1 Chapter 6 – Internet Protocol: Connectionless Datagram Delivery 6.3 Internet Architecture and Philosophy Chapters 6 - 8 are about this layer NETWORK.

Slides:



Advertisements
Similar presentations
1 Internet Protocol: Routing IP Datagrams D. E. Comer, “Internetworking with TCP/IP: Principles, Protocols and Architectures”, Ch. 8, Prentice Hall, 2000.
Advertisements

IPv4 - The Internet Protocol Version 4
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Internet Control Message Protocol (ICMP)
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.
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
1 CCNA 2 v3.1 Module 8. 2 TCP/IP Suite Error and Control Messages CCNA 2 Module 8.
Chapter 19 Binding Protocol Addresses (ARP) Chapter 20 IP Datagrams and Datagram Forwarding.
Class 4 Internet Protocols
IP Routing, Format, Fragmentation Chapters 20-21, 23.
NET0183 Networks and Communications Lectures 19 and 20 Support Protocols: ARP and ICMP 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
1 CMPT 471 Networking II ICMP © Janice Regan, 2012.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
1 Internet Protocol: Forwarding IP Datagrams Chapter 7.
1 Computer Communication & Networks Lecture 20 Network Layer: IP and Address Mapping (contd.) Waleed.
1 Version 3.1 modified by Brierley Module 8 TCP/IP Suite Error and Control Messages.
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute.
FALL, 2005CSI Part 2.3 Internetworking & Addressing (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution Robert L. Probert, SITE,
© 2002, Cisco Systems, Inc. All rights reserved..
資 管 Lee Lesson 5 IP Packets: Delivery and Routing IP Layer operation.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
10/8/2015CST Computer Networks1 IP Routing CST 415.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
Dr. John P. Abraham Professor UTPA
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
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.
Internet Protocols. Address Resolution IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware.
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
Error and Control An IP datagram travels from node to node on the way to its destination Each router operates autonomously Failures or problems may occur.
Chapter 23 Internet Control Message Protocol used to report information and errors IP uses ICMP when it sends an error message ICMP uses IP to transport.
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Internet Protocol: Routing IP Datagrams Chapter 8.
© 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.
Cisco 2 - Routers Perrine. J Page 112/19/2015 Chapter 8 TCP/IP Error Message Some of the conditions that must be met in order for host to host communication.
ICMPv6 Error Message Types Informational Message Types.
INTERNET CONTROL MESSAGE PROTCOL. ICMP n allows router to send error or control messages to another router or host n provides communication between IP.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
Chapter 22 Q and A Victor Norman IS333 Spring 2016.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
ICMP The IP provides unreliable and connectionless datagram delivery. The IP protocol has no error-reporting or error-correcting mechanism. The IP protocol.
Chapter 9 ICMP.
COMPUTER NETWORKS CS610 Lecture-33 Hammad Khalid Khan.
Error and Control Messages in the Internet Protocol
Chapter 22 Q and A Victor Norman CS332 Fall 2017.
Byungchul Park ICMP & ICMPv DPNM Lab. Byungchul Park
Internetworking & Address Resolution
CS 428 Computer Networking
Dr. John P. Abraham Professor UTPA
Internetworking Outline Best Effort Service Model
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
Dr. John P. Abraham Professor UTPA
Net 323 D: Networks Protocols
Internet Control Message Protocol
ITIS 6167/8167: Network and Information Security
Presentation transcript:

1 Chapter 6 – Internet Protocol: Connectionless Datagram Delivery 6.3 Internet Architecture and Philosophy Chapters are about this layer NETWORK INTERFACE (MAC) LAYER Not part of IP Chapter 12 will be about this layer Various later chapters about these

2 6.5 Connectionless Delivery System Internet Protocol (IP) is an ► unreliable (best-effort) ► connectionless packet delivery service (compare wired Ethernet) IP TCP SMTP, HTTP, etc. 6.6 Purpose of the Internet Protocol Chapter 6 – Packet format Chapter 7 – Forwarding Chapter 8 – Error messages (but some errors are reported)

3 Figure 6.3 Format of an IP Datagram

4 ORIGINAL ULTIMATE

Datagram Encapsulation

6 Figure 2.2 Ethernet Frame Format 0800IP DATAGRAM

7 Figure 6.7 Where Fragmentation Occurs (Payload) Fragmentation

8 Figure 6.8 (a) Original Datagram carrying 1400 octets of data (b) For a network MTU of 620 the data are fragmented between three new datagrams. They must be complete datagrams, with header!

9 Where to reassemble the payload? How to reassemble the payload? Reassembly of Fragments

10 MF 1 1 0

11

12

13 Routers make forwarding decisions. HOST Fig 7.1 – blue host has three possible choices when transmitting a datagram sender Chapter 7 IP: Forwarding IP Datagrams Hosts also make forwarding decisions.

Direct and Indirect Delivery of an IP Datagram Direct: No router between source and destination Indirect: sender must be able to identify first router in chain Q: How does sender know that direct delivery is possible? A: network parts of source and destination IP addresses are identical.

15 Indirect delivery is a concatentation of direct deliveries; Alternatively, direct delivery is the trivial case of indirect delivery. Last router in chain must deliver directly Datagram Delivery over a Single Network

Table-Driven IP Forwarding Routers store their forwarding instructions in “routing tables.” Hosts also have routing tables, but they are small. 7.5 Next-Hop (Next-Stop?) Forwarding A routing table contains pairs (N,R) where N is the IP address of a destination network and R is the IP address of the “next” router along the path to N. The “next hop” must be a directly-connected router. A router knows only the “next hop” along the way, not the complete path to the destination.

17 Size of routing table is proportional to number of networks. Fig. 7.2(b) the routing table in R

18 Consequences of choosing routes based only on the destination network: ► all traffic from a source to a given destination follows the same path; multiple paths may not be followed concurrently. ► only the final router along the path can know if the destination is operational (for Ethernet, not even the final router). ► forward and reverse paths may be different. Routes are chosen only on basis of destination network BHM NO CHL ATL

Default Routes Routing table in Q: Deliver Directly Deliver Directly DefaultForward to Huge benefit! Entire external Internet can often be collapsed into a single entry!

The IP Forwarding Algorithm Fig 7.3 Check IP Version and checksum !

21 Forwarding Algorithm (revised) Check IP version and header checksum Extract destination IP address, D, from the datagram; if table contains a host-specific route for D send datagram to next-hop specified in table (ENCAPSULATE) and quit; compute N, the network prefix of address D; if N matches any directly-connected network address deliver datagram to destination D over that network (ENCAPSULATE); else if table contains a route for network prefix N send datagram to next hop specified in table (ENCAPSULATE); else if table contains a default route send datagram to default router specified (ENCAPSULATE); else declare a forwarding error; ENCAPSULATE = map IP address to a physical address, encapsulate the datagram in a frame and send.

Dotted Decimal Notation compute N, the network prefix of address D; “Address Mask”

23 Elaboration of routing algorithm (figure 7.3, or revision): “if table contains a route for network prefix N send datagram to next hop specified in table;” Algorithm is: For each row of the forwarding table If (address mask).and. IP D = destination network IP address then send datagram to next hop IP address exit routing algorithm. Notation: Table row contains (destination network IP address, next hop IP address) Recall forwarding table:

Forwarding with IP Addresses which fields are changed by router? Nowhere! The router simply passes the next-hop IP address down to the network interface layer for ARP processing. After table-lookup has determined the next-hop IP address, where in the IP datagram does the router IP layer store it? In Destination IP Address?

25 Why not use physical addresses when storing and computing routes? 01:FA:96:43:1B:49 02:16:7B:62:78:F3

26 Why does IP software avoid using physical addresses when storing and computing routes? Using only IP addresses above the dashed line makes routes easy to examine or change and hides the details of the underlying physical networks. Figure 7.4

Handling Incoming Datagrams Hosts IP layer checks its own IP address against the destination IP address in the arriving datagram. If match, OK else host discards datagram. Why discard? ► there has been an error and if host forwards the datagram to the correct destination, error will persist; ► we don’t want the host to be diverted from its legitimate work to do the router’s work.

Handling Incoming Datagrams – continued Routers Check all of own IP addresses against the destination IP address in incoming datagram. If no match (usual situation) router is a stop along the way from source to destination – execute forwarding algorithm (fig 7.3) else router is final destination of this datagram – message is for higher layer within the router, eg. routing table change

Establishing Routing Tables For now, assume routing tables are loaded manually; In chapters 13 and 15 we’ll see protocols that allow routers to learn routes from each other. End of Chapter 7.

30 Summary of Bridge 1.Like computer with 2 NICs in promiscuous mode 2.Store and forward frames 3.Processes only valid frames 4. Works at layer 2 with hardware addresses 5. Automatically learns which destination hosts are reachable from which interface (no administrator required). 6. Does not change frame in any way (bridges “leave no fingerprints”) 7. Forwards frames with local broadcast hardware address in destination-address field Summary of Router 1.Like computer with 2 NICs in normal mode 2. Store and forward IP datagrams 3. Processes only valid IP datagrams 4. Works at layer 3 with IP addresses 5.Administrator has to enter next hop in routing tables. 6. When forwarding IP datagram, changes at least two fields in datagram header 7. Does not forward IP datagrams with local broadcast IP address in destination-address field

31 Perspective on Comer’s Chapters 6 – 8 Chapter 6 - Internet Protocol: Connectionless Datagram Delivery no routers necessarily involved – lab sessions Chapter 7 - Internet Protocol: Forwarding IP Datagrams how routers work – lab session 4 Chapter 8 – Internet Protocol: Error and Control Messages (ICMP) PING in lab sessions 1 – 3, will see more in later labs.

32 Chapter 8 – Internet Protocol: Error and Control Messages (ICMP) 8.2 The Internet Control Message Protocol ICMP is a required part of IP. Although IP does not guarantee delivery, it does not capriciously discard datagrams and when it is forced to do so it tries to be helpful by sending an ICMP message. Both routers and hosts send ICMP messages.

33 The ultimate destination of an ICMP message is the IP software on the machine intended to receive the message – it is the IP software that has the code to handle the message. 8.2 The Internet Control Message Protocol – contd. Like all traffic across an IP network, ICMP messages travel in the payload of an IP datagram. 1 ICMP Message

Error Reporting vs. Error Correction Not all ICMP messages relate to errors – eg. PING. For errors, ICMP is a reporting mechanism, not a correcting mechanism. When a datagram causes an error, the unit detecting this usually sends an ICMP message back to the original source of the datagram, stating why the datagram was dropped. Why is notification restricted to the original source? That’s all the detecting unit knows!

35 Datagrams carrying ICMP messages are subject to the usual IP uncertainty. 8.4 ICMP Message Delivery Exception: If a datagram carrying an ICMP error message encounters difficulty, an error message about this error message is not sent. ICMP is not considered a higher-layer protocol – it is part of IP

ICMP Message Format Although each ICMP message has its own format, they all begin with the same three fields: ICMP messages that report errors always include the header plus additional octets from the IP datagram that caused the problem

37 Figure 8.2 Values that can appear in the TYPE field of an ICMP message Error? No Yes ? No ? Yes

Testing Destination Reachability and Status (Ping) Type 8 is request, type 0 reply. IDENTIFIER is a random number, used to match replies with requests. Will be studied in Lab Session #1

Reports of Unreachable destinations When a router cannot forward or deliver an IP datagram, the router sends an ICMP destination unreachable (type 3) message back to the original source.

40 * Code 4 used for path MTU discovery * 8.8 Reports of Unreachable destinations - continued

41 Comer page 116: A router may not know of all delivery failures, eg. final delivery over Ethernet. From revised version of routing algorithm (fig 7.3): compute N, the network prefix of address D; if N matches any directly-connected network address deliver datagram to destination D over that network (ENCAPSULATE); ENCAPSULATE = map IP to a physical address, encapsulate the datagram in a frame and send. No feedback to IP if ARP fails.

Route Change Requests from Routers If router R2 receives a datagram that it has to forward to R1, R2 sends an ICMP redirect message (type 5) to the sending host, telling it in future to send such datagrams directly to R1. Fig 7.1

Route Change Requests from Routers – continued This is not a general mechanism for route changes. It is restricted to routers sending to directly-connected hosts. R5 cannot redirect R1 to use the shorter path from S to D Figure 8.7

Detecting Circular or Excessively Long Routes Each time a router forwards a datagram it decrements the TTL by 1 If the result is zero, the router discards the datagram after sending an ICMP time exceeded (type 11, code 0) message. When a destination host reassembles a fragmented payload, it’s possible that some fragments are lost. When the host receives the first fragment it starts a reassembly timer. If the timer expires before all fragments arrive, the host gives up and sends an ICMP type 11, code 1 message back to the original source.

45

46 Input AInput B Output Output A.AND. B 2 binary inputs A, B Mask IP Destination Address

47 Input AInput B Output Output A.OR. B 2 binary inputs A, B