Top Banner
Network Layer Services Packet Switching – Send Packet, Receive Packet path determination routing algorithms forwarding call setup if required Connectionless (datagram) Service – Internet packets forwarded using destination host address Connection-Oriented (virtual circuit) Service – ATM call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) every router on source-dest path maintains “state” for each passing connection link, router resources (bandwidth, buffers) may be allocated to VC to get circuit-like performance Note: QoS issue starts to blur the boundary of connection types
16

Routing

Oct 31, 2014

Download

Documents

Amit Pandey

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Routing

Network Layer Services

Packet Switching – Send Packet, Receive Packet path determination routing algorithms forwarding call setup if required

Connectionless (datagram) Service – Internet packets forwarded using destination host address

Connection-Oriented (virtual circuit) Service – ATM call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) every router on source-dest path maintains “state” for each

passing connection link, router resources (bandwidth, buffers) may be allocated to

VC to get circuit-like performance Note: QoS issue starts to blur the boundary of connection

types

Page 2: Routing

Datagram and Virtual Circuit

DatagramRouting tables

Connection ID

From H1 with CID 1

From H3 with CID 1

CID changed to 2

A’s table changed

(why? How?)

Page 3: Routing

Comparison of Virtual-Circuit and Datagram Subnets

5-4

PVC, SVCSetup vs

parsing

Packet Routing

Session Routing

Page 4: Routing

Routing Algorithms

Goal: determine “good” path thru network from source to dest Good Path usually means minimum cost path Correctness, simplicity, robustness, stability, fairness, optimality Conflict between fairness and optimality

Min mean packet delay, Max network throughput, Min # of hops

Optimality Principle If J is on the optimal path from I to K,

then optimal path from J to K is the same

Sink Tree All optimal paths to a node forms a tree

Routing Algorithm Classification Global vs. decentralized

Global --- all routers have complete topology, link cost info Decentralized -- router knows only neighbors, link costs to neighbors

Static (non-adaptive) vs. dynamic (adaptive) Static -- routes change slowly over time

Shortest path routing Flooding

Dynamic -- routes change more quickly, periodic update in response to link cost changes

link state algorithms distance vector algorithms

Page 5: Routing

Shortest Path Routing - static

Cost of a linkdistance, bandwidth, avg traffic,

comm cost, avg queue, delay, etc

Dijkstra shortest path algorithm1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infinity 7 8 Loop 9 find w not in N such that D(w) is a

minimum 10 add w to N 11 update D(v) for all v adjacent to w

and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v

or known 14 shortest path cost to w plus cost

from w to v */ 15 until all nodes in N

improve

Smallest label =>

permanentShortest path from A to

D

Page 6: Routing

Flooding - static

Incoming pkt is sent to all outgoing line except the one it arrives on

Methods to reduce traffic Hop count Keep track of packets

(source, seq) Use up-to-counter to reduce (source, seq) entries

Selective flooding Only send to approximately correct directions (e.g.

east-west) Not practical in most applications, but…

Military (robustness) Distributed database (concurrent update) Wireless Benchmark (without overhead traffic, flooding has

the shortest delay)

Page 7: Routing

Distance Vector Routing - dynamic

Also known as Distributed Bellman-Ford Ford-Fulkerson RIP (routing information

protocol) Original ARPAnet algorithm

Distance Hops, queue, delay

Distributed – periodical update with neighbors only

Old routing table is not used to derive new table

J measured the delays to

neighbors

Page 8: Routing

Count to Infinityusing # of hops as metric

Serious drawback for distance vector routing React rapidly to good news, but very slow to bad news Infinity can be set to longest path +1

A is coming

UP

A or link is going DOWN

RIP was used in Arpanet until 1979 Delay metric was queue length, link bandwidth was not

considered Too long to converge

Split horizon

Page 9: Routing

Link State Routing – OSPF, ISIS

Each router must do the following: Discover its neighbors, learn their network

address. HELLO Measure the delay or cost to each of its

neighbors. ECHO Traffic load ? (echo pkt queue time vs. sent time) Throughput vs. oscillation

Construct a packet telling all it has just learned. When ? (periodically or significant events)

Send this packet to all other routers. FLOODING Use sequence # to control flooding Use Age field to deal with irregular seq#

Crash, wrap-around, tx error Holding area and acknowledgement

Compute the shortest pathto every other router. Dijkstra’s algorithm

oscillation

60 sec10 sec per

update

Treat LAN as a Virtual node

Page 10: Routing

OSPF – Open Shortest Path FirstThe Interior Gateway Routing Protocol

designated router

OSPF = Link state routing PLUS

Authentication of routing messages

Avoid malicious router Additional hierarchy (area)

No need to reach EVERY network in the domain

Load balancing

Page 11: Routing

Hierarchical Routing

Reduce routing table - Scalability

Enforce administrative autonomy

internet = network of networks

each network admin may want to control routing in its own network

Divide into regions (Autonomous Systems)

Optimal # of levels ln N, requiring e ln N entries per router

May cause non-optimal routing

E.g. 1A to 5C5

4+2

Page 12: Routing

Broadcast Routing - implementations

Distinct packet to each dest Flooding Multi-destination routing

Pkt contains a list of dest addr or bit map Optimization form of distinct pkt method

Spanning tree Min # of packets necessary All routers need to know the tree (link state routing)

Reverse path forwarding IF broadcast pkt arrives from the line that’s used to send to pkt

source,THEN forward ELSE drop it

Reasonably efficient and easy to implement

Sink tree for I optimal routes from all sources to a dest

First hop

Most likely the first one to

arrive

Most likely a

duplicate

Page 13: Routing

Multicast Routing

Host belongs to Groups Routers learn about which of “their” hosts

are in which groups Routers tell their neighbors and build the

spanning tree Spanning tree for

this source

Tree Pruning

for group 1

Page 14: Routing

Routing for Mobile HostsFixed Routers – mobile IP

Fixed home location Find the location of mobile host and route

pkts to mobile host via home agent Mobile Node (host) / foreign agent

registration FA broadcast MN registers (HA addr, MAC addr, MN id) FA registers with HA on behalf of MN FA accept / reject MN registration

HA responds to a new session Tunnel pkt to FA Tell sender to tunnel

future pkts to FA directly

HA

FA

Page 15: Routing

Mobile Ad Hoc NETworksMobile Router -- MANET

Possible applicationsBattlefield, ships, earthquake emergency (no infrastructure

support)

AODV algorithm Ad hoc On-demand Distance Vector

On-demand route discovery B Rcv REQUESTIF dup, THEN dropIF fresher dest route info exists, THEN use-meELSE Hop count++, add reverse entry (with

TTL)Rebroadcast

A sends to I

Uniquely identify A’s

Route Request to avoid dup

I’s last seq # in A

Init to 0 inc when

rebroadcast

I’s Respons

e

Duration of VALID route

From I’s system

B Rcv RESPONSEIF no entry, THEN add IF fresher dest THEN updateIF same freshness, but shorter hop THEN

update

Page 16: Routing

Ad-hoc Routing Table

SEQ #

TTL

Node receive a REPLY, add the entry to Routing Table IF No route to dest is known Sequence # in REPLY is greater (fresher) Same seq #, but less hops (faster)

REQUEST is broadcast, REPLY is unicast Node on the reverse path learns the route for FREE

Each node periodically broadcast HELLO and expect replies from Active neighbors