Transcript ch22 part1

Chapter 22
Network layer
Delivery, Forwarding and
Routing
1
Network layer
2
Direct and indirect delivery
3
FORWARDING
Forwarding means to place the packet in its route to its
destination. Forwarding requires a host or a router to
have a routing table. When a host has a packet to send
or when a router has received a packet to be forwarded,
it looks at this table to find the route to the final
destination.
Topics discussed in this section:
Forwarding Techniques
Forwarding Process
Routing Table
4
Route method versus next-hop method
•Forwarding means to place the packet in its route to its destination
using routing table.
•Next-Hop Method is technique to reduce the contents of a routing
table ,the routing table holds only the address of the next hop instead of
information about the complete route
5
Host-specific versus network-specific method
•Instead of having an entry for every destination host connected to the same
physical network
•One entry that defines the address of the destination network itself.
•All hosts connected to the same network treated as one single entity.
6
Default method
7
Simplified forwarding module in classless address
Note
In classless addressing, we need at least four columns in a
routing table.
8
Example 1: Make a routing table for router R1, using the
following configuration
m3
(/0)
(0.0.0.0)
9
Example
Show the forwarding process if a packet arrives at R1 with
the destination address 180.70.65.140.
Routing table for R1:
(/0)
(0.0.0.0)
10
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
and the interface number m0 are passed to ARP for
further processing .
11
Example
Show the forwarding process if a packet arrives at R1 in
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.
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 packet and the interface number m3
12
Example
Show the forwarding process if a packet arrives at R1 in
Figure 22.6 with the destination address 18.24.32.78.
Solution
This time all masks are applied, one by one, 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.
13
Routing
Packet go from source to destination via routers.
 Routing means to place the packet in its route to its destination.
 Routing requires a host or a router to have a routing table.
When a host has a packet to send or when a router has
received a packet to be forwarded, it looks at this table to find
the route to the final destination
14
Routing Table
Static :
 A static routing table contains information entered manually.
 The table must be manually altered by the administrator when there is a change
in the Internet.
 used in a small internet that does not change very often or in an experimental
internet for troubleshooting.
Dynamic:
 Updated automatically when there is change in the Internet.
For instance, they need to be updated when a router is down, and they need to
be updated whenever a better route has been found
 Routing protocols are needed to create the routing tables dynamically.
 A routing protocol is a combination of rules and procedures that:
 Lets routers in the internet inform one another of changes.
 Allows routers to share whatever they know about the internet or their neighbourhood.
 big internet such as the Internet need to be updated dynamically for efficient
delivery of the IP packets.
15
Routing Table Format
•
•
•
routing table for classless addressing has a minimum of four columns.
the number of columns is vendor-dependent.
Common fields in a routing table:
•
•
•
•
•
•
•
Mask. This field defines the mask applied for the entry.
Network address. This field defines the network address to which the packet is finally delivered. In
the case of host-specific routing, this field defines the address of the destination host.
Next-hop address. This field defines the address of the next-hop router to which the packet is
delivered.
Interface. This field shows the name of the interface.
Flags. This field defines up to five flags. Flags are on/off switches that signify either presence or
absence. The five flags are U (up), G (gateway), H (host-specific), (added by redirection), and M
(modified by redirection).
Reference count. This field gives the number of users of this route at the moment.
Use. This field shows the number of packets transmitted through this router for the corresponding
destination.
16
Unicast Routing
 In unicast routing, there is only one source and only
one destination.
 When a router receives a packet, it forwards the
packet through only one of its ports (the one
belonging to the optimum path) as defined in routing
table.
 Discard the packet, if there is no route.
17
Autonomous systems
 Autonomous System (AS): Group of networks and routers under the authority
of a single administration.
 Routers inside an autonomous system is referred to as interior routing
(Intradomain).
 Routing between autonomous systems is referred to as exterior routing
(Interdomain).
 Solid lines show the
communication between
routers that use interior routing
protocols.
 Broken lines show the
communication between
routers that use an exterior
routing protocols.
18