CH 6
CH 6
CH 6
Delivery, Forwarding,
and Routing of IP Packets
Objectives
Upon completion you will be able to:
Connection Types
Direct Versus Indirect Delivery
Connection Types
Connection Oriented Service – First connection established from
source to dst., then packets are sent after one another. When all
packets are delivered, connection is terminated.
Routers do not calculate route for each individual packet.
Connectionless Service – Each packet independent, no relationship
with other packets. Every packet may or may not travel the same
path.
IP is a connectionless protocol.
Direct Delivery – Dst is host connected to same physical Network.
Or the delivery is between last router and dst host.
Indirect Delivery – Dst is host connected to other network.
Packet goes from router to router.
Sender uses Dst. IP addr. And routing table to find IP addr of next
router.
Sender uses ARP to find physical addr. Of next router.
Forwarding Techniques
Forwarding with Classful Addressing
Forwarding with Classless Addressing
Combination
Forwarding Techniques
Next Hop Method – Routing table holds only the addr. Of next hop
instead of complete route.
See Fig.
Forwarding Techniques
Forwarding Techniques
Forwarding Techniques
Default Routing Method – Host can have just one entry called default.
A can have default entry with network address 0.0.0.0
See fig.
Each routing table has three columns
– Network addr. Of dst. Network. (We use network-specific
Forwarding.)
– Next hop address (Empty for direct delivery)
– Interface number (Defines outgoing port)
See fig.
Solution
Figure 6.9 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 as we will see in Chapter 7.
If variable length subnetting, we need several tables otherwise we need
only one table
See fig.
The process
– Extract dst. Addr. Of packet.
– Use mask to extract subnet address.
– Search table using subnet addr. To find next-hop addr. & interface
– Number.
– Next-hop addr and interface addr. Are given to ARP.
TCP/IP Protocol Suite 28
Figure 6.10 Simplified forwarding module in classful address with subnetting
Solution
The mask is /18. After applying the mask, the subnet
address is 145.14.0.0. The packet is delivered to ARP
with the next-hop address 145.14.32.78 and the
outgoing interface m0.
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.
Whole address space is one entity; no classes.
Table searched based on network address.
Mask is included in the table.
Fig. Shows simple forwarding module for classless addressing.
Solution
Table 6.1 shows the corresponding table.
Solution
The router performs the following steps:
Solution
We know some facts but we don’t have all for a
definite topology. We know that router R1 has three
interfaces: m0, m1, and m2. We know that there are
three networks directly connected to router R1. We
know that there are two networks indirectly connected
to R1. There must be at least three other routers
involved (see next-hop column). We know to which
networks these routers are connected by looking at
their IP addresses. So we can put them at their
appropriate place.
See Next Slide
TCP/IP Protocol Suite 52
Example 11 (Continued)
Address Aggregation
The first local ISP has divided its assigned subblock into 8
smaller blocks and assigned each to a small ISP. Each small
ISP provides services to 128 households (H001 to H128), each
using four addresses. Note that the mask for each small ISP is
now /23 because the block is further divided into 8 blocks.
Each household has a mask of /30, because a household has
only 4 addresses (232−30 is 4).
The second local ISP has divided its block into 4 blocks and
has assigned the addresses to 4 large organizations (LOrg01 to
LOrg04). Note that each large organization has 1024 addresses
and the mask is /22.
See Next Slide
TCP/IP Protocol Suite 60
Example 12 (Continued)
The third local ISP has divided its block into 16 blocks and
assigned each block to a small organization (SOrg01 to
SOrg15). Each small organization has 256 addresses and the
mask is /24.
There is a sense of hierarchy in this configuration. All routers
in the Internet send a packet with destination address
120.14.64.0 to 120.14.127.255 to the regional ISP. The regional
ISP sends every packet with destination address 120.14.64.0 to
120.14.79.255 to Local ISP1. Local ISP1 sends every packet
with destination address 120.14.64.0 to 120.14.64.3 to H001.
$ netstat -rn
Kernel IP routing table
Destination Gateway Mask Flags Iface
153.18.16.0 0.0.0.0 255.255.240.0 U eth0
127.0.0.0 0.0.0.0 255.0.0.0 U lo
0.0.0.0 153.18.31. 254 0.0.0.0 UG eth0.
$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:B0:D0:DF:09:5D
inet addr:153.18.17.11 Bcast:153.18.31.255 Mask:255.255.240.0
....
Components