1. Trang chủ
  2. » Công Nghệ Thông Tin

Chuyên đề mạng thế hệ mới mạng n5 intradomain

25 268 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 25
Dung lượng 3,08 MB

Nội dung

Chuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạngChuyên đề mạng thế hệ mới mạng

Shortest-Path & Adaptative Routing Prométhée Spathis promethee.spathis@lip6.fr Thème NPA, LIP6 Paris, FRANCE 2 Goals of Today’s Lecture • Path selection – Minimum-hop and shortest-path routing – Dijkstra and Bellman-Ford algorithms • Topology change – Using beacons to detect topology changes – Propagating topology or path information • Routing protocols – Link state: Open Shortest Path First – Distance vector: Routing Information Protocol 3 Adapting Routing to the Traffic • Challenges – Reacting quickly to alleviate congestion – Avoiding over-reacting and causing oscillations – Limiting bandwidth & CPU overhead on routers • Load-sensitive routing – Routers adapt to link load in a distributed fashion – At the packet level, or on “group of packets” • Traffic engineering – Centralized computation of routing parameters – Network-wide measurements of offered traffic IP Addressing 00001100 00100010 10011110 00000101 Network (24 bits) Host (8 bits) 12 34 158 5 • 32-bit number in dotted-quad notation (12.34.158.5) • Divided into network & host portions (left and right) • 12.34.158.0/24 is a 24-bit prefix with 2 8 addresses • In the older days… – Class A: 0*  Very large /8 blocks (e.g., MIT has 18.0.0.0/8) – Class B: 10*  Large /16 blocks (e.g,. Princeton has 128.112.0.0/16) – Class C: 110*  Small /24 blocks (e.g., AT&T Labs has 192.20.225.0/24) – Class D: 1110*  Multicast groups – Class E: 11110*  Reserved for future use (sounds a bit scary…) • And then, address space became scarce… Some History: Why Dotted-Quad Notation? IP Address != Host Machine • Dynamic IP address assignment (DHCP) – Single client may have multiple addresses over time – Address may correspond to multiple clients over time • Shared machines – Multiple users on a shared compute server – Transfers traveling through proxies and firewalls – Multiple Web sites hosted on a single machine • Replicated sites – Multiple machines hosting a single (popular) Web site • Addresses do not correspond to geographic location – Similar prefix does not necessarily imply nearby hosts – Single prefix may span hosts in large geographic region • Source IP address may be spoofed (e.g., DoS attack) Addresses Lifetime and Scope 8Jelger/Tschudin – Dagstuhl Seminar – Oct/Nov. 2006 scope update frequency global local IP (NAT) IP (global) FQDN (global) FQDN (private) DHCP "trend" EUI-48 port/protocol numbers labels Google keywords (attributes) 1 sec 1 day 1 year 10 years AS numbers URL emails 9 Challenges for Internet routing scale: with 200 million destinations: • can’t store all dest’s in routing tables! • routing table exchange would swamp links! administrative autonomy • internet = network of networks • each network admin may want to control routing in its own network Routing study thus far - idealization – all routers identical – network “flat” … not true in practice IP Address : 12.4.0.0 IP Mask: 255.254.0.0 00001100 00000100 00000000 00000000 Address Mask for hosts Network Prefix Use two 32-bit numbers to represent a network. Network number = IP address + Mask Usually written as 12.4.0.0/15 11111111 11111110 00000000 00000000 Classless Inter-Domain Routing (CIDR) CIDR = Hierarchy in Address Allocation • Prefixes are key to Internet scalability – Address allocation by ARIN/RIPE/APNIC and by ISPs – Routing protocols and packet forwarding based on prefixes – Today, routing tables contain ~150,000-200,000 prefixes 12.0.0.0/8 12.0.0.0/16 12.254.0.0/16 12.1.0.0/16 12.2.0.0/16 12.3.0.0/16 : : : 12.253.0.0/16 12.3.0.0/24 12.3.1.0/24 : : 12.3.254.0/24 12.253.0.0/19 12.253.32.0/19 12.253.64.0/19 12.253.96.0/19 12.253.128.0/19 12.253.160.0/19 12.253.192.0/19 : : : Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: “Send me anything with addresses beginning 200.23.16.0/20” 200.23.16.0/23 200.23.18.0/23 200.23.30.0/23 Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23” 200.23.20.0/23 Organization 2 . . . . . . ISPs-R-Us has a more specific route to Organization 1 “Send me anything with addresses beginning 200.23.16.0/20” 200.23.16.0/23 200.23.18.0/23 200.23.30.0/23 Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23” 200.23.20.0/23 Organization 2 . . . . . . Hierarchical addressing: more specific routes Longest Prefix Match Forwarding 4.0.0.0/8 4.83.128.0/17 201.10.0.0/21 201.10.6.0/23 126.255.103.0/24 201.10.6.17 destination forwarding table Serial0/0.1 outgoing link • Forwarding tables in IP routers – Maps each IP prefix to next-hop link(s) • Destination-based forwarding – Packet has a destination address – Router identifies longest-matching prefix 15 A Simple Algorithm • Scan the forwarding table one entry at a time – See if the destination matches the entry – If so, check the size of the mask for the prefix – Keep track of the entry with longest-matching prefix Simplest Algorithm is Too Slow • Overhead is linear in size of the forwarding table – Today, that means 150,000-200,000 entries! – And, the router may have just a few nanoseconds before the next packet is arriving • Need greater efficiency to keep up with line rate – Better algorithms – Hardware implementations – Patricia Trees – MPLS Faster Lookups • Patricia tree is faster than linear scan – Proportional to number of bits in the address • Patricia tree can be made faster – Can make a k-ary tree  E.g., 4-ary tree with four children (00, 01, 10, and 11) – Faster lookup, though requires more space • Can use special hardware – Content Addressable Memories (CAMs) – Allows look-ups on a key rather than flat address • Huge innovations in the mid-to-late 1990s – After CIDR was introduced (in 1994) – … and longest-prefix match was a major bottleneck 23 R R R A B C D R1 R2 R3 R4 R5 E Net Nxt Hop R4 R3 R3 R4 Direct R4 Net Nxt Hop A B C D E default R2 R2 Direct R5 R5 R2 Net Nxt Hop A B C D E default R1 Direct R3 R1 R3 R1 Default to upstream router A B C D E default Forwarding: determine next hop Routing: establish end-to-end paths Forwarding always works Routing can be badly broken Routing vs. Forwarding Forwarding vs. Routing • Forwarding: data plane – Directing a data packet to an outgoing link – Individual router using a forwarding table • Routing: control plane – Computing the paths the packets will follow – Routers talking amongst themselves – Individual router creating a forwarding table forwarding table Host, router network layer functions: Routing protocols •path selection •RIP, OSPF, BGP IP protocol •addressing conventions •datagram format •packet handling conventions ICMP protocol •error reporting •router “signaling” Transport layer: TCP, UDP Link layer physical layer Network layer The Internet Network Layer 26 Statically Dynamically Routers exchange network reachability information using ROUTING PROTOCOLS. Routers use this to compute best routes Administrator manually configures forwarding table entries In practice : a mix of these. Static routing mostly at the “edge” + More control + Not restricted to destination-based forwarding - Doesn’t scale - Slow to adapt to network failures + Can rapidly adapt to changes in network topology + Can be made to scale well - Complex distributed algorithms - Consume CPU, Bandwidth, Memory - Debugging can be difficult - Current protocols are destination-based How Are Forwarding Tables Populated to implement Routing? Data, Control, and Management Planes Data Plane Control Plane Management Plane Timescale Packet (nsec) Event (10 msec to sec) Human (min to hours) Tasks Forwarding, buffering, filtering, scheduling Routing, signaling Analysis, configuration Location Line-card hardware Router software Humans or scripts 29 Autonomy: network of networks LIP6 network DT AS 1 AS 3 AS 2 • Internet = interconnection of Autonomous Systems (AS) – Distinct regions of administrative control – Routers/links managed by a single “institution” – Service provider, company, university, etc. AS 1 AS 2 BGP EGP = Exterior Gateway Protocol IGP = Interior Gateway Protocol Metric based: OSPF, IS-IS, RIP, EIGRP (cisco) Policy based: BGP The Routing Domain of BGP is the entire Internet OSPF EIGRP Architecture of Dynamic Routing 31 Hierarchical routing LIP6 network DT AS 1 AS 3 AS 2 Intra-AS routing (Interior Gateway Protocol) Most common: OSPF,IS-IS determines path from ingress to egress Inter-AS routing (Border Gateway Protocol) determines AS path and egress point Interconnected ASes • Forwarding table is configured by both intra- and inter-AS routing algorithm – Intra-AS sets entries for internal dests – Inter-AS & Intra-As sets entries for external dests 3a 3c 3b 1c 1b 1a 1d 2a 2c 2b AS 1 AS 2 AS 3 Intra-AS Routing algorithm Inter-AS Routing algorithm Forwarding table The Gang of Four Link State Vectoring EGP IGP BGP RIP IS-IS OSPF • Topology information is flooded within the routing domain • Best end-to-end paths are computed locally at each router. • Best end-to-end paths determine next-hops. • Based on minimizing some notion of distance • Works only if policy is shared and uniform • Examples: OSPF, IS-IS • Each router knows little about network topology • Only best next-hops are chosen by each router for each destination network. • Best end-to-end paths result from composition of all next- hop choices • Does not require any notion of distance • Does not require uniform policies at all routers • Examples: RIP, BGP Link State Vectoring Technology of Distributed Routing Routers Talking to Routers Routing info Routing info • Routing computation is distributed among routers within a routing domain • Computation of best next hop based on routing information is the most CPU/memory intensive task on a router • Routing messages are usually not routed, but exchanged via layer 2 between physically adjacent routers Shortest-Path Routing • Path-selection model – Destination-based – Minimum hop count or sum of link weights – Dynamic vs. static link weights (i.e. load-insensitive routing) 3 2 2 1 1 4 1 4 5 3 Link-State Routing: Dijsktra’s Algorithm • Each router keeps track of its incident links – Link cost, and whether the link is up or down • Each router broadcasts the link state – To give every router a complete view of the graph • Each router runs Dijkstra’s algorithm – To compute shortest paths and forwarding table 3 2 2 1 1 4 1 4 5 3 E.g., OSPF and IS-IS 38 Dijkstra’s Shortest-Path Algorithm • Iterative algorithm – After k iterations, know least-cost path to k nodes • S: nodes whose least-cost path definitively known – Initially, S = {u} where u is the source node – Add one node to S in each iteration • D(v): current cost of path from source to node v – Initially, D(v) = c(u,v) for all nodes v adjacent to u – … and D(v) = ∞ for all other nodes v – Continually update D(v) as shorter paths are learned Dijsktra’s Algorithm 1 Initialization: 2 S = {u} 3 for all nodes v 4 if v adjacent to u { 5 D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in S with the smallest D(w) 10 add w to S 11 update D(v) for all v adjacent to w and not in S: 12 D(v) = min{D(v), D(w) + c(w,v)} 13 until all nodes in S 39 40 Dijkstra’s Algorithm Example 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 41 Dijkstra’s Algorithm Example 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 42 Shortest-Path Tree • Shortest-path tree from u • Forwarding table at u 3 2 2 1 1 4 1 4 5 3 u v w x y z s t v (u,v) w (u,w) x (u,w) y (u,v) z (u,v) link s (u,w) t (u,w) 43 Link-State Routing • 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) 44 Detecting Topology Changes • Beaconing – Periodic “hello” messages in both directions – Detect a failure after a few missed “hellos” • Performance trade-offs – Detection speed – Overhead on link bandwidth and CPU – Likelihood of false detection “hello” 45 Broadcasting the Link State • Flooding – Node sends link-state information out its links – And then the next node sends out all of its links – … except the one where the information arrived X A C B D (a) X A C B D (b) X A C B D (c) X A C B D (d) 46 Broadcasting the Link State • Reliable flooding – Ensure all nodes receive link-state information – … and that they use the latest version • Challenges – Packet loss – Out-of-order arrival • Solutions – Acknowledgments and retransmissions – Sequence numbers – Time-to-live for each packet 47 When to Initiate Flooding • Topology change – Link or node failure – Link or node recovery • Configuration change – Link cost change • Periodically – Refresh the link-state information – Typically (say) 30 minutes – Corrects for possible corruption of the data [...]... network • Best end-to-end paths result from composition of all nexthop choices • Does not require any notion of distance • Does not require uniform policies at all routers • Examples: RIP, BGP Network Layer Intradomain Routing Today • Link-state routing with static link weights – Static weights: avoid stability problems – Link state: faster reaction to topology changes • Most common protocols in backbones . Example 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 41 Dijkstra’s Algorithm Example 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 3 2 2 1 1 4 1 4 5 3 42 Shortest-Path. contain ~ 150 ,000-200,000 prefixes 12.0.0.0/8 12.0.0.0/16 12. 254 .0.0/16 12.1.0.0/16 12.2.0.0/16 12.3.0.0/16 : : : 12. 253 .0.0/16 12.3.0.0/24 12.3.1.0/24 : : 12.3. 254 .0/24 12. 253 .0.0/19 12. 253 .32.0/19 12. 253 .64.0/19 12. 253 .96.0/19 12. 253 .128.0/19 12. 253 .160.0/19 12. 253 .192.0/19 : : : Hierarchical. prefixes 12.0.0.0/8 12.0.0.0/16 12. 254 .0.0/16 12.1.0.0/16 12.2.0.0/16 12.3.0.0/16 : : : 12. 253 .0.0/16 12.3.0.0/24 12.3.1.0/24 : : 12.3. 254 .0/24 12. 253 .0.0/19 12. 253 .32.0/19 12. 253 .64.0/19 12. 253 .96.0/19 12. 253 .128.0/19 12. 253 .160.0/19 12. 253 .192.0/19 : : : Hierarchical addressing: route aggregation Hierarchical

Ngày đăng: 14/04/2015, 15:43

TỪ KHÓA LIÊN QUAN

w