Delivery Forwarding 2025
Delivery Forwarding 2025
Direct delivery occurs when the source and destination of the packet
are located on the same physical network or if the delivery is
between the last router and the destination host
Direct delivery
Direct delivery
It can extract the network address of the destination (using the mask)
and compare this address with the addresses of the networks to which
it is connected.
In direct delivery, the sender uses the destination IP address to find the
destination physical address.
A B
The sender then uses ARP to find the physical address of the next
router.
In direct delivery, the address mapping is between the IP address of the final
destination and the physical address of the final destination.
Delivery always involves one direct delivery but zero or more indirect
deliveries.
Next-Hop Method
One technique to reduce the contents of a routing table.
Here, the routing table holds only the address of the next hop instead of
information about the complete route.
Treat all hosts connected to the same network as one single entity.
Network-specific
routing table for host S
Destination Next Hop
Host-specific
routing table for host S N2 R1
For example, 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.
N1
R1 R3
Host B
N2 R2 N3
So instead of listing all networks in the entire Internet, host A can just
have one entry called the default (normally defined as network
address 0.0.0.0).
Default
R2
router
Discuss
Forwarding without subnetting : contents of a routing table and forwarding
module for the situation in which there is no subnetting.
3. The interface number defines the outgoing port from which the
packet is sent out.
3. The result of Step 2 for class A, B, or C and the destination address are
used to extract the network address. This is done by masking off
(changing to 0s) the rightmost 8, 16, or 24 bits based on the class
4. The class of the address and the network address are used to find next-
hop information. The class determines which table is to be searched. The
module searches this table for the network address. If a match is found,
the next-hop address and the interface number of the output port are
extracted from the table. If no match is found, the default is used.
5. The ARP module uses the next-hop address and the interface number
to find the physical address of the next router. It then asks the data link
layer to deliver the packet to the next hop.
Figure 6.8 shows an imaginary part of the Internet. Show the routing tables
for router R1.
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).
The network address is extracted by masking off the leftmost 24 bits of the
destination address; the result is 192.16.7.0.
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.
Solution
The destination address in binary is
10100111 00011000 10100000 00000101.
The class is B.
The network address can be found by masking off 16 bits of the destination address, the
result is 167.24.0.0.
The packet needs to be forwarded to the default router (the network is somewhere else in
the Internet).
The next-hop address 111.30.31.18 and the interface number m0 are passed to ARP.
The routers that handle subnetting are either at the border of the
organization site or inside the site boundary.
3. The destination address and the mask are used to extract the
subnet address.
4. The table is searched using the subnet address to find the next-hop
address and the interface number. If no match is found, the default
is used.
5. The next-hop address and the interface number are given to ARP .
36
Example 6.4
Second, the address x.y.z.t/n for the interface m4 because we do not know to
which network this router is connected.
Third, the table has a default entry for packets that are to be sent out of the
site. The router is configured to apply the subnet mask /18 to any destination
address.
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.
The router receives the packet and applies the mask (/18). The network address
is 7.22.64.0.
The router uses the address of the default router (not shown in figure) and sends
the packet to that router.
Destination address in the packet gives no clue about the network address.
Need to have an extra column that includes the mask for the corresponding
block.
Solution
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.
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 .
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.
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 packet and the interface number m3 are passed
to ARP
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 someplace else in the Internet.
The routing table for router R1 is given in Table 6.2. Draw its topology?
The Internet today has a sense of hierarchy. Internet is divided into backbone,
regional and local ISPs.
If the routing table has a sense of hierarchy like the Internet architecture, the
routing table can decrease in size.
Let us take the case of a local ISP. A local ISP can be assigned a single, but large,
block of addresses with a certain prefix length.
The local ISP can divide this block into smaller blocks of different sizes, and
assign these to individual users and organizations.
If the block assigned to the local ISP starts with a.b.c.d/n, the ISP can create
blocks starting with e.f.g.h/m, where m may vary for each customer and is
greater than n.
All customers of the local ISP are defined as a.b.c.d/n to the rest of the
Internet.
Every packet destined for one of the addresses in this large block is
routed to the local ISP. There is only one entry in every router in the
world for all of these customers.
Inside the local ISP, the router must recognize the subblocks and route
the packet to the destined customer.
To decrease the size of the routing table even further, we need to extend
hierarchical routing to include geographical routing.
We must divide the entire address space into a few large blocks.
The routers of ISPs outside of Europe will have only one entry for packets to
Europe in their routing tables.
• To make searching more efficient, the routing table can be divided into three
tables (called buckets), one for each class.
• When the packet arrives, the router applies the default mask to find the
corresponding bucket (A, B, or C).
• The router then searches the corresponding bucket instead of the whole
table.
The simplest, but not the most efficient, search method is called the longest
prefix match.
The routing table can be divided into buckets, one for each prefix. The router first
tries the longest prefix.
If the address is not found, the next prefix is searched. And so on.
It is obvious that this type of search takes a long time. One solution is to change
the data structure used for searching.
Instead of a list, other data structures (such as a tree or a binary tree) can be
used.
TCP/IP Protocol Suite 62
Forwarding Based on Label
x
y
x
Switch 1
0004
2
0012
Here some conventional routers in the Internet can be replaced by MPLS routers
that can behave like a router and a switch.
When behaving like a router, MPLS can forward the packet based on the
destination address; when behaving like a switch, it can forward a packet based
on the label.
To simulate connection-oriented switching using a protocol like IP, the first thing
needed is to add a field to the packet that carry the label.