Professional Documents
Culture Documents
Delivery, Forwarding,
and Routing of IP Packets
Objectives
Upon the completion of this lecture you will be able to:
1
2.1 DELIVERY
The network layer supervises delivery, the handling of the packets by the
underlying physical networks. Two important concepts are the type of
connection and direct versus indirect delivery.
Delivery
The way the packet is handled by the lower layer networks under
the control of the network layer
Delivery of packet to its final destination
Connectionless and connection-oriented services
Direct and indirect delivery
Routing
Refers to the way routing tables are created to help in forwarding
2
2.2 Connection Types
Connection-oriented service
A dedicated path is established between the source and destination
before transmission is started
Packets follow that dedicated 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
Reliable service
Connectionless service
No dedicated path is established
Dealing with each packet independently
Packets may not travel the same path to their destination
Unreliable service
The delivery of a packet to its final destination is accomplished using two methods
of delivery:
oDirect
oIndirect
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 from the destination IP address of the
packet (setting the hostid part to all 0s)
•Then, comparing this network address with the networks to which it is
connected
4
Figure 2.1 Direct delivery
5
2.3 Direct versus Indirect Delivery (cont.)
Indirect delivery
The destination host is not on the same network as the deliverer
The packet goes from router to router until it finds the final
destination
Using ARP to find the next physical address
•Mapping between the IP address of next router and the physical address
of that router
Questions?
1. A delivery always involves ----------direct delivery(ies) and ------
indirect deliveries
2. The last delivery is always ------------- delivery
6
Figure 2.2 Indirect delivery
Forwarding Techniques
•Several forwarding techniques can make the size of the routing table
manageable and handle issues related to security.
Next-Hop Routing
Network-Specific Routing
Host-Specific Routing
Default Routing
8
Forwarding(cont.)
Next-hope routing vs. Route based routing
The RT holds only the address of the next hop instead of holing
information about the complete route.
Figure 2.3
9
Forwarding(cont.)
Network-specific routing vs. Host-specific routing
To reduce the routing table and simplify the searching process
RT holds only one entry to define the address of the destination
network itself instead of having an entry for every host that is
connected to the physical network
Figure 2.4
10
Forwarding(cont.)
Host-specific routing:
It is the inverse of Network-specific routing
RT has the destination addresses
The administrator may sometimes need to
configure host-specific routing
Figure 2.5
11
Forwarding(cont.)
Default routing:
Host A is connected to the network using 2 routers
R1 is used to route packets to hosts connected to N2
R2 is used for the rest of the Internet
Since it is not possible to list all the hosts in the
Internet, host A uses the default route(0.0.0.0) to send
packets to the Internet
Figure 2.6
12
2.4.1 FORWARDING WITH CLASSFUL ADDRESSING
Most of the routers in the global Internet are not involved in Sub-netting
Each routing table in this scheme of forwarding contains a minimum of the
following fields:
Destination network address
Destination host address can be obtained after wards
Using network-specific forwarding and not the rarely-used
host-specific forwarding
Next hop address
Tells us to which router the packet must be delivered for an
indirect delivery
Interface number
Defines the outgoing port from which the packet is sent out
13
Simplified forwarding module in classful address without subnetting
Figure 2.7
14
Example 1
15
Figure 2.8 Configuration for routing, Example 1
16
Example 1 (Continued)
Solution :
Figure 2.9 in the next slide shows the three tables used by router R1. Note that
some entries in the next-hop address column are empty because in these cases,
the destination is in the same network to which the router is connected (direct
delivery). In these cases, the next-hop address used by ARP is simply the
destination address of the packet.
18
Example 2
Solution:
The destination address in binary is 11000000 00010000 00000111 00001110.
By examining the first four bits, the router identifies that the given address is
a class C address. The network address is then extracted from the IP address
by applying the mask. The result is 192.16.7.0. The table for Class C is
searched. The network address is found in the first row. The next-hop address
111.15.17.32. and the interface m0 are passed to ARP.
19
Example 3
Solution:
The destination address in binary is 10100111 00011000 10100000 00000101.
By examining the first four bits, the router identifies that the given address is
a class B address. The network address is then extracted from the IP address
by applying the mask. The result is 167.24.0.0. 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).
20
Figure 2.10 Simplified forwarding module in classful address with subnetting
22
Example 4
Solution:
After applying the mask(/18), the subnet address is 145.14.0.0.
There is a matching entry in the routing table for this address.
The packet is delivered to ARP with the next-hop address 145.14.32.78 and
the outgoing interface m0.
24
Example 6
A host in network 145.14.0.0 in Figure 2.11 has a packet to send to the host
with address 7.22.67.91. Show how the packet is routed.
Solution:
The router receives the packet and applies the mask (/18).
The network address is 7.22.64.0.
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
2.4.2 FORWARDING WITH CLASSLESS ADDRESSING
In classless addressing , the whole address space is one entity. There
are no classes.
The destination address in the packet gives no clue about the network
address.
To solve this problem , we need to include the mask (/n) in the
routing table.
26
Figure 2.12 Simplified forwarding module in classless addressing
27
Figure 2.13 Using the diagram given below identify the routing table for R1
Show the forwarding process if a packet arrives at R1 in Figure 2.13 with the
destination address 180.70.65.140.
Solution:
The router performs the following steps:
1. The first mask (/26) is applied to the destination address. The result is
180.70.65.128, which does not match the corresponding network address.
2. The second mask (/25) is applied to the destination address. The result is
180.70.65.128, 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
Example 9
Show the forwarding process if a packet arrives at R1 in Figure 2.13 with the
destination address 201.4.22.35.
Solution:
The router performs the following steps:
1. The first mask (/26) is applied to the destination address. The result is
201.4.22.0, which does not match the corresponding network address (row 1).
2. The second mask (/25) is applied to the destination address. The result is
201.4.22.0, which does not match the corresponding network address (row 2).
3. The third mask (/24) is applied to the destination address. The result is
201.4.22.0, which matches the corresponding network address. The
destination address of the package and the interface number m3 are passed to
ARP.
31
Example 10
Show the forwarding process if a packet arrives at R1 in Figure 2.13 with the
destination address 18.24.32.78.
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 180.70.65.200 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.
32
End of Slides
If you have any question?
33