1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied...

66
1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006

Transcript of 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied...

Page 1: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

1 | 66

Communication Systems5th lecture

Chair of Communication SystemsDepartment of Applied Sciences

University of Freiburg2006

Page 2: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

2 | 66

Communication SystemsLast lecture and practical course

● Next Tuesday is practical course (as usual in comp. dept. in SR -101)

● IP sub- and supernetting● Datagram delivery● Address mapping in broadcast nets● Packet routing in IP networks

– Discussed address adaptation in broadcast nets for local delivery

– Talked of routing principles (matching destination addresses against network address of an interface)

– Mostly involves static routing (addresses, netmasks, ...) assigned by administrator directly or via DHCP

● How does routing LAN-wide or globally work?

Page 3: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

3 | 66

Communication SystemsLast lecture and practical course

● Routing: Measure / function needed to represent certain values● Metric can be seen as a value for measuring routing costs● These costs could be

– Physical distance between two routers

– Number of hops packets travel from source to destination

– Estimated transit time

– Monetary costs (cheap satellite link vs. expensive sea cable for continental crossing or vice versa)

● Different routing algorithms (RA) use different metrics for their routing decisions

● Different metrics have different costs of computing them

Page 4: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

4 | 66

Communication Systemsplan for this lecture

● Concept and theory of dynamic routing ● Routing algorithms:

– flooding

– distant vector

– shortest path

– link state ● Taxonomy of routing protocols

– IGP / EGP

– RIP (II) and OSPF

– BGP as example for EGP

Page 5: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

5 | 66

Communication Systemsrouting – optimality principle

● Before discussing specific routing algorithm (RA) one can state in general there is a optimal route without regarding network topology

● The optimality principle states: If router B is optimal path from router A to router C, then route from B to C falls to the same path (measured in hops)

Page 6: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

6 | 66

Communication Systemsrouting – optimality principle cont.

● Proving that name the part from A to B r1 and the rest of the route r2: If there is a better route r2 (e.g. the dotted line) it would be concatenated to r1 to improve the whole route, contradicting that r1r2 is optimal

● Consequence: Set of optimal routes from all sources to given destination form a tree rooted at destination

Page 7: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

7 | 66

Communication Systemsrouting – optimality principle cont.

● Example of a sink tree with hop count metric● Not necessarily unique – router 12 may connected over 3 with

same hop count

Page 8: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

8 | 66

Communication Systemsrouting algorithms – sink tree

● Goal of all RA is to discover such trees for all routers of a given subnet

● Since sink tree is a tree it does not contain any loops, so packets should be delivered within a finite and bounded number of hops

● In practice operation of networks is not as easy:– Links may go down and recover after a while

– Different routers may have different ideas about topology

– It was not stated how routers acquire information for tree computing (itself, predefined, centrally, ...)

Page 9: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

9 | 66

Communication Systemsrouting algorithms – flooding

● A relative specific routing algorithm is flooding● Every incoming packet is sent out on every outgoing line except

the one the packet was received from● Flooding obviously generates a vast number of packets, so

measures should be taken to damp the process– Install a hop counter, so if packet hop counter reaches zero

the packet is discarded

– Keep track of which packets have been flooded, use sequence number and discard duplicate packets

– Each router has to keep a list which packets have been seen from which source

Page 10: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

10 | 66

Communication Systemsflooding cont.

– To prevent of growing lists out of bound use a counter k, meaning that all packets up to k have been seen

– When packet comes in it is easy to check if it has already be seen

– List below k is not needed, because it summarizes all packets up to that number

● Flooding is not practical in most applications, because or the very suboptimal utilization of bandwidth and network capacity

● But it finds the most effective route in every case, because every route is checked (and the fastest packet arrives first)

Page 11: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

11 | 66

Communication Systemsrouting algorithms – flooding

● Mechanism could be found e.g. in unswitched ethernets with hubs connecting segments – very cheap and simple principle – no complicated logic has to

be build into components – hubs in ethernets simply regenerate and amplify passing signals

– That principle renders unswitched ethernets unusable with more than a few end systems added (generating certain amount of traffic)

● Another advantage – no/very simple routing tables have to be kept

● Flooding can be useful in special IP routing scenarios we will see later

Page 12: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

12 | 66

Communication Systemsrouting algorithms – routing mechanisms

● Distance vector & link state routing– Distributed algorithms

● Distance vector– Tell neighbors about distances to each destination

– Each nodes computation depends on its neighbors● Link state

– Tell all routers distance to each neighbor

– Each router computes its best paths● Distance vector uses shortest path

– Single adaptive cost of a link

Page 13: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

13 | 66

Communication Systemsshortest path routing

● Routing technique widely used, because it is simple and easy to understand

● Idea: Build a graph of the subnet with each node representing a router and each arc representing a link

● To choose a route between a given pair of nodes the algorithm just finds the shortest path on the graph

● You have to explain the metric used for shortest path measuring:– Hop count, physical distance, bandwidth, latency,

communication costs, mean queue length, ...

Page 14: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

14 | 66

Communication Systemsshortest path routing

● Hop count metric has same length for path 1-2-5 and 1-2-3 (nodes are fat numbers, costs smaller numbers between nodes)

● Geographic distance is for 1-2-3 much longer then for 1-2-5 (assuming the graph is drawn in scale)

● For other metrics the weighting function may be computed through hourly test packets sent and computed

● Criteria for computation of metric may combined

Page 15: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

15 | 66

Communication Systemsshortest path routing cont.

● One algorithm for computing the shortest path is Dijkstras● Each node is labeled with its distance from source node along the

best known path● Initially no paths are known (and labeled accordingly)● As algorithm proceeds and paths are discovered labels may

change reflecting better paths

Page 16: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

16 | 66

Communication Systemsshortest path routing cont.

● The shortest path (sp) from 1 to 4 is searched for● We are using the geographic distance for computing the sp● Started from 1 marking it permanent (big dot), then examined the

adjacent nodes to 1 (node 2 and 7)● Whenever a node is (re)labeled the source node we come from is

filled in (distance, source node)

Page 17: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

17 | 66

Communication Systemsshortest path routing cont.

● When adjacent routes are examined the smallest distance is labeled permanent (node 2)

● In the next step the process is restarted from node 2 ● We have to take the sums of the route up to here in to account

and we get node 5 (last picture)● Note: In next step node 7 has to be relabeled { (6,1) -> (5,5) }

Page 18: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

18 | 66

Communication Systemsshortest path routing cont.

● Path with 3 hops to 7 has lesser costs than direct with 1 hop● Next step shows that from node 7 the metric to 8 is higher than

from node 5 over 6 to 8● Node 8 has to be relabeled then (see next slide)

Page 19: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

19 | 66

Communication Systemsshortest path routing cont.

● Step shows that from node 7 the metric to 8 is higher than from node 5 over 6 to 8 (node 8 has to be relabeled)

● There is a more optimal route to node 8– 1 – 2 – 5 – 7 – 8 (4 hops with cost of 9)

– 1 – 2 – 5 – 6 – 8 (4 hops with cost of 8)

Page 20: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

20 | 66

Communication Systemsshortest path routing cont.

● For getting the path we start from the destination and get the predecessor from the labels

● In the end we get a route 1 – 2 – 5 – 6 – 8 – 4● Remember: route optimal in “costs” not in hops

– Simple hop count routing would prefer 1 – 2 – 3 – 4 (cost of 12) or 1 – 7 – 8 – 4 (same cost) – 2 points higher than route named above

Page 21: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

21 | 66

Communication Systemsdistance vector routing

● For distance vector routing each router maintains a table (called a vector for a given destination – computed with shortest path) delivering the best known distance to each destination

● This tables are updated by regularly exchanging information with neighbors

● Other name of this algorithm is distributed Bellmann-Ford or Ford-Fulkerson

● In distance vector routing each router maintains a routing table containing the pair of each router of the (sub)net and the destination to it

● Entry contains information on outgoing line and the estimate of time, distance to destination

Page 22: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

22 | 66

Communication Systemsdistance vector routing cont.

● The metric might be one of the types we named earlier● Every router should know the distance to its neighbors, with hop

count (typically used with RIP – explained next lecture in greater detail) it is just one hop

● Queue length as metric might be computed through simply checking each outgoing line

● For delay the router might ping each neighbor with special ECHO packets and compute the round trip time

● For setting up of the tables each router sends a packet with the list of distances to each router in the (sub)net

● Every router receives such packets and uses them for computing of an updated table

Page 23: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

23 | 66

Communication Systemsdistance vector routing cont.

● Each destination might be reachable on different paths, but the router takes the shortest distance from all packets and removes the other information to the same destination

● Such the router computes information on which line which router is reachable

● This mechanism works quite well in theory, but has some drawbacks too ...

Page 24: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

24 | 66

Communication Systemscount-to-infinity problem

● Although distant vector converges to the correct answer it may doing it very slowly

● It reacts fast to positive news but leisurely to bad ones● To see how fast good news propagates see the next simple

example (five routers on a linear subnet, hops to 1 shown)

Page 25: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

25 | 66

Communication Systemscount-to-infinity problem

● With 1 down initially no router knows a path to it (in routing terms: infinite route)

● With 1 coming up - at the first exchange (for simplicity: all routing information is exchanged at exact the same moment) 2 gets the good news that 1 has a route of “0” to 1

● 2 adds this information to its table● In the next round of exchange 2 tells 3 that it knows a route with

hop count “1” to 1, 3 learns that and adds the metric “2” for the route to 1

● Nexts steps are accordingly – process ends after the 4th round

Page 26: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

26 | 66

Communication Systemscount-to-infinity problem

● Now compute the routes for the opposite scenario (router 1 is going down for some reason)

Page 27: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

27 | 66

Communication Systemscount-to-infinity problem

● All lines where initially up, but 1 failed● The first round of packet exchange 2 hears nothing from 1, but 3

says “no worry, I know a route to 1”● Hence 2 updates its table to the hop count of “3” for path to 1● 2 does not know that 3s route runs through itself● With second exchange router 3 has two entries for 1 with the

same metric of “3”, therefore picks one at random and updates its table to a hop count of “4”

● Problem: No one router has a hop count greater than the minimum of all neighbors, gradually they walk up to infinity

Page 28: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

28 | 66

Communication Systemscount-to-infinity problem

● When router 1 is set “unreachable” depends on the value for infinity

● Therefor the value for infinity should set to the maximum diameter of the network plus “1”

● But even in moderate sized networks the exchanges needed for setting a router “unreachable” may regarded as to much

● If the metric is a time delay then the upper bound of the infinity value should be set reasonable high, else simple problems within the network (congestions of a short moment, delays in queues, ...) could bring routers out of range

● One of many suggested solutions (no one solved the problem) is the “Split-Horizon-Hack”

Page 29: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

29 | 66

Communication Systemslink state routing

● Distance vector was used within ARPANET until 1979 and much longer within LANs

● Two problems caused its demise:– The convergence of algorithm often took too long (even with

split horizon or similar hacks)

– The line bandwidth was not taken into account – no problem in the beginning with just all lines having 56kbit/s (or in LANs with just only 10Mbit/s Ethernet)

● Therefore a completely new algorithm “link state routing” was introduced

Page 30: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

30 | 66

Communication Systemslink state – topology dissemination

● In distance vector the path or cost to destination is partially determined by its neighbors

● With link state every router gets information on complete topology of a given network– All routers use same algorithm – so they will compute the

same paths (avoiding of loops)● Two components

– Topology dissemination and shortest path algorithm● Topology dissemination should establish a consistent link state

database in each router● Once established each router computes shortest paths to all

destinations from itself as origin

Page 31: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

31 | 66

Communication Systemsrouting protocols

● The idea behind this algorithm can be stated as five parts:

1. Each router must discover its neighbors and learn their network addresses

2. ... measure the delay or cost to each of its neighbors

3. ... construct a packet telling all it has just learned

4. ... send this packet to all other routers

5. ... compute the shortest path to every other router● So the complete topology and all the possible delays are

measured● Information is distributed to every router

Page 32: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

32 | 66

Communication Systemsrouting protocols

● During boot procedure of a router it has to learn its neighbors first● This is done by sending a special discovery packet (HELLO) on

every point-to-point line● The router on the other end should send a response packet telling

who it is● Router names must be unique, so if one router hears of routes to

a router N it should know that the same machine is meant● Point-to-point connections are normal within WAN, but within LAN

more than one router may be present● An artificial router is introduced presenting the LAN, so every

router has point-to-point connections again

Page 33: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

33 | 66

Communication Systemslink state – measuring line costs

● Each router should know (or an estimate of it) of the delay to each of its neighbors

● Direct way to getting this information is via a special ECHO packet that other routers should send back immediately – round trip time divided by two gives an estimate (or for better approx. send several packets and compute the average)

● Question is if the load of a line should be taken into account– Load is interfering with the delay

– But it could lead to problems in special scenarios

Page 34: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

34 | 66

Communication Systemsrouting protocols – general considerations

● If you have a routing scenario as shown in the picture (examples are typical over sea connections or similar ...)

● Two parts of the net are connected through the lines 2 – 3 and 6 -7

● If most traffic is using 6 – 7 the line is heavily loaded as a result (and the delay increased)

● If delay is taken into account, 2 – 3 is the shortest path instead of 6 - 7

Page 35: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

35 | 66

Communication Systemsrouting protocols – pitfalls

● In the next round a new computation would find 6 – 7 as shortest path again

● As an result the routing tables may oscillate wildly, leading to erratic routing and many difficulties finding errors

● If load is ignored then the aggregated bandwidth of the two lines is not used optimally

● If traffic is spread over the two lines bandwidth may better utilized but routing may be suboptimal

Page 36: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

36 | 66

Communication Systemsrouting protocols – theory

● After collecting needed information the router should build a packet containing all data

● The packet starts with identity of sender, followed by a sequence number, age and a list of neighbors

● For each neighbor the delay to it is given● Building the packets is relatively easy, the hard part is when

to distribute them● This may be done in regular intervals or when a significant

change occurs (line going down or up, changing properties)

Page 37: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

37 | 53

Communication Systemsrouting protocols – theory

● After collecting needed information the router should build a packet containing all data

● The packet starts with identity of sender, followed by a sequence number, age and a list of neighbors

● For each neighbor the delay to it is given● Building the packets is relatively easy, the hard part is when

to distribute them● This may be done in regular intervals or when a significant

change occurs (line going down or up, changing properties)

37 | 66

Communication Systemsrouting protocols – theory

● How to distribute packets reliably?● As packets distributed and installed the router getting the

first ones will use it and change it routes● Consequently different routers may have a different view of

the topology, which may lead to inconsistencies, loops, unreachable machines, ...

● Fundamental idea is to use flooding (described last lecture) for distribution of those packets

● Therefore a sequence number is included

Page 38: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

38 | 66

Communication Systemsrouting – theory cont.

● Routers keep track of all pairs (source router, sequence number) they see

● When new packet arrives it is checked against the packets already seen – if new it is forwarded to all lines except the one it came from (duplicates are discarded)

● If packet with lower sequence number arrives it is rejected as obsolete (already seen)

● Some problems may occur– Wrapping around of sequence number counter

– Corrupted packets with wrong numbers which confuse the algorithm

Page 39: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

39 | 66

Communication Systemslink state

● Once a router has accumulated a full set of state packets it can construct the entire graph

● Every link is presented (even twice – for each direction!)● Now Dijkstras algorithm can be used on every router for computing

the shortest paths to every destination● For a subnet of N routers with K neighbors the memory required to

store is proportional to K*N (and the computing power required is growing too)

● For larger networks hierarchical routing is introduced

Page 40: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

40 | 66

Communication Systemslink state versus distant vector – comparison

● Principle: Periodic advertisement of the routes in their routing tables● Example: RIP (II)● Advantages

– Simpler - Easy to configure● Disadvantages

– Large routing tables

– High network traffic overhead

– Does not scale (very well), maximum of 15 hops

– High convergence time

Page 41: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

41 | 66

Communication Systemslink state versus distant vector – comparison

● Principle: exchange link state advertisements (LSAs) ● LSAs are advertised upon startup and when changes in the

internetwork topology ● Advantages

Smaller routing tables

Low network overhead

Ability to scale

Lower convergence time● Disadvantages

Complex

More difficult to configure

Page 42: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

42 | 66

Communication Systemsrouting protocols – IGP / EGP

● After theoretical introduction to routing concepts the practical implementations laid out– Different implementations for different kind of networks

● Taxonomy – dynamic routing could be divided into– Interior Gateway Protocols (IGP)

– Exterior Gateway Protocols (EGP)● Autonomous system (AS definition) - unit of routing policy, either

a single network or a group of networks that is controlled by a common network administrator on behalf of a single administrative entity (such as a university, a business enterprise, or a business division)

● AS is also sometimes referred to as a routing domain

Page 43: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

43 | 66

Communication Systemsrouting – interior gateway protocols

● Routing within Autonomous System (AS)● Always finds shortest path within AS● Most common IGPs:

– RIP (II) (Routing Information Protocol version 1 & 2)

– OSPF (Open Shortest Path First)

– ISIS (Intermediate System to Intermediate System)

– Others

Page 44: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

44 | 66

Communication Systemsrouting – exterior gateway protocol

● Routing between different AS● Routing protocols and tables may differ between different AS● Most common EGP: BGP(4) (Border Gateway Protocol)● Example: A,B,C autonomous systems - C.b, A.a, A.c and B.a EGP

routers – small letters IGP routers

Page 45: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

45 | 66

Communication Systemsrouting information protocol (RIP)

● RIP - simplest dynamic routing protocol (try routed on linux)● IGP using distance vector algorithm● Distance metric:

– Hop count (maximum of 15)– No other metrics available

● Routers broadcast their entire routing table● Carried in data field of UDP datagram● Easy to implement and configure● RIP II includes (very simple) authentication mechanisms● Only advisable for small (homogeneous) networks

Page 46: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

46 | 66

Communication Systemsrouting information protocol – example

Initial routing table for router A:

A

B D

C

10.1.0.0

10.2.0.0 10.3.0.0

10.4.0.0 10.5.0.0

10.6.0.0 10.7.0.0

E

1

2 3

Destination Next Hop Interface Hops 10.1.0.0 0 1 1 10.2.0.0 0 2 1 10.3.0.0 0 3 1

After router B’s advertisement received:

Destination Hops 10.2.0.0 1 10.4.0.0 1 10.6.0.0 2

Destination Next Hop Interface Hops 10.1.0.0 0 1 1 10.2.0.0 0 2 1 10.3.0.0 0 3 1 10.4.0.0 B 2 2 10.6.0.0 B 2 3

Router ARouter ARoutingRoutingTable:Table:

Router ARouter ARoutingRoutingTable:Table:

Router B only knewRouter B only knewof its direct networksof its direct networksand router C’sand router C’s

Page 47: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

47 | 66

Communication Systemsrouting information protocol – example

Final routing table for router A:

Destination Next Hop Interface Hops 10.1.0.0 0 1 1 10.2.0.0 0 2 1 10.3.0.0 0 3 1 10.4.0.0 B 2 2 10.5.0.0 D 3 2 10.6.0.0 B 2 3 10.7.0.0 D 3 3

A

B D

C

10.1.0.0

10.2.0.0 10.3.0.0

10.4.0.0 10.5.0.0

10.6.0.0 10.7.0.0

E

1

2 3

Router A only receives direct advertisementsfrom routers B and D. Router C and E’s routesare learned from router B and D.

Page 48: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

48 | 66

Communication Systemsrouting information protocol – split horizon

● This “hack” adds a rule to the RIP

● Router never advertises the cost of a destination to neighbor N if N is the current next hop for destination

● solves trivial Count-2-Infinity problems, but see example network with 4 nodes

● If path 3 – 4 is going down ...

Page 49: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

49 | 66

Communication Systemsrouting information protocol – split horizon

● If path 3 – 4 is going down:– With split horizon both 1 and 2 tell 3 that they cannot reach

number 4

– Thus 3 concludes that 4 is unreachable

– But: 1 hears from 2 that it can reach 4 within two hops

– So 2 concludes it can reach 4 via 1 within three hops

– On the next exchange the distance is incremented, same problem as discussed in the beginning (“split horizon” cannot solve that scenario)

● Same idea: poison reverse – instead of no advertisement use infinity cost instead

Page 50: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

50 | 66

Communication SystemsRIP – problems

● Limitations:● Unsuitable for large networks:● Interrupts routers frequently, slowing them down● Farther networks than 15 hops are ignored

● UDP is unreliable, RIP is very insecure● Only one metric - RIP doesn’t consider bandwidth● RIP converges very slowly (minutes)

● The potential range for other metrics as bandwidth, throughput, delay, and reliability can be large

● The value for INFINITY should be large; but this can result in slow convergence of RIP due to count-to-infinity problem

Page 51: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

51 | 66

Communication Systemsopen shortest path first (OSPF)

● Interior Gateway Protocol (IGP) specified in RFC 2178● OSPF uses Link State routing● Router contains a routing directory (called a "routing database"). ● Exchange Link state advertisements● Route computation using Dijkstra’s algorithm● Advertisements disseminated to entire AS (via flooding explained

before)● Utilizes the Hello protocol for advertising state information

between neighbors ● Neighbors exchange Hello packets periodically

Page 52: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

52 | 66

Communication SystemsOSPF – hierarchy

● OSPF can cope with large networks (no restrictions as with RIP)● Two-level hierarchy: local area, backbone

– local area: aggregation of routers, hosts– backbone: distributes routing information between different

areas– area border routers: advertise distances in own area to other

area border routers– boundary routers: connect to other AS

Page 53: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

53 | 66

Communication SystemsOSPF – hierarchy (example)

● Routers 1 – 4 and 8 – 11 are within the same area● Routers 5,6,7 are backbone routers and form an additional area

Page 54: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

54 | 66

Communication SystemsOSPF – protocol operation

● Hello packets used to find adjacencies– Adding neighbours to the local list

– Flood network with LSA (Link State Advertisement introduced beginnig of this lecure) to propagate information

– Each router forwards only new information

– Hello packets check state of neighbours

– No response → router down → LSA flood → update of routing tables → fast convergence

Page 55: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

55 | 66

Communication SystemsOSPF – protocol operation

● Hello packets (sent to special multicast address) in ethereal

Page 56: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

56 | 66

Communication SystemsOSPF – routing tables

A

B D

C

10.1.0.0 (3)

10.2.0.0 (1) 10.3.0.0 (2)

10.4.0.0 (1) 10.5.0.0 (8)

10.6.0.0 (2) 10.7.0.0 (2)

E

Step Confirmed Tentative1 A (0) 10.1.0.0 [1] (3)

10.2.0.0 [2] (1) *10.3.0.0 [3] (2)

2 A (0) 10.1.0.0 [1] (3)10.3.0.0 [3] (2) *

10.2.0.0 [2] (1) 10.4.0.0 [2, B] (1 + 1 = 2) *

3 A (0) 10.1.0.0 [1] (3)10.2.0.0 [2] (1) 10.4.0.0 [2, B] (1 + 1 = 2) *10.3.0.0 [3] (2) 10.5.0.0 [3, D] (2 + 8 = 10)

4 A (0) 10.1.0.0 [1] (3) *10.2.0.0 [2] (1)10.3.0.0 [3] (2) 10.5.0.0 [3, D] (2 + 8 = 10)10.4.0.0 [2, B] (2) 10.6.0.0 [2, B, C] (1 + 1 + 2 = 4)

[1]

[2] [3]

** represents tentative entries that are lowest cost; one of these is represents tentative entries that are lowest cost; one of these ismoved to confirmed list at end of each step.moved to confirmed list at end of each step.

Steps for building routing table for Router A:

Page 57: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

57 | 66

Communication Systemsrouting algorithms – routing mechanisms

A (0)10.2.0.0 [2] (1)10.3.0.0 [3] (2)10.4.0.0 [2, B] (2)10.1.0.0 [1] (3)10.6.0.0 [2, B, C] (4)10.7.0.0 [2, B, C, E] (6)10.5.0.0 [3, D] (10)

Router A’s final routing table

A

B D

C

10.1.0.0 (3)

10.2.0.0 (1) 10.3.0.0 (2)

10.4.0.0 (1) 10.5.0.0 (8)

10.6.0.0 (2) 10.7.0.0 (2)

E

[1]

[2] [3]

Page 58: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

58 | 66

Communication Systemsexterior gateway protocol – BGP

● Protocol to connect different AS– Exterior Gateway Protocol– Specified in RFC 1771– extension mBGP (multiprotocol BGP)

● Mostly used by ISPs not in local LAN/MAN● TCP for delivery (less bandwidth needed)● Distance vector approach● Allows policy-based routing

Page 59: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

59 | 66

Communication Systemsshortest path routing

● Inter-AS routing with BGP:

AS2 (OSPF

intra-AS routing)

AS1 (RI P intra-AS

routing) BGP

AS3 (OSPF intra-AS

routing)

BGP

R1 R2

R3

R4

R5

Page 60: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

60 | 66

Communication SystemsBGP – vector protocol

● Each Gateway broadcasts entire path (sequence of AS identified by a 16-bit number) to destination to peers

● Operates on a path vector protocol:– Similar to Distance Vector protocol

– Each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS’s) to destination

– BGP routes to networks (ASs), not individual hosts

– E.g., Gateway X may send its path to dest. Z:

– Path (X,Z) = X,Y1,Y2,Y3,…,Z● Initially whole routing table exchanged

Page 61: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

61 | 66

Communication SystemsBGP – vector protocol

● Incremental updates exchange● Keepalive messages to neighbours● Four basic components in a BGP system

– Speakers

– Peers

– Links

– Border routers● Receiving and filtering route advertisements from directly

attached neighbors

Page 62: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

62 | 66

Communication Systemsshortest path routing cont.

● Do a route selection● Send route advertisements to neighbors● BGP uses TCP for message exchange● Messages

– Open: opens TCP connection to peer and authenticates sender

– Update: advertises new path (or withdraws old)

– Keepalive: keeps connection alive in absence of UPDATES; also ACKs OPEN request

– Notification: reports errors in previous msg; also used to close connection

Page 63: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

63 | 66

Communication Systemsshortest path routing cont.

● BGP reduces transit traffic– Types of traffic for BGP routers

● Local traffic: origin or destination in AS● Transit traffic: all other traffic

● AS classification:– Stub - only single connection to another AS

– Multihomed - multiple connections, no transit traffic

– Transit - connections to several other AS, designed to carry both local and transit traffic

Page 64: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

64 | 66

Communication Systemsdecision on routing protocols

● Different routing policies depending on type of network● Inter-AS: admin wants control over how its traffic routed, who

routes through its net. ● Intra-AS: single admin, so no policy decisions needed

● Scale● hierarchical routing saves table size, reduced update traffic

● Performance ● Intra-AS: can focus on performance● Inter-AS: policy may dominate over performance

Page 65: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

65 | 66

Communication Systemsnext lecture / literature

● Next lecture is on Thursday, practical course on Tuesday● Routing Algorithms

– Kurose & Ross: Computer Networking, 3rd edition: Section 4.5 Routing Algorithms

● Link State Routing– Tanenbaum: Computer Networks, 4th edition: Section 5.2.5 Link State

Routing

● RIP– Kurose & Ross: Computer Networking, 3rd edition: Section 4.6.1 Intra-AS

Routing in the Internet:RIP

– Stevens, TCP/IP Illustrated Vol. 1: Section 10.4 RIP, Section 10.5 RIP Version 2

Page 66: 1 | 66 Communication Systems 5 th lecture Chair of Communication Systems Department of Applied Sciences University of Freiburg 2006.

66 | 66

Communication Systemsliterature

● OSPF– Kurose & Ross: Computer Networking, 3rd edition: Section 4.6.2 Intra-AS

Routing in the Internet: OSPF

– Stevens, TCP/IP Illustrated Vol. 1: Section 10.6 OSPF: Open Shorest Path First

– Tanenbaum: Computer Networks, 4th edition: Section 5.6.4 OSPF -- The Interior Gateway Routing Protocol

● BGP– Kurose & Ross: Computer Networking, 3rd edition: Section 4.6.3 Inter-

Autonomous System Routing: BGP

– Stevens, TCP/IP Illustrated Vol. 1: Section 10.7 BGP: Border Gateway Protocol

– Tanenbaum: Computer Networks, 4th edition: Section 5.6.5 BGPThe Exterior Gateway Routing Protocol