1 Internet Protocol: Forwarding IP Datagrams Chapter 7.

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

Routing: Cores, Peers and Algorithms
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
CSCI 4550/8556 Computer Networks Comer, Chapter 18: IP: Internet Protocol Addresses.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Internetworking.
IP: The Internet Protocol
Oct 26, 2004CS573: Network Protocols and Standards1 IP: Routing and Subnetting Network Protocols and Standards Autumn
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
CS335 Networking & Network Administration Tuesday, May 11, 2010.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding.
COS 420 Day 3.
Chapter 19 Binding Protocol Addresses (ARP) Chapter 20 IP Datagrams and Datagram Forwarding.
Delivery, Forwarding, and Routing
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Lecture Slide Rizwan Rehman, CCS. Classless and Subnet Address Extensions (CIDR) Topics: –There are problems with the IP addressing scheme we’ve studied.
Class 4 Internet Protocols
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
© MMII JW RyderCS 428 Computer Networking1 Reading  Make sure you read all of chapter 2 & 3.
Module 10. Internet Protocol (IP) is the routed protocol of the Internet. IP addressing enables packets to be routed from source to destination using.
Mapping Internet Addresses to Physical Addresses (ARP)
Classless and Subnet Address Extensions (CIDR)
1 Chapter 6 – Internet Protocol: Connectionless Datagram Delivery 6.3 Internet Architecture and Philosophy Chapters are about this layer NETWORK.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Protocol Layering Chapter 10. Looked at: Architectural foundations of internetworking Architectural foundations of internetworking Forwarding of datagrams.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer Internet Protocol (IP) layer Introduction.
Copyright © Lopamudra Roychoudhuri
資 管 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.
Chapter 18 IP: Internet Protocol Addresses
Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets Lecture #4 Items you should understand by now – before routing Physical Addressing – with in.
Chapter 22 Q and A Victor Norman CS 332 Spring 2014.
Chapter 6 Delivery and Forwarding of IP Packets
Dr. John P. Abraham Professor UTPA
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 with TCP/IP DCLAB-ghcho-internet Fall 1 Chap. 7 Internet Protocol (IP)  A user thinks of an internet as a single virtual network.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 6 Delivery and Routing of IP Packets.
COP 4930 Computer Network Projects Summer C 2004 Prof. Roy B. Levow Lecture 3.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Delivery, Forwarding, and Routing of IP Packets
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Universal Identifier UNIVERSAL IDENTIFIER Universal network = globally accepted method for identifying each computer. Host identifier = host is identify.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Internet Application Theory & Applications. Internet Application - Ibrahim Otieno SCI/ICT Building 2 nd Floor Rm.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
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.
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.
Teknik Routing Pertemuan 10 Matakuliah: H0524/Jaringan Komputer Tahun: 2009.
Classful Internet Addresses Chapter 4. Universal Identifiers Designers of TCP/IP determined that each host on the internet would have a 32-bit identifier.
Protocol Layering Chapter 11.
CS470 Computer Networking Protocols
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 Module 10 Routing Fundamentals and Subnets.
Delivery and Forwarding Chapter 18 COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Computer Networks 0110-IP Gergely Windisch
ROUTING.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
IP: Addressing, ARP, Routing
Forwarding and Routing IP Packets
CS4470 Computer Networking Protocols
Internet Protocol: Connectionless Datagram Delivery
CS 428 Computer Networking
Dr. John P. Abraham Professor UTPA
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
Dr. John P. Abraham Professor UTPA
Delivery, Forwarding, and Routing of IP Packets
COMPUTER NETWORKS CS610 Lecture-29 Hammad Khalid Khan.
Classless and Subnet Address Extensions (CIDR)
Presentation transcript:

1 Internet Protocol: Forwarding IP Datagrams Chapter 7

2 Basic unit of transfer in TCP/IP internet is the datagram Datagram format characterizes the static aspects of IP Datagram format characterizes the static aspects of IP Forwarding characterizes the operational aspects Forwarding characterizes the operational aspects

3 Forwarding In An Internet Forwarding refers to choosing a path for packets Term routing was previously used Term routing was previously used Popular term now is forwarding Popular term now is forwarding Router is the computer making the choice WAN Has multiple physical connections between packet switches Has multiple physical connections between packet switches Network itself routes packets while in net Network itself routes packets while in net Internal routing; self-contained in the WAN Internal routing; self-contained in the WAN

4 Goal of IP: Virtual network Focus on IP forwarding Also called internet routing or IP routing Also called internet routing or IP routing Information used to make decisions called IP forwarding information Information used to make decisions called IP forwarding information Similar to forwarding in single physical network: IP forwarding chooses path for datagram IP forwarding chooses path for datagram Difference Difference Chooses routes across multiple physical networks Chooses routes across multiple physical networks

5 Forwarding can be difficult Ideally, should be based on: Ideally, should be based on: Network load Datagram length Type of service specified Most software is less sophisticated Most software is less sophisticated Selects on fixed assumptions about shortest paths Both hosts and routers participate Host may make initial forwarding decision if has access to multiple routers (even if singly- homed) Host may make initial forwarding decision if has access to multiple routers (even if singly- homed) Also, multi-homed hosts & general machines Also, multi-homed hosts & general machines For now, treat hosts and routers separate For now, treat hosts and routers separate

6 Direct and Indirect Delivery Can divide forwarding into two forms: Direct Delivery Direct Delivery Datagram from one machine to another Across single physical network Both must be attached to same physical network Indirect Delivery Indirect Delivery Destination not on a directly attached network Router must become involved

7 Delivery over a single network IP datagram encapsulated into frame IP datagram encapsulated into frame IP address mapped to physical address IP address mapped to physical address Network hardware delivers the datagram Network hardware delivers the datagram To tell if destination directly connected: To tell if destination directly connected: Easy based on prefix and suffix of IP address Sender extracts network prefix of destination If same as its network portion: directly connected Special case of general purpose forwarding Special case of general purpose forwarding Final router always directly connected to destination

8 Indirect delivery Sender must specify a router Sender must specify a router Router must then forward toward destination Router must then forward toward destination Datagram passes from router to router until it reaches a router directly connected to destination Datagram passes from router to router until it reaches a router directly connected to destination Questions: Questions: How does a router know where to send a datagram? How can a host know which router to use? Consider basic table-driven forwarding now Consider basic table-driven forwarding now Later talk about routers learning new routes

9 Table-Driven IP Routing Uses IP routing table Info about destinations & how to reach them Info about destinations & how to reach them Both hosts and routers have Both hosts and routers have What info to keep? Can’t do all possible destinations Can’t do all possible destinations Couldn’t keep current; too much storage space IP address scheme helps IP address scheme helps Direct delivery test is efficient Routing tables only need network prefixes

10 Next-Hop Forwarding Routing table has pairs (N,R) N is the IP address of a destination network N is the IP address of a destination network R is the IP address of the “next” router along the path to N R is the IP address of the “next” router along the path to N R is the next hop Using this table is next-hop forwarding Don’t know whole path, only one step All routers in machine M’s table must be directly connected to M All routers in machine M’s table must be directly connected to M

11 S R Q To reach hosts on networkRoute to this address Deliver Directly Deliver Directly

12 Routing table size depends on number of networks Size & contents independent of number of hosts Size & contents independent of number of hosts Consequences of choosing routes based on destination network ID alone: Traffic for same network usually take same path Traffic for same network usually take same path Multiple paths may not be used concurrently All traffic types follow same path regardless of delay or throughput Only final router knows if hosts exists or is operational Only final router knows if hosts exists or is operational Must report delivery problems Traffic from A-B may have different path than B-A Traffic from A-B may have different path than B-A

13 Default Routes If no route in table, use default route Keeps tables small Keeps tables small Consolidates multiple entries into default case Consolidates multiple entries into default case Useful when only one connection to internet Useful when only one connection to internet Test if local net destination If not, only can go through one router anyway

14 Host-Specific Routes Forwarding based on networks, not individual hosts IP forwarding software allows per-host routes Gives local network admin more control over network use Gives local network admin more control over network use Permits testing Permits testing Controls access for security purposes Controls access for security purposes

15 IP Forwarding Algorithm ForwardDatagram(Datagram,RoutingTable) Extract destination IP address, D from datagram; If the table contains a host-specific route for D send datagram to next-hop specified in the table and quit; send datagram to next-hop specified in the table 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; deliver datagram to destination D over that network; (Involves resolving D to a physical address, encapsulating the datagram, and sending the frame.) Else if the table contains a route for network N send datagram to next-hop specified in table; send datagram to next-hop specified in table; Else if the table contains a default route send datagram to the default router specified in table; send datagram to the default router specified in table; Else declare a forwarding error

16 Forwarding With IP Addresses IP forwarding does not alter original datagram Except for decrementing TTL and recomputing the checksum Except for decrementing TTL and recomputing the checksum Source and destination addresses unchanged Source and destination addresses unchanged Router must pick next-hop IP address Router must pick next-hop IP address Where does this address get stored? There is no place in the datagram for it

17 Does not store the next-hop address at all IP passes datagram & next-hop address to the network interface IP passes datagram & next-hop address to the network interface Network interface software: Network interface software: Binds next-hop address to physical address Forms a frame using the physical address Places datagram in data portion of frame Sends the result Discards next-hop address

18 Why not use physical addresses when storing and computing routes? Routing table provides clean interface between IP forwarding SW and high-level SW Routing table provides clean interface between IP forwarding SW and high-level SW Look at routing table to debug forwarding problems IP addresses makes it easy to do Point of IP is to build abstraction Point of IP is to build abstraction Communication software can be written to use internet addresses Only a few low-level routines need to know and interface with the physical addresses

19 Handling Incoming Datagrams When datagram arrives at a host: Network interface SW delivers incoming datagrams to IP module Network interface SW delivers incoming datagrams to IP module If destination address matches host’s: IP software accepts the datagram IP software accepts the datagram Passes it on to higher-level protocol software Passes it on to higher-level protocol software If destination address does not match host’s: Datagram must be discarded Datagram must be discarded Hosts forbidden from trying to fix routing problem Hosts forbidden from trying to fix routing problem

20 When datagram arrives at a router: Delivered to IP module Delivered to IP module If destination IP address matches the routers: Datagram passed to higher-level protocol software Datagram passed to higher-level protocol software Usually destined for router if testing or sending commands Usually destined for router if testing or sending commands If datagram is not at final destination: TTL field is decremented TTL field is decremented If TTL = 0, datagram is discarded If TTL > 0, computes new checksum IP forwards the datagram using the forwarding algorithm IP forwards the datagram using the forwarding algorithm

21 Determining if at final destination is not trivial Host may have multiple physical connections Host may have multiple physical connections Destination IP address must be compared with that of each connection Also, may be a broadcast datagram Also, may be a broadcast datagram Have to see if IP address matches the limited or directed broadcast IP address Classless, subnet, and multicast addresses make it even more complex Classless, subnet, and multicast addresses make it even more complex Will see in later chapters….

22 Why forbid hosts from forwarding functions? Host receiving datagram not for it indicates a problem Host receiving datagram not for it indicates a problem Won’t be revealed if host takes corrective action Forwarding steals time from legitimate uses of the host Forwarding steals time from legitimate uses of the host Simple errors can cause chaos Simple errors can cause chaos Some host accidentally broadcasts datagram for a host Every local host receive a copy; all send to recipient Routers do more than merely route traffic Routers do more than merely route traffic Report errors Propagate forwarding information

23 Establishing Routing Tables How do systems initialize routing tables? How are routing tables updated? Later chapters discuss the protocols that do this Later chapters discuss the protocols that do this For now: For now: Understand IP software uses routing tables to decide how to forward a datagram Changing routing tables will change the paths

24 Summary IP software forwards datagrams Decides where to send based on destination IP address Decides where to send based on destination IP address Direct delivery used if the destination machine is on the same network as the sender Otherwise, sender must go through a router Otherwise, sender must go through a router Datagrams travel from router to router until they can be delivered directly Datagrams travel from router to router until they can be delivered directly IP software produces IP address of the next hop Network interface SW encapsulates datagram, maps next-hop address to physical address, and sends Network interface SW encapsulates datagram, maps next-hop address to physical address, and sends

25 Internet forwarding algorithm: Is table-driven Is table-driven Uses only IP addresses Uses only IP addresses Possible to have host-specific destination addresses Most routing tables only have network addresses Most routing tables only have network addresses Using default routes helps keep tables small Especially for hosts that can access only one router Especially for hosts that can access only one router