Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding.

Similar presentations


Presentation on theme: "CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding."— Presentation transcript:

1 CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding

2 Introduction Communication using IP datagrams is the fundamental Internet communication service. To better understand this facility, we must examine the format of IP datagram packets, and consider the processing of datagrams by routers, including forwarding of packets, and delivery to the final destination.

3 IP is Connectionless The end-to-end delivery service is connectionless. This is an extension of a LAN abstraction, with universal addressing, and data delivered in packets (frames), each with a header. It combines a collection of physical networks into a single, virtual network. Transport protocols use this connectionless service to provide connectionless data delivery (UDP) and connection-oriented data delivery (TCP).

4 Virtual Packets Packets server the same purpose in internet as do frames on a LAN. Each packet has a header. Routers (formerly gateways) forward packets between physical networks. Packets have a uniform, hardware-independent format that includes a header and data field, and cannot use a format dependent on any particular network hardware. IP packets are encapsulated in hardware frames for delivery across each physical network.

5 IP Datagram Format Formally, the unit of IP data delivery is called a datagram. It includes a header area and a data area. Datagrams can have different sizes. The header area is usually fixed (20 octets), but can have options. The data area can contain between 1 and 65,535 (2 16 - 1) octets. Usually, the data area is much larger than the header.

6 Forwarding Datagrams The IP header contains all the information needed to deliver a datagram to the destination computer : destination address source address identifier It includes some additional delivery information, and some optional processing action information. A router examines the header of each datagram and forwards it along a path to the destination.

7 The Routing Table For efficiency, information about forwarding is stored by each router in a routing table. It is initialized at system initialization time. It must be updated as the network topology changes. The routing table contains a list of destination networks and the next hop for each destination. (a) Example internet (b) Conceptual table found in router R 2

8 Default Routes The routing table is kept small by listing destination networks rather than individual hosts. Its size can be further reduced by using default routes. A default route entry is used if the destination network is not explicitly listed in the routing table. E.g., UNOmaha uses default routes for most off-campus networks.

9 Routing Tables and Address Masks In practice, additional information is kept in the routing table. The destination is stored as a network address The next hop is stored as an IP address of the next router. The address mask defines how many bits of address are in the prefix : Prefix defines how much of an address used to identify the network. For example, a class A mask is 255.0.0.0 This feature is used for subnetting (logically subdividing a large internet into smaller networks).

10 Address Mask Example (a) An internet with four networks and three routers. (b) Routing table in the center router. The addresses shown in the ‘destination’ column are masked (and’ed) with the value in the ‘mask’ column to yield the network number; the ‘next hop’ column identifies the complete IP address of a router, or direct delivery indication.

11 Using an Address Mask To identify the destination network, apply each address mask (Mask) to the datagram’s destination address (D) and compare that to the corresponding Destination network address (Dest) in the routing table. Can use Boolean and operation: if ((Mask[i] & D) == Dest[i]) then forward to NextHop[i] Consider 128.1.15.26 (in the center router):

12 Forwarding, Destination Address and Next-hop Address The Destination address in an IP datagram is always the ultimate destination. A router looks up the next-hop address and forwards the datagram. The network interface layer takes two parameters: an IP datagram, and the next-hop address. The next-hop address never appears in a forwarded IP datagram.

13 Best-effort Delivery IP provides a service equivalent to that of a LAN. It does not guarantee to prevent duplicate datagrams, delayed or out-of-order delivery, corruption of data, or datagram loss. Reliable delivery is provided by the transport layer. The network layer - IP - can detect and report errors without actually fixing them. The network layer focuses on datagram delivery. The application layer is not interested in differentiating among delivery problems at intermediate routers.

14 IP Datagram Header Format

15 IP Datagram Header Fields VERS - version of IP (currently 4) H. LEN - header length (in units of 32 bits) SERVICE TYPE - sender's preference for priority, low latency, high reliability (rarely used) TOTAL LENGTH - total octets in datagram IDENT, FLAGS, FRAGMENT OFFSET - used with fragmentation TTL - time to live; decremented in each router; datagram discarded when TTL = 0 TYPE - type of protocol carried in datagram; e.g., TCP, UDP HEADER CHECKSUM - 1s complement of 1s complement sum SOURCE, DEST IP ADDRESS - IP addresses of original source and ultimate destination

16 IP Datagram Options Several options can be added to the IP header: Record route – each router puts its address in the header, replacing a free slot in the options area. Source route – specifies the exact or approximate route the datagram is to take (i.e., which routers are to forward it). Timestamp – each router puts the time in a free slot in the options area. A header with no options has H. LEN field value of 5; the data begins immediately after the DESTINATION IP ADDRESS. Options are added between the DESTINATION IP ADDRESS and data in multiples of 32 bits (with padding added if necessary to round up to a 32-bit multiple). A header with 96 bits of options has H. LEN field value 8.

17 Summary The basic unit of delivery used in the TCP/IP protocol suite is IP datagram. Routers use the destination address in an IP datagram header to determine the next-hop address. Forwarding information stored in a routing table in each router. The IP datagram header has 40 octets of fixed field information, with additional octets added for options.


Download ppt "CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding."

Similar presentations


Ads by Google