Sie sind auf Seite 1von 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

OPM

Network Information Source and Update Timing


routing decisions usually based on knowledge of network (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)
OPM 2

General routing techniques


Shortest path Routing Distance Vector Routing Link State Routing Hierarchical Routing Flooding Broadcast routing Multicast Routing Routing for mobile Hosts Routing in Ad Hoc Network
OPM 3

Routing algorithm
It is part of the network layer software responsible for deciding through which output line an incoming packet should be transmitted.

OPM

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 decisions on measurements or estimates of the current traffic and network topology.

OPM

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 link cost, time delay, and length of transmission line between source and destination etc.

OPM

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

OPM

Least cost algorithms


For packet switching networks and internet, mostly used least cost routing algorithms: Dijkstra algorithm Bellman-Ford algorithm

OPM

Example Packet Switched Network

OPM

Dijkstras Algorithm Example

OPM

10

Dijkstras Algorithm
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

OPM

11

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.

OPM

12

Example of Bellman-Ford algorithm

OPM

13

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
OPM 14

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

OPM

15

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 hops between 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.
OPM 16

Distance vector/Bellman Ford Routing


Dynamic routing

Each router maintains a routing table indexed by, and containing one 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 not for non-uniform data rate links.

It encounters Infinite count problem (good news spreads quickly and bad news spreads slowly)
OPM 17

Link State Routing


Dynamic routing Distance routing algorithm was replaced by Link state routing Removes the count to infinity problem and considers nonuniform data rate links

OPM

18

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)

OPM

19

Hierarchical routing
As network grows in size, routing tables grow, which results in more 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

OPM

20

Broadcast Routing
Hosts send message to all other nodes This method is wasteful of bandwidth Consumes too much bandwidth

OPM

21

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

OPM

22

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


OPM 23

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

OPM

24

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
OPM 25

Routing for Mobile hosts in GSM


Examples: Host moves one cell to another cell Host move one MSC to another MSC (Roaming) International host

OPM

26

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
OPM 27

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

OPM

28

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
OPM 29

Das könnte Ihnen auch gefallen