lecture 4: routing - cseweb.ucsd.eduexample bgp routing table" > show ip bgp network next...
TRANSCRIPT
![Page 1: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/1.jpg)
CSE 222A: Computer Communication Networks Alex C. Snoeren
Lecture 4:Routing"
Thanks: Nick Feamster & Mike Freedman
![Page 2: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/2.jpg)
Lecture 4 Overview"
● Routing review ◆ Alternative designs ◆ BGP
● Paxson discussion
CSE 222A – Lecture 4: Routing" 2
![Page 3: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/3.jpg)
● Building a forwarding table ◆ Computing paths between network elements ◆ … and figuring out where the end-hosts are ◆ … to map a destination address to an outgoing link
● How to find the hosts? ◆ Learning/flooding ◆ Injecting into routing protocol ◆ Dissemination via different protocol ◆ Directory service
Finding the Hosts"
3 CSE 222A – Lecture 4: Routing"
![Page 4: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/4.jpg)
Learning and Flooding"● When a frame arrives
◆ Inspect the source address
◆ Associate address with the incoming interface
● When the frame has an unfamiliar destination ◆ Forward out all interfaces ◆ … except for the one where
the frame arrived
A!
B!
C!
D!
Switch learns how to reach A.!
A!
B!
C!
D!
When in doubt, shout!!
Used in Ethernet LANs!
4 CSE 222A – Lecture 4: Routing"
![Page 5: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/5.jpg)
Inject into Routing Protocol"● Treat the end host (or subnet) as a node
◆ And disseminate in the routing protocol ◆ E.g., flood information about where addresses attach
3 2
2
1
1 4
1
4
5
3
u!
s!6!Used in OSPF and IS-IS, especially in enterprise networks
. . .!5 CSE 222A – Lecture 4: Routing"
![Page 6: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/6.jpg)
Disseminate w/Other Protocol"● Distribute using another protocol
◆ One router learns the route ◆ … and shares the information with other routers
learn a route to d!(e.g., via BGP)!
disseminate route to other routers!
Internal BGP (iBGP) used in backbone networks
6 CSE 222A – Lecture 4: Routing"
![Page 7: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/7.jpg)
Directory Service"● Contact a service to learn the location
◆ Lookup the end-host or subnet address ◆ … and learn the label to put on the packet ◆ … to get the traffic to the right egress point
s!
d!
i!
e!
directory!
“Host d is at egress e”!
Encapsulate packet to send to egress e.!
Used in some data centers
7 CSE 222A – Lecture 4: Routing"
![Page 8: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/8.jpg)
To Each His Own…"● Ethernet LAN: spanning tree, MAC learning, flooding
● Enterprise: link-state routing, injecting subnet addresses
● Backbone: link-state routing inside, path-vector routing with neighboring domains, and iBGP dissemination
● Data centers: many different solutions, still in flux » E.g., link-state routing or multiple spanning trees » E.g., directory service or injection of subnets into routing protocol
8 CSE 222A – Lecture 4: Routing"
![Page 9: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/9.jpg)
Internet Routing: BGP"
Route Advertisement
Autonomous Systems (ASes)
Session
Traffic Destination Next-hop AS Path
130.207.0.0/16
130.207.0.0/16
192.5.89.89
66.250.252.44
10578..2637
174… 2637
9 CSE 222A – Lecture 4: Routing"
![Page 10: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/10.jpg)
Two Flavors of BGP"
● External BGP (eBGP): exchanging routes between ASes
● Internal BGP (iBGP): disseminating routes to external destinations among the routers within an AS
eBGP iBGP
10 CSE 222A – Lecture 4: Routing"
![Page 11: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/11.jpg)
Example BGP Routing Table"> show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i *>i4.0.0.0 4.79.2.1 0 110 0 3356 i *>i4.21.254.0/23 208.30.223.5 49 110 0 1239 1299 10355 10355 i * i4.23.84.0/22 208.30.223.5 112 110 0 1239 6461 20171 i
The full routing table
> show ip bgp 130.207.7.237 BGP routing table entry for 130.207.0.0/16 Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer 10578 11537 10490 2637 192.5.89.89 from 18.168.0.27 (66.250.252.45) Origin IGP, metric 0, localpref 150, valid, internal, best Community: 10578:700 11537:950 Last update: Sat Jan 14 04:45:09 2006
Specific entry. Can do longest prefix lookup: Prefix
AS path Next-hop
11 CSE 222A – Lecture 4: Routing"
![Page 12: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/12.jpg)
● Local preference: numerical value assigned by routing policy. Higher values are more preferred.
● AS path length: number of AS-level hops in the path ● Multiple exit discriminator (“MED”): allows one AS to specify that
one exit point is more preferred than another. Lower values are more preferred.
● eBGP over iBGP ● Shortest IGP path cost to next hop: implements “hot potato”
routing ● Router ID tiebreak: arbitrary tiebreak, since only a single “best”
route can be selected
BGP routes have the following attributes, on which the route selection process is based:
12 CSE 222A – Lecture 4: Routing"
BGP Route Selection"
![Page 13: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/13.jpg)
Other BGP Attributes"
● Next-hop: IP address to send packets en route to destination. (Question: How to ensure that the next-hop IP address is reachable?)
● Community value: Semantically meaningless. Used for passing around “signals” and labelling routes. More in a bit.
Next-hop: 4.79.2.1 iBGP
4.79.2.1 4.79.2.2
Next-hop: 192.5.89.89
13 CSE 222A – Lecture 4: Routing"
![Page 14: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/14.jpg)
Local Preference"
● Control over outbound traffic ● Not transitive across ASes ● Coarse hammer to implement route preference ● Useful for preferring routes from one AS over another
(e.g., primary-backup semantics)
Primary
Backup
Higher local pref
Lower local pref
Destination
14 CSE 222A – Lecture 4: Routing"
![Page 15: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/15.jpg)
Communities and Local Pref"
● Customer expresses provider that a link is a backup ● Affords some control over inbound traffic
Primary
Backup
“Backup” Community
Destination
15 CSE 222A – Lecture 4: Routing"
![Page 16: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/16.jpg)
AS Path Length"
● Among routes with highest local preference, select route with shortest AS path length
● Shortest AS path != shortest path, for any interpretation of “shortest path”
Destination
Traffic
16 CSE 222A – Lecture 4: Routing"
![Page 17: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/17.jpg)
Hot-Potato Routing"● Prefer route with shorter IGP path cost to next-hop ● Idea: traffic leaves AS as quickly as possible
I
New York Atlanta
Washington, DC
5 10
Dest.
Common practice: Set IGP weights in accordance with propagation delay (e.g., miles, etc.)
Traffic
17 CSE 222A – Lecture 4: Routing"
![Page 18: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/18.jpg)
Hot-Potato Dynamics"● Small changes in IGP weights can have significant
impact
18
I
San Fran New York
LA
5 10
Dest.
Traffic
11
CSE 222A – Lecture 4: Routing"
![Page 19: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/19.jpg)
Internet Business Model (Simplified)"
● Customer/Provider: One AS pays another for reachability to some set of destinations
● “Settlement-free” Peering: Bartering. Two ASes exchange routes with one another.
Provider
Peer
Customer
Preferences implemented with local preference manipulation
Destination
Pay to use
Get paid to use
Free to use
19 CSE 222A – Lecture 4: Routing"
![Page 20: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/20.jpg)
End-to-End Routing Behavior"● Importance of paper
◆ Revitalized field of network measurement ◆ Use of statistical techniques to capture new types of
measurements ◆ Empirical findings of routing behavior
(motivation for future work)
● Various routing pathologies ◆ Routing loops ◆ Erroneous ◆ Connectivity altered mid-stream ◆ Fluttering…
20 CSE 222A – Lecture 4: Routing"
![Page 21: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/21.jpg)
Measurement With Traceroute"● Traceroute tool to measure the forwarding path
◆ Send packets with TTL=1, 2, 3… ◆ Record the source of the “time exceeded” message
● Useful, but introduces many challenges ◆ Path changes ◆ Non-participating nodes ◆ Inaccurate, two-way measurements
source! destination!
TTL=1!Time! exceeded!
TTL=2!
21 CSE 222A – Lecture 4: Routing"
![Page 22: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/22.jpg)
Questions"● Why can’t we measure the Internet more directly?
◆ What can we do about it?
● Right division of labor between host and network? ◆ For path selection ◆ For network monitoring
● How do we fix these routing problems? ◆ In a decentralized, federated network ◆ How to incentivize better network management
22 CSE 222A – Lecture 4: Routing"
![Page 23: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/23.jpg)
For Next Class…"
● Read and review Wetherall ’98
● Keep thinking about term project ideas/groups ◆ Initial ideas due on Tuesday ◆ Email to Danny
23 CSE 222A – Lecture 4: Routing"
![Page 24: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/24.jpg)
Pathology type
Prevalence in 1995
Prevalence in 1996
Long-lived Routing loops
Short-lived Routing loops
Outage>30s
Total
0.065% ~
0.14% ~ same
same
0.96% 2.2%
3.4% 1.5%
End-to-End Routing Behavior"
24 CSE 222A – Lecture 4: Routing"
![Page 25: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/25.jpg)
Routing Prevalence and Persistence"● Prevalence: How often is the route present in the routing
tables? ◆ Internet paths are strongly dominated by a single route
● Persistence: How long do routes endure before changing? ◆ Routing changes occur over a variety of time scales
25 CSE 222A – Lecture 4: Routing"
![Page 26: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/26.jpg)
Routing Loops"● Persistent Routing Loops
◆ 10 persistent routing loops in D1 ◆ 50 persistent routing loops in D2
● Temporary Routing Loops ◆ 2 loops in D1 ◆ 21 in D2
● Location of Routing Loops: All in one AS
26 CSE 222A – Lecture 4: Routing"
![Page 27: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/27.jpg)
Erroneous and Transient Routing"● Transatlantic route to London via Israel!
● Connectivity altered mid-stream ◆ 10 cases in D1 ◆ 155 cases in D2
● Fluttering: Packets to the same flow changing mid-stream
27 CSE 222A – Lecture 4: Routing"
![Page 28: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/28.jpg)
Backup Slides on Paxson Paper"
28
![Page 29: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/29.jpg)
Paxson Study: Forwarding Loops"● Forwarding loop
◆ Packet returns to same router multiple times
● May cause traceroute to show a loop ◆ If loop lasted long enough ◆ So many packets traverse the loopy path
● Traceroute may reveal false loops ◆ Path change that leads to a longer path ◆ Causing later probe packets to hit same nodes
● Heuristic solution ◆ Require traceroute to return same path 3 times
![Page 30: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/30.jpg)
Paxson Study: Causes of Loops"● Transient vs. persistent
◆ Transient: routing-protocol convergence ◆ Persistent: likely configuration problem
● Challenges ◆ Appropriate time boundary between the two? ◆ What about flaky equipment going up and down? ◆ Determining the cause of persistent loops?
● Anecdote on recent study of persistent loops ◆ Provider has static route for customer prefix ◆ Customer has default route to the provider
![Page 31: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/31.jpg)
Paxson Study: Path Fluttering"● Rapid changes between paths
◆ Multiple paths between a pair of hosts ◆ Load balancing policies inside the network
● Packet-based load balancing ◆ Round-robin or random ◆ Multiple paths for packets in a single flow
● Flow-based load balancing ◆ Hash of some fields in the packet header ◆ E.g., IP addresses, port numbers, etc. ◆ To keep packets in a flow on one path
![Page 32: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/32.jpg)
Paxson Study: Routing Stability"● Route prevalence
◆ Likelihood of observing a particular route ◆ Relatively easy to measure with sound sampling ◆ Poisson arrivals see time averages (PASTA) ◆ Most host pairs have a dominant route
● Route persistence ◆ How long a route endures before a change ◆ Much harder to measure through active probes ◆ Look for cases of multiple observations ◆ Typical host pair has path persistence of a week
![Page 33: Lecture 4: Routing - cseweb.ucsd.eduExample BGP Routing Table" > show ip bgp Network Next Hop Metric LocPrf Weight Path *>i3.0.0.0 4.79.2.1 0 110 0 3356 701 703 80 i](https://reader034.vdocument.in/reader034/viewer/2022042305/5ed07fac3bf672044829d2a4/html5/thumbnails/33.jpg)
Paxson Study: Route Asymmetry"
● Hot-potato routing ● Other causes ◆ Asymmetric link
weights in intradomain routing
◆ Cold-potato routing, where AS requests traffic enter at particular place
● Consequences ◆ Lots of asymmetry ◆ One-way delay is not
necessarily half of the round-trip time
Customer A
Customer B
multiple peering points
Provider A
Provider B
Early-exit routing