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