CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.

Slides:



Advertisements
Similar presentations
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

IPv4 - The Internet Protocol Version 4
IP datagrams Service paradigm, IP datagrams, routing, encapsulation, fragmentation and reassembly.
NETWORK LAYER (1) T.Najah AlSubaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Internet Protocol (IP)
CSCI 4550/8556 Computer Networks Comer, Chapter 21: IP Encapsulation, Fragmentation, and Reassembly.
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.
COS 420 DAY 5 & 6. Agenda Assignment 1 Due Assignment 2 posted over Due Feb 13 Individual Projects Assigned Due March 20 & 23 Today we will look at IP.
Chapter 19 Binding Protocol Addresses (ARP) Chapter 20 IP Datagrams and Datagram Forwarding.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 18 Introduction to Networks and the Internet.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
IP Routing, Format, Fragmentation Chapters 20-21, 23.
Module 10. Internet Protocol (IP) is the routed protocol of the Internet. IP addressing enables packets to be routed from source to destination using.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
1 Internet Protocol: Forwarding IP Datagrams Chapter 7.
1 Chapter 6 – Internet Protocol: Connectionless Datagram Delivery 6.3 Internet Architecture and Philosophy Chapters are about this layer NETWORK.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part XI Internetworking Part 2.4 (Datagram Encapsulation, Transmission, Fragmentation, Reassembly)
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Network Layer Last Update Copyright Kenneth M. Chipps Ph.D.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
Chapter 22 Q and A Victor Norman CS 332 Spring 2014.
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.
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.
Chapter 20 IP Datagrams and Datagram Forwarding. Connectionless vs Connection-oriented Service TCP/IP’s fundamental delivery service is connectionless.
NET0183 Networks and Communications Lectures 15 and 16 Datagram Forwarding 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks Lecture powerpoints.
Internet Application Theory & Applications. Internet Application - Ibrahim Otieno SCI/ICT Building 2 nd Floor Rm.
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 21 IP Encapsulation, Fragmentation, and Reassembly.
Internet Protocol: Routing IP Datagrams Chapter 8.
1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of.
© 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.
EECB 423 V.1 1 Internetworking 2 Datagram Encapsulation Transmission Fragmentation and Reassembly.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. Datagram Fragmentation Checksum Options Topics.
Network Layer & IP Protocol.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Chapter 22 Q and A Victor Norman CS332 Fall 2017.
Computer Networks and Internets, 5e By Douglas E. Comer
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
IP Encapsulation, Fragmentation, and Reassembly
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
COMPUTER NETWORKS CS610 Lecture-29 Hammad Khalid Khan.
ITIS 6167/8167: Network and Information Security
IP - The Internet Protocol
NET 323D: Networks Protocols
Presentation transcript:

CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer Engineering & Computer Science California State University, Long Beach

TCP/IP TCP/IP forms the basis for all Internet communication. TCP/IP includes protocols for both: An unreliable connectionless delivery service (UDP) A reliable connection-oriented service (TCP) Both UDP and TCP run at Layer 4 on top of the IP Protocol.

IP Datagrams How does a packet (IP Datagram) travel across the Internet? A host: creates a packet places the destination address in the packet header sends the packet to a nearby router A router receives a packet uses the destination address to select the next router on the path forwards the packet Eventually, the packet reaches a router that can deliver the packet to its final destination

IP Datagrams (cont’d) IP defines a packet format that is independent of the hardware. The result is a universal, virtual packet called an IP datagram. As the term virtual implies: IP Datagram format is not tied directly to any hardware The underlying hardware does not understand or recognize an IP datagram Instead, each host or router in the Internet contains protocol software that recognizes the IP datagrams. Each datagram consists of a header followed by data area (payload): The amount of data carried in a datagram is not fixed The size of a datagram is determined by the application that sends data A datagram can contain as little as a single octet of data or at most 64K octets

IP Datagram Header (Version 4) What does a datagram header contain? It contains the IP address of the destination (the ultimate recipient) which is used to forward the datagram The datagram header also contains information, such as: the IP address of the source (the original sender) and a field that specifies the type of data being carried in the payload Important: each address in the datagram header is an IP address. MAC addresses for the sender and recipient do not appear Note: Each field in an IP datagram header has a fixed size This makes header processing efficient.

IP Datagram Fields VERS -- Each datagram begins with a 4-bit protocol version number (the figure shows a version 4 header) H.LEN -- 4-bit header specifies the number of 32-bit quantities in the header (If no options, the value is 5) SERVICE TYPE -- 8-bit field that carries a class of service for the datagram (seldom used in practice) TOTAL LENGTH bit integer that specifies the total number of bytes in the datagram (both header and data) IDENTIFICATION bit number (usually sequential) assigned to the datagram (used in fragments, too) FLAGS -- 3-bit field with individual bits specifying whether the datagram is a fragment FRAGMENT OFFSET bit field that specifies where in the original datagram the data in this fragment belongs (the value of the field is multiplied by 8 to obtain an offset)

IP Datagram Fields (cont’d) TIME TO LIVE -- 8-bit integer initialized by the original sender; decremented by each router that processes the datagram; if the value reaches zero (0), the datagram is discarded and an error message is sent back to the source TYPE -- 8-bit field that specifies the type of the payload HEADER CHECKSUM bit ones-complement checksum of header fields SOURCE IP ADDRESS bit Internet address of the original sender (the addresses of intermediate routers are not in the header) DESTINATION IP ADDRESS bit Internet address of the ultimate destination IP OPTIONS -- Optional header fields used to control routing and datagram processing (seldom used) PADDING -- If options do not end on a 32-bit boundary, zero bits of padding are added to make the header a multiple of 32 bits

Forwarding an IP Datagram The Internet uses next-hop forwarding. Each router along the path: receives the datagram extracts the destination address from the header uses the destination address & forwarding Table to determine the next hop to which the datagram should be sent then the router forwards the datagram to the next hop (either the final destination or another router) The forwarding table is filled with entries by the routing algorithm. The forwarding table is initialized when the router boots and must be updated if the topology changes or hardware fails.

Forwarding an IP Datagram Figure 22.3 shows an example internet and the contents of a forwarding table for router R 2 :

Network Prefix Extraction The router uses the forwarding table to select the next hop for a datagram. This process is called forwarding. The mask field in a forwarding table entry is used to extract the network portion of an address. EXAMPLE: When a router encounters a datagram with destination IP address D the forwarding function must find an entry in the forwarding table that specifies a next hop for D. The software examines each entry in the table by using the subnet mask in the entry to extract the prefix of address D. It compares the resulting prefix to the Destination field of the entry If the two are equal, the datagram will be forwarded to the Next Hop

Network Prefix Extraction (cont’d) The bit mask representation makes extraction efficient: the computation consists of a Boolean & between the mask and destination address, D The computation to examine the i th entry in the table can be as: if ( (Mask[i] & D) == Destination[i] ) forward to NextHop[i]

Forwarding Table Notes In practice, Internet forwarding tables can be extremely large and the forwarding algorithm is complex. This table is a trivial example: Internet forwarding tables contain a default entry that provides a path for all destinations that are not explicitly listed. A network manager can specify a host-specific route. A forwarding table can have addresses that overlap.

Longest Prefix Match Suppose a router's forwarding table contains entries for the following two network prefixes: /16 and /24 What happens if a datagram arrives destined to ? Matching procedure succeeds for both of the entries: a Boolean and of a 16-bit mask will produce a Boolean and with a 24-bit mask will produce Question: Which entry should be used? Answer:Internet forwarding uses a longest prefix match. In this example, /24

The IP Protocol (Layer 3) IP uses “Best Effort” Service. IP makes the best effort it can to deliver each datagram, but it does not guarantee that it will handle all problems, such as: Datagram duplication Delayed or out-of-order delivery Corruption of data Datagram loss IP is designed to run over any type of network. High-speed and low-speed networks can be attached together using routers.

Encapsulation When IP datagram is encapsulated in a hardware frame, the entire datagram is placed in the data area of the frame. Notes: The network hardware treats the IP datagram like any other frame. The hardware does not examine the data area of the frame. The sender and receiver must agree on the value used in the frame type field of the frame header in order to know the incoming frame contains an IP datagram. Encapsulation also requires the sender to supply the physical address of the next computer to which the datagram should be sent (using the ARP command).

Transmission Across an Internet Encapsulation applies to one transmission at a time (i.e., to one hop across the network at a time). Notes: Hosts and routers store a datagram in memory with no additional header. The Layer 2 frame headers are discarded at each router.

MTU, Datagram Size, and Encapsulation Defn: The maximum transmission unit (MTU) is the maximum amount of data that a frame can carry. Each hardware technology specifies its own MTU. There is no exception to the MTU limit. A datagram must be smaller or equal to the MTU in order to be transmitted. Difficulty: In a heterogeneous network, a router can connect networks with different MTUs.

Fragmentation & Reassembly When a datagram is larger than the MTU of the network over which it must be sent, the router divides the datagram into smaller pieces called fragments, and sends each fragment independently. The fragments have the same format as other datagrams. The FLAG field contains a bit that means the datagram is a fragment. Other fields in the header contain information that allows the fragments to be reassembled. Each fragment has a copy of the original header with fields modified as necessary.

Reassembly The process of creating the original datagram from the fragments is called reassembly. Note: The final fragment has a special bit set in the header to signal that all fragments have arrived successfully. The Internet Protocol specifies that the ultimate destination host should reassembly the fragments. Two advantages to reassembly at the destination: Reduces the amount of information in each router. It allows the routes to change dynamically. In the figure, H 2 will perform reassembly. R 2 will simply forward the fragments.

Identifying a Datagram Each datagram has a unique identification number placed in the IDENTIFICATION field. This datagram IDENTIFICATION field is also copied into each fragment. Thus, the IDENTIFICATION field plus the IP source address to determine to which datagram a fragment belongs. For fragment ordering, the FRAGMENT OFFSET field specifies where in the original datagram the fragment belongs. Fragment Loss Since IP does not guarantee delivery, fragments may be lost or delayed. IP holds fragments for a limited time (a timer is set) to see whether all of the fragments arrive. If they do, the datagram is reassembled completely. If all the fragments do not arrive, the datagram is discarded. Fragments are not retransmitted..

Fragmenting a Fragment If the MTU of a subsequent network is smaller than the one that caused fragmentation, the fragments must be fragmented further. The IP fragmentation scheme allows this fragmentation with all fragments still being treated in exactly the same way. Example: 532