Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.

Similar presentations


Presentation on theme: "© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas."— Presentation transcript:

1 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas E. Comer Lecture PowerPoints By Lami Kaya, LKaya@ieee.org

2 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.2 Chapter 20 IP Datagrams And Datagram Forwarding

3 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.3 Topics Covered 20.1 Introduction 20.2 Connectionless Service 20.3 Virtual Packets 20.4 The IP Datagram 20.5 Forwarding An IP Datagram 20.6 IP Addresses And Routing Table Entries 20.7 The Mask Field And Datagram Forwarding 20.8 Destination And Next-Hop Addresses 20.9 Best-Effort Delivery 20.10 The IP Datagram Header Format

4 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.4 20.1 Introduction This chapter discusses the fundamental communication service in an internet describes the format of packets that are sent across an internet discusses how routers process and forward such packets

5 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.5 20.2 Connectionless Service Designers must decide whether to offer –connection-oriented (CO) service –connectionless (CL) service –or both TCP/IP designers chose to include protocols for both CL and CO services –Fundamental delivery service CL –add a reliable CO service that uses the underlying CL service

6 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.6 20.3 Virtual Packets CL internet service is an extension of packet-switching transmit individual packets of data across an internet Each packet travels independently How does a packet pass across an internet? –A router forwards each packet from one NW to another. What format is used for an internet packet? –internet protocol SW defines an internet packet format that is independent of the underlying HW –The result is a universal, virtual packet

7 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.7 20.4 The IP Datagram TCP/IP use the name Datagram for an internet packet. A datagram begins with a header followed by a data –Figure 20.1 illustrates the datagram format The amount of data carried in a datagram is not fixed –The size of a datagram is determined by the application Allowing the size of datagram to vary makes IP adaptable to a variety of applications, in IPv4 –a datagram can contain a single octet of data or at most 64K octets, including the header

8 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.8

9 9 20.5 Forwarding An IP Datagram Each router extracts the destination address (DA) from the header –uses the DA to determine a next hop Routing table (RT) must be initialized when router boots RT must be updated if the topology changes RT contains a set of entries –each specify a DA and the next hop used to reach that DA Figure 20.2 shows a RT in one of three routers

10 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.10

11 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.11 20.6 IP Addresses And Routing Table Entries An actual IP RT is more complex than in Figure 20.2 –Destination field in each entry contains the NW prefix –An additional field in each entry contains an address mask –Address mask specifies which bits correspond to the NW prefix –An IP address is used when the Next-Hop field denotes a router Figure 20.3 illustrates how the RT from Figure 20.2 might appear

12 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.12

13 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.13 20.7 The Mask Field And Datagram Forwarding (1) Using a RT to select a next hop for a given datagram –called “routing” or “forwarding” Mask field in a RT entry is used to extract the NW part of an address during lookup A bit mask representation makes extraction efficient Compute Boolean and (&) of the mask and the datagram DA, D, to examine the i th entry if ( (Mask [i] & D) == Destination [i] ) forward to NextHop [i];

14 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.14 20.7 The Mask Field And Datagram Forwarding (2) As an example, consider a datagram DA is 192.4.10.3 assume the datagram arrives at a router that contains the RT Figure 20.3 illustrates further assume entries in the table searched in order –The first entry fails: because 255.0.0.0 & 192.4.10.3 is not equal to 30.0.0.0 –After rejecting the second and third entries in the RT, chooses next hop 128.1.0.9 because 255.255.255.0 & 192.4.10.3 == 192.4.10.0

15 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.15 20.8 Destination And Next-Hop Addresses When a router receives a datagram, –the router extracts the destination address, D, –and uses it to compute the address of the next router to which the datagram should be sent, N Although the datagram is sent directly to address N –the header in the datagram retains destination address D

16 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.16 20.9 Best-Effort Delivery IP uses the term “best-effort” to describe its services –IP makes a best-effort attempt to deliver each datagram IP does not guarantee that it will handle the problems of: –Datagram duplication –Delayed or out-of-order delivery –Corruption of data –Datagram loss IP is designed to operate over all types of NW HW, –Therefore, the underlying HW may misbehave –Other high-level protocols are required to handle these errors

17 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.17 20.10 The IP Datagram Header Format Figure 20.4 shows the fields of an IP datagram header VERS  a 4-bit protocol version (currently 4 ) H.LEN  a 4-bit datagram header length SERVICE TYPE  field specifies –whether the sender prefers the datagram to travel over a route with “minimal delay” or a route with “maximal throughput” –a router that knows multiple routes can use the value to choose a route TOTAL LENGTH  specifies number of octets: header + the data. TIME TO LIVE (TTL)  used to prevent a datagram from traveling forever around a path that contains a loop –TTL can be set to a value 0 - 255 –Each router that handles the datagram decrements TTL by 1 –If the counter reaches zero, the datagram is discarded and an error message is sent back to the source PADDING  to make header multiple of 32 bits, when needed

18 © 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.18


Download ppt "© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas."

Similar presentations


Ads by Google