Network Layer: Delivery, Forwarding, and Routing

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Network Layer:

Delivery, Forwarding,
and Routing
DELIVERY
• The network layer supervises the handling of
the packets by the underlying physical
networks.
• We define this handling as the delivery of a
packet.
Direct Versus Indirect Delivery
The delivery of a packet to its final destination is
accomplished by using two different methods of
delivery, direct and indirect.
Direct Delivery
Direct delivery occurs when the source and the
destination of the packet are located on the same
physical network or when the delivery is between the
last router and the destination host.
Indirect Delivery
If the destination host is not on the same network as the
deliverer, the packet is delivered indirectly.
In an indirect delivery, the packet goes from router to
router until it reaches the one connected to the same
physical network as its final destination.
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.
Forwarding Techniques

 Next-Hop method versus Route Method

 Network-specific Method versus Host-specific Method

 Default Method
Route method versus next-hop method
One technique to reduce the contents of routing table is
called next-hop method
In this technique, the routing table holds only the
address of the next hop instead of information about the
complete route ( route method).
The entries of a routing table must be consistent with
one another.
Host-specific versus network-specific method
In other words, we treat all hosts connected to
the same network as one single entity.
For example, if 1000 host are attached to the
same network, only one entry exist in the routing
table instead of 1000.
Default method
Forwarding Process
Let us assume that hosts and routers use classless
addressing.
In classless addressing, the routing table needs to have one
row of information for each block involved.
Example 1
Make a routing table for router R1, using the configuration
in the Figure
Solution
Example2
Show the forwarding process if a packet arrives at R1
in Figure with the destination address 180.70.65.140.
Solution
The router performs the following steps:
First step
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.
Second step
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
Example3
Show the forwarding process if a packet arrives at R1
in Figure with the destination address 201.4.22.35.
The router performs the following steps:
First step
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.
Second step
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.
Third step
The third mask (/24) is applied to the destination
address.

The result is 201.4.22.0, which matches the


corresponding network address.

The next-hop address and the interface number m3


are passed to ARP for further processing
Example4
Show the forwarding process if a packet arrives at R1
in Figure 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
ROUTING TABLE
A host or a router has a routing table with an entry for
each destination, (or a combination of destinations), to
route IP packet.
The routing table can be either :
Static
dynamic
Static routing table:
A static routing table contains information entered
manually.
The administrator enters the route for each destination
into the table.
When a table is created, it cannot update automatically
when there is a change in the Internet.
The table must be manually update by the
administrator.

A static routing table can be used in a small internet


that does not change very often
Dynamic routing table:

A dynamic routing table is updated periodically by using


one of the dynamic routing protocols such as RIP, OSPF,
or BGP.
Whenever there is a change in the Internet, such as
shutdown of a router or breaking of link, the dynamic
routing protocols update all the tables in the routers
automatically.
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, the 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. These are:
U (up): indicates the router is up and running.
If this flag is not present, it means that the router is down.
The packet cannot be forwarded and is discarded.
G ( gateway): means that the destination is in another network.
The packet is delivered to next-hop router for delivery.
When this flag is missing, it means the destination is in this
network
(direct delivery)
H (host-specific): indicates that the entry in the network address
field is a host-specific address.
When it is missing, it means that the address is only the network
address of the destination.
D ( added by redirection): indicates that routing information for
this destination has been added to the host routing table by
redirection message from ICMP.
M ( modified by redirection ): indicates that routing information for
this destination has been modified by redirection message from
ICMP.
Reference count: this field gives the number of users of
this route at the moment.
Use: this field shows the number of packet transmitted
through this router for the corresponding destination.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy