Presentation is loading. Please wait.

Presentation is loading. Please wait.

Link State & OSPF Spring 2013CE 151 - Advanced Networks1.

Similar presentations


Presentation on theme: "Link State & OSPF Spring 2013CE 151 - Advanced Networks1."— Presentation transcript:

1 Link State & OSPF Spring 2013CE 151 - Advanced Networks1

2 Administrativia Static Routing lab – Wording problems – VM stability issues How are the labs going? – I will start upgrades of VMs today… will send e-mail w/ new password when done Opportunities – Cruzio… I’m waiting to hear back – NMO Software Development for Cisco Advanced Services… waiting for applications – Expect more from campus network operations group… Next week – Link Layer lab due Wednesday, 4/24 – Link-State Routing quiz Thursday, 4/25 Project proposal due Tuesday 4/30 – Topic – Draft outline – What you need to investigate Spring 2013CE 151 - Advanced Networks2

3 3 Routing Introduction Remember… delivery of IP packets implemented by two processes –Forwarding –Routing Dynamic routing process is a distributed computation –Triggered by topology changes –Processing defined by a routing protocol –Output of the computation is forwarding state Goal of computation is convergence –After finite sequence of topology changes –Process should terminate updates to forwarding state –Forwarding state should be correct Loop-free (after convergence vs. instantaneous) With desired characteristics: performance, possibly conform to policy Spring 2013CE 151 - Advanced Networks

4 4 “Fate-sharing” Principle “The fate-sharing model suggests that it is acceptable to lose the state information associated with an entity if, at the same time, the entity itself is lost.” Dave Clark, “Design Philosophy of the DARPA Internet Protocols”, SIGCOMM ‘88. Benefits –Ensures the failure of any single component of an internet does not invalidate state located elsewhere in the internet –Localizing the effects of any failures –More robust system Internet routing architecture co-locates –Forwarding state –Routing process that computes the state Compared with virtual-circuit routing? Spring 2013CE 151 - Advanced Networks

5 5 Routing Protocol A set of algorithms and messages that are used to exchange topology information and populate the forwarding table with the routing protocol’s choice of best paths. Purpose: –Discover remote subnets –Maintain up-to-date forwarding tables –Choose the best path to destination subnets Components of a routing protocol: –Algorithm: Procedures for –Processing routing information –Selecting best-paths The data structures needed for these steps. –Routing protocol messages: Discover neighboring routers Exchange topology information Spring 2013CE 151 - Advanced Networks

6 6 Classifying Routing Protocols Function: –Intra-domain/Interior Gateway Protocol (IGP) –Inter-domain/Exterior Gateway Protocol (EGP) Algorithm… distinguished by information exchanged: –Distance-Vector –Link-State –Path-Vector Spring 2013CE 151 - Advanced Networks

7 7 Functional Classification An autonomous system (AS) or routing domain is a region of the Internet that is administered by a single entity –UCSC’s network –IBM’s corporate network –AT&T’s ISP network Routing inside an AS –Focus is on performance –Popular protocols: RIP, OSPF, IS-IS –Called intra-domain or internal gateway (IGP) routing Routing between ASs –Focus is on policy –Popular protocol: BGP –Called inter-domain or external gateway (EGP) routing Spring 2013CE 151 - Advanced Networks

8 Spring 20138 How ensure correct routes? Recall requirement for correctness of routing protocol –Loop-free –Desired path characteristics Two strategies for ensuring correctness –Use identical algorithm for selecting paths Share minimal topology information Use identical path selection algorithm at all nodes Used for IGP/Intra-domain routing Use link-state or distance vector protocol –Use custom (private) algorithm for selecting paths Share full path information Use policy-specific path selection algorithm at each node Used for EGP/Inter-domain routing Use path-vector protocol CE 151 - Advanced Networks

9 9 Algorithm Classification Distance-Vector –Vectors of destination and distance sent to neighbors “Tell your neighbors about the rest of the network” –Destination in terms of a network prefix –Distance in terms of a metric: hop count, delay, bandwidth –Use Distributed Bellman-Ford path selection algorithm –Popular protocol: Routing Information Protocol (RIP) Link-State –Flood description of your links (link state) “Tell the rest of the network about your neighbors” –Links described by End-point routers of subnet in internet Cost of subnet: delay, bandwidth –Use Dijkstra path selection algorithm –Popular protocol: Open Shortest Path First (OSPF) Path-Vector –Routes advertised as full-paths –Paths described by sequence of ASs –Popular protocol is Border Gateway Routing Protocol (BGP) Spring 2013CE 151 - Advanced Networks

10 Destination-Based Forwarding Internet routing uses a single path per destination Destination-based forwarding is a restricted version of single-path A path through a node to a destination… …must be an extension of the path from the node to the destination. This is coming back to haunt us… Spring 2013CE 151 - Advanced Networks10

11 Review The Internet implements a distributed routing architecture that is triggered by topology change events. Convergence of routing in the Internet depends on the stability of the network topology for a sufficient period of time. The Fate-Sharing Principle – “It is acceptable to lose the state information associated with an entity if, at the same time, the entity itself is lost.” –Ensures the failure of any single component of an internet does not invalidate state located elsewhere in the internet –Localizing the effects of any failures –Results in a more robust system –Achieved in Internet by co-locating Forwarding state Routing process that computes the state 11 Spring 2013CE 151 - Advanced Networks

12 Review An Autonomous System (AS) is a region of the Internet that is administered by a single entity and follows a single routing policy. Functional classification of routing protocols –IGP - routing inside an AS Share minimal topology information Use identical path selection algorithm at all nodes Optimize performance –EGP - routing between ASs Share full path information Use custom path selection algorithm at each node to implement desired policies Enforce policies 12 Spring 2013CE 151 - Advanced Networks

13 Review Algorithmic classification of routing protocols –Distance-vector Send vectors of distances to destinations to neighbors “Tell your neighbors about the rest of the network” “Distributed computation” –Link-state Flood description of your links to all routers “Tell the rest of the network about your neighbors” “Distributed database” –Path-vector Distance-vector with full paths Spring 2013CE 151 - Advanced Networks13

14 Review Destination-based forwarding –A path through a node to a destination… must be an extension of the path from the node to the destination –Tends concentrates traffic on a subset of the network topology. Spring 2013CE 151 - Advanced Networks14

15 Link-State Spring 2013CE 151 - Advanced Networks15

16 Routing Algorithms Distance-Vector – Vectors of destination and distance sent to neighbors “Tell your neighbors about the rest of the network” – Destination in terms of a network prefix – Distance in terms of a metric: hop count, delay, bandwidth – Use Distributed Bellman-Ford path selection algorithm – Popular protocol: Routing Information Protocol (RIP) Link-State – Flood description of your links (link state) “Tell the rest of the network about your neighbors” – Links described by End-point routers of subnet in internet Cost of subnet: delay, bandwidth – Use Dijkstra path selection algorithm – Popular protocol: Open Shortest Path First (OSPF) Path-Vector – Routes advertised as full-paths – Paths described by sequence of ASs – Popular protocol is Border Gateway Routing Protocol (BGP) Spring 2013CE 151 - Advanced Networks16

17 Routing Algorithms Distance-Vector – Vectors of destination and distance sent to neighbors “Tell your neighbors about the rest of the network” – Destination in terms of a network prefix – Distance in terms of a metric: hop count, delay, bandwidth – Use Distributed Bellman-Ford path selection algorithm – Popular protocol: Routing Information Protocol (RIP) Link-State – Flood description of your links (link state) “Tell the rest of the network about your neighbors” – Links described by End-point routers of subnet in internet Cost of subnet: delay, bandwidth – Use Dijkstra path selection algorithm – Popular protocol: Open Shortest Path First (OSPF) Path-Vector – Routes advertised as full-paths – Paths described by sequence of ASs – Popular protocol is Border Gateway Routing Protocol (BGP) Spring 2013CE 151 - Advanced Networks17

18 How ensure correct routes? Recall requirement for correctness of routing protocol – Loop-free – Desired path characteristics Two strategies for ensuring correctness – Use identical algorithm for selecting paths Share minimal topology information Use identical path selection algorithm at all nodes Used for IGP/Intra-domain routing Use link-state or distance vector protocol – Use custom (private) algorithm for selecting paths Share full path information Use policy-specific path selection algorithm at each node Used for EGP/Inter-domain routing Use path-vector protocol Spring 2013CE 151 - Advanced Networks18

19 How ensure correct routes? Recall requirement for correctness of routing protocol – Loop-free – Desired path characteristics Two strategies for ensuring correctness – Use identical algorithm for selecting paths Share minimal topology information Use identical path selection algorithm at all nodes Used for IGP/Intra-domain routing Use link-state or distance vector protocol – Use custom (private) algorithm for selecting paths Share full path information Use policy-specific path selection algorithm at each node Used for EGP/Inter-domain routing Use path-vector protocol Spring 2013CE 151 - Advanced Networks19

20 Link-State Protocols Are Interior-Gateway Protocols (IGPs) Exchange link-state information – Pair of routers connected by a subnet – Cost of subnet (hop count, delay, etc.) Conceptually, very simple… Spring 2013CE 151 - Advanced Networks20

21 Link-State Protocols Maintains a topology database of all the links it has heard of – Initialize with the subnets it is connected to. Floods link-state updates describing its directly connected subnets, including any changes to these links. – “Tell the rest of the network about your neighbors” Participates in the flooding of link-state updates from other routers. On update of its topology database – Runs a shortest-path algorithm on the database to compute routes Dijkstra is most efficient – Updates its forwarding table with any changes. Spring 2013CE 151 - Advanced Networks21

22 Characterizing Link State Link-State # updates per link change? – One. How far propagate updates? – Flooded to all nodes. One update, global distribution. Scaling problems due to flooding As we’ll see next lecture, the characteristics of distance vector… – …are very different – …hint at a much better solution Spring 2013CE 151 - Advanced Networks22

23 Dijstra Shortest-Path Algorithm Breadth-first search of paths, by increasing path cost, for best paths to all destinations. Terminate when path has been found for all destinations. Maintain two sets – Destinations for which shortest paths have been found. Permanently labeled destinations P Initialize with self – Destinations for which candidate shortest paths have been found. Temporarily labeled destinations T Initialize with my neighbors. Iterate – Move shortest path in T, say for destination D, to P – Add routes for D’s neighbors, that are extensions of the path to T, to T if they are shorter than the current path in T for each neighbor. The “relaxation” step. – Repeat until a route has been added to P for all destinations Spring 2013CE 151 - Advanced Networks23

24 More formally… E is the set of edges. w ij is the weight of the link between nodes i and j. P and T… see previous slide. P and T entries are triples, : – d is the destination – p is the predecessor – w is the link weight Spring 2013CE 151 - Advanced Networks24

25 Dijkstra… path cost C,  B,2 G,  H,  6 2 2 2 F,  E,  1 A,0 D,  7 3 2 3 2 4 C,  F,  E,4 A,0 B,2 D,  G,  H,  C,  F,  E,4 A,0 B,2 D,  G,5 H,  C,  F,6 E,4 A,0 B,2 D,  G,5 H,  C,  F,6 E,4 A,0 B,2 D,  G,5H,8 C,9 F,6 E,4 A,0 B,2 D,  G,5 H,8 C,9 F,6 E,4 A,0 B,2 D,10 G,5 H,8 Spring 2013CE 151 - Advanced Networks25

26 Translating to a Protocol Dijkstra requires a “centralized” implementation – Maintain a full graph of the network, on an event-driven basis – Re-compute routes as the graph changes – Flood changes to your links “Brute-force” protocol. – Straight-forward, easy to understand – Inefficient… lots of overhead Spring 2013CE 151 - Advanced Networks26

27 Review Dijkstra – Iterates on “next shortest path” – Requires centralized computation LS protocols – Is an IGP – Implements a centralized routing model – Floods link-state updates describing current state of its links “Tell the rest of the network about your neighbors” – Use Dijkstra algorithm because it is most efficient shortest-path algorithm Spring 2013CE 151 - Advanced Networks27

28 The Challenge of Internet Routing Independent routing computations at each router… Need to compute paths that… – Support destination-based forwarding – Are shortest – Are loop-free This is trickier than it looks… Spring 2013CE 151 - Advanced Networks28

29 Examples illustrating challenges of distributed routing… Spring 2013CE 151 - Advanced Networks29

30 Correct solution depends on combination of routing algorithm and algebra used for metrics. Spring 2013CE 151 - Advanced Networks30

31 OSPF Spring 2013CE 151 - Advanced Networks31

32 OSPF OSPF = Open Shortest Path First The most widely used routing protocol The complexity of OSPF is significant History: – 1989: RFC 1131 OSPF Version 1 – 1991: RFC1247 OSPF Version 2 – 1994: RFC 1583 OSPF Version 2 (revised) – 1997: RFC 2178 OSPF Version 2 (revised) – 1998: RFC 2328 OSPF Version 2 (current version) Spring 2013CE 151 - Advanced Networks32

33 What We Cover… Messages Router IDs Flooding process Metrics Designated routers Areas Spring 2013CE 151 - Advanced Networks33

34 OSPF Messages An OSPF message can contain one of five packet types. OSPF is embedded directly in an IP frame (doesn’t use UDP) – Protocol field is set to 89 (OSPF) – Destination address is typically set to one of two multicast addresses: 224.0.0.5 (“AllSPFRouters”… Hello messages) or 224.0.0.6 (“AllDRouters”… routing info to “Designated Routers”). If the OSPF packet is encapsulated in an Ethernet frame, the destination MAC address is also a multicast address: –01-00-5E-00-00-05 or 01-00-5E-00-00-06 Spring 2013CE 151 - Advanced Networks34

35 OSPF Packet Types Hello: Used to establish and maintain adjacency with other OSPF routers. DBD: The database description (DBD) packet contains an abbreviated list of the sending router’s link-state database and is used by receiving routers to check against the local link-state database. LSR: Receiving routers can then request more information about any entry in the DBD by sending a link-state request (LSR). LSU: Link-state update (LSU) packets are used to reply to LSRs and to announce new information. LSUs contain seven different types of link- state advertisements (LSA). LSAck: When an LSU is received, the router sends a link-state acknowledgment (LSAck) to confirm receipt of the LSU. Spring 2013CE 151 - Advanced Networks35

36 OSPF Message Header 2: current version is OSPF V2 Message types: 1: Hello (tests reachability) 2: Database description 3: Link Status request 4: Link state update 5: Link state acknowledgement ID of the Area from which the packet originated Standard IP checksum taken over entire packet 0: no authentication 1: Cleartext password 2: MD5 checksum (added to end packet) Authentication passwd = 1: 64 cleartext password Authentication passwd = 2: 0x0000 (16 bits) KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits) Prevents replay attacks Spring 2013CE 151 - Advanced Networks36

37 RouterIDs Router ID Router ID plays an important role in OSPF – Uniquely identifies each router in a routing domain – Used in Designated Router election process (explained later) Router ID is an IP address of a router Cisco routers use following algorithm to determine Router ID – IP address configured with OSPF router-id command – If not configured, use highest IP address of a loopback interface – If no loopback interfaces, use highest active IP address of physical interface Advantage of loopback interface is it cannot fail Spring 2013CE 151 - Advanced Networks37

38 OSPF Hello Packets Used to –Discover OSPF neighbors and establish neighbor adjacencies –Elect the Designated Router and Backup Designated Router on multiaccess networks such as Ethernet and Frame Relay –Negotiate Hello interval (e.g. 10 sec on Ethernet segments) Dead interval: time to declare neighbor down (4x Hello interval) Network type Five network types –Point-to-point –Point-to-multipoint –Broadcast multiaccess (Ethernet) –Nonbroadcast multiaccess (Frame Relay) –Virtual links Spring 2013CE 151 - Advanced Networks38

39 OSPF LSU Packets Link State Update (LSU) packets –Used for OSPF routing updates –Contain one or more LSAs Link State Advertisements (LSAs) –Contain route information for destination networks –There are 11 types of LSAs Spring 2013CE 151 - Advanced Networks39

40 Link State Advertisement (LSA) The LSA of router 10.10.10.1 is as follows: Link State ID: 10.10.10.1 = can be Router ID Advertising Router: 10.10.10.1 = Router ID Number of links: 3 = 2 links plus router itself Description of Link 1: Link ID = 10.1.1.1, Metric = 4 Description of Link 2: Link ID = 10.1.2.1, Metric = 3 Description of Link 3: Link ID = 10.10.10.1, Metric = 0 Spring 2013CE 151 - Advanced Networks40 Each router sends its LSA to all routers in the network (using a method called reliable flooding)

41 LSA Format Spring 2013CE 151 - Advanced Networks41 LSA Header Link 1 Link 2

42 OSPF Metrics The OSPF metric is called cost. The following passage is from RFC 2328: – A cost is associated with the output side of each router interface. This cost is configurable RFC 2328 does not specify which values should be used to determine the cost. In Cisco IOS – Link cost is 10 8 ÷ link bandwidth. – Reference bandwidth (10 8 ) can be changed with auto-cost referencebandwidth – Modify link bandwidth value with bandwidth Spring 2013CE 151 - Advanced Networks42

43 Link State Database The collection of all LSAs is called the link-state database Each router has and identical link-state database – Useful for debugging: Each router has a complete description of the network If neighboring routers discover each other for the first time, they will exchange their link-state databases The link-state databases are synchronized using reliable flooding Spring 2013CE 151 - Advanced Networks43

44 Link State Database Spring 2013CE 151 - Advanced Networks44 Each router has a database which contains the LSAs from all other routers

45 Neighbor Discovery Router multicasts OSPF Hello packets on all OSPF-enabled interfaces. If two routers share a link, they can become neighbors, and establish an adjacency After becoming a neighbor, routers exchange their link state databases Spring 2013CE 151 - Advanced Networks45 Scenario: Router 10.1.10.2 restarts

46 Neighbor discovery and database synchronization Spring 2013CE 151 - Advanced Networks46 Scenario: Router 10.1.10.2 restarts Sends empty database description Discovery of adjacency Sends database description. (description only contains LSA headers) Database description of 10.1.10.2 Acknowledges receipt of description After neighbors are discovered the nodes exchange their databases

47 Regular LSA exchanges Spring 2013CE 151 - Advanced Networks47 10.1.10.2 explicitly requests each LSA from 10.1.10.1 10.1.10.1 sends requested LSAs 10.1.10.2 has more recent value for 10.0.1.6 and sends it to 10.1.10.1 (with higher sequence number)

48 Dissemination of LSA-Update A router sends and refloods LSA-Updates, whenever the topology or link cost changes. (If a received LSA does not contain new information, the router will not flood the packet) Exception: Infrequently (every 30 minutes), a router will flood LSAs even if there are no new changes. Acknowledgements of LSA-updates: – explicit ACK, or – implicit via reception of an LSA-Update Spring 2013CE 151 - Advanced Networks48

49 Why Designated Routers? Large number of adjacencies – Full mesh of adjacencies – n(n - 1)/2 adjacencies Excessive load from flooding LSAs Spring 2013CE 151 - Advanced Networks49

50 Electing Designated Router OSPF elects a Designated Router (DR) on multiaccess networks DR is collection and distribution point for LSAs on network Backup Designated Router (BDR) also elected for case where DR fails Spring 2013CE 151 - Advanced Networks50 224.0.0.6 224.0.0.5

51 Electing Designated Router Election held through exchange of Hello messages DR/BDR election criteria – DR is router with highest interface priority – BDR is router with second-highest interface priority – If interface priorities are equal, use Router ID Spring 2013CE 151 - Advanced Networks51

52 Electing Designated Router Further elections only occur on failure of DR/BDR On DR failure – BDR promoted to DR – New BDR elected On BDR failure – New BDR elected Live (B)DR not replaced by election. – If DR dies BDR replaces DR Election held to replace BDR – If BDR dies Election held to replace BDR Spring 2013CE 151 - Advanced Networks52

53 OSPF Areas An OSPF Area is a set of routers that share link state information Goal is to address scalability problem with OSPF flooding Area 0 is the backbone area – All areas must be connected to he backbone area – Best practice to use area 0 in single-area OSPF – Eases conversion to multi-area Spring 2013CE 151 - Advanced Networks53

54 Review OSPF message types – Hello - establish and maintain adjacency with OSPF routers – DataBase Description (DBD) - summary of my database – Link-State Request (LSR) - request for detailed entry – Link-State Update (LSU) - response to LSR – Link-State Ack (LSAck) - acknowledge receipt of LSU Router IDs… – Uniquely identifies each router in a routing domain – Used in Designated Router election process – Best practice is to use loopback interface... it can’t fail Spring 2013CE 151 - Advanced Networks54

55 Review OSPF metrics… – “Cost is associated with the output side of each router interface.” – In IOS is 10 8 / link bandwidth (inversely proportional to bandwidth) Designated routers… – Mitigate impact of “full-mesh” on # of adjacencies in topology (n(n-1)/2) – DR is collection and distribution point for LSAs on network OSPF deals with scaling problem by using “areas,” area 0 is the backbone. Spring 2013CE 151 - Advanced Networks55


Download ppt "Link State & OSPF Spring 2013CE 151 - Advanced Networks1."

Similar presentations


Ads by Google