6 network layer routing
TRANSCRIPT
-
8/13/2019 6 Network Layer Routing
1/29
Network layer
Serves to Transport Layer
Routing packets to destination device
Routing Algorithms
Network Layer Addresses (IP, VP/VC etc.)
Packet fragmentation , Aggregation/ Integration and concatenation
1OPM
-
8/13/2019 6 Network Layer Routing
2/29
Network Information Source and Update
Timing
routing decisions usually based on knowledge ofnetwork (not always)
distributed routing
using local knowledge, info from adjacent nodes, info from all nodes on
a potential route central routing
collect info from all nodes
Issue of update timing when is network info held by nodes updated ?
fixed - never updated (Static)
adaptive - regular updates (Dynamic)
2OPM
-
8/13/2019 6 Network Layer Routing
3/29
General routing techniques
Shortest path Routing
Distance Vector Routing
Link State RoutingHierarchical Routing
Flooding
Broadcast routing
Multicast Routing
Routing for mobile Hosts
Routing in Ad Hoc Network
3OPM
-
8/13/2019 6 Network Layer Routing
4/29
Routing algorithm
It is part of the network layer software responsible for deciding
through which output linean incoming packet should be
transmitted.
4OPM
-
8/13/2019 6 Network Layer Routing
5/29
Routing algorithms
Adaptive (Dynamic):- Change their routing decisions to
reflect changes in the network traffic and topology
Non-adaptive (Static):- Do not change their routing decisionson measurements or estimates of the current traffic and
network topology.
5OPM
-
8/13/2019 6 Network Layer Routing
6/29
Least cost algorithm
All packet-switched and internet base networks take their
routing decision on some form of least-cost criterion.
Criterion may be minimum number of hops, minimum linkcost, time delay, and length of transmission line between
source and destination etc.
6OPM
-
8/13/2019 6 Network Layer Routing
7/29
Least cost algorithm
Link cost/value
Inversely proportional to the link capacity
Proportional to the current load on the link
Or some combination of above two
Link cost may be asymmetric in both direction
7OPM
-
8/13/2019 6 Network Layer Routing
8/29
Least cost algorithms
For packet switching networks and internet, mostly used least
cost routing algorithms:
Dijkstra algorithm
Bellman-Ford algorithm
8OPM
-
8/13/2019 6 Network Layer Routing
9/29
Example Packet Switched Network
9OPM
-
8/13/2019 6 Network Layer Routing
10/29
Dijkstras Algorithm Example
10OPM
-
8/13/2019 6 Network Layer Routing
11/29
DijkstrasAlgorithm
1. [Initialization]
T= {s}; where T and s are set of traveled nodes and source node
L(n) = w(s, n) for n is not equal to s; where L stores link cost from node s to
n
2. [Get Next Node] Choosing the next node which is having minimum link cost
Find x which is not a element of T such that L(x) =min L(j); for j is not a
element of T; where x (next node) would be the least cost node from s.
3. [Update Least-cost paths]
L(n)= min[L(n), L(x) + w(x, n)]; for all n not element of T
11OPM
-
8/13/2019 6 Network Layer Routing
12/29
Bellman-Ford Algorithm
This algorithm finds the shortest paths from a given source
node subject to the constraints that the paths contains at most
one link
Then find the shortest paths with a constraints of paths of at
most two links, and so on.
12OPM
-
8/13/2019 6 Network Layer Routing
13/29
Example of Bellman-Ford algorithm
13OPM
-
8/13/2019 6 Network Layer Routing
14/29
Bellman-Ford Algorithm
1. [initialization]
L0(n)= infinity, all values of n except s (source node)
Lh(s) = 0, for all h (hops)
2. [Update]
For each successive h>=0:
Lh+1(n) = min [Lh(j) + w(j, n)];
Where j represent all the nodes one hop less distant than n from s.
Where
h = hop count
s= source node
n = node (Router) in the network
Lh(n)= link cost of node n which is at h hop distance from s
j = node one hop less distance then node n
w(j, n)= link cost from node j to n
14OPM
-
8/13/2019 6 Network Layer Routing
15/29
Comparison
In Bellman-Ford algorithm, the calculation for node n
involves knowledge of the link cost of all neighboring nodes
plus the total link cost to each neighboring nodes from a
particular node /Source Node
In Dijkstra algorithm, each node must have complete
topological information about the network
15OPM
-
8/13/2019 6 Network Layer Routing
16/29
Flooding
Static algorithm Every incoming packet is sent out on every out going line except
the one it arrived on.
It is used to find No. of hopsbetween source and destination
Consumes too much bandwidth
To reduce duplicate packets in the network Packet Sequence No.
can be used to discard the duplicate packets arrived at a node.
Selective flooding reduces bandwidth wastage by allowing
flooding in the direction/ path which leads to destination device.
16OPM
-
8/13/2019 6 Network Layer Routing
17/29
Distance vector/Bellman Ford Routing
Dynamic routing
Each router maintains a routing table indexed by, and containingone entry for each router in the subnet.
The entry contains link cost/hop count and out going path
It is good for the network having uniform data rate links but notfor non-uniform data rate links.
It encounters Infinite count problem (good news spreads quicklyand bad news spreads slowly)
17OPM
-
8/13/2019 6 Network Layer Routing
18/29
Link State Routing
Dynamic routing
Distance routing algorithm was replaced by Link state routing
Removes the count to infinity problem andconsiders non-
uniform data rate links
18OPM
-
8/13/2019 6 Network Layer Routing
19/29
Link State Routing
Steps of Link state routing
Discover neighbors and their Addresses
Measure the cost to each of its neighbors
Construct a packet telling all it has just learned Send this packet to all other nodes
Compute the shortest path to every other router (Dijkstra
algorithm can be used)
19OPM
-
8/13/2019 6 Network Layer Routing
20/29
Hierarchical routing
As network grows in size, routing tables grow, which results inmore memory consumption, CPU processing and bandwidth
are needed to send status report.
Routers are divided into Regions
Each router contains information about its region only
For big network, two or more level hierarchy may be possible
as Regions=> Clusters=> Zones=> Groups and so on
20OPM
-
8/13/2019 6 Network Layer Routing
21/29
Broadcast Routing
Hosts send message to all other nodes
This method is wasteful of bandwidth
Consumes too much bandwidth
21OPM
-
8/13/2019 6 Network Layer Routing
22/29
Multicast routing
Sending a message to a group in network is called multicasting,
and its routing algorithm is called multicast routing
Multicasting requires group management
Either host must inform their routers about changes in group
membership, or router must query their host periodically
22OPM
-
8/13/2019 6 Network Layer Routing
23/29
Routing for Mobile hosts
Hosts are mobile and routers are fixed
The portable devices supports mobility which increases
complexity in routing.
Type of Hosts
Stationary Host
Migratory Host
Mobile Host
23OPM
-
8/13/2019 6 Network Layer Routing
24/29
Routing for Mobile hosts
A big communication network is divided into small units such
as area (LAN, WLAN,MAN and PAN).
Foreign agents:- Keeps track of all mobile hosts visiting the
area.
Home agent:- Keeps track of hosts Whose home is in same
area
24OPM
-
8/13/2019 6 Network Layer Routing
25/29
Routing for Mobile hosts
Visiting host registration process
Periodically, each foreign agent broadcasts a packet announcing its
existence, vice versa also possible.
Mobile host registers with the foreign agent, giving its home address
& security information.
The foreign agent contacts the mobile hosts home agent.
The home agent examines the security information and permits
foreign agent to proceed.
The foreign agent gets the acknowledgement from the home agent, it
makes an entry and informs the mobile host that it is now registered
25OPM
-
8/13/2019 6 Network Layer Routing
26/29
Routing for Mobile hosts in GSM
Examples:
Host moves one cell to another cell
Host move one MSC to another MSC (Roaming)
International host
26OPM
-
8/13/2019 6 Network Layer Routing
27/29
Routing in Ad Hoc Network
Called MANETS (Mobile AdHoc NETworks)
Host and Router both are mobile
Each node works as independent entity . These nodes are self
organized and self governed.
No need of base station or facilitator
Each node works as a host and router
27OPM
-
8/13/2019 6 Network Layer Routing
28/29
Routing in Ad Hoc Network
Examples:
Military vehicles in battle fields with no existing/fixed
infrastructure
Groups of ships in sea
Wireless Network by the Laptops without WiFi Access Point
Bluetooth
28OPM
-
8/13/2019 6 Network Layer Routing
29/29
Routing in Ad Hoc Network
Topology may be changing all the time, due to which routing
in Adhoc network is different
AODV (AdHoc On-demand Distance Vector) routing
algorithm is a distant relative of Bellman-Ford algorithm
This Algorithm is adapted to work in a mobile environment
and takes into account the limited bandwidth and low battery
life
It is a on-demand algorithm
29OPM