Download presentation

Presentation is loading. Please wait.

Published byLeslie Route Modified over 2 years ago

1
CSE 561 – Bridging and Routing David Wetherall djw@cs.washington.edu Spring 2000

2
djw // CS 561, Spring 2000 L3.2 This Lecture 1.Learning bridges and spanning trees 2.Intra-domain static routing

3
djw // CS 561, Spring 2000 L3.3 Limits of a LAN One shared LAN can limit us in terms of: –Distance –Number of nodes –Performance How do we scale to a larger, faster network? –We must be able to interconnect LANs nodes (wire) Hub (repeater)

4
djw // CS 561, Spring 2000 L3.4 Bridges and Extended LANs “Transparently” interconnect LANs –Receive frames from each LAN and forward to the other –Each LAN is its own domain; a bridge is not a repeater –Could have many ports or join to a remote LAN bridge

5
djw // CS 561, Spring 2000 L3.5 Backward Learning Algorithm To increase overall performance: –Shouldn’t forward A B or C D, should forward A C and D B How does the bridge know? –Learn who is where by observing source addresses –Forward using destination address; age for robustness bridge B A D C

6
djw // CS 561, Spring 2000 L3.6 Why stop at one bridge? LANs and bridges form a graph –LANs = nodes, bridges = edges But to avoid loops we forward only on select bridge ports! –Spanning Trees B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I

7
djw // CS 561, Spring 2000 L3.7 Spanning Tree Example Spanning tree is a subset of the graph that spans it but has no cycles –Prune some ports Q: How do we find a spanning tree? B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I

8
djw // CS 561, Spring 2000 L3.8 Spanning Tree Algorithm Distributed algorithm to compute spanning tree –Robust against failures, needs no organization Outline: –Goal is to turn some bridge ports off –Bridges send periodic “best” configuration messages –Elect a root node of the tree (lowest address) –Grow tree as shortest distances from the root –Turn off ports that aren’t on shortest paths

9
djw // CS 561, Spring 2000 L3.9 Algorithm continued Each bridge sends periodic messages containing: –Its address, address of the root bridge, and distance (in hops) to root Each bridge receives messages, updates “best” config. –Smaller root address is better, then shorter distance –To break ties, bridge with smaller address is better Initially, each bridge thinks it is the root –Sends configuration messages on all ports Later, bridges send only “best” configs –Add 1 to distance, send configs where still “best” (designated bridge) –Turn off forwarding on ports except those that send/receive “best”

10
djw // CS 561, Spring 2000 L3.10 Algorithm Example Message format: (root, dist to root, bridge) Sample messages sequences to and from B3: 1.B3 sends (B3, 0, B3) to B2 and B5 2.B3 receives (B2, 0, B2) and (B5, 0, B5) and accepts B2 as root 3.B3 sends (B2, 1, B3) to B5 4.B3 receives (B1, 1, B2) and (B1, 1, B5) and accepts B1 as root 5.B3 wants to send (B1, 2, B2) but doesn’t as its nowhere “best” 6.B3 receives (B1, 1, B2) and (B1, 1, B5) again … stable –Data forwarding is turned off to the LAN A

11
djw // CS 561, Spring 2000 L3.11 Some other details Configuration information is aged –If the root fails a new one will be elected Reconfiguration is damped –Adopt new spanning trees slowly to avoid temporary loops

12
djw // CS 561, Spring 2000 L3.12 LAN Switches LAN switches are high performance multi-port bridges –Looks like a hub, but frames are switched, not shared –Every host on a separate port, or can combine switches Ethernet Switch Ethernet Switch

13
djw // CS 561, Spring 2000 L3.13 Limitations of Bridges LAN switches form an effective small-scale network –Plug and play for real! Why can’t we build a large network using bridges? –Little control over forwarding paths –Size of bridge forwarding tables grows with number of hosts –Broadcast traffic flows freely over whole extended LAN –Spanning tree algorithm limits reconfiguration speed –Poor solution for connecting LANs with different MAC protocols

14
djw // CS 561, Spring 2000 L3.14 Forwarding and Routing Forwarding is the process that each router goes through for every packet to send it on its way –Involves local decisions Routing is the process that all routers go through to calculate the routing tables –Involves global decisions

15
djw // CS 561, Spring 2000 L3.15 Kinds of Routing Schemes Many routing schemes have been proposed/explored … Distributed or centralized Hop-by-hop or source-based Deterministic or stochastic Single or multi-path Static or dynamic route selection Internet is to the left

16
djw // CS 561, Spring 2000 L3.16 Routing Questions How to choose best path? –Defining “best” is slippery How to scale to millions of users? –Minimize control messages and routing table size How to adapt to failures or changes? –Node and link failures, plus message loss –We will use distributed algorithms

17
djw // CS 561, Spring 2000 L3.17 Some Pitfalls Using global knowledge is challenging –Hard to collect –Can be out-of-date –Needs to summarize in a locally-relevant way Inconsistencies in local/global knowledge can cause –Loops (black holes) –Oscillations, esp. when adapting to load

18
djw // CS 561, Spring 2000 L3.18 Routing is essentially a problem in graph theory =router =link Network as a Graph X 1 1 1 1 1 1 1 1 1=cost

19
djw // CS 561, Spring 2000 L3.19 Distance Vector Routing Assume: –Each router knows only address/cost of neighbors Goal: –Calculate routing table of next hop information for each destination at each router Idea: –Tell neighbors about learned distances to all destinations

20
djw // CS 561, Spring 2000 L3.20 DV Algorithm Each router maintains a vector of costs to all destinations as well as routing table –Initialize neighbors with known cost, others with infinity Periodically send copy of distance vector to neighbors –On reception of a vector, if neighbors path to a destination plus neighbor cost is better, then switch to better path update cost in vector and next hop in routing table Assuming no changes, will converge to shortest paths –But what happens if there are changes?

21
djw // CS 561, Spring 2000 L3.21 DV Example – Initial Table at A DestCostNext B1B C1C D - E1E F1E G -

22
djw // CS 561, Spring 2000 L3.22 DV Example – Final Table at A Reached in a single iteration … simple example DestCostNext B1B C1C D2C E1E F1E G2F

23
djw // CS 561, Spring 2000 L3.23 What if there are changes? One scenario: Suppose link between F and G fails 1.F notices failure, sets its cost to G to infinity and tells A 2.A sets its cost to G to infinity too, since it learned it from F 3.A learns route from C with cost 2 and adopts it XXXXX DestCostNext B1B C1C D2C E1E F1E G3C

24
djw // CS 561, Spring 2000 L3.24 Simple example –Costs in nodes are to reach Internet Now link between B and Internet fails … Count To Infinity Problem Internet A/2B/1

25
djw // CS 561, Spring 2000 L3.25 Count To Infinity Problem B nears of a route to the Internet via A with cost 2 So B switches to the “better” (but wrong!) route update Internet A/2B/3XXX

26
djw // CS 561, Spring 2000 L3.26 Count To Infinity Problem A hears from B and increases its cost update Internet A/4B/3XXX

27
djw // CS 561, Spring 2000 L3.27 Count To Infinity Problem B hears from A and (surprise) increases its cost Cycle continues and we “count to infinity” Packets caught in the crossfire loop between A and B update Internet A/4B/5XXX

28
djw // CS 561, Spring 2000 L3.28 Split Horizon Solves trivial count-to-infinity problem Router never advertises the cost of a destination back to to its next hop – that’s where it learned it from! Poison reverse: go even further – advertise back infinity However, DV protocols still subject to the same problem with more complicated topologies –Many enhancements suggested

29
djw // CS 561, Spring 2000 L3.29 Routing Information Protocol (RIP) DV protocol with hop count as metric –Infinity value is 16 hops; limits network size –Includes split horizon with poison reverse Routers send vectors every 30 seconds –With triggered updates for link failures –Time-out in 180 seconds to detect failures RIPv1 specified in RFC1058 –www.ietf.org/rfc/rfc1058.txt RIPv2 (adds authentication etc.) in RFC1388 –www.ietf.org/rfc/rfc1388.txt

30
djw // CS 561, Spring 2000 L3.30 Link State Routing Same assumptions/goals, but different idea: –Tell all routers the topology and have each compute best paths –Two phases: Topology dissemination (flooding) Shortest-path calculation (Dijkstra’s algorithm) Why? –In DV, routers hide their computation, making it difficult to decide what to use when there are changes –With LS, faster convergence and hopefully better stability –It is more complex though

31
djw // CS 561, Spring 2000 L3.31 Each router maintains link state database and periodically sends link state packets (LSPs) to neighbor –Contain [router, neighbors, costs] Each router forwards LSPs not already in its database on all ports except where received –Each LSP will travel over the same link at most once in each direction Flooding is fast, and can be made reliable with acknowledgments Flooding

32
djw // CS 561, Spring 2000 L3.32 Example LSP generated by X at T=0 Nodes become yellow as they receive it XA CBD XA CBD XA CBD XA CBD T=0T=1 T=2T=3

33
djw // CS 561, Spring 2000 L3.33 Complication: Sequence Numbers When link/router fails need to remove old data … How? –LSPs carry sequence numbers to determine new data –Send a new LSP with cost infinity to signal a link down What happens when a router fails and restarts? –What sequence number should it use? Don’t want data ignored. –One option: age LSPs and send with “cost 0” to purge Router can listen at startup to learn right sequence number What happens if the network is partitioned and heals? –Different LS databases must be synchronized –A version number is used!

34
djw // CS 561, Spring 2000 L3.34 Dijkstra’s Algorithm Graph algorithm for single-source shortest path S {} Q While Q != {} u extract-min(Q) S S plus {u} for each node v adjacent to u “relax” the cost of v u is done

35
djw // CS 561, Spring 2000 L3.35 Dijkstra Example – Step 1 10 23 5 2 1 46 7 9 0

36
djw // CS 561, Spring 2000 L3.36 Dijkstra Example – Step 2 10 23 5 2 1 46 7 9 0 5

37
djw // CS 561, Spring 2000 L3.37 Dijkstra Example – Step 3 8 23 5 2 1 46 7 9 0 5 7 14

38
djw // CS 561, Spring 2000 L3.38 Dijkstra Example – Step 4 8 23 5 2 1 46 7 9 0 5 7 13

39
djw // CS 561, Spring 2000 L3.39 Dijkstra Example – Step 5 8 23 5 2 1 46 7 9 0 5 7 9

40
djw // CS 561, Spring 2000 L3.40 Dijkstra Example – Done 8 23 5 2 1 46 7 9 0 5 7 9

41
djw // CS 561, Spring 2000 L3.41 Open Shortest Path First (OSPF) Most widely-used Link State protocol today Basic link state algorithms plus many features: –Authentication of routing messages –Extra hierarchy: partition into routing areas –Load balancing: multiple equal cost routes

Similar presentations

OK

Spring 20081 Routing: Part I Section 4.2 Outline Algorithms Scalability.

Spring 20081 Routing: Part I Section 4.2 Outline Algorithms Scalability.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on human body Ppt on product data management Ppt on drupal content management system Inspirational ppt on positive attitude free download Ppt on rain water conservation Ppt on brand equity management Ppt on team building stories Ppt on generation of electricity from wastewater Download ppt on pulse code modulation block Ppt on biodegradable and non biodegradable example