Dr. John P. Abraham Professor UTPA

Slides:



Advertisements
Similar presentations
Chapter 20 Network Layer: Internet Protocol
Advertisements

CE363 Data Communications & Networking Chapter 7 Network Layer: Internet Protocol.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 - The Internet Protocol Version 4
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Internet Protocol (IP)
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Internet Protocol Version4.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Dr. John P. Abraham Professor UTPA
Internet Protocol --- Connectionless Datagram Delivery Linda Wu (CMPT )
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ECE 4110 – Internetwork Programming IP Protocol. 2 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Position of IP in TCP/IP Protocol Suite.
Network Layer: Internet Protocol.
Chapter 19 Network Layer Protocols Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 21 Internetworking Part 2 (Datagram Encapsulation, Transmission, Fragmentation, Reassembly)
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.
CS 4396 Computer Networks Lab
Chapter 20 Network Layer: Internet Protocol
Chapter 21 IP Encapsulation, Fragmentation, and Reassembly.
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Chapter 8 Internet Protocol (IP)
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Internet Protocol Version4.
IPv4 IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. Datagram Fragmentation Checksum Options Topics.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 Network Layer Protocols
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
IP - The Internet Protocol
Computer Networks and Internets, 5e By Douglas E. Comer
Chapter 8: Internet Protocol (IP)
IP - The Internet Protocol
Internet Protocol Version4
Chapter 20 Network Layer: Internet Protocol
Internet Protocol Version4
IP - The Internet Protocol
IP : Internet Protocol Surasak Sanguanpong
IP Encapsulation, Fragmentation, and Reassembly
Chapter 20 Network Layer: Internet Protocol
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
Net 323 D: Networks Protocols
IP - The Internet Protocol
Chapter 7 Internet Protocol Version 4 (IPv4)
Internet Protocol (IP)
ITIS 6167/8167: Network and Information Security
IP - The Internet Protocol
NET 323D: Networks Protocols
Presentation transcript:

Dr. John P. Abraham Professor UTPA 22-Datagram Forwarding Dr. John P. Abraham Professor UTPA

Figure 8.1 Position of IP in TCP/IP protocol suite

Virtual Packets Virtual means that the packet is not bound to a particular hardware. Connectionless service allows a sender to transmit individual packets across the internet. Source computer sends the packet with the destination address to its router. The router extracts the destination address and selects the best path next router. The last router sends it to the destination machine. Internet protocol defines a packet format that is independent of the underlying hardware.

IP datagram Header and payload The amount of data carried in a datagram is not fixed. The size of the datagram is determined by the application that sends data. In v4 It can contain as little as single octet of data or maximum of 64K octets, including the header. The size of the header is fixed.

Figure 8.2 IP datagram VER-VERSION C OR VER 6 HLEN – COULD BE FROM 20 TO 60 BYTES, DEFAULT 20 DS (SERVICE TYPE OR DIFFERENTIAL SERVICE) OUT OF 8 BITS 3 BITS (ms) USED FOR PRECEDENCE (PRIORITY IN CASE OF CONGESTION), remaining 4 out of 5 bits are used to indicate type of service: normal, minimize cost, maximize reliability, maximize throughput and minimize delay (only one bit can be on at a time 0000 0001 0010 0100 1000), last bit of the 8 bit is not used. See p. 182 for specific examples.

IP header format 4bit version number 4-bit header length. Number of 32-bit quantities in the header. Default value is 5. You need to multiply this value by 4 to get bytes. 8-bit service type (differentiates services), originally it was called type of service (TOS). Even though changed to handle codepoint, it still is backward compatible. See below. the first 6 bits make up the codepoint the other two not used (used in traffic management QOS). When the 3 right-most bits are 0s, the 3 left-most bits are interpreted as the TOS for backward comparibility. It is called the precedence bits, defining priority of the datagram from 0 to 7, in issues such as congestion. Datagrams with lowest priority are discarded first. When the rightmost 3 bits are not 0s, all six bits define 56 service based on the priority assignment.

Table 8.1 Types of service

IP header continued. 16bits-total length. Header plus data in bytes. Total length is limited to 216-1 or 65,535. The header can be 20 to 60 bytes long, rest can be data. 16bits identification. Used in fragmentation. Explained later. 3bits flags. Used in fragmentation. 13bits fragmentation offset. Used in fragmentation. 8bits TTL. Value is approximately two times the maximum number of routers between any two hosts. Each router will decrement it by one. On zero the packet is discarded. Different default values for different implementations of operating system. TCP generally has TTL of 64, UDP 30, Windows use 32, 64 or 128 depending on the version.

IP header continued 8 bits protocol. 16-bits header checksum Source address 32bits Destination address 32 bits. Options and padding 0 to 40 bytes.

Example 1 An IP packet has arrived with the first 8 bits as shown: 01000010 The receiver discards the packet. Why? Solution There is an error in this packet. The 4 left-most bits (0100) show the version, which is correct. The next 4 bits (0010) show the header length; which means (2 × 4 = 8), which is wrong. The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission.

Example 2 In an IP packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet? Solution The HLEN value is 8, which means the total number of bytes in the header is 8 × 4 or 32 bytes. The first 20 bytes are the base header, the next 12 bytes are the options.

Example 3 In an IP packet, the value of HLEN is 516 and the value of the total length field is 002816 . How many bytes of data are being carried by this packet? Solution The HLEN value is 5, which means the total number of bytes in the header is 5 × 4 or 20 bytes (no options). The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 − 20).

Example 4 An IP packet has arrived with the first few hexadecimal digits as shown below: 45000028000100000102 . . . How many hops can this packet travel before being dropped? The data belong to what upper layer protocol? Solution To find the time-to-live field, we skip 8 bytes (16 hexadecimal digits). The time-to-live field is the ninth byte, which is 01. This means the packet can travel only one hop. The protocol field is the next byte (02), which means that the upper layer protocol is IGMP.

Forwarding an IP datagram Next hop forwarding. Each router extracts the destination address, determines the next hop from the table and forwards to the next hop. Take a look at a table on page 367, fig 22.3

Best effort delivery IP makes a best effort to deliver each datagram, but does not guarantee delivery. The following are accepted problems of IP: Datagram duplication Delayed or out of order delivery Corruption of data Datagram los Many of these problems can be solved by using TCP along with IP

IP encapsulation and fragmentation The format and size of a frame depend on the protocol used by the physical network. A datagram may have to be fragmented to fit the protocol regulations. The topics discussed in this section include: Maximum Transfer Unit (MTU) Fields Related to Fragmentation

Network hardware treats a frame that contains a datagram like any other frame MTU How does a receiver know whether the payload of an incoming fram contains an IP datagram or other data? The sender and receiver must agree on the value used in the frame type field. See page 372 fig 22.5 that explains how a datagram travels through the internet.

Table 8.5 MTUs for some networks

Fragmentation When a datagram is larger than the MTU of the network, the router divides the datagram into smaller pieces. The flags field of the header indicates if the datagram is a fragment. The fragment offset is needed to place the fragment into the appropriate part of the whole original datagram.

Figure 8.7 Flags field

Fragmentation Offset This 13 bit filed shows the relative position of this fragment with respect to the whole datagram. The offset of data in the original datagram measured in units of 8 bytes. Suppose we have an original datagram of 4000 bytes numbered from 0 to 3999. The first offset is 0. If the fragment has 1400 bytes, the second offset is 1400, and the third is 2800. In order to fit in the offset field we divide each offset by 8. so we place 0 in the first, 175 in the second and 350 in the third. When a router make fragments, it is forced choose the offset of each fragment to be divisible by 8. Fragments can also be further fragmented.

Figure 8.8 Fragmentation example

Figure 8.9 Detailed fragmentation example

Example 5 A packet has arrived with an M bit value of 0. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented? Solution If the M bit is 0, it means that there are no more fragments; the fragment is the last one. However, we cannot say if the original packet was fragmented or not. A nonfragmented packet is considered the last fragment.

Example 6 A packet has arrived with an M bit value of 1. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented? Solution If the M bit is 1, it means that there is at least one more fragment. This fragment can be the first one or a middle one, but not the last one. We don’t know if it is the first one or a middle one; we need more information (the value of the fragmentation offset). See also the next example.

Example 7 A packet has arrived with an M bit value of 1 and a fragmentation offset value of zero. Is this the first fragment, the last fragment, or a middle fragment?. Solution Because the M bit is 1, it is either the first fragment or a middle one. Because the offset value is 0, it is the first fragment.

Example 8 A packet has arrived in which the offset value is 100. What is the number of the first byte? Do we know the number of the last byte? Solution To find the number of the first byte, we multiply the offset value by 8. This means that the first byte number is 800. We cannot determine the number of the last byte unless we know the length of the data.

Example 9 A packet has arrived in which the offset value is 100, the value of HLEN is 5 and the value of the total length field is 100. What is the number of the first byte and the last byte? Solution The first byte number is 100 × 8 = 800. The total length is 100 bytes and the header length is 20 bytes (5 × 4), which means that there are 80 bytes in this datagram. If the first byte number is 800, the last byte number must be 879.

Collecting the fragments of a frame Fragments from multiple datagrams can arrive in arbitrary order. A sender places a unique identification number in the header (ID field). The router copies this ID number to each fragment. Frag offset is used to reassemble. A datagram can’t be reassembled untill all fragments arrive. IP specifies a maximum time to hold fragments. Upon receiving the first fragment, a reassembly timer is started. If the timer expires and all fragments are not in, all the received fragments are discarded. All or nothing.