1 | 45 communication systems 6 th lecture chair of communication systems department of applied...
TRANSCRIPT
1 | 45
Communication Systems6th lecture
Chair of Communication SystemsDepartment of Applied Sciences
University of Freiburg2008
2 | 45
Communication SystemsLast lecture, next lecture, practical courses
Exercise sheet #3 is due to the 30th May If any questions: please contact our Hiwi Mohannad Zalloom
regarding lecture recordings and exercise sheets (via email: [email protected])
Changes of dates for first practical course block (moved ahead) now: 6th and 10th June (13th is lecture)
Last lecture – introduction to dynamic routing different routing strategies: Static vs. dynamic routing
concept and theory of dynamic routing
discussed distant vector routing algorithm and its problems
3 | 45
Communication Systemsplan for this lecture
Example for distance vector algorithms: RIP (II) Discuss link state algorithms Example: OSPF Extendend taxonomy of routing protocols
IGP / EGP
RIP (II) and OSPF
BGP as example for EGP
specialized algorithms e.g. in WLANs
4 | 45
Communication Systemsrouting information protocol (RIP)
RIP - simplest dynamic routing protocol (try quagga, zebra, ... on Linux machines)
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
5 | 45
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
6 | 45
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.
7 | 45
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 ...
8 | 45
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
9 | 45
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
10 | 45
Communication Systemslink state routing
Distance vector was used within ARPANET until 1979 and much longer within LANs
Two problems caused its demise: can not not scale
convergence of algorithm often took too long (even with split horizon or similar hacks)
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
11 | 45
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
12 | 45
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
13 | 45
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
14 | 45
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
15 | 45
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
16 | 45
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
17 | 45
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)
18 | 45
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
19 | 45
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
20 | 45
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
21 | 45
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
22 | 45
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
23 | 45
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
24 | 45
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, like OLSF
25 | 45
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
26 | 45
Communication Systemsinterior gateway protocols
Interior Gateway Protocol (IGP) specified in RFC 2178 discovers the topology of a network through the operation of a
distributed routing protocol
describe the current network topology
routing protocols distribute how to reach address prefix groups
routing protocols function through either
distributed computing model (distance vector, discussed last lecture)
parallel computing model (link state, will be introduced now)
27 | 45
Communication Systemsopen shortest path first (OSPF)
OSPF Link State Routing algorithm 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
28 | 45
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
29 | 45
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
30 | 45
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
31 | 45
Communication SystemsOSPF – protocol operation
Hello packets (sent to special multicast address) in ethereal
32 | 45
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:
33 | 45
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]
34 | 45
Communication Systemsexterior gateway protocol – principles
You tell me all the address prefixes you can reach, but don’t tell me the path you use to get there
I’ll tell you the same
If anything changes, please let me know If you tell me an address I’ll send you traffic destined to that
address. If I tell you an address I will accept traffic destined to that address
Beside that: Hide network internal topologies
35 | 45
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
36 | 45
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
37 | 45
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
38 | 45
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
39 | 45
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
40 | 45
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
41 | 45
Communication Systemsshortest path routing cont.
Implications You have control over policy settings
what is advertised to your immediate peers
what you accept from your immediate peers
what transits you will accept (send traffic)
But you cannot control transit path of received traffic
symmetry of transit policy
Thus “peering” between different providers is a complicated issue (estimation of traffic (asymmetries), contracts and handling)
42 | 45
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
43 | 45
Communication Systemsother routing protocols
Special routing scenarios e.g. for distributed WLANs (z.B. Berlin freifunk.net)
OLSF (Optimized Link State Routing Protocol, RFC3536)
ISIS - Intermediate system to intermediate system link-state routing protocol invented by DEC, standardized in 1992
operates by reliably flooding topology information throughout a network of routers
each router then independently builds a picture of the network's topology
IS-IS uses Dijkstra's algorithm
Enhanced Interior Gateway Routing Protocol (EIGRP) - Cisco proprietary routing protocol deploying multiple metrics
Diffusing Update Algorithm (DUAL) for guaranteed loop-free operation and a mechanism for fast convergence
44 | 45
Communication Systemsnext lecture / literature
Next lecture is on Friday, then again on Tuesday Practical course will be on 6, 10th June, starting at 1pm (!) in the
Computer Center (H.-Herder-Str.) 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
45 | 45
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 BGP - The Exterior Gateway Routing Protocol