IP-The Internet ProtocolIP -The Internet ProtocolBased on the slides of Dr Jorg Liebeherr University of VirginiaBased on the slides of Dr. Jorg Liebeherr, University of VirginiaOrientation IP (Internet Protocol) is a Network Layer Protocol.IP: The waist of the hourglass gIP is the waist ofIP is the waist of the hourglass of the InternetApplications HTTP FTP SMTP the Internet protocol architectureTCP UDP IP a c tectu eMultiple higherlayerData link layer protocolsMultiple higher-layer protocolsMlil llpPhysical layer protocols Multiple lower-layer protocolsNetwork Layer Protocol y IP is the highest layer protocol which is implemented at both routers and hostsIP Service Delivery service of IP is minimal IP provide provides an unreliable connectionless best effort service (also called: “datagram service”). Unreliable: IP does not make an attempt to recover lost packetspp Connectionless: Each packet (“datagram”) is handled independently. IP is not aware that packets between hosts may be sent in a logical sequenceBest effort:IP does not make guarantees on the service (noBest effort: IP does not make guarantees on the service (no throughput guarantee, no delay guarantee,…) Consequences:Consequences: • Higher layer protocols have to deal with losses or with duplicate packets• Packets may be delivered out-of-sequenceIP Service IP supports the following services:one-to-one(unicast)onetoone (unicast) one-to-all (broadcast) one-to-several (multicast)unicastbroadcastmulticast IP multicast also supports a many-to-many service. broadcastmulticast IP multicast requires support of other protocols (IGMP, multicast routing)IP AddressesIP Addresses IP is a network layer - it must be ycapable of providing communication between hosts on different kinds of networks (different data-link implementations). The address must include information about what network the receiving host is on. This is what makes routing feasible.gIP AddIP Addresses IP addresses are logical addresses (not physical) 32 bits.IPv4 (version 4) Includes a network ID and a host ID. Every host must have a unique IP address.IP dd i d b ICANNIP addresses are assigned by ICANN(Internet Corporation for Assigned Names and Numbers).IP Address as a 32-Bit Binary NumberBinary and Decimal ConversionyClasses of Network IPClasses of Network IP AddressesIP Addresses as DecimalIP Addresses as Decimal NumbersNetwork IDs and Broadcast AddressesAn IP address such as 176.10.0.0 that has all binary 0s in ythe host bit positions is reserved for the network address.An IP address such as 176.10.255.255 that has all binary 1s in the host bit positions is reserved for the broadcast addressaddress. Private AddressesSubnetworksTo create a subnet address, a network administrator borrows bits from the original host portion and designates them as the subnet field.SubnetworksIP Datagram FormatgECNversionheaderlengthDS total length (in bytes)bit # 0 15 23 24831716MDIdentification Fragment offsetsource IP addresstime-to-live (TTL) protocol header checksum0MFDFsource IP addressdestination IP addressoptions (0 to 40 bytes)payload 20 bytes ≤ Header Size <24x 4 bytes = 60 bytes20 b t≤TtlL th<216b t 65536 b t4 bytes20 bytes ≤Total Length<216 bytes = 65536 bytesIP Datagram Formatg Question: In which order are the bytes of an IP datagram transmitted?g Answer: Transmission is row by rowFor each row:For each row:1. First transmit bits 0-72. Then transmit bits 8-153. Then transmit bits 16-234 Then transmit bits 24314. Then transmit bits 24-31 This is called network byte order or big endian byte ordering. Note: Many computers (incl. Intel processors) store 32-bit words in little endian format Others (incl Motorolawords in little endian format. Others (incl. Motorola processors) use big endian.Big endian vs. small endiang• Conventions to store a multibyte work•Example: a 4 byte Long IntegerByte3 Byte2 Byte1 Byte0Little EndianSt th ldbt tBig EndianSt th hi hdbt t•Example: a 4 byte Long Integer Byte3 Byte2 Byte1 Byte0Stores the low-order byte at the lowest address and the highest order byte in the highest addressStores the high-order byte at the lowest address, and the low-order byte at the highest addresshighest address. Base Address+0 Byte0 Base Address+1 Byte1 Base Address+2 Byte2address. Base Address+0 Byte3 Base Address+1 Byte2 Base Address+2 Byte1Base Address+2 Byte2 Base Address+3 Byte3 Intel processors use this orderBase Address+2 Byte1 Base Address+3 Byte0Motorola processors use big endianIntel processors use this orderMotorola processors use big endian.Fields of the IP HeaderVersion (4 bits):current version is 4 next version will be 6Version (4 bits):current version is 4, next version will be 6. Header length (4 bits): length of IP header, in multiples of 4 bytes DS/ECN field (1 byte) This field was previously called as Type-of-Service (TOS) field. The role of this field has been re-defined but is“backwards compatible”role of this field has been redefined, but is backwards compatible to TOS interpretation Differentiated Service (DS) (6 bits):Used to specify service level (currently not supported in the Internet)Used to specify service level (currently not supported in the Internet) Explicit Congestion Notification (ECN) (2 bits): New feedback mechanism used by TCPFields of the IP Header Identification (16 bits): Unique identification of a datagram from a host. Incremented whenever a datagram is transmitted Flags (3 bits): First bit always set to 0 DF bit (Do not fragment) MF bit (More fragments) Will be explained laterÆFragmentationWill be explained laterÆFragmentationFields of the IP Header Time To Live (TTL) (1 byte): Specifies longest paths before datagram is dropped Role of TTL field: Ensure that packet is eventually dropped when a routing loop occursoccursUsed as follows:Sender sets the value (e g 64)Sender sets the value (e.g., 64) Each router decrements the value by 1Wh th l h 0 th d t iWhen the value reaches 0, the datagram is droppedFields of the IP Header Protocol (1 byte):Specifies the higher-layer protocolSpecifies the higherlayer protocol. Used for demultiplexing to higher layers. Header checksum (2 bytes): A simple 16-bit long checksum which is computed for the header of the datagram.Fields of the IP Header
View Full Document