Presentation is loading. Please wait.

Presentation is loading. Please wait.

IP. Orientation 2 IP (Internet Protocol) is a Network Layer Protocol. IP’s current version is Version 4 (IPv4). It is specified in RFC 891.

Similar presentations


Presentation on theme: "IP. Orientation 2 IP (Internet Protocol) is a Network Layer Protocol. IP’s current version is Version 4 (IPv4). It is specified in RFC 891."— Presentation transcript:

1 IP

2 Orientation 2 IP (Internet Protocol) is a Network Layer Protocol. IP’s current version is Version 4 (IPv4). It is specified in RFC 891.

3 IPv4 Address Model ClassNetwork IDHost ID# of Addresses # of Networks A0 + 7 bit24 bit2 24 -2126 B10 + 14 bit16 bit65,536 - 22 14 C110 + 21 bit8 bit256 - 22 21 D1110 + Multicast AddressIP Multicast EFuture Use 0Network (7 bits) Network (14 bits) 110 10 Network (21 bits) Host (24 bits) Host (16 bits) Host (8 bits) Class A: Class B: Class C:

4 IP: The waist of the hourglass 4 IP is the waist of the hourglass of the Internet protocol architecture Multiple higher-layer protocols Multiple lower-layer protocols Only one protocol at the network layer.

5 Application protocol 5 IP is the highest layer protocol which is implemented at both routers and hosts

6 IP Service 6 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 packets  Connectionless: Each packet (“datagram”) is handled independently. IP is not aware that packets between hosts may be sent in a logical sequence  Best effort: IP does not make guarantees on the service (no throughput guarantee, no delay guarantee,…)

7 IP IP is connectionless in the end-to-end delivery  Data delivered in datagrams (packets / frames), each with a header Combines collection of physical networks into single, virtual network Transport protocols use this connectionless service to provide connectionless data delivery (UDP) and connection-oriented data delivery (TCP)

8 IP is Best Effort Delivery IP provides service equivalent to LAN Does not guarantee to prevent  Duplicate datagrams  Delayed or out-of-order delivery  Corruption of data  Datagram loss Reliable delivery provided by transport layer Network layer - IP - can detect and report errors without actually fixing them

9 IP Problems Higher layer protocols have to deal with losses or with duplicate packets Packets may be delivered out-of-sequence

10 IP Service 10 IP supports the following services:  one-to-one (unicast)  one-to-all (broadcast)  one-to-several(multicast) IP multicast also supports a many-to-many service. IP multicast requires support of other protocols (IGMP, multicast routing) unicast broadcast multicast

11 The IP Datagram Formally, the unit of IP data delivery is called a datagram Includes header area and data area Datagrams can have different sizes  Header area usually fixed (20 octets) but can have options  Data area can contain between 1 octet and 65,535 octets (2 16 - 1)  Usually, data area much larger than header

12 Forwarding Datagrams The header contains all the information needed to deliver a datagram to a destination computer  Destination address  Source address  Identifier  Other delivery information Routers examine the header of each datagram and forwards the datagram along a path to the destination  Use routing table to compute next hop  Update routing tables using algorithms previously discussed  Link state, distance vector, manually

13 IP Datagram Format 13 20 bytes ≤ Header Size < 2 4 x 4 bytes = 60 bytes 20 bytes ≤ Total Length < 2 16 bytes = 65536 bytes

14 IP Datagram Format 14 Transmission is row by row  For each row: 1. First transmit bits 0-7 2. Then transmit bits 8-15 3. Then transmit bits 16-23 4. Then transmit bits 24-31 Note: Many computers (incl. Intel processors) store 32-bit words in little endian format. Others (incl. Motorola processors) use big endian. This is called network byte order (LE or BE) "Big Endian" means that the high-order byte of the number is stored in memory at the lowest address, and the low-order byte at the highest address. 0x1234:  BE: 12 34 LE: 34 12

15 Maximum Transmission Unit 15 Maximum size of IP datagram is 65535, but the data link layer protocol generally imposes a limit that is much smaller Example:  Ethernet frames have a maximum payload of 1500 bytes  IP datagrams encapsulated in Ethernet frame cannot be longer than 1500 bytes The limit on the maximum IP datagram size, imposed by the data link protocol is called maximum transmission unit (MTU) MTUs for various data link protocols: Ethernet: 1500FDDI:4352 802.3:1492ATM AAL5: 9180 802.5: 4464PPP: negotiated

16 Datagram Lifetime Datagrams could loop indefinitely  Consumes resources  Transport protocol may need upper bound on datagram life Datagram marked with lifetime  Time To Live field in IP  Once lifetime expires, datagram discarded (not forwarded)  Hop count  Decrement time to live on passing through a each router  Time count  Need to know how long since last router

17 IP Fragmentation 17 MTUs: FDDI: 4352 Ethernet: 1500 Fragmentation: IP router splits the datagram into several datagram Fragments are reassembled at receiver What if the route contains networks with different MTUs? Or exceeds?

18 Where is Fragmentation done? 18  Fragmentation can be done at the sender or at intermediate routers  The same datagram can be fragmented several times.  Reassembly of original datagram is only done at destination hosts

19 IP Fragmentation and Reassembly ID =x offset =0 moreflag =0 length =4000 ID =x offset =0 moreflag =1 length =1500 ID =x offset =1480 moreflag =1 length =1500 ID =x offset =2960 moreflag =0 length =1040 One large datagram becomes several smaller datagrams

20 Fragmenting Fragments A fragment may encounter a subsequent network with even smaller MTU  Router fragments the fragment to fit  Resulting (sub)fragments look just like original fragments (except for size)  No need to reassemble hierarchically; (sub)fragments include position in original datagram

21 Dealing with Failure Re-assembly may fail if some fragments get lost Need to detect failure Re-assembly time out  Assigned to first fragment to arrive  If timeout expires before all fragments arrive, discard partial data

22 Error Control Not guaranteed delivery Router should attempt to inform source if packet discarded  e.g. for time to live expiring Source may modify transmission strategy May inform high layer protocol Datagram identification needed Destination doesn’t ACK or NAK if checksum fails, no retries, best-effort like Ethernet


Download ppt "IP. Orientation 2 IP (Internet Protocol) is a Network Layer Protocol. IP’s current version is Version 4 (IPv4). It is specified in RFC 891."

Similar presentations


Ads by Google