280 likes | 408 Views
ecs298k: Routing in General... lecture #2. Dr. S. Felix Wu Computer Science Department University of California, Davis http://www.cs.ucdavis.edu/~wu/ wu@cs.ucdavis.edu. Routing Protocol Framework Information Model. Routing Information Base. OSPF. RIPv2. BGP4. RIB. RIB. RIB.
E N D
ecs298k:Routing in General...lecture #2 Dr. S. Felix Wu Computer Science Department University of California, Davis http://www.cs.ucdavis.edu/~wu/ wu@cs.ucdavis.edu
Routing Protocol Framework Information Model Routing Information Base OSPF RIPv2 BGP4 RIB RIB RIB Application Layer Network Layer (Dest, NextHop, Routing Metrics) FIB FIB Forwarding Information Base Forwarding Algorithm Forwarding Decision NPDU Header (Network Protocol Data Unit)
Operation Model - Routing Information Exchange Hey, Here is the routing information I got so far Hmm, some of them are obsolete, Here is my update
Which algorithm should I use?? Distributed Dijikstra’s algorithm or Distributed Bellman-Ford algorithm? Routing Information Base Forwarding Information Base Operation Model - Route Generation and Selection application Layer network Layer
Administrative Domain 1 Administrative Domain 2 Routing Domain Routing Domain AIR AIR AIR ASBR ASBR AIR Host ASBR Host AIR Host Host Routing Protocol Framework Topology Model • Two Level Routing - Intra-domain and Inter-domain • Multiple routing domains can form an administrative domain • ASBR and It’s restriction • Routing protocol examples ( RIP, RIPv2, IGRP, OSPF, EGP, BGP, IS-IS)
FIB • Forwarding Information Base • Longest Matching Rule • CIDR (Classless Inter-domain Routing) • IP address + Net Mask Length • 128.32.12/24 versus 128.32.12/22 • 10000000.00100000.00001100.-------- • 11111111.11111111.11111111.00000000 • 11111111.11111111.11111100.00000000 • Aggregation: • 128.32.12.0/24, 128.32.13.0/24 => 128.32.12.0/23 • 128.32.12.0/23, 128.32.14.0/23 => 128.32.12.0/22
IP Routing • Routing targets network addresses • Clouds - IP network address. • Routers use forwarding table • destination/mask, next hop, network interface, metric • table look-up for each packet • need to recognize address structure • Routing information updates the forwarding table after the route computation.
Routing SRC DST I want to know the shortest path or simply “a path” Routers exchange local information!
Link State A B A B B You A A B C Your Neighbor Flooding
Link State A B A B B You A A B C Your Neighbor Flooding
Distance Vector Your Neoghbor will decide who should be the next hop! A: 3 hops B: 2 hops C: 2 hops B You A VIEW C Your Neighbor A: 1 hop B: 2 hops
Routing Information • Link State: • I let the whole world knows about my relationship with my neighbors. • (Felix, Neighbor-X) is up! • Distance Vector: • I let all my neighbors knows about my relationship with the rest of the world. • (Felix can get to Remote-Y) in 5 hops.
RIP • Routing Information Protocol is a simple distance vector protocol. • Initialization: • When the routing daemon is initialized, it send a request command to each network interface (card). • Neighboring routers will reply with routing table information.
RIP, cont. • Periodic Updates • routers advertise tables with neighbors periodically (~30 seconds) + upon interface changes. • Split-Horizon • Router records the interface providing a route and does not propagate it back.
Bad News Propagation: 1 A: 0 A: 1 A: 2 A: 3 A: 4 A: 5 1 1 1 1 1 20
Bad News Propagation: 2 A: 0 A: 3 A: 2 A: 3 A: 4 A: 5 8 1 1 1 1 20
Black Hole A: 3 hops B: 2 hops C: 2 hops B You A C Your Neighbor A: 1 hop B: 2 hops
Black Hole Attack control flow data flow Destination N, NextHop R1, Metric 1 R1 R3 R2 Rn
BGP4 • In between Link-State and Distance-Vector • tell my neighbors about my connection to the rest of the world • but, also tell them how I reach there: • routing path information. • What can or can’t I do with the extra path information? • Can I still attack? • How can I prevent or detect?
Route Path (among AS’s) E F B A A-B-E-F C A-C
BGP Messages • OPEN • NOTIFICATION • UPDATE (NEW and WITHDRAW)
Race Conditions and Paths • T(shortest path) <= Tdown <= T(longest path) A B
R AS2 AS3 AS0 AS1 * * * BGP Convergence Example *B R via 3 B R via 13 B R via 23 *B R via 3 B R via 03 B R via 23 *B R via 3 B R via 03 B R via 13 *B R via 013 B R via 103 *B R via 203 AS0 AS1 AS2
36% Average: 110 (min/max 78/135) seconds Announce AS4 AS5 AS (52 seconds) Withdraw (110 seconds) 35% Average: 107 (min/max 91/133) seconds Announce AS4 AS1 AS3 (39 seconds) Announce AS4 AS5 AS3 (68 seconds) Withdraw (107 seconds) 2% Average:140.00 (min/max 120/142) Announce AS4 AS5 AS8 AS7 AS3 (27) Announce AS4 AS5AS9 AS8 AS7 AS3 (86) Withdraw (140 seconds) 27% Other P6 P5 P4 ISP 9 P2 P5 P3 ISP 5 P5 P7 P6 ISP 8 P7 ISP 1 P2 P5 P4 P6 P7 P3 P5 ISP 7 P4 P6 P7 ISP3-ISP4 Paths During Failure ISP 4 Steady State FAULT R3 ISP 3
63% Average: 79 (min/max 44/208) seconds AS4 AS5 AS2 (35 seconds) Withdraw (79 seconds) 7% Average: 88 (min/max 80/94) seconds Announce AS4 AS5 AS2 (33 seconds) Announce AS4 AS6 AS5 AS2 (61 seconds) Withdraw (88 seconds) 7% Average: 54 (min/max 29/9) seconds Withdraw (54 seconds) 23% Other P4 P3 ISP 13 P4 P2 ISP 6 ISP 12 P3 P4 Vagabond ISP 5 ISP 11 P2 P4 P3 ISP 10 P4 ISP2-ISP4 Paths During Failure ISP 4 Steady State FAULT R2 ISP 2
P2 ISP 5 96% Average: 92 (min/max 63/140) seconds Announce AS4 AS5 AS1 (44 seconds) Withdraw (92 seconds) 4% Average: 32 (min/max 27/38) seconds Withdraw (32 seconds) P2 ISP1-ISP4 Paths During Failure ISP 4 • Only one back up path (length 3) Steady State FAULT R1 ISP 1