1 Kyung Hee University Chapter 6 Delivery Forwarding, and Routing of IP Packets.

Slides:



Advertisements
Similar presentations
Network Layer Delivery Forwarding and Routing
Advertisements

1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding Relates to Lab 3.
Delivery and Forwarding of
1 Chapter 22 Network layer Delivery, Forwarding and Routing.
ECE 4110 – Internetwork Programming TCP/IP Protocol (cont’d)
Routing and Routing Protocols Introduction to Static Routing.
Delivery, Forwarding, and Routing
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.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
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.
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.
Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing.
22.1 Chapter 22 Network Layer: Delivery, Forwarding, and Routing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
1 Routing. 2 Routing is the act of deciding how each individual datagram finds its way through the multiple different paths to its destination. Routing.
18-WAN Technologies and Dynamic routing Dr. John P. Abraham Professor UTPA.
IP Forwarding.
Copyright © Lopamudra Roychoudhuri
資 管 Lee Lesson 5 IP Packets: Delivery and Routing IP Layer operation.
10/8/2015CST Computer Networks1 IP Routing CST 415.
Delivery, Forwarding, and Routing of IP Packets
Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets Lecture #4 Items you should understand by now – before routing Physical Addressing – with in.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 27/03/2007.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2003 Chapter 6 Delivery and Routing of IP Packets.
Chapter 6 Delivery and Forwarding of IP Packets
HANNAM UNIVERSITY 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 6 Delivery and Routing of IP Packets.
1 Routing Table  The seven fields Mask: for finding (sub)network address of the destination l Host-specific routing: (/32) l Default routing:
Delivery, Forwarding, and Routing of IP Packets
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Network Layer: 19.1 Internetworks 19.2 Addressing Classful, Classless addressing, NAT 19.3 Routing.
Routing and Routing Protocols
Internet Protocol: Routing IP Datagrams Chapter 8.
TCP/IPTCP/IP Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets.
Linux Operations and Administration Chapter Eight Network Communications.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
1 Chapter 6 Delivery Forwarding, and Routing of IP Packets Chapter 6 Delivery Forwarding, and Routing of IP Packets Mi-Jung Choi Dept. of Computer Science,
1 Kyung Hee University Chapter 11 User Datagram Protocol.
Delivery and Forwarding Chapter 18 COMP 3270 Computer Networks Computing Science Thompson Rivers University.
22.1 Network Layer Delivery, Forwarding, and Routing.
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.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Chapter 6 Delivery & Forwarding of IP Packets
Forwarding and Routing IP Packets
Chapter 6 – Routing.
Chapter 6 Delivery & Forwarding of IP Packets
Chapter 6 Delivery & Forwarding of IP Packets
5 Network Layer Part II Computer Networks Tutun Juhana
Delivery, Forwarding, and Routing
IP Forwarding Relates to Lab 3.
IP Forwarding Relates to Lab 3.
Chapter 6 Delivery & Forwarding of IP Packets
UNIT III ROUTING.
Delivery, Forwarding, and Routing
Delivery and Routing of IP Packets
Delivery and Routing of IP Packets
Delivery, Forwarding, and Routing of IP Packets
Delivery and Forwarding of
18-WAN Technologies and Dynamic routing
IP Forwarding Relates to Lab 3.
Net 323 D: Networks Protocols
Delivery, Forwarding, and Routing of IP Packets
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Example 9 (Continued) 1. The first mask (/26) is applied to the destination address. The result is , which does not match the corresponding network.
Figure 6.11 Configuration for Example 4
Figure 6.6 Default routing
Longest Mask Matching What happens if one of the organizations is not geographically close to the others, like in Figure No problem, as long as the.
See Next Slide Example 13 (continued)
Presentation transcript:

1 Kyung Hee University Chapter 6 Delivery Forwarding, and Routing of IP Packets

2 Kyung Hee University Introduction  Delivery Meaning the physical forwarding of the packets Connectionless and connection-oriented services Direct and indirect delivery  Routing Related to finding the route (next hop) for a datagram

3 Kyung Hee University 6.1 Delivery  Connection Types Connection-oriented service l Using same path l The decision about the route of a sequence of packets with the same source and destination addresses can be made only once, when the connection is established Connectionless service l Dealing with each packet independently l Packets may not travel the same path to their destination  IP is : Connectionless protocol

4 Kyung Hee University Direct versus Indirect Delivery  Two methods delivering a packet to its final destination Direct Indirect  Direct delivery The final destination of the packet is a host to the same physical network as the deliverer or the delivery is between the last router and the destination host Decision making whether delivery is direct or not l Extracting the network address of the destination packet (setting the hostid part to all 0s) l Then, comparing the addresses of the network to which it is connected

5 Kyung Hee University Direct versus Indirect Delivery (cont’d)  Direct delivery

6 Kyung Hee University Direct versus Indirect Delivery (cont’d)  Indirect delivery The destination host is not on the same network as the deliverer The packet goes from router to router until finding the final destination Using ARP to find the next physical address l Mapping between the IP address of next router and the physical address of the next router

7 Kyung Hee University Direct versus Indirect Delivery (cont’d)  Indirect delivery

8 Kyung Hee University 6.3 Forwarding  Forwarding means to place the packet in its route to its destination. So, it requires a host or a router a routing table.  Routing table Used to find the route to the final destination

9 Kyung Hee University Forwarding Techniques  Next-hop Method A technique to reduce the contents of a routing table The routing table holds only the address of the next hop instead of holding information about the complete route The entries of a routing table must be consistent with each other

10 Kyung Hee University Forwarding Techniques (cont’d)

11 Kyung Hee University Forwarding Techniques (cont’d)  Network-Specific Method Having only one entry to define the address of network itself

12 Kyung Hee University Forwarding Techniques (cont’d)  Host-Specific Method Destination host addresses is given in the routing table The efficiency is sacrificed for the advantages : l Giving to administrator more control over routing Ex) if the administrator wants all packets arriving for host B delivered to router R3 instead of R1, one single entry in the routing table of host A can explicitly define the route

13 Kyung Hee University Routing methods (cont’d)

14 Kyung Hee University Routing methods (cont’d)  Default Method Instead of listing all networks in the entire Internet, host A can just have one entry called the default (network address )

15 Kyung Hee University Forwarding with Classful Addressing  Forwarding without Subnetting

16 Kyung Hee University Example 1  Figure 6.8 shows an imaginary part of the Internet. Show the routing tables for router R1.

17 Kyung Hee University Example 1 - Solution

18 Kyung Hee University Example 2  Router R1 in Figure 6.8 receives a packet with destination address Show how the packet is forwarded.  Solution

19 Kyung Hee University Example 2 - Solution  The destination address in binary is A copy of the address is shifted 28 bits to the right. The result is or 12. The destination network is class C. The network address is extracted by masking off the leftmost 24 bits of the destination address; the result is The table for Class C is searched. The network address is found in the first row. The next- hop address and the interface m0 are passed to ARP.

20 Kyung Hee University Example 3  Router R1 in Figure 6.8 receives a packet with destination address Show how the packet is forwarded  Solution The destination address in binary is A copy of the address is shifted 28 bits to the right. The result is or 10. The class is B. The network address can be found by masking off 16 bits of the destination address, the result is The table for Class B is searched. No matching network address is found. The packet needs to be forwarded to the default router (the network is somewhere else in the Internet). The next-hop address and the interface number m0 are passed to ARP.

21 Kyung Hee University Forwarding with Subnetting

22 Kyung Hee University Example 4  Figure 6.11 shows a router connected to four subnets.

23 Kyung Hee University Example 5  The router in Figure 6.11 receives a packet with destination address Show how the packet is forwarded.  Solution The mask is /18. After applying the mask, the subnet address is The packet is delivered to ARP with the next-hop address and the outgoing interface m0.

24 Kyung Hee University Example 6  A host in network in Figure 6.11 has a packet to send to the host with address Show how the packet is routed.  Solution The router receives the packet and applies the mask (/18). The network address is The table is searched and the address is not found. The router uses the address of the default router (not shown in figure) and sends the packet to that router.

25 Kyung Hee University Forwarding with Classless Addressing  In classful addressing we can have a routing table with three columns; in classless addressing, we need at least four columns. Figure 6.12 Simplified forwarding module in classless address

26 Kyung Hee University Example 7  Make a routing table for router R1 using the configuration in Figure 6.13.

27 Kyung Hee University Example 7 - Solution  Solution Table 6.1 shows the corresponding table Table 6.1 Routing table for router R1 in Figure 6.13

28 Kyung Hee University Example 8  Show the forwarding process if a packet arrives at R1 in Figure 6.13 with the destination address

29 Kyung Hee University Example 8 - Solution Solution  Solution The router performs the following steps: 1. The first mask (/26) is applied to the destination address. The result is , which does not match the corresponding network address. 2. The second mask (/25) is applied to the destination address. The result is , which matches the corresponding network address. The next-hop address (the destination address of the packet in this case) and the interface number m0 are passed to ARP for further processing.

30 Kyung Hee University Example 9  Show the forwarding process if a packet arrives at R1 in Figure 6.13 with the destination address

31 Kyung Hee University Example 9 - Solution  Solution  Solution The router performs the following steps: 1. The first mask (/26) is applied to the destination address. The result is , which does not match the corresponding network address (row 1). 2. The second mask (/25) is applied to the destination address. The result is , which does not match the corresponding network address (row 2). 3. The third mask (/24) is applied to the destination address. The result is , which matches the corresponding network address. The destination address of the package and the interface number m3 are passed to ARP.

32 Kyung Hee University Example 10  Show the forwarding process if a packet arrives at R1 in Figure 6.13 with the destination address  Solution This time all masks are applied to the destination address, but no matching network address is found. When it reaches the end of the table, the module gives the next-hop address and interface number m2 to ARP. This is probably an outgoing package that needs to be sent, via the default router, to some place else in the Internet.

33 Kyung Hee University Example 11  Now let us give a different type of example. Can we find the configuration of a router, if we know only its routing table? The routing table for router R1 is given in Table 6.2. Can we draw its topology? Table 6.2 Routing table for Example 11  Table 6.2 Routing table for Example 11

34 Kyung Hee University Example 11 - Solution

35 Kyung Hee University Address Aggregation  Figure 6.15 Address aggregation

36 Kyung Hee University Longest Mask Matching  The routing table is sorted from the longest mask to the shortest mask.

37 Kyung Hee University Hierarchical Routing  To solve the problem of gigantic routing tables, creating a sense of the routing tables  Routing table can decrease in size

38 Kyung Hee University Example 12 As an example of hierarchical routing, let us consider Figure A regional ISP is granted 16,384 addresses starting from The regional ISP has decided to divide this block into four subblocks, each with 4096 addresses. Three of these subblocks are assigned to three local ISPs, the second subblock is reserved for future use. Note that the mask for each block is /20 because the original block with mask /18 is divided into 4 blocks.

39 Kyung Hee University Example 12

40 Kyung Hee University 6.3 Routing - Static versus Dynamic Routing  Static routing table Containing information entered manually Cannot update automatically when there is a change in the internet Used in small internet that does not change very much, or in an experimental internet for troubleshooting  Dynamic routing table is updated periodically using one of the dynamic routing protocols such RIP, OSPF, or BGP (see Chap. 14) Updating the routing table corresponding to shutdown of a router or breaking of a link

41 Kyung Hee University Routing Module

42 Kyung Hee University Routing Table  Routing table In classless addressing, routing table has a minimum of four columns. - Some routers have even more columns Flags U (up) : The router is up and running. G (gateway) : The destination is in another network. H : Host-specific address. D : Added by redirection. M : Modified by redirection.

43 Kyung Hee University Routing Table (cont’d) Flags l U (Up) : indicating the router’s running l G (Gateway) : meaning that the destination is another network l H (Host-specific) : indicating that the entry in the destination is a host-specific address l D (Added by redirection) : indicating that routing information for this destination has been added to the host routing table by a redirection message from ICMP l M (Modified by redirection) : indicating that routing information for this destination has been modified by a redirection message from ICMP Reference count : giving the number of users that are using this route at any moment Use : showing the number of packets transmitted through this router for the corresponding destination Interface : showing the name of the interface

44 Kyung Hee University Example 13  One utility that can be used to find the contents of a routing table for a host or router is netstat in UNIX or LINUX. The following shows the listing of the contents of the default server. We have used two options, r and n. The option r indicates that we are interested in the routing table and the option n indicates that we are looking for numeric addresses. Note that this is a routing table for a host, not a router. Although we discussed the routing table for a router throughout the chapter, a host also needs a routing table.

45 Kyung Hee University Example 13 (cont’d) $ netstat -rn Kernel IP routing table Destination Gateway Mask Flags Iface U eth U lo UG eth0. Loopback interface

46 Kyung Hee University Example 13 (cont’d) More information about the IP address and physical address of the server can be found using the ifconfig command on the given interface (eth0). $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:B0:D0:DF:09:5D inet addr: Bcast: Mask: From the above information, we can deduce the configuration of the server as shown in Figure 6.19.

47 Kyung Hee University Example 13 (cont’d) Ifconfig command gives us the IP address and the physical address (hardware) address of the interface

48 Kyung Hee University 6.4 Structure of a Router

49 Kyung Hee University Components  Input port  Output port

50 Kyung Hee University Components (cont’d)  Routing Processor performing the functions of the network layer destination address is used to find the address of the next hop and output port number : table lookup

51 Kyung Hee University Switching fabrics  Crossbar switch

52 Kyung Hee University Switching Fabrics  Banyan switch  log2 (n) stages with n/2 microswitches

53 Kyung Hee University Switching Fabrics (cont’d)  Examples of routing in a banyan switch

54 Kyung Hee University Switching Fabrics (cont’d)  Possibility of internal collision even when two packets are not heading for the same output port in banyan switch solving the problem by sorting the arriving packets based on their destination port Trap module: preventing duplicate packets (packets with the same output destination) from passing to the banyan switch simultaneously

55 Kyung Hee University Switching Fabrics (cont’d)  Batcher-banyan switch

56 Kyung Hee University Summary(1)  In a connection-oriented service, the local network layer protocol first makes a connection with the network layer protocol at the remote site before sending a packet.  In a connectionless service, the network layer protocol treats each packet independently, with each packet having no relationship to any other packet. The packets in a message may or may not travel the same path to their destination. The IP protocol is a connectionless protocol.  The delivery of a packet is called direct if the deliverer(host or router) and the destination are on the same network.  The delivery of a packet is called indirect if the deliverer(host or router) and the destination are on different networks.  In the next-hop method, instead of a complete list of the stops the packet must make, only the address of the next hop is listed in the routing table.  In the network-specific method, all hosts on a network share one entry in the routing table.  In the host-specific method, the full IP address of a host is given in the routing table.

57 Kyung Hee University Summary(2)  In the default method, a router is assigned to receive all packets with no match in the routing table.  The routing table for classful forwarding can have three columns.  The routing table for classless addressing needs at least four columns.  The number of columns in a routing table is vendor dependent.  Address aggregation simplifies the forwarding process in classless addressing.  Longest mask matching is required in classless addressing.  Classless addressing requires hierarchical and geographical routing to prevent immense routing tables.  Search algorithms for classful addressing are not efficient for classless addressing.  A static routing table's entries are updated manually by an administrator.  A dynamic routing table's entries are updated automatically by a routing protocol.  A router is normally made of four components: input ports, output ports, the routing processor, and the switching fabric.