Internet & Web

Tunneling Not all routers can be upgraded simultaneous. NAT: Network Address TranslaEon. NAT: Network Address TranslaEon

Logical view:! Tunneling Not all routers can be upgraded simultaneous no flag days How will the network operate with mixed IPv and IPv6 routers? A! B! E! F! tunnel! Tunneling: IPv6 carried as payload in
of 13
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Logical view:! Tunneling Not all routers can be upgraded simultaneous no flag days How will the network operate with mixed IPv and IPv6 routers? A! B! E! F! tunnel! Tunneling: IPv6 carried as payload in IPv datagram among IPv routers C! D! Physical view:!! IPv6! IPv6! IPv6! IPv6! A! B! E! F! IPv6! IPv6! IPv! IPv! IPv6! IPv6! Flow: X! Src: A! Dest: F! dat A-to-B:! IPv6! Src:B! Dest: E! Flow: X! Src: A! Dest: F! dat Src:B! Dest: E! B-to-E:! Flow: X! IPv6 inside! Src: A! IPv! Dest: F! dat Flow: X! Src: A! Dest: F! dat E-to-F:! IPv6! NAT: Network Address TranslaEon Motivation: a stop-gap measure to handle the IPv address exhaustion problem! share a limited number ( ) of global, static addresses by a number of local hosts! local to global address binding done per connection, on-deman rest of! local network! Internet! (e.g., home network)! 0.0.0/! ! ! All datagrams leaving local! network have same source NAT IP address: ,! different! source port numbers! ! Datagrams with source or! destination in this network! have 0.0.0/ address for! source, destination (as usual)! ! ! NAT: Network Address TranslaEon A NAT box funceons: replaces source IP address, port # of every outgoing datagram to NAT IP address, new port # remote hosts use NAT IP address, new port # as desenaeon addr remember (in NAT translaeon table) every source IP address, port # to NAT IP address, new port # mapping replaces NAT IP address, new port # in dest field of every incoming datagram with corresponding source IP address, port # stored in the NAT table forwards modified datagrams into the local network! : NAT router! changes datagram! source addr from! , to! , 00,! updates table! NAT: Network Address TranslaEon! NAT translation table! global addr local addr! , ,! S: , 00! D: , 80! S: , 80! D: , 00! ! : Reply arrives! dest. address:! , 00!!! ! S: , D: , 80!! S: , 80! D: , : host ! sends datagram to! 8.9.0, 80!! ! ! ! : NAT router! changes datagram! dest addr from! , 00 to ,! NAT: Network Address TranslaEon Advantages: can change address of devices in local network without noefying outside world devices inside local net not explicitly addressable by or visible to the outside world (a security plus) Disadvantage: devices inside local net not explicitly addressable by or visible to the outside world, making peer- to- peer networking that much harder routers should only process up to layer (port# s are app layer objects) address shortage should instead be solved by IPv6, instead NAT hinders the adopeon of IPv6 (nothing wrong with that?) Lesson: Be careful what you propose as a temporary patch, temporary solueons have a tendency to stay around beyond expiraeon date The evil that men do lives aser them, the good is os interred with their bones. Goals of Today s Lecture Inside a router Control plane: roueng protocols Data plane: packet forwarding Path seleceon Minimum- hop and shortest- path roueng Dijkstra s algorithm Topology change Using beacons to detect topology changes PropagaEng topology informaeon RouEng protocol: Open Shortest Path First [acknowledgement: slides adapted from Prof Rexford] 6! What is RouEng? A famous quotaeon from RFC 79 A name indicates what we seek. An address indicates where it is. A route indicates how we get there. - - Jon Postel RouEng vs. Forwarding RouEng: control plane CompuEng paths the packets will follow Routers talking amongst themselves Individual router creang a forwarding table Forwarding: data plane DirecEng a data packet to an outgoing link Individual router using a forwarding table 7! 8! Data and Control Planes Router Physical Layout data plane! Processor control plane! Juniper T series Switch Line card Line card Line card Switching Fabric Line card Linecards Line card Line card Cisco 000 9! 0! Line Cards (Interface Cards, Adaptors) Switching Fabric Interfacing Physical link Switching fabric Packet handling Packet forwarding Decrement Eme- to- live Buffer management Link scheduling Packet filtering Rate limieng Packet marking Measurement Receive to/from link lookup to/from switch Transmit Deliver packet inside the router From incoming interface to outgoing interface A small network in and of itself Must operate very quickly MulEple packets going to same outgoing interface Switch scheduling to match inputs to outputs ImplementaEon techniques Bus, crossbar, interconneceon network, Running at a faster speed (e.g., X) than links Dividing variable- length packets into fixed- size cells!! Packet Switching Router Processor Link Link R Link Link Link, ingress Link, ingress Link, ingress Link, ingress Choose Egress Choose Egress Choose Egress Choose Egress Link, egress Link, egress Link, egress Link, egress So- called Loopback interface IP address of the CPU on the router Interface to network administrators Command- line interface for configuraeon Transmission of measurement staesecs Handling of special data packets Packets with IP opeons enabled Packets with expired Time- To- Live field Control- plane sosware ImplementaEon of the roueng protocols CreaEon of forwarding table for the line cards!! Where do Forwarding Tables Come From? Routers have forwarding tables Map IP prefix to outgoing link(s) Entries can be staecally configured E.g., map..8.0/ to Serial0/0. But, this doesn t adapt To failures To new equipment To the need to balance load That is where roueng protocols come in CompuEng Paths Between Routers Routers need to know two things Which router to use to reach a desenaeon prefix Which outgoing interface to use to reach that router u! z! Interface along! the path to z! Router z that can! reach destination!..8.0/ Today s class: just how routers reach each other How u knows how to forward packets toward z 6! Shortest- Path RouEng CompuEng the Shortest Paths Path- seleceon model DesEnaEon- based Load- insensieve (e.g., staec link weights) Minimum hop count or sum of link weights assuming you already know the topology 7! 8! Shortest- Path Problem Given: network topology with link costs c(x,y): link cost from node x to node y Infinity if x and y are not direct neighbors Compute: least- cost paths to all nodes From a given source u to all other nodes p(v): predecessor node along path from source to v u! p(v)! v! 9! Dijkstra s Shortest- Path Algorithm IteraEve algorithm ASer k iteraeons, know least- cost path to k nodes S: nodes whose least- cost path definievely known IniEally, S = {u} where u is the source node Add one node to S in each iteraeon D(v): current cost of path from source to node v IniEally, D(v) = c(u,v) for all nodes v adjacent to u and D(v) = for all other nodes v ConEnually update D(v) as shorter paths are learned 0! Dijsktra s Algorithm Initialization: S = {u} for all nodes v if (v is adjacent to u) D(v) = c(u,v) 6 else D(v) = 7 8 Loop 9 find w not in S with the smallest D(w) 0 add w to S update D(v) for all v adjacent to w and not in S: D(v) = min{d(v), D(w) + c(w,v)} until all nodes in S Dijkstra s Shortest Path First (SPF) Algorithm A greedy algorithm for solving single- source shortest path problem assume non- negaeve edge weights even if we re only interested in the path from s to a single desenaeon, d, we need to find the shortest path from s to all vereces in G (otherwise, we might have missed a shorter path) if the shortest path from s to d passes through an intermediate node u, i.e., P = {s,..., u,..., d}, then P = {s,..., u} must be the shortest path from s to u!! Dijkstra s Shortest Path First (SPF) Algorithm SPF(startnode s)! { // Initialize!! table = createtable( V ); // stores spf, cost, predecessor!! table[*].spf = false; table[*].cost = INFINITY;!! pq = createpq( E ); // empty pq!! table[s].cost = 0;!! pq.insert(0, s); // pq.insert(cost, v)!! while (!pq.isempty()) {!!! v = pq.getmin();!!! if (!table[v].spf) { // not on sp tree!!!! table[v].spf = true;!!!! for each u = v.neighbors() {!!!!! newcost = weight(u, v) + table[v].cost;!!!!! if (table[u].cost newcost) {!!!!!! table[u].cost = newcost;!!!!!! table[u].pred = v;!!!!!! pq.insert(newcost, u);!!!!! }!!!! }!!! }!! }!! extract SPF from table;! }!! Dijkstra s SPF Example (init) a F b F 0 -!! c F d F! e F! f F e!! f!! 6 Dijkstra s SPF Example (v =s =b) Dijkstra s SPF Example (v =a) a F b b T 0 - c F b d F e F f F!!!! a T b b T 0 - c F a d F 8 a e F f F!!!!! e! f!! e! f! 6! Dijkstra s SPF Example (v =c) Dijkstra s SPF Example (v =d) a T b b T 0 - c T a d F 6 c e F 8 c f F!!!! a T b b T 0 - c T a d T 6 c e F 8 c f F d!!!!! e! f!! e! f! 7! 8! 7 Dijkstra s SPF Example (v =e) Dijkstra s SPF Example (v =f) a T b b T 0 - c T a d T 6 c e T 8 c f F 9 e!!!! a T b b T 0 - c T a d T 6 c e T 8 c f T 9 e!!!!! e! f!! e! f! 9! 0! Dijkstra s SPF Algorithm Algorithm complexity: N nodes each iteraeon: extract minheap O(log N ) total O( N log N ) Each neighbor of each node could also poteneally go through the minheap once: O( E log N ) Total: O( N log( N )+ E log( N )) = O( E log N ) ( E N for a connected graph) OscillaEons possible: e.g., link cost = amount of carried traffic, asymmetric link cost A +e D B e C e ini;ally! +e A 0 0 A +e +e A 0 D +e B D 0 0 B D +e B 0 0 e C C +e 0 C e recompute e recompute e recompute rou;ng Dijkstra s Algorithm Example! 8 Dijkstra s Algorithm Example Shortest- Path Tree Shortest- path tree from u v! y! x! u! t! w! s! z! Forwarding table at u link v (u,v) w (u,w) x (u,w) y (u,v) z (u,v) s (u,w) t (u,w)!! Link- State RouEng Learning the Topology by the routers talk amongst themselves Each router keeps track of its incident links Whether the link is up or down The cost on the link Each router broadcasts the link state To give every router a complete view of the graph Each router runs Dijkstra s algorithm To compute the shortest paths and construct the forwarding table Example protocols Open Shortest Path First (OSPF) Intermediate System Intermediate System (IS- IS) 6! 9 DetecEng Topology Changes Beaconing Periodic hello messages in both direceons Detect a failure aser a few missed hellos hello! BroadcasEng the Link State Flooding Node sends link- state informaeon out its links And then the next node sends out all of its links except the one where the informaeon arrived X A X A Performance trade- offs DetecEon speed Overhead on link bandwidth and CPU C B D (a) X A C B D (b) X A Likelihood of false deteceon 7! C B D (c) C B D (d) 8! BroadcasEng the Link State When to IniEate Flooding Reliable flooding Ensure all nodes receive link- state informaeon Topology change Link or node failure and that they use the latest version Challenges Packet loss Out- of- order arrival SoluEons Acknowledgments and retransmissions Sequence numbers Time- to- live for each packet Link or node recovery ConfiguraEon change Link cost change Periodically Refresh the link- state informaeon Typically (say) 0 minutes Corrects for possible corrupeon of the data 9! 0! 0 Convergence When the Routers Disagree (during transient periods) Gerng consistent roueng informaeon to all nodes E.g., all nodes having the same link- state database Consistent forwarding aser convergence All nodes have the same link- state database All nodes forward packets on shortest paths The next router on the path forwards to the next hop!! Transient DisrupEons DetecEon delay A node does not detect a failed link immediately and forwards data packets into a blackhole Depends on Emeout for deteceng lost hellos Transient DisrupEons Inconsistent link- state database Some routers know about failure before others The shortest paths are no longer consistent Can cause transient forwarding loops!! Convergence Delay Sources of convergence delay DetecEon latency Flooding of link- state informaeon Shortest- path computaeon CreaEng the forwarding table Performance during convergence period Lost packets due to blackholes and TTL expiry Looping packets consuming resources Out- of- order packets reaching the desenaeon Very bad for VoIP, online gaming, and video Reducing Convergence Delay Faster deteceon Smaller hello Emers Link- layer technologies that can detect failures Faster flooding Flooding immediately Sending link- state packets with high- priority Faster computaeon Faster processors on the routers Incremental Dijkstra s algorithm Faster forwarding- table update Data structures supporeng incremental updates 6! Scaling Link- State RouEng Overhead of link- state roueng Flooding link- state packets throughout the network Running Dijkstra s shortest- path algorithm Introducing hierarchy through areas area border router Area Area Area 0 Area Area 7! OSPF (Open Shortest Path First) Open : publicly available Uses Link State algorithm LS packet disseminaeon adveresements disseminated to enere network (via flooding protocol: forward to all interfaces except the incoming one) adveresement carried in OSPF messages directly over IP (rather than TCP or UDP) route computaeon using Dijkstra s algorithm topology map at each node OSPF is not loop free due to delay in topology propagaeon maintaining LS database consistency is hard due to router reboot: how to determine which LS is newer? 8! OSPF (Open Shortest Path First) Advance features (not in RIP): security: all OSPF messages authenecated (to prevent fake adveresement) muleple same- cost paths allowed (only one path in RIP) for each link, muleple cost metrics for different TOS (e.g., satellite link cost set to low for best effort; high for real Eme) integrated uni- and mulecast support: MulEcast OSPF (MOSPF) uses same topology data base as OSPF Hierarchical OSPF in large domains 9! Conclusions RouEng is a distributed algorithm React to changes in the topology Compute the paths through the network Shortest- path link state roueng Flood link weights throughout the network Compute shortest paths as a sum of link weights Forward packets on next hop in the shortest path Convergence process Changing from one topology to another Transient periods of inconsistency across routers 0!
Similar documents
View more...
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks