Module 4: Routing Part 2

woonsocketpoliticalNetworking and Communications

Oct 28, 2013 (3 years and 7 months ago)

53 views

1
Module 4: Routing Part 2
Johan Nykvist
Department of Computer Science and Electrical Engineering
Luleå University of Technology
SMD123 Computer Communications
Lecture Objectives
 Routing in the Internet
 Intra-Domain Routing

RIP, OSPF
 Inter-Domain Routing

BGP
2
Intra-Domain Routing
 Handle routing within Autonomous Systems
 Interior-Gateway Protocols (IGP)
 Most common IGP protocols:
 Distance-Vector Protocols

RIP: Routing Information Protocol

IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

EIGRP: Enhanced IGRP, uses diffusion computations to avoid the
count-to-infinity problem (Cisco proprietary)
 Link-State Protocols

OSPF: Open Shortest Path First Protocol

IS-IS: Intermediate System-to-Intermediate System (ISO)
Routing Information Protocol (RIP)
 Uses the Distance-Vector Algorithm
 Hop-count as routing metric
 One hop == one subnet traversal
 Infinity == 16
D
C
B
A
u
v
w
x
y
z
A’s Routing table:
destination
hops
u 1
v 2
w 2
x 3
y 3
z 2
3
Routing Information Protocol (RIP)
 Each router keeps a routing table with the router’s
distances to subnets in the AS (Distance Vector)
 The distance vectors are exchanged between
neighbors with response messages

Also known as advertisements

Advertisements are sent every 30 seconds (no need to store
neighbors’ routing tables)

Contain subnet addresses and distances to the subnets
(max. 25 addresses per message)
Routing Information Protocol (RIP)
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B 7
x -- 1
….….....
w
x y
z
A
C
D
B
Routing table in D
4
Routing Information Protocol (RIP)
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B A 7 5
x -- 1
….….....
Routing table in D
w
x y
z
A
C
D
B
Dest Next hops
w - -
x - -
z C 4
….… ...
Advertisement
from A to D
Routing Information Protocol (RIP)
 Timeout after 180 seconds
1.Neighbor is considered to be no longer reachable
2.Routes via neighbor are removed from the routing table
3.Advertisements are sent to the other neighbors
 RIP applies Poison Reverse to avoid ping-pong loops
 Still suffers from loops that are longer than 3 hops
(Infinity is therefore set to 16)
5
Routing Information Protocol (RIP)
 Advertisements are exchanged with UDP on port 520
 In UNIX, the RIP protocol is executed by an
application-level process called route-d (daemon)
physical
link
network forwarding
(IP) table
Transport
(UDP)
routed
physical
link
network
(IP)
Transport
(UDP)
routed
forwarding
table
Routing Information Protocol (RIP)
 Was one of the earliest IGPs
 Included in BSD UNIX in 1982
 Three versions exist:
 RIP version 1 (RFC 1058)

No support for subnets

No router authentication
 RIP version 2 (RFC 2453)

Backward-compatible with RIPv1

Subnet support

Router authentication support
 RIP Next Generation (RFC 2080)

Support for IPv6
6
Open Shortest Path First (OSPF)
 “Open”: publicly available (version 2, RFC 2328)
 Uses Link State algorithm
 Link-State packets are disseminated regularly and
at topology changes
 Each router has a complete topology map
 Route computation is done using Dijkstra’s algorithm
(each router regards itself as the source router)
 Advertisements disseminated to entire AS via flooding
 Carried in OSPF messages directly over IP
(rather than TCP or UDP)
OSPF “advanced” features (not in RIP)
 Security: all OSPF messages authenticated
(to prevent malicious intrusion)
 Multiple same-cost paths allowed
(only one path in RIP)
 For each link, multiple cost metrics for different TOS
(e.g., satellite link cost set “low” for best effort; high
for real time)
 Hierarchical OSPF in large domains
7
Hierarchical OSPF

Two-level hierarchy: local areas and backbone area

Link-state advertisements kept within each area

each node has detailed area topology:
only knows direction (shortest path) to nets in other areas

Area border routers: “summarize” distances to nets in own
area, advertise to other area border routers

Backbone routers: run OSPF routing limited to backbone

Boundary routers: connect to other AS’s
Lecture Objectives
 Routing in the Internet
 Intra-Domain Routing

RIP, OSPF
 Inter-Domain Routing

BGP
8
Inter-Domain Routing
 Handle routing *between* Autonomous Systems
 Exterior-Gateway Protocols (EGP)
 Do not care about routing within ASes
 The standard EGP used in Internet today: BGP
AS3
AS1
AS2
Border Gateway Protocol (BGP)

Border Gateway Protocol version 4 (BGP) – RFC 1771

BGP provides each AS a means to
1.Obtain network reachability information from neighboring ASes
2.Propagate received information to routers within the AS
3.Determine “good” routes to distant networks based on received
information and routing policies
4.Advertise its network prefixes to neighboring ASes

Each AS is assigned an unique AS Number (ASN) by ICANN

Uses a path-vector routing algorithm

Similar to the Distance-Vector algorithm (distributed computation)

The AS-path to a destination is included in the routing information

Routing decisions made on metrics and local routing policies
9
BGP Basics

Pairs of routers (BGP peers) exchange routing information over
semi-permanent TCP connections: BGP sessions
(Note that BGP sessions do not correspond to physical links)

External BGP (eBGP) sessions between ASes,
Internal BGP (iBGP) sessions within ASes

When AS2 advertises a prefix to AS1, AS2 is promising it will
forward any datagrams destined to that prefix towards the
prefix
3b
1d
3a
1c
2a
AS3
AS1
AS2
1a
2c
2b
1b
3c
eBGP session
iBGP session
Distributing reachability information
 With an eBGP session between 3a and 1c, AS3 sends
prefix reachability info to AS1
 1c can then use iBGP do distribute this new prefix
reach info to all routers in AS1
 1b can then re-advertise the new reach info to AS2
over the 1b-to-2a eBGP session
3b
1d
3a
1c
2a
AS3
AS1
AS2
1a
2c
2b
1b
3c
eBGP session
iBGP session
10
BGP Routes and Path Attributes
 When advertising a prefix, the advertisement includes
BGP attributes.
 prefix + attributes = “route”
 Two important attributes:
 AS-PATH:contains the ASNs of the ASs through which the
advert for the prefix passed, e.g., [5 4 3 2 1]
 NEXT-HOP:Indicates the specific internal-AS router next-
hop AS. (There may be multiple links from current AS to
next-hop-AS)
 When a gateway router receives a route advertisement,
it applies import policies to accept / decline the route
BGP Route Selection
 Router may learn about more than 1 route to some
prefix. Router must select route
 Per-AS routing policies are applied to
implement business agreements
 Elimination rules for selecting the “best” route:
1.Local preference value attribute: policy decision
2.Shortest AS-PATH
3.Closest NEXT-HOP router (hot potato routing)
4.…
11
BGP Messages

BGP messages exchanged using TCP, port 179.

BGP 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 used to ACK OPEN request
 NOTIFICATION:reports errors in previous message
also used to close connection
BGP Routing Policy

Figure 4.5-BGPnew: a simple BGP scenario
A

B

C

W

X

Y

legend:

customer
network:
provider
network

 A,B,C are provider networks (called Transit ASes)
 X,W,Y are customers of provider networks (called Stub ASes)
 X is multi-homed:attached to two networks

X does not want to route from B via X to C

.. so X will not advertise to B a route to C (local routing policies applied)
12
BGP Routing Policy

Figure 4.5-BGPnew: a simple BGP scenario
A

B

C

W

X

Y

legend:

customer
network:
provider
network

 A advertises to B the path AW
 B advertises to X the path BAW
 Should B advertise to C the path BAW?

No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s
customers

B wants to force C to route to w via A

B wants to route only to / from its customers!
Inter-Domain Routing – Network prefix growth
Collected at AS 1221 (Telstra) – http://bgp.potaroo.net
13
Inter-Domain Routing – ASN growth
Collected at AS 1221 (Telstra) – http://bgp.potaroo.net
Inter-Domain Routing – Avg AS Path Length
Collected at AS 1221 (Telstra) – http://bgp.potaroo.net