Intro to TCPIP The OSI Model TCPIP What

  • Slides: 20
Download presentation
Intro to TCP/IP The OSI Model TCP/IP What Net+OS Provides TCP, UDP, and IP

Intro to TCP/IP The OSI Model TCP/IP What Net+OS Provides TCP, UDP, and IP details HTML basics

Layers of the OSI Model Application Presentation Session Transport Network Datalink Physical End-user layer,

Layers of the OSI Model Application Presentation Session Transport Network Datalink Physical End-user layer, provides semantics Isolates data representation differences Session setup/teardown Data exchange, connection/~connection Routing, flow/congestion control Reliable data xfer between adjacent nodes Physical Transmission

TCP/IP • A full suite of protocols spanning layers 2 (Datalink) through 7 (Application)

TCP/IP • A full suite of protocols spanning layers 2 (Datalink) through 7 (Application) • Informally named for “Transmission Control Protocol” (Layer 4 - Transport) and “Internet Protocol” (Layer 3 Network), it is comprised of many protocols

MAJOR Layer Associations Datalink • ARP (Address Resolution Protocol) • RARP (Reverse ARP) •

MAJOR Layer Associations Datalink • ARP (Address Resolution Protocol) • RARP (Reverse ARP) • IARP (Inverse ARP)

MAJOR Layer Associations Network • IP (Internet Protocol) • IPv 6 (IP Version 6)

MAJOR Layer Associations Network • IP (Internet Protocol) • IPv 6 (IP Version 6) • ICMP/ICMPv 6 (Internet Control Message Protocol – e. g. , “ping”) • RIPv 6 (Routing Information Protocol) • OSPF (Open Shortest Path First) • Others… (Only underlined protocols will be discussed further. )

MAJOR Layer Associations Transport • TCP (Transmission Control Protocol) – Reliable, insequence delivery of

MAJOR Layer Associations Transport • TCP (Transmission Control Protocol) – Reliable, insequence delivery of data, connection oriented • UDP (User Datagram Protocol) – Connectionless, delivery and sequence not guaranteed • RUDP (Reliable UDP) • BGP (Border Gateway Protocol) • Others… (Only underlined protocols will be discussed further. )

MAJOR Layer Associations Session • DNS (Domain Name Service) • LDAP (Lightweight Directory Access

MAJOR Layer Associations Session • DNS (Domain Name Service) • LDAP (Lightweight Directory Access Protocol) • Others… Presentation • LPP (Lightweight Presentation Protocol) (Only underlined protocols will be discussed further. )

MAJOR Layer Associations Application • FTP (File Transfer Protocol) • SNMPv. X (Simple Network

MAJOR Layer Associations Application • FTP (File Transfer Protocol) • SNMPv. X (Simple Network Management Protocol, versions 1 -3) • POP 3 (Post Office Protocol, version 3) • SMTP (Simple Mail Transfer Protocol) • Telnet • DHCP (Dynamic Host Configuration Protocol) • HTTP (Hyper. Text Transfer Protocol) • Others… (Only underlined protocols will be discussed further. )

Net+OS Provides… Transport • TCP (thru Sockets) • UDP (thru Sockets/Fast Sockets & “Fast

Net+OS Provides… Transport • TCP (thru Sockets) • UDP (thru Sockets/Fast Sockets & “Fast IP”) Session • DNS Application • DHCP • Telnet Client • SNMP Agent • HTTP/Advanced Web Servers • FTP Client & Server • Email (POP 3/SMTP) Clients

Noteworthy Digression… Datalink Although it’s not part of the Internet Suite, Net+OS also provides…

Noteworthy Digression… Datalink Although it’s not part of the Internet Suite, Net+OS also provides… • PPP (Point-to-Point Protocol)

UDP in Practice • • Connectionless protocol Delivery and sequence not guaranteed “Rides on”

UDP in Practice • • Connectionless protocol Delivery and sequence not guaranteed “Rides on” IP Header fields in Network Byte Order (memory order in Big. Endian processors) • Packet (datagram) format: 0 16 Source Port (16 bits) Length (16 bits) Payload (varies) 32 Destination Port (16 bits) Checksum (16 bits)

About that Checksum… // Compute "1's complement of 16 -bit 1's complement sum" unsigned

About that Checksum… // Compute "1's complement of 16 -bit 1's complement sum" unsigned short IPCheck. Sum(unsigned short* buffer, int size) { unsigned long ip. Cksum = 0; // Add all words, taking care of leftover octet while (size > 1) { ip. Cksum += *buffer++; size -= sizeof(unsigned short); } if (size) { ip. Cksum += *(unsigned char *)buffer; } ip. Cksum = (ip. Cksum >> 16) + (ip. Cksum & 0 xffff); ip. Cksum += (ip. Cksum >> 16); // Return the bitwise complement return (unsigned short)(~ip. Cksum); }

TCP in Practice • • • Connection-oriented In-sequence delivery guaranteed “Rides” on IP Header

TCP in Practice • • • Connection-oriented In-sequence delivery guaranteed “Rides” on IP Header Fields in Network Byte Order Packet format: 0 16 32 Source Port (16) Destination Port (16) Sequence Number of First Data Octet (32) Next Expected Ack Number (32) Ofst(4) Rsvd(6) Flags(6) Window (16) Checksum (16) Urgent Data Pointer (16) Options + Pad (varies) Payload (varies)

TCP Header Fields Explained • Ofst - Data offset/length of header in 32 -bit

TCP Header Fields Explained • Ofst - Data offset/length of header in 32 -bit words • Rsvd - Reserved • Flags – – – Urgent Data Pointer Significant (URG) Ack Field Significant (ACK) Reset Connection (RST) Push Function (PSH) – prompt forwarding Synchronize Sequence Numbers (SYN) – seq # is initial No More Data (FIN) • Window - number of octets sender will accept • Option - one octet OR one octet type + one octet length + n octets option information

IPv 4 in Practice • Header fields in Network Byte Order • Capable (when

IPv 4 in Practice • Header fields in Network Byte Order • Capable (when allowed) of fragmentation and reassembly • Packet (datagram) format: 0 16 32 Ver (4) IHL(4) Service(8) Total Length (bytes) (16) CF(3) Fragment Offset (13) Identification (16) TTL(8) Protocol (8) Header Checksum (16) Source IP Address (32) Destination IP Address (32) Options + Padding Data (e. g. , TCP Packet) (varies)

IP Header Fields Explained • • • Ver – version of IP IHL –

IP Header Fields Explained • • • Ver – version of IP IHL – Internet Header Length (32 -bit words) Service – Precedence/Delay/Throughput/Reliability Identification – assistance in reassembling fragments CF – control flags: – Reserved – 1 to prevent fragmentation, else 0 – 1 if last fragment, else 0 • Fragment Offset – of this fragment in total message, bytes • TTL – Time to Live, upper limit of life enroute • Protocol – next higher protocol, e. g. , TCP, UDP or ICMP

HTML Basics

HTML Basics

Html Overview <html> <head> <title>This is a title</title> </head> <body> This is some text

Html Overview <html> <head> <title>This is a title</title> </head> <body> This is some text </body> </html>

Things to Notice • • • Language is tag based All tags have a

Things to Notice • • • Language is tag based All tags have a “begin” tag All tags have an “end” tag File must begin with <html> File must end with </html> Can get into all sorts of trouble (opportunities)

Linking pages <a href={“referenced page”}>text</a> ***notice the “begin” and “end” tags Concrete example: Three

Linking pages <a href={“referenced page”}>text</a> ***notice the “begin” and “end” tags Concrete example: Three files, test 1. htlm, test 2. html, test 3. html To be display in that order Test 1. html must contain the following: <a>href=“test 2. html”>next</a> Test 2. html must contain the following: <a>href=“test 1. html”>previous</a> <a>href=“test 3. html”>next</a> Test 3. html must contain the following: <a>href=test 2. html>previous</a>