Professional Documents
Culture Documents
Chapter 6
Delivery and
Routing of
IP Packets
McGraw-Hill
6-2
Connection-Oriented Services
The network layer protocol first makes a connection
between the source and destination hosts, then starts
transmission of data. After the transmission of data is
over, the network layer tears down the connection.
Connectionless Services
The network layer protocol treats each packet
independently, with each packet having no relationship
to any other packet.
McGraw-Hill
6-3
Direct delivery
McGraw-Hill
6-4
Indirect delivery
6-5
Routing Methods:
Next-Hop Routing
! Network-Specific Routing
! Host-Specific Routing
! Default Routing
!
McGraw-Hill
6-6
Next-hop routing
Only the next router is specified in the RT for each destination host
McGraw-Hill
6-7
(The following seven slides explain the essence of the next-hop routing)
McGraw-Hill
6-8
Suppose that the costs associated with the internode links are as shown.
(The minimal cost routes are shown on the next slide).
B
3
C
2
1
4
6
4
1
McGraw-Hill
6-9
B
3
C
2
1
2
4
6
4
1
5
RT at node 1
RT at node 2
Dest.
node
Next
node
Dest.
node
Next
node
1
2
3
4
5
6
2
6
2
6
6
1
2
3
4
5
6
1
4
4
4
1
4
6
McGraw-Hill
3
5
6-10
B
3
C
2
1
2
4
6
4
1
5
RT at node 6
RT at node 4
Dest.
node
Next
node
Dest.
node
Next
node
1
2
3
4
5
6
1
1
5
5
5
-
1
2
3
4
5
6
2
2
3
5
5
4
6
3
5
McGraw-Hill
3
5
6-11
B
3
C
2
1
4
6
4
1
5
RT at node 5
RT at node 3
Dest.
node
Next
node
Dest.
node
Next
node
1
2
3
4
5
6
6
4
3
4
6
1
2
3
4
5
6
5
4
4
5
5
4
6
3
5
McGraw-Hill
3
5
6-12
RT at node 1
Dest.
node
Next
node
1
2
3
4
5
6
2
6
2
6
6
4
6
"An optimal policy has the property that whatever the initial state and
the initial decision are, the remaining decisions must constitute an
optimal policy with regard the state resulting from the first decision"
McGraw-Hill
6-13
a
First link of
the optimal
route a-x-b
McGraw-Hill
Remaining part
of the optimal
route a-x-b
The McGraw-Hill Companies, Inc., 2000
6-14
Network-specific routing
Only one entry exists in RT for all hosts
connected to the same physical network
(the most common method)
Host-specific routing
6-15
McGraw-Hill
6-16
Default routing
Anything not
specified above
McGraw-Hill
6-17
6-18
6-19
Host
A
Router
R
Router
S
Host
B
IP datagram stays basically the same all the way (exception: TTL)
McGraw-Hill
Routing Table
6-20
McGraw-Hill
6-21
Windows has a specific way of displaying the routing table: 1st line shows the default router, the
2nd line is loopback route, the 3rd line defines the range of addresses on the local network
segment, the line with 224.0.0.0 is for multicast addresses, the line with 255.255.255.255 is for
broadcast.
McGraw-Hill
The McGraw-Hill Companies, Inc., 2000
6-22
Routing Module
Get the packet;
for (each entry in RT) {
Apply the mask to packet destination address;
if (the result matches the value in destination field) {
if (G flag present)
Use the next-hop address from the RT;
(indirect delivery)
else
Use the destination address from the packet;
(direct delivery)
Send the packet to the fragmentation module;
return; // Routing done
}
}
// No match is found
Send an ICMP error message;
return;
McGraw-Hill
McGraw-Hill
6-23
6-24
Mask
Destination
Next Hop
I/f
255.0.0.0
111.0.0.0
--
m0
255.255.255.224
193.14.5.160
m2
255.255.255.224
193.14.5.192
m1
-------------------------------------------------------------------------------255.255.255.255
194.17.21.16
111.20.18.14
m0
--------------------------------------------------------------------------------255.255.255.0
192.16.7.0
111.15.17.32
m0
255.255.255.0
194.17.21.0
111.20.18.14
m0
--------------------------------------------------------------------------------0.0.0.0
McGraw-Hill
0.0.0.0
111.30.31.18
m0
6-25
Example 1
Router R1 receives 500 packets for destination 192.16.7.14; the
algorithm applies the masks row by row to the destination address
until a match (with the value in the second column) is found:
Direct delivery
192.16.7.14 & 255.0.0.0
# 192.0.0.0 no match
no match
Host-specific
192.16.7.14 & 255.255.255.255 #192.16.7.14 no match
Network-specific
192.16.7.14 & 255.255.255.0
McGraw-Hill
#192.16.7.0 match
The McGraw-Hill Companies, Inc., 2000
Example 2
6-26
# 193.0.0.0
McGraw-Hill
no match
match
6-27
Example 3
#200.0.0.0
no match
no match
no match
Host-specific
200.34.12.34 & 255.255.255.255 #200.34.12.34
McGraw-Hill
no match
6-28
Example 3 (cont.)
no match
no match
Default
200.34.12.34 & 0.0.0.0
McGraw-Hill
# 0.0.0.0.
match
The McGraw-Hill Companies, Inc., 2000
6-29
Example 4
Make the routing table for router R1 in this figure:
Mask
Destination
Next Hop
I.
255.255.0.0
134.18.0.0
--
m0
255.255.0.0
129.8.0.0
222.13.16.40
m1
255.255.255.0
220.3.6.0
222.13.16.40
m1
0.0.0.0
0.0.0.0
134.18.5.2
m0
McGraw-Hill
6-30
Example 5
Mask
Destination
Next Hop
Interface
255.255.255.0
200.8.4.0
----
m2
255.255.255.0
80.4.5.0
m1 (or m2)
255.255.255.0
80.4.6.0
m1 (or m2)
0.0.0.0
0.0.0.0
McGraw-Hill
?????????
m0
The McGraw-Hill Companies, Inc., 2000
6-31
Example 6
Mask
255.255.0.0
255.255.0.0
255.255.0.0
255.255.0.0
255.255.0.0
0.0.0.0
McGraw-Hill
Next Hop
190.17.6.5
180.14.2.5
110.70.4.6
Interface
m0
m2
m1
m1
m2
m0
6-32
Geographical Routing
Hierarchical Routing
Further decrease of RT size
(large blocks: North America,
Europe, Asia, Africa,)
RT Search Algorithms
6-33
Internet today
ISP = Internet Service Provider
National ISPs (backbone networks):
SprintLink,
PSINet,
UUNet
Technology,
AGIS,
Internet MCI
Local ISPs
McGraw-Hill
6-34
Hierarchical Routing
Way to keep RTs smaller and more manageable
R1
R2
X1
X2 X3
X
X1
AXA2
Y
Y1
Z
R3
Y2
Y
X3
Y1 Y2
R4
Z1
Z2
Z
Z1
Z2
6-35
X
X1
X2 X3
Y1
X
X1
McGraw-Hill
A XA2
Y2
Z1
Y
X3
Y1 Y2
Z2
Z
Z1
Z2