0% found this document useful (0 votes)
15 views37 pages

Routing

The document discusses the network layer's role in packet delivery, forwarding, and routing, highlighting the importance of routing tables and methods for packet delivery. It covers various routing protocols, including static and dynamic routing, as well as algorithms like Dijkstra's for finding optimal paths. Additionally, it explains the differences between distance vector and link state routing, along with specific protocols such as RIP and OSPF.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views37 pages

Routing

The document discusses the network layer's role in packet delivery, forwarding, and routing, highlighting the importance of routing tables and methods for packet delivery. It covers various routing protocols, including static and dynamic routing, as well as algorithms like Dijkstra's for finding optimal paths. Additionally, it explains the differences between distance vector and link state routing, along with specific protocols such as RIP and OSPF.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 37

Network Layer:

Delivery, Forwarding,
and Routing

22.1
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

22.2
Direct and indirect delivery

22.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.

22.4
Route method versus next-hop method

22.5
Host-specific versus network-specific method

22.6
Default method

22.7
Simplified forwarding module in classless address

22.8
Note

In classless addressing, we need at


least four columns in a routing table.

22.9
Example

Make a routing table for router R1, using the


configuration in Figure .

Solution
Table shows the corresponding table.

22.10
Configuration for Example

22.11
Routing table for router R1

22.12
Common fields in a dynamic routing table

22.13
• Mask: Mask applied for the entry
• Network Address: This field defines the network address to
which the packet is finally delivered.
• Next-hop Address: Address of the next-hop router to which
the packet is delivered
• Interface: Name of interface

• Flags:
• U (Up): It indicates that router is up and running.

• G (Gateway): The G flag means that the destination is in another


network. The packet is delivered to the next-hop router for delivery
(indirect). When this flag is missing, it means the destination is in this
network (direct delivery).

22.14
• H (Host-specific): It 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): The D indicates that routing information for
this destination has been added to the host routing table by a
redirection table by a redirection message from ICMP.
• M (Modified by redirection): It indicates that the routing information
for this destination has been modified by a redirection message from
ICMP.

• Reference Count: Indicates number of users of this route at the


moment.
• Use: Indicates number of packets transmitted through this route
for corresponding destination.

22.15
UNICAST ROUTING PROTOCOLS

A routing table can be either static or dynamic. A static table is


one with manual entries. A dynamic table is one that is updated
automatically when there is a change somewhere in the Internet.
A routing protocol is a combination of rules and procedures that
lets routers in the Internet inform each other of changes.

Topics discussed in this section:

Intra- and Interdomain Routing


Distance Vector Routing and RIP
Link State Routing and OSPF
Path Vector Routing and BGP
22.16
Autonomous systems

22.17
Popular routing protocols

22.18
Optimality Principal
• This statement is known as the optimality principle
(Bellman,1957).
• It states that if router J is on the optimal path from
router I to router K, then the optimal path from J to K
also falls along the same route
• The set of optimal routes to a particular node forms a
sink tree.
• Sink trees are not necessarily unique
• Goal of all routing algorithms
• Discover sink trees for all destinations

22.19
Shortest Path Algorithm
Mark the source node as permanent.
Designate the source node as the working node.
Set the tentative distance to all other nodes to infinity.
While some nodes are not marked permanent
Compute the tentative distance from the source to all nodes adjacent to
the working node. If this is shorter than the current tentative distance
replace the tentative distance of the destination and record the label of
the working node there.

Examine ALL tentatively labeled nodes in the graph. Select the node with
the smallest value and make it the new working node. Designate the node
permanent.

22.20
Dijkstra algorithm

22.21
Shortest Path Algorithm

22.22
Why the Shortest Path Algorithm
Works
B
E
A

Z
• Perhaps A*ZE is a better path to E than ABE
• nodes are made permanent when paths to them are the shortest paths in
the graph
• All subsequent paths found to permanent nodes will be at least as long as
previously found paths
• Two cases
1.) If Z is permanent, then we have already checked A*ZE
2.) If Z is tentatively labeled, paths to Z must be longer than paths to E,
otherwise Z would have been made permanent
Flooding (a nonadaptive routing
algorithm)
• Brute force routing
• Every incoming packet is sent on every outgoing line
• Always finds the shortest path quickly
• Also finds many long paths
• Time to live is set to size of subnet
• Selective Flooding
• Flood only in the direction of the destination
• Practical in a few settings
• Military Applications
• Distributed Databases
• Metric for comparison
Distance Vector Routing (an adaptive
routing algorithm)
• Neighboring routers periodically exchange information from their
routing tables.
• Routers replace routes in their own routing tables anytime that
neighbors have found better routes.
• Information provided from neighbors
• Outgoing line used for destination
• Estimate of time or distance
• can be number of hops, time delay, packet queue length, etc.
Distance Vector Routing (an adaptive routing
algorithm)
The Count to Infinity Problem
Link State Routing (an adaptive routing algorithm)
Five Steps
1.) Discover your neighbors and learn their addresses.
2.) Measure the cost (delay) to each neighbor.
3.) Construct a packet containing all this information
4.) Send this packet to all other routers.
5.) Compute the shortest path to every other router.
1.) Discovering Your Neighbors
• Send “Hello” packet on each point-to-point line. Destination node
replies with its address.

2.) Measuring Line Cost

• Send an “ECHO” packet over the line.


• Destination is required to respond to “ECHO” packet immediately.
• Measure the time required for this operation.
Build Link State Packets
Distributing the Link State Packets
• Use selective flooding
• Sequence numbers prevent duplicate packets from being propagated
• Lower sequence numbers are rejected as obsolete
Computing the New Routes
• Dijkstra’s Shortest Path algorithm is used to determine the shortest
path to each destination.
Hierarchical Routing
• Addresses the growth of routing tables
• Routers are divided into regions
• Routers know the routes for their own regions only
• Works like telephone routing
• Possible hierarchy
• city, state, country, continent
• Optimal number of levels for an N router subnet is lnN
Hierarchical Routing
RIP Protocol
• RIP stands for Routing Information Protocol .
• Distance Vector Protocol (Bellman Ford Algorithm)
• Classful addressing protocol (VLSI and Summarization not supported)
• Its works on HOP Count Matrix
• AD value 120, Protocol no 520
• Maximum 16 routers can be connected (0-15 Hop Count)
• Its only works on HOP count if the better route matrix is available (ignore the matrix)
• Broadcast its update in every 30 second (Bandwidth utilization high)
• Slow Convergence
• Hold Down Timer 180 second
• Flush Timer (180+60) 240 second (Completely remove the path)
22.35
OSPF Protocol

22.36
OSFP Contt..
• Process Id is locally affected
• Must have a area 0 for connection (Backbone area)
• If any router configure with area 1 and area 0 is called as ABR (Area
Border Router)
• Router ospf 500
• Network 192.168.1.0 0.0.0.255 area 0
• Network 10.0.0.0 0.255.255.255 area 0

22.37

You might also like