Presentation is loading. Please wait.

Presentation is loading. Please wait.

Delivery and Routing of IP Packets

Similar presentations


Presentation on theme: "Delivery and Routing of IP Packets"— Presentation transcript:

1 Delivery and Routing of IP Packets
Prof. Choong Seon HONG

2 Introduction Delivery Routing
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 6.1 Connection-oriented versus Connectionless Services
Packet delivery in network layer Connection-oriented protocol Using same path 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 protocol Dealing with each packet independently Packets may not travel the same path to their destination IP protocol

4 6.2 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 Extracting the network address of the destination packet (setting the hostid part to all 0s) Then, comparing the addresses of the network to which it is connected

5 Direct versus Indirect Delivery (cont’d)

6 Direct versus Indirect Delivery (cont’d)
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 Mapping between the IP address of next router and the physical address of the next router

7 Direct versus Indirect Delivery (cont’d)

8 6.3 Routing methods Routing table Next-hop Routing
Used to find the route to the final destination Next-hop Routing The routing table holds only the address of the next hop instead of holding information about the complete route

9 Routing methods (cont’d)

10 Routing methods (cont’d)
Network-Specific Routing Having only one entry to define the address of network itself

11 Routing methods (cont’d)
Host-Specific Routing Host addresses in the routing table 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

12 Routing methods (cont’d)

13 Routing methods (cont’d)
Default routing Instead of listing all networks in the entire Internet , host A can just have one entry called the default (network address )

14 6.4 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 Updating the routing table corresponding to shutdown of a router or breaking of a link

15 6.5 Routing Module and Routing Table Design
When looking for the route, The router must first check for direct delivery Then host-specific delivery Then network-specific delivery Finally, default delivery The operation of the routing module and table The routing module receiving an IP packet from the IP processing module The routing module consulting the routing table to find the best route for the packet The packet to be sent to the fragmentation

16 Routing Module and Routing Table Design (cont’d)

17 Routing Module and Routing Table Design (cont’d)
Organized in hierarchical scheme Direct-delivery entries first Host-specific delivery entries next Network-specific entries next The default delivery entry lat Seven fields that the routing table has Mask, destination address, next-hop address, flags, reference-count, use, and interface Flags U The router is up and running. G The destination is in another network. H Host-specific address. D Added by redirection. M Modified by redirection.

18 Routing Module and Routing Table Design (cont’d)
Mask Defining the mask applied to the destination IP address of the packet to find the network or subnetwork address of the destination In host-specific and default routing, the mask is In unsubnetted network, the mask is the default mask for the class ( , , or ) Destination address Defining either the destination host address (host-specific : netid + hostid )or destination network address (network-specific : netid) Nexthop address Defining the address of the next-hop router to which the packet should be delivered

19 Routing Module and Routing Table Design (cont’d)
Flags U (Up) : indicating the router’s running G (Gateway) : meaning that the destination is another network H (Host-specific) : indicating that the entry in the destination is a host-specific address 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 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

20 Routing Module and Routing Table Design (cont’d)
module receiving an IP packet from the IP processing module 1. for each entry in the routing table 1. Apply the mask to packet destination address 2. If (the result matches the value in the destination field) 1. If (the G flag is present) 1. Use the next-hop entry in the table as next-hop address 2. If ( the G flag is missing) 1. Use packet destination address (direct delivery) 3. Send packet to fragmentation module with next-hop address 4. Stop 2. If no match is found, send an ICMP error message 3. Stop

21 Examples Giving some examples of routing by router R1

22 Examples (cont’d) Routing table for router R1

23 Examples (cont’d) Example 1
Router R1 Receives 500 packets for destination ; algorithm applies the masks row by row to the destination address until a match is found Direct delivery &  no match &  no match &  no match 2. Host-specific &  no match 3. Network specific a &  match

24 Examples (cont’d) sending packet through interface m0 along with the next-hop IP address ( ) to the fragmentation module for further processing Incrementing the use field by 500 and the reference count field by 1

25 Examples (cont’d) Example 2 Direct delivery
- Router R1 Receives 100 packets for destination ; the algorithm applies the masks row by row to the destination address until a match is found Direct delivery a &  no match b &  match Sending packet through interface m2 along with the next-hop IP address ( ) to the fragmentation module for further processing Incrementing the use field by 100 and the reference count field by 1

26 Examples (cont’d) Example 3
Router R1 Receives 20 packets for destination ; the algorithm applies the masks row by row to the destination address until a match is found Direct delivery &  no match &  no match &  no match 2. Host-specific &  no match 3. Network specific &  no match 4. Default a &  match

27 Examples (cont’d) sending packet through interface m0 along with the next-hop IP address ( ) to the fragmentation module for further processing Incrementing the use field by 20 and the reference count field by 1

28 Examples (cont’d) Example 4

29 Examples (cont’d) Mask Destination Next Hop I.

30 Examples (cont’d) Example 5

31 Examples (cont’d) Mask Destination Next Hop I.
m1 or or m2 m1 or or m2 ???????????? m0

32 Examples (cont’d) The routing table for router R1 is given below. Draw its topology Mask Destination Next Hop I. m0 m2 m1 m1 m2 m0

33

34 Examples (cont’d)

35 6.6 Classless Addressing : CIDR
Routing Table Size The number of routing table entries will increase Hierarchical Routing To solve the problem of gigantic routing tables Geographical routing Extension of hierarchical routing to include geographical routing For example, a block to North America, a block to Europe, a block to Asia, a block to Africa, and so on. The routers of ISPs outside of Europe will have only one entry for packets to Europe in their routing tables

36 Classless Addressing : CIDR (cont’d)
Routing Table Search Algorithms In classful addressing, each address has self-contained information that facilitates routing table searching. : ex) dividing 3 buckets (A, B, C) In classless addressing, there is no self-contained information in the destination address to facilitate routing table searching. : ex) using longest match method - from the longest prefix(/32)


Download ppt "Delivery and Routing of IP Packets"

Similar presentations


Ads by Google