[go: up one dir, main page]

0% found this document useful (0 votes)
16 views89 pages

Unit 3

The document discusses the network layer's role in packet delivery, forwarding, and routing, highlighting direct and indirect delivery methods. It explains the importance of routing tables for forwarding packets and various techniques to manage their size, such as the next-hop and network-specific methods. Additionally, it covers unicast and multicast routing protocols, detailing their functionalities and applications in network communication.

Uploaded by

vishnu060405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views89 pages

Unit 3

The document discusses the network layer's role in packet delivery, forwarding, and routing, highlighting direct and indirect delivery methods. It explains the importance of routing tables for forwarding packets and various techniques to manage their size, such as the next-hop and network-specific methods. Additionally, it covers unicast and multicast routing protocols, detailing their functionalities and applications in network communication.

Uploaded by

vishnu060405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 89

Network Layer:

Delivery, Forwarding,
and Routing

22.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
22-
22-1 DELIVERY

The network layer supervises the handling of the


packets by the underlying physical networks
networks.. We
define this handling as the delivery of a packet
packet..

Topics discussed in this section:


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

In a direct delivery, the final destination of the packet is a host


connected to the same physical network as the deliverer.

Direct delivery occurs when the source and destination of the


packet are located on the same physical network.

The sender can easily determine if the delivery is direct.

It can extract the network address of the destination and


compare this address with the addresses of the networks to
which it is connected. If a match is found, the delivery is direct.
Figure 22.1 Direct and indirect delivery
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.

22.5
22-
22-2 FORWARDING

Forwarding means to place the packet in its route to


its destination
destination.. Forwarding requires a host or a router
to have a routing table
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
destination..

Topics discussed in this section:


Forwarding Techniques
Forwarding Process
Routing Table

22.6
Routing table
For a network router to know where to send packets of data it
receives, it uses a routing table.

The routing table contains a list of specific routing destinations,


and when the router receives a packet of data, it references the
routing table to know where to send that data.

The routing table may also contain information on how far each
destination is from the router. In essence, a routing table is a
map for the router.

The table is usually stored in a router or the network computer as


a database or file.

This information helps to find the best possible path.

The routing table has at least 3 fields: the destination network id,
cost of the path, next hop or address to send the packet.
22.7
However, this simple solution is impossible today in an
Internetwork such as the Internet because the number of entries
needed in the routing table would make table lookups inefficient.

Forwarding Techniques
Several techniques can make the size of the routing table
manageable and also handle issues such as security.

Next-Hop Method Versus Route Method


One technique to reduce the contents of a routing table is called the
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).
Figure 22.2 Route method versus next-hop method
Network-Specific Method Versus Host-Specific Method

A second technique to reduce the routing table and simplify the


searching process is called the network-specific method.

Here, instead of having an entry for every destination host


connected to the same physical network (host-specific method),
we have only one entry that defines the address of the
destination network itself.

In other words, we treat all hosts connected to the same network


as one single entity.

For example, if 1000 hosts are attached to the same network,


only one entry exists in the routing table instead of 1000.
Figure 22.3 Host-specific versus network-specific method

22.11
Default Method

Another technique to simplify routing is called the default


method.

In Figure 22.4 host A is connected to a network with two


routers. Router Rl routes the packets to hosts connected to
network N2. However, for the rest of the Internet, router R2 is
used.

So instead of listing all networks in the entire Internet, host A


can just have one entry called the default.

22.12
Figure 22.4 Default method

22.13
Figure 22.5 Simplified forwarding module in classless address

22.14
Note

In classless addressing, we need at least


four columns in a routing table.

22.15
Example 22.1

Make a routing table for router R1, using the


configuration in Figure 22.6.

Solution
Table 22.1 shows the corresponding table.

22.16
Figure 22.6 Configuration for Example 22.1

22.17
Table 22.1 Routing table for router R1 in Figure 22.6

22.18
Example 22.2

Show the forwarding process if a packet arrives at R1 in


Figure 22.6 with the destination address 180.70.65.140.
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.
22.19
Example 22.3

Show the forwarding process if a packet arrives at R1 in


Figure 22.6 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).
22.20
Example 22.3 (continued)

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.

22.21
Example 22.4

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.

22.22
Figure 22.7 Address aggregation

22.23
Figure 22.8 Longest mask matching

22.24
Example 22.5

As an example of hierarchical routing, let us consider


Figure 22.9. A regional ISP is granted 16,384 addresses
starting from 120.14.64.0. The regional ISP has decided
to divide this block into four subblocks, each with 4096
addresses. Three of these subblocks are assigned to three
local ISPs; the second subblock is reserved for future use.
Note that the mask for each block is /20 because the
original block with mask /18 is divided into 4 blocks.
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, each using
four addresses.
22.25
Example 22.5 (continued)

The second local ISP has divided its block into 4 blocks
and has assigned the addresses to four large
organizations.
The third local ISP has divided its block into 16 blocks
and assigned each block to a small organization. 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.

22.26
Figure 22.9 Hierarchical routing with ISPs

22.27
Figure 22.10 Common fields in a routing table

22.28
Example 22.6

One utility that can be used to find the contents of a


routing table for a host or router is netstat in UNIX or
LINUX. The next slide shows the list of the contents of a
default server. We have used two options, r and n. The
option r indicates that we are interested in the routing
table, and the option n indicates that we are looking for
numeric addresses. Note that this is a routing table for a
host, not a router. Although we discussed the routing table
for a router throughout the chapter, a host also needs a
routing table.

22.29
Example 22.6 (continued)

The destination column here defines the network address.


The term gateway used by UNIX is synonymous with
router. This column actually defines the address of the next
hop. The value 0.0.0.0 shows that the delivery is direct. The
last entry has a flag of G, which means that the destination
can be reached through a router (default router). The Iface
defines the interface.
22.30
Example 22.6 (continued)

More information about the IP address and physical


address of the server can be found by using the ifconfig
command on the given interface (eth0).

22.31
Figure 22.11 Configuration of the server for Example 22.6

22.32
22-
22-3 UNICAST ROUTING PROTOCOLS

A routing table can be either static or dynamic


dynamic.. A static
table is one with manual entries
entries.. A dynamic table is
one that is updated automatically when there is a
change somewhere in the Internet
Internet.. A routing protocol
is a combination of rules and procedures that lets
routers in the Internet inform each other of changes
changes..
Topics discussed in this section:
Optimization
Intra- and Interdomain Routing
Distance Vector Routing and RIP
Link State Routing and OSPF
Path Vector Routing and BGP
22.33
Figure 22.12 Autonomous systems

22.34
Figure 22.13 Popular routing protocols

22.35
Figure 22.14 Distance vector routing tables

22.36
Figure 22.15 Initialization of tables in distance vector routing

22.37
Note

In distance vector routing, each node


shares its routing table with its
immediate neighbors periodically and
when there is a change.

22.38
Figure 22.16 Updating in distance vector routing

22.39
Figure 22.17 Two-node instability

22.40
Figure 22.18 Three-node instability

22.41
Figure 22.19 Example of a domain using RIP

22.42
Figure 22.20 Concept of link state routing

22.43
Figure 22.21 Link state knowledge

22.44
Figure 22.22 Dijkstra algorithm

22.45
Figure 22.23 Example of formation of shortest path tree

22.46
Table 22.2 Routing table for node A

22.47
Figure 22.24 Areas in an autonomous system

22.48
Figure 22.25 Types of links

22.49
Figure 22.26 Point-to-point link

22.50
Figure 22.27 Transient link

22.51
Figure 22.28 Stub link

22.52
Figure 22.29 Example of an AS and its graphical representation in OSPF

22.53
Figure 22.30 Initial routing tables in path vector routing

22.54
Figure 22.31 Stabilized tables for three autonomous systems

22.55
Figure 22.32 Internal and external BGP sessions

22.56
22-
22-4 MULTICAST ROUTING PROTOCOLS

In this section, we discuss multicasting and multicast


routing protocols
protocols..

Topics discussed in this section:


Unicast, Multicast, and Broadcast
Applications
Multicast Routing
Routing Protocols

22.57
Figure 22.33 Unicasting

22.58
Note

In unicasting, the router forwards the


received packet through
only one of its interfaces.

22.59
Figure 22.34 Multicasting

22.60
Note

In multicasting, the router may


forward the received packet
through several of its interfaces.

22.61
Figure 22.35 Multicasting versus multiple unicasting

22.62
Note

Emulation of multicasting through


multiple unicasting is not efficient
and may create long delays,
particularly with a large group.

22.63
Note

In unicast routing, each router in the


domain has a table that defines
a shortest path tree to possible
destinations.

22.64
Figure 22.36 Shortest path tree in unicast routing

22.65
Note

In multicast routing, each involved


router needs to construct
a shortest path tree for each group.

22.66
Figure 22.37 Source-based tree approach

22.67
Note

In the source-based tree approach, each


router needs to have one shortest path
tree for each group.

22.68
Figure 22.38 Group-shared tree approach

22.69
Note

In the group-shared tree approach, only


the core router, which has a shortest
path tree for each group, is involved in
multicasting.

22.70
Figure 22.39 Taxonomy of common multicast protocols

22.71
Note

Multicast link state routing uses the


source-based tree approach.

22.72
Note

Flooding broadcasts packets, but


creates loops in the systems.

22.73
Note

RPF eliminates the loop in the


flooding process.

22.74
Figure 22.40 Reverse path forwarding (RPF)

22.75
Figure 22.41 Problem with RPF

22.76
Figure 22.42 RPF Versus RPB

22.77
Note

RPB creates a shortest path broadcast


tree from the source to each destination.
It guarantees that each destination
receives one and only one copy
of the packet.

22.78
Figure 22.43 RPF, RPB, and RPM

22.79
Note

RPM adds pruning and grafting to RPB


to create a multicast shortest
path tree that supports dynamic
membership changes.

22.80
Figure 22.44 Group-shared tree with rendezvous router

22.81
Figure 22.45 Sending a multicast packet to the rendezvous router

22.82
Note

In CBT, the source sends the multicast


packet (encapsulated in a unicast
packet) to the core router. The core
router decapsulates the packet and
forwards it to all interested interfaces.

22.83
Note

PIM-DM is used in a dense multicast


environment, such as a LAN.

22.84
Note

PIM-DM uses RPF and pruning and


grafting strategies to handle
multicasting.
However, it is independent of the
underlying unicast protocol.

22.85
Note

PIM-SM is used in a sparse multicast


environment such as a WAN.

22.86
Note

PIM-SM is similar to CBT but uses a


simpler procedure.

22.87
Figure 22.46 Logical tunneling

22.88
Figure 22.47 MBONE

22.89

You might also like