Download presentation
Presentation is loading. Please wait.
Published byΠανδώρα Λούπης Modified over 6 years ago
1
2017 session 1 TELE3118: Network Technologies Week 7: Network Layer Control Plane: Intra-Domain Routing Some slides have been adapted from: Computer Networking: A Top Down Approach, 7th (global) edition. Jim Kurose, Keith Ross. Pearson, April All material copyright J.F Kurose and K.W. Ross, All Rights Reserved. Computer Networks, 5th edition. Andrew S. Tanenbaum, David J. Wetherall, Pearson, 2010. Network Layer
2
Network-layer functions
Recall: two network-layer functions: forwarding: move packets from router’s input to appropriate router output data plane routing: determine route taken by packets from source to destination control plane Two approaches to structuring network control plane: per-router control (traditional) logically centralized control (software defined networking) Network Layer: Control Plane
3
Per-router distributed control plane
Individual routing algorithm components in each and every router interact in the distributed control plane Routing Algorithm data plane control values in arriving packet header 0111 1 2 3 Network Layer: Control Plane
4
Logically centralized control plane
A distinct (typically remote) controller interacts centrally with local control agents (CAs) Remote Controller CA data plane control values in arriving packet header 1 2 0111 3 Network Layer: Control Plane
5
Routing protocols Routing protocol goal: determine “good” paths (equivalently, routes), from sending hosts to receiving host, through network of routers path: sequence of routers packets will traverse in going from given initial source host to given final destination host “good”: least “cost”, “fastest”, “least congested” routing: a “top-10” networking challenge! Network Layer: Control Plane
6
Graph abstraction of the network
u y x w v z 2 1 3 5 graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } aside: graph abstraction is useful in other network contexts, e.g., P2P, where N is set of peers and E is set of TCP connections Network Layer: Control Plane
7
Graph abstraction: costs
u y x w v z 2 1 3 5 c(x,x’) = cost of link (x,x’) e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or inversely related to congestion cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) key question: what is the least-cost path between u and z ? routing algorithm: algorithm that finds that least cost path Network Layer: Control Plane
8
Routing algorithm classification
Q: global or decentralized information? global: all routers have complete topology, link cost info “link state” algorithms decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms Q: static or dynamic? static: routes change slowly over time dynamic: routes change more quickly periodic update in response to link cost changes Network Layer: Control Plane
9
Distance vector - RIP Each node maintains a table of triples.
table at B: Destination Cost Next-hop A 1 C D 2 E F G 3 Network Layer
10
RIP: overview Iterative, asynchronous, distributed
Directly connected neighbors exchange updates periodically (on the order of several seconds) whenever table changes (called triggered update) Each update is a vector of distances: (Destination, Cost) Update local table if receive a “better” route smaller cost came from next-hop Refresh existing routes; delete if they time out Network Layer
11
RIP: example Initial table at A: After receiving update from F:
Destination Cost Next-hop B 1 C D ∞ - E F G After receiving update from F: After receiving update from C: Destination Cost Next-hop B 1 C D 2 E F G Destination Cost Next-hop B 1 C D 2 E F G ∞ - Network Layer
12
RIP: recovering from link failure
At F: Dest Cost Nh A 1 B 2 C D ∞ - E G F receives update from A: A receives update from C: At A: Dest Cost Nh B 1 C D 2 E F G 3 Dest Cost Nh A 1 B 2 C D 3 E G 4 Dest Cost Nh B 1 C D 2 E F G ∞ - Network Layer
13
RIP: link cost decreases
1 Y 4 1 X Z 12 X 4 Z 1 X 1 Z X 1 Z At Y: X 2 Y 1 X 5 Y 1 X 5 Y 1 At Z: Good news travels fast Network Layer
14
RIP: link cost increases
14 Y 4 1 X Z 12 X 4 Z 1 X 6 Z 1 X 6 Z 1 X 8 Z 1 At Y: X 5 Y 1 X 5 Y 1 X 7 Y 1 X 7 Y 1 At Z: and so on Bad news travels slow “count to infinity” problem loops! Network Layer
15
Breaking the loop … If next-hop to D is R:
Split Horizon: do not include D in update to R Split Horizon with Poison Reverse: include D, but with metric = ∞ 14 Y 4 1 X Z 12 X 4 Z 1 X 14 Z 1 X 14 Z 1 X 13 Z 1 At Y: X 5 Y 1 X 5 Y 1 X 12 Y 1 X 12 Y 1 At Z: Does this solve the “count to infinity” problem? Network Layer
16
… is not always easy At A: C receives update from A:
Dest Cost Nh B 1 C D 2 E ∞ - F G A receives update from B: C receives update from A: B receives update from C: Dest Cost Nh B 1 C D 2 E 4 F G Dest Cost Nh A 1 B C D E 5 F 2 G Dest Cost Nh A 1 C D 2 E 3 F G Network Layer
17
RIPv2 (RFC 2453) details Included in BSD-UNIX Distribution in 1982
Distance metric: # of hops (∞ = 16): why? Distance vectors only exchanged among neighbors Up to 25 destinations per RIP update message Update-interval is 30 sec: If too large, convergence is slow If too small, too much traffic Triggered update whenever change in routing table Split horizon mandatory, poison reverse optional Network Layer
18
RIPv2 details (contd.) Updates sent every 30 (+/- 5) seconds
Address of net 2 Distance to net 2 Command Must be zero Family of net 2 Family of net 1 Address of net 1 Distance to net 1 Version 8 16 31 Updates sent every 30 (+/- 5) seconds Route not refreshed for 180 sec is timed-out Still included in update messages Timed-out route is deleted (garbage-collected) after 120 sec Triggered update timer set for 1-5 sec Includes only changed routes Suppressed if regular update due subnet mask of net 1 next hop of net 1 subnet mask of net 2 next hop of net 2 Network Layer
19
RIP: where does it run? RIP runs as application-level process (route-d) Updates sent as UDP message (port 520) Multicast IP address (with TTL=1) routed routed Transprt (UDP) Transprt (UDP) network forwarding (IP) table network (IP) forwarding table link link physical physical Network Layer
20
Link State - OSPF Strategy: each node learns complete topology
send information about directly connected links (not entire routing table) to entire network (not just neighbors) Link State Advertisement (LSA) include Nodes (routers) and links (networks) Sequence number and age Reliable flooding Store most recent LSA for each node Send LSA to all nodes except one that sent it Generate LSA periodically (with higher sequence number) Age out each stored LSA Network Layer
21
A link-state routing algorithm
Dijkstra’s algorithm net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have same info computes least cost paths from one node (‘source”) to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k dest.’s notation: c(x,y): link cost from node x to y; = ∞ if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known Network Layer: Control Plane
22
Dijsktra’s algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v
if v adjacent to u then D(v) = c(u,v) else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known shortest path cost to w plus cost from w to v */ 15 until all nodes in N' Network Layer: Control Plane
23
Dijkstra’s algorithm: example
D(v) p(v) D(w) p(w) D(x) p(x) D(y) p(y) D(z) p(z) Step N' u ∞ 7,u 3,u 5,u 1 uw ∞ 11,w 6,w 5,u 2 uwx 14,x 11,w 6,w 3 uwxv 14,x 10,v 4 uwxvy 12,y w 3 4 v x u 5 7 y 8 z 2 9 5 uwxvyz notes: construct shortest path tree by tracing predecessor nodes ties can exist (can be broken arbitrarily) Network Layer: Control Plane
24
Dijkstra’s algorithm: another example
Step 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u D(w),p(w) 5,u 4,x 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ 4,y u y x w v z 2 1 3 5 * Check out the online interactive exercises for more examples: Network Layer: Control Plane
25
Dijkstra’s algorithm, discussion
algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n(n+1)/2 comparisons: O(n2) more efficient implementations possible: O(nlogn) oscillations possible: e.g., support link cost equals amount of carried traffic: A A D C B given these costs, find new routing…. resulting in new costs A D C B given these costs, find new routing…. resulting in new costs A D C B given these costs, find new routing…. resulting in new costs 1 1+e 2+e 1+e 1 2+e 1+e 1 2+e 1+e 1 D B e C 1 1 e initially Network Layer: Control Plane
26
OSPF details RFC 2328 (244 pages long!)
Neighbor up/down detected using “hello” packets LSA reliable flooding over entire AS LSA includes sequence number and age LSA integrity using checksum (excludes age) OSPF messages directly over IP (no UDP or TCP) Hierarchical OSPF: allow scaling to larger networks 5 types of LSAs: Router LSA: set of nodes Network LSA: set of links Summary LSA: inter-area networks Summary LSA: area-border-routers External LSA: external to AS Network Layer
27
OSPF “advanced” features
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 ToS; high for real-time ToS) integrated uni- and multi-cast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF hierarchical OSPF in large domains. Network Layer: Control Plane
28
Hierarchical OSPF backbone boundary router backbone router area border
routers area 3 internal routers area 1 area 2 Network Layer: Control Plane
29
Hierarchical OSPF two-level hierarchy: local area, backbone.
link-state advertisements only in area each nodes has detailed area topology; only know 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’es. Network Layer: Control Plane
30
Comparison of LS and DV algorithms
message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies speed of convergence LS: O(n2) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node’s table used by others error propagate thru network Network Layer: Control Plane
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.