TCP/IP and the Internet Eytan Modiano Massachusetts Institute of Technology Slide 1
TCP/IP and the Internet Eytan Modiano Massachusetts Institute of Technology Eytan Modiano Slide 1
The TCP/P Protocol Suite Transmission Control Protocol Internet protocol Developed by darPa to connect Universities and Research Labs Four Layer model Applications Telnet, FTP, email, etc Transport TCP, UDP Network IP ICMP, IGMP Link Device drivers interface cards TCP.Transmission Control protocol UDP-User Datagram Protocol IP-Internet Protocol Slide 2
The TCP/IP Protocol Suite • Transmission Control Protocol / Internet Protocol • Developed by DARPA to connect Universities and Research Labs Four Layer model Telnet, FTP, email, etc. TCP, UDP IP, ICMP, IGMP �Device drivers, interface cards TCP - Transmission Control Protocol UDP - User Datagram Protocol IP - Internet Protocol Applications Transport Network Link Eytan Modiano Slide 2
iP addresses 32 bit address written as four decimal numbers One per byte of address (e. g, 155 34.60 112) Hierarchical address structure Network iD/ Host ID/ Port iD Complete address called a socket Network and host id carried in IP Header Port ID (sending process)carried in TCP header iP Address classes 0 Net ID Host ID Class A Nets 16 10 Net ID Host iD 110 Net ID Host D Class C Nets Class d is for multicast traffic
IP addresses • 32 bit address written as four decimal numbers – One per byte of address (e.g., 155.34.60.112) • Hierarchical address structure – Network ID/ Host ID/ Port ID – Complete address called a socket – Network and host ID carried in IP Header – Port ID (sending process) carried in TCP header • IP Address classes: 8 32 Class A Nets 16 32 Class B Nets 24 32 Net ID Host ID 110 Class C Nets Class D is for multicast traffic 0 Net ID Host ID 10 Net ID Host ID Eytan Modiano Slide 3
Host Names Each machine also has a unique name Domain name System: a distributed database that provides a mapping between IP addresses and Host names E.g., 155.34.50.112=> plymouth. mit edu Slide 4
Host Names • Each machine also has a unique name • Domain name System: A distributed database that provides a mapping between IP addresses and Host names • E.g., 155.34.50.112 => plymouth.ll.mit.edu Eytan Modiano Slide 4
Internet Standards Internet Engineering Task Force(IETF Development on near term internet standards pen body Meets 3 times a year Request for Comments(RFCs) Official internet standards AvailablefromIeTfwebpagehttp:/www.ietf.org Slide 5
Internet Standards • Internet Engineering Task Force (IETF) – Development on near term internet standards – Open body – Meets 3 times a year • Request for Comments (RFCs) – Official internet standards – Available from IETF web page: http://www.ietf.org Eytan Modiano Slide 5
The Internet Protocol (IP) Routing of packet across the network Unreliable service Best effort delivery Recovery from lost packets must be done at higher layers Connectionless Packets are delivered (routed )independently Can be delivered out of order Re-sequencing must be done at higher layers · Current version v4 Future v6 Add more addresses(40 byte header!) Ability to provide Qos Slide 6
The Internet Protocol (IP) • Routing of packet across the network • Unreliable service – Best effort delivery – Recovery from lost packets must be done at higher layers • Connectionless – Packets are delivered (routed) independently – Can be delivered out of order – Re-sequencing must be done at higher layers • Current version V4 • Future V6 – Add more addresses (40 byte header!) – Ability to provide Q oS Eytan Modiano Slide 6
Header Fields in IP Header Ver length type of servic Total length(bytes) 16-bit identification Flags13-bit fragment offset TTL Protocol Header checksum Source P Address Destination P Address Options(if any) Data Note that the minimum size header is 20 bytes; TCP also has 20 byte header
Header Fields in IP 1 4 8 16 Protocol Note that the minimum size header is 20 bytes; TCP also has 20 byte header Ver Header length type of service Total length (bytes) 16 - bit identification Flags 13 - bit fragment offset TTL Header Checksum Source IP Address Destination IP Address Options (if any) Data Eytan Modiano Slide 7 32
IP HEADER FIELDS Vers Version of IP (current version is 4) HL. Header Length in 32-bit words Service: Mostly Ignored Total length Length of IP datagram Unique datagram ID ° Flags NoFrag more FragOffset: Fragment offset in units of 8 Octets Time to live in"seconds"or Hops Protocol: Higher layer protocol Id HDR Cksum: 16 bit 1,s complement checksum (on header only!) sa da: network addresses Options: Record Route, Source Route, Time Stamp
IP HEADER FIELDS • Vers: Version # of IP (current version is 4) • HL: Header Length in 32-bit words • Service: Mostly Ignored • Total length Length of IP datagram • ID Unique datagram ID • Flags: NoFrag, More • FragOffset: Fragment offset in units of 8 Octets • TTL: Time to Live in "seconds” or Hops • Protocol: Higher Layer Protocol ID # • HDR Cksum: 16 bit 1's complement checksum (on header only!) • SA & DA: Network Addresses • Options: Record Route,Source Route,TimeStamp Eytan Modiano Slide 8
IP Routing Routing table at each node contains for each destination the next hop router to which the packet should be sent Not all destination addresses are in the routing table Look for net id of the destination "Prefix match Use default router Routers do not compute the complete route to the destination but only the next hop router P uses distributed routing algorithms: RIP, OSPF In a lan, the"host computer sends the packet to the default router which provides a gateway to the outside world Slide 9
IP Routing • Routing table at each node contains for each destination the next hop router to which the packet should be sent – Not all destination addresses are in the routing table Look for net ID of the destination “Prefix match” Use default router • Routers do not compute the complete route to the destination but only the next hop router • IP uses distributed routing algorithms: RIP, OSPF • In a LAN, the “host” computer sends the packet to the default router which provides a gateway to the outside world Eytan Modiano Slide 9
Subnet addressing Class a and b addresses allocate too many hosts to a given net Subnet addressing allows us to divide the host ID space into smaller“ sub networks Simplify routing within an organization Smaller routing tables Potentially allows the allocation of the same class B address to more than one organization 32 bit subnet "Mask" is used to divide the host id field into subnets <1 denotes a network address field 0 denotes a host id field 16 bit net id 16 bit host id Class b Address 252 140 Subnet ID Host ID Mask 1111111111111111111111100000000 Slide 10
Subnet addressing • Class A and B addresses allocate too many hosts to a given net • Subnet addressing allows us to divide the host ID space into smaller “sub networks” – Simplify routing within an organization – Smaller routing tables – Potentially allows the allocation of the same class B address to more than one organization • 32 bit Subnet “Mask” is used to divide the host ID field into subnets – “1” denotes a network address field – “0” denotes a host ID field 16 bit net ID 16 bit host ID Class B Address Mask 111111 111 1111111 11111111 00000000 140.252 Subnet ID Host ID Eytan Modiano Slide 10