university of delaware cpeg 4191 avoid routing loops zthe network must be made into an acyclic tree....

27
University of Delaware CPEG 419 1 Avoid Routing Loops The network must be made into an acyclic tree. The root of the tree must be decided. The shortest path to the route are the only routes used. The algorithm must adapt to changes in the network (e.g., when nodes are added, links cut, or nodes break).

Upload: grace-chapman

Post on 30-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

University of Delaware CPEG 419 1

Avoid Routing Loops

The network must be made into an acyclic tree.

The root of the tree must be decided.

The shortest path to the route are the only routes used.

The algorithm must adapt to changes in the network (e.g., when nodes are added, links cut, or nodes break).

University of Delaware CPEG 419 2

Spanning Tree Algorithm 1

When manufactured, each bridge is given a unique ID. The root is the node with the smallest ID.

If a LAN has more than one bridge, all the bridges on that LAN must decide which bridge can route frames to and from the LAN. The one selected is the one that is closer to the

root. If there is a tie, then the one with smaller ID is

selected.

University of Delaware CPEG 419 3

Spanning Tree Algorithm 2

Bridges exchange messages with the following information

1. The ID of the bridge that is sending the message.

2. The ID for what the sending bridge believes to be the root bridge.

3. The distance (hops) from the sending bridge to the root bridge.

University of Delaware CPEG 419 4

Spanning Tree Algorithm 3Each bridge that receives the message checks if it is “better” than the current information, where better means

1. The identified root has a smaller ID or

2. The root is the same, but the distance is less or

3. The root and distance is the same, but the sending bridge has a smaller ID.

In this way all the bridges get the correct information.

University of Delaware CPEG 419 5

Spanning Tree Algorithm 3

Bridges continue to send messages even after the routing has stabilized.

If information is not refreshed, then it is disregarded.

In this way, if the topology changes, a new tree will be quickly made.

University of Delaware CPEG 419 6

Spanning Tree: Example

B3

LAN 2

LAN 1

LAN 3 LAN 4

LAN 5

B5

B4B1

B2

10

10

10

10

5

5

5

5

1055

B3

LAN 2

LAN 1

LAN 3 LAN 4

LAN 5

B5

B4B1

B2

10

10

10

10

5

5

5

5

1055

University of Delaware CPEG 419 7

Spanning Tree: ExampleB1

LAN 1 LAN 2

B2

LAN 3 LAN 4

LAN 5

B4

B5B3

. Only designated bridgeson each LAN allowed toforward frames.

. Bridges continue exchanging info to react to topology changes.

EE/CS 450 Spring 00 8

The Network Layer

Stallings chapters 8, 9, 15, 16 and Tanenbaum chapter 5.

University of Delaware CPEG 419 9

Goals

Get data from source to destination.

May require traversing many hops and involving intermediate routers and different types of links.

University of Delaware CPEG 419 10

Store and Forward Packet Switching

H1H2

Router

Router

Router

Subnet

End systemRouter

Idea: H1 sends a packet to the router. The router receives the packet, checks the CRC, reads the destination address and then decides which outgoing link to use and sends the packet to its next hop.

The network accepts packets and delivers packets and that’s about it.

Two types of networks: connectionless and connection-oriented.

University of Delaware CPEG 419 11

Network Layer Design

Connection-oriented versus connection-less infrastructure.

Connection-oriented: virtual circuit Connection-less: datagrams.

University of Delaware CPEG 419 12

Connectionless

A packet (datagram) is injected to the network with no advanced setup.

When a router receives a packet it treats it as an individual packet, there is no concept of flow.

It is possible that packets from the same source and to the same destination will not use the same path.

Each packet must have a global destination address. This large address must be processed at every router.

University of Delaware CPEG 419 13

Connection-less service

Internet.E2E argument.

Push functionality closer to users.Error and flow control at higher layers.No delivery or ordering guarantees.Every packet must carry full

destination address (each packet independent of the other).

University of Delaware CPEG 419 14

Connection-oriented

Telephone and ATM networks.Network-layer connection:

Logical connection between network-layer processes at sender and receiver.

Connection ID used to identify PDUs. Connection set up (QoS, cost negotiation)

and tear down. Full duplex communication. Reliable and ordered delivery.

University of Delaware CPEG 419 15

Virtual Circuit

Analogy to physical circuits used by telephone networks.

At connection establishment time, path from source to destination is selected and used throughout connection lifetime.

When connection is over, virtual circuit terminated.

University of Delaware CPEG 419 16

Connection-Oriented

Virtual-circuit – like circuit switching Circuit switching

Each call gets its own wire or its own part of the spectrum of a wire.

The “wire” must be setup at the beginning of the call.

The wire stays setup for the length of the call. Can be inefficient. Provides reliable service.

University of Delaware CPEG 419 17

Connection-Oriented

Virtual-circuit Each “call” is setup.

During setup a path is found.Each router along the path makes sure that there is

enough bandwidth that the call can be handled. If not, then another path is found, or the call is rejected.

Because of buffers and careful planning (queuing theory), virtual-circuit is much more efficient than circuit switching.

The quality can easily be controlled. Billing is possible.

University of Delaware CPEG 419 18

Connection-Oriented Label switching

A scheme to reduce the size of the address and aggregate traffic.

H1 H2

H3 H4

Router D

End systemRouter A

Suppose H1 -> H4. Then H1 tells router A that it will send a flow labeled 1 with destination H4.If it’s OK, router A tells router B that it will send a flow labeled 1 with destination H4…..

Now H3 tells router B that it will send a flow labeled 1 with destination H2. Router B says ok, but since there is already a flow going from B->C with label 1, it will re-label this flow 2. And router B tells router C that a flow with label 2 with destination H2…..

While setup might be slow, the switching is very fast.

Router C

Router B

University of Delaware CPEG 419 19

Connection vs. connectionless

issue Packet switching Virtual-circuit

Setup Not needed needed

addressing Each packet has full address

Just VC number (label)

State information Nothing about the flow is needed

Each VC requires a some information

Routing Each packet routing independently

Route is chosen at setup.

Effect of router failure Perhaps little, a few packets lost until a new route is found.

All VC that pass through router have to be re-setup

Quality of Service Difficult Easy to implement, but hard to plan efficiently.

Congestion control Difficult Easy to implement, but difficult to plan efficiently.

University of Delaware CPEG 419 20

We mostly look at connectionless routing.

But connection-oriented is becoming more and more important (maybe).

University of Delaware CPEG 419 21

Routing and Internetworking Based on knowledge of network topology, choose

appropriate paths from source to destination. Goals

Correctness Simplicity (funny, aren’t we smart enough to make

complicated things?) Robustness – when a router or link goes down, the network

must remain up. Stability – some routing algorithms never converge or take a

very long time to converge after a small change. A small change in one part of the network should not lead to a large change. Currently the routing does not meet this criteria.

Fairness Optimality

University of Delaware CPEG 419 22

Fairness and optimality

1

2

3

4

5

6

7 8

Total flow is maximized by just sending from 1->2, 3->4 and 5->6, but not so fair to 7->8

University of Delaware CPEG 419 23

Adaptive and Non-adaptive Routing

Non-adaptive routing: Fixed routing, static routing. Do not take current state of the network (e.g.,

load, topology). Routes are computed in advance, off-line, and

downloaded to routers when booted.

Adaptive routing: Routes change dynamically as function of current

state of network. Algorithms vary on how they get routing

information, metrics used, and when they change routes.

University of Delaware CPEG 419 24

Hot potato routing

Just send the packet somewhere.

University of Delaware CPEG 419 25

Flooding Every packet is sent to every neighboring router except the

one it came on. In order to stop the packet from traveling forever, a counter of

the number of hops is decremented at every hop. Once the counter hits zero, the packet is dropped.

Use sequence numbers so that if a router sees a packet twice, it will drop it. But then each router need to keep a list of packets it has seen so far.

Each packet could contain a list to routers visited so far. Then…

Selective flooding Flood to those neighbors that are in the general right

direction.

University of Delaware CPEG 419 26

Shortest Path Routing

Shortest with respect to some metric Example:

Number of hops.Delay.Bandwidth.Cost.

University of Delaware CPEG 419 27

Bellman Optimality Principle

General statement about optimal routes (topology, routing algorithm independent).

If router J is on optimal path between I and K, then the optimal path from J to K also falls along the same route. Proof by contradiction.

Corollary: Set of optimal routes from all sources to

destination form a tree rooted at destination. Sink tree.