CIS 185 CCNP ROUTE Chapter 3: Implementing OSPF Part 2 Rick Graziani Cabrillo College graziani@cabrillo.edu Fall 2015
LSAs
OSPF packet types
Part I - LSAs using all normal areas Multi Area OSPF Normal Areas What are the router types? Backbone Area ASBR ABR Internal ABR Internal Internal Internal
Part I - LSAs using all normal areas Routes Received on all OSPF Routers Overview of Normal Areas – This will all be explained! Receives all routes from within A.S.: Within the local area – LSA 1 and LSA 2 From other areas (Inter-Area) – LSA 3, LSA 4, LSA 5 Receives all routes from External A.S.’s (External AS means routes not from this OSPF routing domain): From external AS’s – LSA 5 As long as routes are being redistributed by the ASBR (more later) Default Route Received only if default-information-originate command was used (later) If default-information-originate command is not used, then the default route is not received Routes Received on all OSPF Routers Overview of Normal Areas – This will all be explained! Receives all routes from within A.S.: Within the local area – LSA 1 and LSA 2 From other areas (Inter-Area) – LSA 3, LSA 4, LSA 5 Receives all routes from External A.S.’s (External AS means routes not from this OSPF routing domain): From external AS’s – LSA 5 As long as routes are being redistributed by the ASBR (more later) Default Routes Received only if default-information-originate command was used (later) If default-information-originate command is not used, then the default route is not received
R33 router ospf 1 network 172.16.1.0 0.0.0.255 area 1 network 172.30.1.0 0.0.0.255 area 1 R22 network 172.30.2.0 0.0.0.255 area 1 R1 network 10.0.0.0 0.0.0.3 area 0 network 9.0.0.0 0.0.0.3 area 0 network 172.16.2.0 0.0.0.255 area 1 R2 network 192.168.2.0 0.0.0.255 area 0 network 11.0.0.0 0.0.0.3 area 0 default-information originate ip route 0.0.0.0 0.0.0.0 serial 0/2 R3 router ospf 1 network 11.0.0.0 0.0.0.3 area 0 network 9.0.0.0 0.0.0.3 area 0 network 172.16.10.0 0.0.0.255 area 51 network 172.16.11.0 0.0.0.255 area 51 network 99.0.0.0 0.0.0.3 area 51 R100 network 99.1.0.0 0.0.255.255 area 51 network 99.0.0.4 0.0.0.3 area 51 R200 network 99.0.0.0 0.0.255.255 area 51 ABR contains network statements for each area it belongs to, using the proper area value.
LSAs using all normal areas Multi Area OSPF Normal Areas What are the router types? Backbone Area ASBR ABR Internal ABR Internal Internal Internal
Multi Area OSPF Normal Areas What are the router types? Backbone Area ASBR ABR Internal ABR Internal Internal Internal
Multi Area OSPF Normal Areas What are the router types? Backbone Area ASBR ABR Internal ABR Internal Internal Internal
Understanding LSAs (FYI ONLY) show ip ospf database This is not the link state database, only a summary. It is a tool to help determine what routes are included in the routing table. We will look at this output to learn the tool as well as become familiar with the different types of LSAs. To view the link state database use: show ip ospf database [router|network|…] 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | LS type | | Link State ID | | Advertising Router | | LS sequence number | | LS checksum | length | LSA Header show ip ospf database This is not the link state database, only a summary. It is a tool to help determine what routes are included in the routing table. We will look at this output to learn the tool as well as become familiar with the different types of LSAs. To view the link state database use: show ip ospf database [router|network|…]
LSA 1 - Router Link States LSA 1 – Router LSA Generated by each router for each area it belongs to. Describes the states of the links in the area to which this router belongs. Flooded only within the area. On multi-access networks, sent to the DR. Denoted by just an “O” in the routing table or “C” if the network is directly connected. ABR will include a set of LSA 1’s for each area it belongs to. When a new LSA 1 is received and installed in the LSDB, the router forwards that LSA, using hop-by-hop or asynchronous flooding. Router A’s LSA 1s which are flooded to all other routers in this area. “Leaf” network LSA 1 – Router LSA Generated by each router for each area it belongs to. Describes the states of the links in the area to which this router belongs. Tells the other routers in the area about itself and its links to adjacent OSPF routers, and “leaf networks.” Flooded only within the area. On multi-access networks, sent to the DR. Denoted by just an “O” in the routing table or “C” if the network is directly connected. ABR will include a set of LSA 1’s for each area it belongs to. When a new LSA 1 is received and installed in the LSDB, the router forwards that LSA, using hop-by-hop or asynchronous flooding.
LSA 1 - Router Link States 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | 1 | | Link State ID | | Advertising Router | | LS sequence number | | LS checksum | length | | 0 |V|E|B| 0 | # links | | Link ID | | Link Data | | Type | # TOS | metric | | ... | | TOS | 0 | TOS metric | LSA 1 - Router Link States
LSA 1 – Router Link States LSA 1’s LSA 1’s LSA 1’s Each router floods their LSA 1s ONLY within their own area. LSA 1s only announce the links (networks) within the area. Router receives LSA 1s from neighbor, floods those LSA 1s to other neighbors within the same area. Each router floods their LSA 1s only within their own area. Router receives LSA 1s from neighbor, floods those LSA 1s to other neighbors within the same area. R100 receives LSA s from R200 and floods those LSAs to R3. R3 receives LSA 1s from R100 but does not flood them to R1 and R2 because they are in a different area.
LSA 1 - Router Link States For Router Links: R100# show ip ospf database OSPF Router with ID (100.100.100.100) (Process ID 1) Router Link States (Area 51) <- Note the Area (LSA 1 - Links in this area.) Link ID ADV Router Age Seq# Checksum LinkCnt 3.3.3.3 3.3.3.3 42 0x80000004 0x00168d 4 100.100.100.100 100.100.100.100 10 0x80000005 0x00472f 4 200.200.200.200 200.200.200.200 10 0x80000002 0x00db5f 1 LSA 1 - Router Link States For Router Links: Link State ID: Advertising Router ID Advertising Router: Router ID of the router that created this LSA 1 Bottom line: Router Link States (LSA1’s) should display all the RouterIDs of routers in that area, including its own. Rick’s reminder: LSA 1 -> “my one area” LSA 1 - Router Link States For Router Links: Link State ID: Advertising Router ID Advertising Router: Router ID of the router that created this LSA 1 Bottom line: Router Link States (LSA1’s) should display all the RouterIDs of routers in that area, including its own. Rick’s reminder: LSA 1 -> “my one area”
LSA 1 - Router Link States R100# show ip route 172.16.0.0/24 is subnetted, 4 subnets O 172.16.10.0 [110/65] via 99.0.0.1, 00:08:30, Serial0/0 O 172.16.11.0 [110/65] via 99.0.0.1, 00:08:30, Serial0/0 Denoted by just an “O” in the routing table, or a “C” Note: Only partial routing tables will be shown Denoted by just an “O” in the routing table, or a “C” Note: Only partial routing tables will be shown
LSA 1 - Router Link States LSA 1’s LSA 1’s LSA 1’s Examine other routers show ip ospf database – Router Link States (LSA 1’s) Should display all the RouterIDs of routers in that area, including its own. show ip route – “O” routes Routes within that area
LSA 2 - Network Link States LSA 2 – Network LSA Generated by the DR on every multi-access network Denoted by just an “O” in the routing table or “C” if the network is directly connected. Flooded only within the originating area. LSA 2’s are in link state database for all routers within area, even those routers on not on multi-access networks or DRs on other multi-access networks in the same area. ABR may include a set of LSA 2s for each area it belongs to. LSA 2 – Network LSA Generated by the DR on every multi-access network Denoted by just an “O” in the routing table or “C” if the network is directly connected. Flooded only within the originating area. LSA 2’s are in link state database for all routers within area, even those routers on not on multi-access networks or DRs on other multi-access networks in the same area. ABR may include a set of LSA 2s for each area it belongs to.
LSA 2 - Network Link States 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | 2 | | Link State ID | | Advertising Router | | LS sequence number | | LS checksum | length | | Network Mask | | Attached Router | | ... |
LSA 2s LSA 2’s LSA 2’s LSA 2s flooded within area by DR.
LSA 2 - Network Link States R3# show ip ospf database Net Link States (Area 51) Link ID ADV Router Age Seq# Checksum 99.0.0.6 200.200.200.200 241 0x80000002 0x006159 Link ID IP address of DR on MultiAccess Network ADV Router Router ID of DR Bottom line: Net Link States (LSA2’s) should display the RouterIDs of the DRs on all multi-access networks in the area and their IP addresses. Rick’s reminder: LSA 2 -> “Ethernet = Layer 2 or D R” 1 2 Link ID IP address of DR on MultiAccess Network ADV Router Router ID of DR Bottom line: Net Link States (LSA2’s) should display the RouterIDs of the DRs on all multi-access networks in the area and their IP addresses. Rick’s reminder: LSA 2 -> “Ethernet = Layer 2 or D R” 1 2
LSA 2 - Network Link States LSA 2’s LSA 2’s Examine other routers show ip ospf database – Net Link States (LSA 2’s) Net Link States (LSA2’s) should display the RouterIDs of the DRs on all multi-access networks in the area and their IP addresses. show ip route – “O” routes Routes within that area
LSA 3 – Summary Net Link States LSA 3 – Summary LSA Originated by the ABR. Describes links between ABR and Internal Routers of the Local Area ABR will include a set of LSA 3’s for each area it belongs to. LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the routing table. LSA 3 – Summary LSA Originated by the ABR. Describes links between ABR and Internal Routers of the Local Area ABR will include a set of LSA 3’s for each area it belongs to. LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the routing table.
LSA 3 – Summary LSAs ABR ABR LSA 3 – Summary LSA Originated by the ABR. Describes links between ABR and Internal Routers of the Local Area ABR will include a set of LSA 3’s for each area it belongs to. LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the routing table. LSA 3 – Summary LSA Originated by the ABR. Describes links between ABR and Internal Routers of the Local Area ABR will include a set of LSA 3’s for each area it belongs to. LSA 3s are flooded throughout the backbone (Area 0) and to other ABRs. Routes learned via LSA type 3s are denoted by an “IA” (Inter-area) in the routing table.
LSA 3 – Summary LSAs ABR ABR LSA 3’s LSA 1’s LSA 3’s
LSA 3 – Summary LSAs LSA 3’s LSA 3’s LSA 1’s
LSA 3 – Summary Net Link States 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | 3 or 4 | | Link State ID | | Advertising Router | | LS sequence number | | LS checksum | length | | Network Mask | | 0 | metric | | TOS | TOS metric | | ... |
X Routers only see the topology of the area they belong to. New or change, do not run SPF algorithm. LSA 1’s LSA 3’s X LSA 3’s Process using DV technique not LSA 1 Link States. Routers only see the topology of the area they belong to. When a link in one area changes, the adjacent routers originate in LSA 1’s and flood them within the area, causing intra-area (internal) routers to re-run the SPF and recalculating the routing table. ABRs do not announce topological information between areas. ABRs only inject routing information into other areas, which is basically a distance-vector technique. Routers only see the topology of the area they belong to. When a link in one area changes, the adjacent routers originate in LSA 1’s and flood them within the area, causing intra-area (internal) routers to re-run the SPF and recalculating the routing table. ABRs do not announce topological information between areas. ABRs only inject routing information into other areas, which is basically a distance-vector technique.
The backbone area serves as a repository for inter-area routes. LSA 1’s LSA 3’s LSA 3’s ABRs calculate intra-area routes and announce them to all other areas as inter-area routes, using LSA 3’s. OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. The backbone area serves as a repository for inter-area routes. This keeps OSPF safe from routing loops. ABRs calculate intra-area routes and announce them to all other areas as inter-area routes, using LSA 3’s. OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. The backbone area serves as a repository for inter-area routes. This keeps OSPF safe from routing loops.
The backbone area serves as a repository for inter-area routes. LSA 1’s LSA 3 LSA 3 Not ABR In normal operation, OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. RTC does not forward LSA 3’s from Area 1 to Area 51, and does not forward LSA 3’s from Area 51 to Area 1. The backbone area serves as a repository for inter-area routes. This keeps OSPF safe from routing loops. ABRs calculate intra-area routes for directly attached areas and announce them to all other areas as inter-area routes, using LSA 3’s. In normal operation, OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. RTC does not forward LSA 3’s from Area 1 to Area 51, and does not forward LSA 3’s from Area 51 to Area 1. The backbone area serves as a repository for inter-area routes. This keeps OSPF safe from routing loops.
Normal Areas LSA 3 LSA 3 LSA 1’s Not ABR RTC does not forward the LSA 3’s back into Area 1, or routing loops may develop. Note: RTC will create LSA 1’s and flood them within the appropriate area. OSPF specification states that ABRs are restricted to considering LSA 3’s only from the backbone area to avoid routing information loops. Example of an LSA 1 originated in Area 1, sent to Area 0 as an LSA 3, and the sent to Area 51 as an LSA 3. RTC does not forward the LSA 3’s back into Area 1, or routing loops may develop. Again, in normal operations, OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. Note: RTC will create LSA 1’s and flood them within the appropriate area. RTC does not forward LSA 1’s from Area 1 as LSA 3’s into Area 51. RTC does not forward LSA 1’s from Area 51 as LSA 3’s into Area 1. OSPF specification states that ABRs are restricted to considering LSA 3’s only from the backbone area to avoid routing information loops.
X Normal Areas LSA 3 LSA 3 LSA 1’s Topology Change: Down Link Update is sent to Area 0 and Area 51 routers using a “distance vector update technique.” SPF not re-run, but routers update routing table. LSA 3 Area 1 routers re-run SPF, creates new SPF tree and updates routing table. LSA 3 LSA 1’s X Topology Change: Down Link When a router detects a topology change it immediately sends out LSA 1’s (Router LSAs) with the change. Age of the LSA is set to MaxAge (3,600 seconds) – Routers remove this entry from their LSDB (Link State Data Base). Routers that receive the LSA 1’s, within the area of the change: Re-run their SPF algorithm Build a new SPF tree Update IP routing tables. (Continued next slide) When a router detects a topology change it immediately sends out LSA 1’s (Router LSAs) with the change. In the case of a down link, the age of the LSA is set to MaxAge (3,600 seconds) – Routers that receive LSAs with the age equal to MaxAge remove this entry from their LSDB (Link State Data Base). Routers that receive the LSA 1’s, within the area of the change, re-run their SPF algorithm, to build a new SPF tree and then make the changes to their IP routing tables. (Continued next slide)
X Normal Areas LSA 3 LSA 3 LSA 1’s Update is sent to Area 0 and Area 51 routers using a “distance vector update technique.” SPF not re-run, but routers update routing table. LSA 3 Area 1 routers re-run SPF, creates new SPF tree and updates routing table. LSA 3 LSA 1’s X Topology Change: Down Link ABR RTA receives the LSA 1 and recalculate their SPF for that area, Area 1. RTA floods the change as a LSA 3 within its other area, Area 0. RTB receives the LSA 3 and floods it within Area 51. Area 0 and Area 51 routers do not recalculate their SPFs, but inject the change into their routing tables. Topology Change: Down Link ABR RTA receives the LSA 1 and recalculate their SPF for that area, Area 1. RTA floods the change as a LSA 3 within its other area, Area 0. RTB receives the LSA 3 and floods it within Area 51. Area 0 and Area 51 routers do not recalculate their SPFs, but inject the change into their routing tables. Note: LSA 3’s (and other Inter-Area routes) are viewed as “leaf nodes” in the SPF tree.
LSA 3 – Summary Net Link States (INTERNAL) ABR R33# show ip ospf database Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 10.0.0.0 1.1.1.1 130 0x8000000c 0x00ec09 9.0.0.0 1.1.1.1 130 0x8000000d 0x00ec09 192.168.2.0 1.1.1.1 130 0x8000000e 0x00ec09 11.0.0.0 1.1.1.1 130 0x8000000f 0x00ec09 172.16.10.0 1.1.1.1 130 0x80000010 0x00ec09 172.16.11.0 1.1.1.1 130 0x80000011 0x00ec09 99.0.0.0 1.1.1.1 130 0x80000012 0x00ec09 99.0.0.4 1.1.1.1 130 0x80000013 0x00ec09 99.1.0.0 1.1.1.1 130 0x80000014 0x00ec09 Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 Bottom line: Should see networks in other areas and the ABR advertising that route. Rick’s reminder: LSA 3 -> “networks sent by the A B R” 1 2 3 Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 Bottom line: Should see networks in other areas and the ABR advertising that route. Rick’s reminder: LSA 3 -> “networks sent by the A B R” 1 2 3
LSA 3 R1# show ip ospf database Summary Net Link States (Area 1) <- Per Area Link ID ADV Router Age Seq# Checksum 10.0.0.0 1.1.1.1 255 0x8000000c 0x00ec09 9.0.0.0 1.1.1.1 255 0x8000000d 0x00ec09 192.168.2.0 1.1.1.1 255 0x8000000e 0x00ec09 11.0.0.0 1.1.1.1 255 0x8000000f 0x00ec09 172.16.10.0 1.1.1.1 255 0x80000010 0x00ec09 172.16.11.0 1.1.1.1 255 0x80000011 0x00ec09 99.0.0.0 1.1.1.1 255 0x80000012 0x00ec09 99.0.0.4 1.1.1.1 255 0x80000013 0x00ec09 99.1.0.0 1.1.1.1 255 0x80000014 0x00ec09 ABR will show all routes it is injecting into the other area including: LSA 3s from other areas LSA 1s from it’s adjacent area it is injecting into this area Bottom line: Should see networks in other areas and the ABR advertising that route. Rick’s reminder: LSA 3 -> “networks sent by the A B R” 1 2 3 ABR will show all routes it is injecting into the other area including: LSA 3s from other areas LSA 1s from it’s adjacent area it is injecting into this area Bottom line: Should see networks in other areas and the ABR advertising that route. Rick’s reminder: LSA 3 -> “networks sent by the A B R” 1 2 3
LSA 3 – Summary Net Link States R2# show ip route 99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O IA 99.0.0.0/30 [110/1626] via 11.0.0.2, 00:43:01, Serial0/1 O IA 99.0.0.4/30 [110/1627] via 11.0.0.2, 00:43:01, Serial0/1 O IA 99.1.0.0/16 [110/1627] via 11.0.0.2, 00:43:01, Serial0/1 172.16.0.0/24 is subnetted, 4 subnets O IA 172.16.1.0 [110/65] via 10.0.0.1, 00:42:21, Serial0/0 O IA 172.16.2.0 [110/65] via 10.0.0.1, 00:42:51, Serial0/0 O IA 172.16.10.0 [110/1563] via 11.0.0.2, 00:43:01, Serial0/1 O IA 172.16.11.0 [110/1563] via 11.0.0.2, 00:43:01, Serial0/1 172.30.0.0/24 is subnetted, 2 subnets O IA 172.30.1.0 [110/66] via 10.0.0.1, 00:42:21, Serial0/0 O IA 172.30.2.0 [110/66] via 10.0.0.1, 00:42:21, Serial0/0 Routes learned via LSA type 3s are denoted by an “IA” (Inter-Area Routes) in the routing table. Routes learned via LSA type 3s are denoted by an “IA” (Inter-Area Routes) in the routing table.
LSA 1’s LSA 3’s LSA 3’s show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 show ip route – “IA” (Inter-Area Routes) Routes in other areas
LSA 4 – ASBR Summary Link States LSA 4 – ASBR Summary LSA Originated by the ABR. Flooded throughout the area. Describes the reachability to the ASBRs Advertises an ASBR (Router ID) not a network Included in routing table as an “IA” route. Exceptions Not flooded to Stub and Totally Stubby networks. More on this later LSA 4 – ASBR Summary LSA Originated by the ABR. Flooded throughout the area. Describes the reachability to the ASBRs Advertises an ASBR (Router ID) not a network Included in routing table as an “IA” route. Same format as a LSA 3 - Summary LSA, except LSA 4 ASBR Summary LSA the Network Mask field is always 0 Exceptions Not flooded to Stub and Totally Stubby networks. More on this later
LSA 4 – ASBR Summary Link States 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | 3 or 4 | | Link State ID | | Advertising Router | | LS sequence number | | LS checksum | length | | Network Mask | | 0 | metric | | TOS | TOS metric | | ... |
LSA 4 – ASBR Summary Link States LSA 1’s (e bit) LSA 4 How does the ABRs know about the ASBR? ASBR sends a type 1 Router LSA with a bit (external bit – e bit) that is set to identify itself as the ASBR. Describes the reachability to the ASBRs How do the ABRs know about the ASBR? When routers receive an LSA 5 (AS External LSA) with external route information, the routers denote the Router ID being the ASBR.
LSA 4 – ASBR Summary Link States (ABR) R1# show ip ospf database Summary ASB Link States (Area 1) Link ID ADV Router Age Seq# Checksum 2.2.2.2 1.1.1.1 1482 0x8000000b 0x00ec09 ASBR (This) ABR Link ID - Router ID of ASBR ADV Router - Router ID ABR advertising route Bottom line: Routers in non-area 0, should see Router ID of ASBR and its ABR to get there . Rick’s reminder: LSA 4 -> “Reachability to the A S B R” 1 2 3 4 Link ID - Router ID of ASBR ADV Router - Router ID ABR advertising route Bottom line: Routers in non-area 0, should see Router ID of ASBR and its ABR to get there . Rick’s reminder: LSA 4 -> “Reachability to the A S B R” 1 2 3 4
LSA 4 – ASBR Summary Link States (INTERNAL) ABR R33# show ip ospf database Summary ASB Link States (Area 1) Link ID ADV Router Age Seq# Checksum 2.2.2.2 1.1.1.1 130 0x8000000b 0x00ec09 ASBR (Advertising) ABR Link ID - Router ID of ASBR ADV Router - Router ID ABR advertising route Bottom line: Routers in non-area 0, should see Router ID of ASBR and its ABR to get there . Rick’s reminder: LSA 4 -> “Reachability to the A S B R” 1 2 3 4 Link ID - Router ID of ASBR ADV Router - Router ID ABR advertising route Bottom line: Routers in non-area 0, should see Router ID of ASBR and its ABR to get there . Rick’s reminder: LSA 4 -> “Reachability to the A S B R” 1 2 3 4
LSA 4 – ASBR Summary Link States LSA 1’s e bit LSA 4 LSA 4 show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 show ip route – “IA” (Inter-Area Routes) Routes in other areas
LSA 5 - AS External Link States LSA 5 – AS External LSA Originated by the ASBR. Describes destination networks external to the Autonomous System (This OSPF Routing Domain) Flooded throughout the OSPF AS except to stub and totally stubby areas Denoted in routing table as E1 or E2 (default) route (soon) ASBR – Router which “redistributes” routes into the OSPF domain. Exceptions Not flooded to Stub and Totally Stubby networks. More on this later LSA 5 – AS External LSA Originated by the ASBR. Describes destination networks external to the Autonomous System (This OSPF Routing Domain) Flooded throughout the OSPF AS except to stub and totally stubby areas Denoted in routing table as E1 or E2 (default) route (soon) We will discuss default routes later. ASBR – Router which “redistributes” routes into the OSPF domain. Exceptions Not flooded to Stub and Totally Stubby networks. More on this later
LSA 5 - AS External Link States 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | 5 | | Link State ID | | Advertising Router | | LS sequence number | | LS checksum | length | | Network Mask | |E| 0 | metric | | Forwarding address | | External Route Tag | |E| TOS | TOS metric | | ... |
Added -> ASBR R2 (ASBR) router ospf 1 redistribute static ip route 57.0.0.0 255.0.0.0 ser 0/3
Describes destination networks external to the OSPF Routing Domain R2 (ASBR) router ospf 1 redistribute static ip route 57.0.0.0 255.0.0.0 ser 0/3 LSA 5 LSA 5’s LSA 5 redistribute command or default-information originate command creates an ASBR router. LSA 5s Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby areas Redistribute” command creates an ASBR router. Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby areas
Link ID = External Networks ADV Router = Router ID of ASBR R1# show ip ospf database Type-5 AS External Link States <- Note, NO Area! Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 2.2.2.2 2088 0x80000003 0x00ddeb 1 57.0.0.0 2.2.2.2 2089 0x80000003 0x00ddeb 0 R2 (ASBR) router ospf 1 redistribute static default-information originate ip route 0.0.0.0 0.0.0.0 ser 0/2 ip route 57.0.0.0 255.0.0.0 ser 0/3 Link ID = External Networks ADV Router = Router ID of ASBR Note: For ABRs: There is only one set of “AS External Link States” in database summary. In other words, an ABR router will only show one set of “AS External Link States,” not one per area. Bottom line: All Routers should see External networks and the Router ID of ASBR to get there . Rick’s reminder: LSA 5 -> O T H E R networks 1 2 3 4 5 Link ID = External Networks ADV Router = Router ID of ASBR Note: For ABRs: There is only one set of “AS External Link States” in database summary. In other words, an ABR router will only show one set of “AS External Link States,” not one per area. Bottom line: All Routers should see External networks and the Router ID of ASBR to get there . Rick’s reminder: LSA 5 -> O T H E R networks 1 2 3 4 5
LSA 5 - AS External Link States R1# show ip route O E2 57.0.0.0/8 [110/20] via 10.0.0.2, 00:16:02, Serial0/0 O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:16:02, Serial0/0 Designated by “E2” Notice that the cost is 20 for all redistributed routes, we will see why later. It has to do with E2 routes and where the default cost is 20. Redistribute command (Route Optimization chapter): If a value is not specified for the metric option, and no value is specified using the default-metric command, the default metric value is 0, except for OSPF where the default cost is 20. Cost of 1 for the redistributed route. Designated by “E2” Notice that the cost is 20 for all redistributed routes, we will see why later. It has to do with E2 routes and where the default cost is 20. Redistribute command (Route Optimization chapter): If a value is not specified for the metric option, and no value is specified using the default-metric command, the default metric value is 0, except for OSPF where the default cost is 20. Cost of 1 for the redistributed route.
LSA 5 - AS External Link States R33# show ip ospf database Type-5 AS External Link States <- Note, NO Area! Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 2.2.2.2 278 0x80000003 0x00ddeb 1 57.0.0.0 2.2.2.2 1187 0x80000003 0x00ddeb 0 R33# show ip route O E2 57.0.0.0/8 [110/20] via 10.0.0.2, 00:16:02, Serial0/0 O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:16:02, Serial0/0
LSA 5 - AS External Link States E1 vs. E2 External Routes External routes fall under two categories: external type 1 external type 2 (default) The difference between the two is in the way the cost (metric) of the route is being calculated. The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. A type 1 cost is the addition of the external cost and the internal cost used to reach that route. A type 1 route is always preferred over a type 2 route for the same destination. More later… E1 vs. E2 External Routes External routes fall under two categories: external type 1 external type 2 (default) The difference between the two is in the way the cost (metric) of the route is being calculated. The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. A type 1 cost is the addition of the external cost and the internal cost used to reach that route. A type 1 route is always preferred over a type 2 route for the same destination. More later…
Stub Areas
LSA 1 – Router Link States LSA 1’s LSA 1’s LSA 1’s Each router floods their LSA 1s ONLY within their own area. LSA 1s only announce the links (networks) within the area. Router receives LSA 1s from neighbor, floods those LSA 1s to other neighbors within the same area. Each router floods their LSA 1s only within their own area. Router receives LSA 1s from neighbor, floods those LSA 1s to other neighbors within the same area. R100 receives LSA s from R200 and floods those LSAs to R3. R3 receives LSA 1s from R100 but does not flood them to R1 and R2 because they are in a different area.
LSA 2s LSA 2’s LSA 2’s LSA 2s flooded within area by DR.
X Routers only see the topology of the area they belong to. New or change, do not run SPF algorithm. LSA 1’s LSA 3’s X LSA 3’s Process using DV technique not LSA 1 Link States. Routers only see the topology of the area they belong to. When a link in one area changes, the adjacent routers originate in LSA 1’s and flood them within the area, causing intra-area (internal) routers to re-run the SPF and recalculating the routing table. ABRs do not announce topological information between areas. ABRs only inject routing information into other areas, which is basically a distance-vector technique. Routers only see the topology of the area they belong to. When a link in one area changes, the adjacent routers originate in LSA 1’s and flood them within the area, causing intra-area (internal) routers to re-run the SPF and recalculating the routing table. ABRs do not announce topological information between areas. ABRs only inject routing information into other areas, which is basically a distance-vector technique.
The backbone area serves as a repository for inter-area routes. LSA 1’s LSA 3’s LSA 3’s ABRs calculate intra-area routes and announce them to all other areas as inter-area routes, using LSA 3’s. OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. The backbone area serves as a repository for inter-area routes. This keeps OSPF safe from routing loops. ABRs calculate intra-area routes and announce them to all other areas as inter-area routes, using LSA 3’s. OSPF ABRs will only announce inter-area routes that were learned from the backbone area, area 0. The backbone area serves as a repository for inter-area routes. This keeps OSPF safe from routing loops.
LSA 4 – ASBR Summary Link States LSA 1’s e bit LSA 4 LSA 4 show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 show ip route – “IA” (Inter-Area Routes) Routes in other areas
Describes destination networks external to the OSPF Routing Domain R2 (ASBR) router ospf 1 redistribute static ip route 57.0.0.0 255.0.0.0 ser 0/3 LSA 5 LSA 5’s LSA 5 redistribute command or default-information originate command creates an ASBR router. LSA 5s Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby areas Redistribute” command creates an ASBR router. Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby areas
Stub Areas Considerations for both Stub and Totally Stubby Areas An area could be qualified a stub when: There is a single exit point (a single ABR) from that area. More than one ABR can be used, but be ready to “accept non-optimal routing paths.” If routing to outside of the area does not have to take an optimal path. The area is not needed as a transit area for virtual links (later). The ASBR is not within the stub area The area is not the backbone area (area 0) Stub areas will result in memory and processing savings depending upon the size of the network. Considerations for both Stub and Totally Stubby Areas An area could be qualified a stub when: There is a single exit point (a single ABR) from that area. More than one ABR can be used, but be ready to “accept non-optimal routing paths.” If routing to outside of the area does not have to take an optimal path. The area is not needed as a transit area for virtual links (later). The ASBR is not within the stub area The area is not the backbone area (area 0) Stub areas will result in memory and processing savings depending upon the size of the network.
Stub Area
Stub Areas Receives all routes from within A.S.: Within the local area - LSA 1s and LSA 2s (if appropriate) From other areas (Inter-Area) - LSA 3s Does not receive routes from External A.S. (External Routes). ABR: ABR blocks all LSA 4s and LSA 5s. ‘If LSA 5s are not known inside an area, LSA 4s are not necessary.’ LSA 3s are propagated by the ABR. Note: Default route is automatically injected into stub area by ABR External Routes: Once the ABR gets a packet headed to a default route, it must have a default route, either static or propagated by the ASBR via default information originate (coming!) Configuration: All routers in the area must be configured as “stub” Receives all routes from within A.S.: Within the local area - LSA 1s and LSA 2s (if appropriate) From other areas (Inter-Area) - LSA 3s Does not receive routes from External A.S. (External Routes). ABR: ABR blocks all LSA 4s and LSA 5s. ‘If LSA 5s are not known inside an area, LSA 4s are not necessary.’ LSA 3s are propagated by the ABR. Note: Default route is automatically injected into stub area by ABR External Routes: Once the ABR gets a packet headed to a default route, it must have a default route, either static or propagated by the ASBR via default information originate (coming!) Configuration: All routers in the area must be configured as “stub”
Stub Areas – Additional Commands R3 (ABR) router ospf 1 area 51 stub << Command: area area stub R100 (INTERNAL) R200 (INTERNAL) All routers in the area must be configured as “stub” including the ABR All routers in the area must be configured as “stub” including the ABR
We only see routes in our area, other areas, and a default route. LSA 1s still sent within each area. Stub Area LSA 3 LSA 3 LSA 4 LSA 4 Blocked LSA 5 LSA 5 Blocked Default route to ABR injected We only see routes in our area, other areas, and a default route. No external routes. Sent by ABR: LSA 3s (Inter-Area routes) Blocked: LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in External routes no longer affect Stub Area routing tables. Sent by ABR: LSA 3s (Inter-Area routes) Blocked: LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in External routes no longer affect Stub Area routing tables.
Stub Areas No LSA 4s or LSA 5s for stub area routers. R100# show ip ospf database Summary Net Link States (Area 51) Link ID ADV Router Age Seq# Checksum 9.0.0.0 3.3.3.3 1752 0x80000037 0x00ba22 0.0.0.0 3.3.3.3 1612 0x80000038 0x00ca50 11.0.0.0 3.3.3.3 625 0x80000039 0x00db11 192.168.2.0 3.3.3.3 614 0x8000003a 0x00dd10 10.0.0.0 3.3.3.3 614 0x8000003b 0x00dd10 172.16.2.0 3.3.3.3 614 0x8000003c 0x00dd10 172.16.1.0 3.3.3.3 614 0x8000003d 0x00dd10 172.30.2.0 3.3.3.3 614 0x8000003e 0x00dc11 172.30.1.0 3.3.3.3 614 0x8000003f 0x00dc11 No LSA 4s or LSA 5s for stub area routers. Default Route injected by ABR (LSA 3) No LSA 4s or LSA 5s for stub area routers. Default Route injected by ABR (LSA 3)
Stub Areas LSA 1’s (Within area) LSA 3’s (Other areas) R200# show ip route 9.0.0.0/30 is subnetted, 1 subnets O IA 9.0.0.0 [110/129] via 99.0.0.5, 00:25:52, FastEthernet0/0 10.0.0.0/30 is subnetted, 1 subnets O IA 10.0.0.0 [110/1691] via 99.0.0.5, 00:25:52, FastEthernet0/0 11.0.0.0/30 is subnetted, 1 subnets O IA 11.0.0.0 [110/1627] via 99.0.0.5, 00:25:52, FastEthernet0/0 99.0.0.0/8 is variably subnetted, 4 subnets, 2 masks O 99.0.0.0/30 [110/65] via 99.0.0.5, 00:25:52, FastEthernet0/0 C 99.0.0.4/30 is directly connected, FastEthernet0/0 O 99.1.0.0/16 [110/2] via 99.0.0.5, 00:25:52, FastEthernet0/0 C 99.2.0.0/16 is directly connected, FastEthernet0/1 172.16.0.0/24 is subnetted, 4 subnets O IA 172.16.1.0 [110/1692] via 99.0.0.5, 00:25:52, FastEthernet0/0 O IA 172.16.2.0 [110/1692] via 99.0.0.5, 00:25:52, FastEthernet0/0 O 172.16.10.0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0 O 172.16.11.0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0 172.30.0.0/24 is subnetted, 2 subnets O IA 172.30.1.0 [110/1693] via 99.0.0.5, 00:25:52, FastEthernet0/0 O IA 172.30.2.0 [110/1693] via 99.0.0.5, 00:25:52, FastEthernet0/0 O IA 192.168.2.0/24 [110/1628] via 99.0.0.5, 00:25:52, FastEthernet0/0 200.200.200.0/32 is subnetted, 1 subnets C 200.200.200.200 is directly connected, Loopback0 O*IA 0.0.0.0/0 [110/66] via 99.0.0.5, 00:25:52, FastEthernet0/0 Stub Areas LSA 1’s (Within area) LSA 3’s (Other areas) No LSA 4’s (ASBR) No LSA 5’s (External routes) Default Route (Injected by ABR) NOTE on default route: ABR will advertise a default route with a cost of 1 cost of 66 = 1 (Default) +1 (Fa) + 64 (serial link) The default cost can be modified with the ospf command: ABR(config-router)# area area-id default-cost cost LSA 1’s (Within area) LSA 3’s (Other areas) No LSA 4’s (ASBR) No LSA 5’s (External routes) Default Route (Injected by ABR) NOTE on default route: ABR will advertise a default route with a cost of 1 cost of 65 = 1 (Default) +1 (Fa) + 64 (serial link) The default cost can be modified with the ospf command: ABR(config-router)# area area-id default-cost cost
Stub Areas R3# show ip route 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 9.0.0.0/30 is subnetted, 1 subnets C 9.0.0.0 is directly connected, Serial0/2 10.0.0.0/30 is subnetted, 1 subnets O 10.0.0.0 [110/1626] via 11.0.0.1, 00:00:41, Serial0/3 11.0.0.0/30 is subnetted, 1 subnets C 11.0.0.0 is directly connected, Serial0/3 99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 99.0.0.0/30 is directly connected, Serial0/0 O 99.0.0.4/30 [110/65] via 99.0.0.2, 00:00:46, Serial0/0 O 99.1.0.0/16 [110/65] via 99.0.0.2, 00:00:46, Serial0/0 172.16.0.0/24 is subnetted, 4 subnets O IA 172.16.1.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3 O IA 172.16.2.0 [110/1627] via 11.0.0.1, 00:00:31, Serial0/3 C 172.16.10.0 is directly connected, FastEthernet0/0 C 172.16.11.0 is directly connected, FastEthernet0/1 172.30.0.0/24 is subnetted, 1 subnets O IA 172.30.1.0 [110/1628] via 11.0.0.1, 00:00:01, Serial0/3 O 192.168.2.0/24 [110/1563] via 11.0.0.1, 00:00:41, Serial0/3 O*E2 0.0.0.0/0 [110/1] via 11.0.0.1, 00:00:41, Serial0/3 Notice, there is no automatic default route on ABR, as there are with the internal stub routers. This default route came from the ASBR. In other words the ABR will inject the default route into the stub area whether or not it has a default route in its routing table. Notice, there is no automatic default route on ABR, as there are with the internal stub routers. This default route came from the ASBR.
Totally Stubby Areas
Totally Stubby Area
Totally Stubby Areas Receives routes from within A.S.: Only from within the local area - LSA 1s and LSA 2s (if appropriate) Does not receive routes from other areas (Inter-Area) - LSA 3s Does not receive routes from External A.S. (External Routes) ABR: ABR blocks all LSA 4s and LSA 5s. ABR blocks all LSA 3s, except propagating a default route. Default route is injected into totally stubby area by ABR. Configuring: All routers must be configured as “stub” ABR must be configured as “stub no-summary” Receives routes from within A.S.: Only from within the local area - LSA 1s and LSA 2s (if appropriate) Does not receive routes from other areas (Inter-Area) - LSA 3s Does not receive routes from External A.S. (External Routes) ABR: ABR blocks all LSA 4s and LSA 5s. ABR blocks all LSA 3s, except propagating a default route. Default route is injected into totally stubby area by ABR. Configuring: All routers must be configured as “stub” ABR must be configured as “stub no-summary”
Totally Stubby Areas R1: (ABR) router ospf 1 area 1 stub no-summary router ospf 1 area 1 stub no-summary ^^ Command: area area stub no-summary R22 and R33: (INTERNAL ROUTERS) area 1 stub ^^ Command: area area stub
We only see routes in our area, other areas, and a default route. LSA 1s still sent within each area. Totally Stubby Area Stub Area Blocked LSA 3 LSA 3 Blocked LSA 4 LSA 4 Blocked Blocked LSA 5 LSA 5 Blocked Default route to ABR injected Default route to ABR injected We only see routes in our area and a default route. No inter-area or external routes. We only see routes in our area, other areas, and a default route. No external routes. Blocked: LSA 3s (Inter-Area routes) LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in other areas and external routes no longer affect Stub Area routing tables. Blocked: LSA 3s (Inter-Area routes) LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in other areas and external routes no longer affect Stub Area routing tables.
Totally Stubby Areas R33# show ip route 33.0.0.0/32 is subnetted, 1 subnets C 33.33.33.33 is directly connected, Loopback0 172.16.0.0/24 is subnetted, 2 subnets C 172.16.1.0 is directly connected, FastEthernet0/0 O 172.16.2.0 [110/2] via 172.16.1.1, 00:02:13, FastEthernet0/0 172.30.0.0/24 is subnetted, 2 subnets C 172.30.1.0 is directly connected, FastEthernet0/1 O 172.30.2.0 [110/2] via 172.16.1.3, 00:02:23, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 172.16.1.1, 00:02:13, FastEthernet0/0 Default route is injected into totally stubby area by ABR for all other networks (inter-area and external routes) Does not receive routes from other areas (Inter-Area) Does not receive routes from External A.S. (External Routes) Default route is injected into totally stubby area by ABR for all other networks (inter-area and external routes) Does not receive routes from other areas (Inter-Area) Does not receive routes from External A.S. (External Routes)
Totally Stubby Areas R1# show ip route 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 9.0.0.0/24 is subnetted, 1 subnets C 9.0.0.0 is directly connected, Serial0/1 10.0.0.0/30 is subnetted, 1 subnets C 10.0.0.0 is directly connected, Serial0/0 11.0.0.0/30 is subnetted, 1 subnets O 11.0.0.0 [110/1626] via 10.0.0.2, 00:05:26, Serial0/0 99.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O IA 99.0.0.0/30 [110/1690] via 10.0.0.2, 00:05:26, Serial0/0 O IA 99.0.0.4/30 [110/1691] via 10.0.0.2, 00:05:26, Serial0/0 O IA 99.1.0.0/16 [110/1691] via 10.0.0.2, 00:05:26, Serial0/0 172.16.0.0/24 is subnetted, 4 subnets C 172.16.1.0 is directly connected, FastEthernet0/0 C 172.16.2.0 is directly connected, FastEthernet0/1 O IA 172.16.10.0 [110/1627] via 10.0.0.2, 00:05:26, Serial0/0 O IA 172.16.11.0 [110/1627] via 10.0.0.2, 00:05:26, Serial0/0 172.30.0.0/24 is subnetted, 2 subnets O 172.30.1.0 [110/2] via 172.16.1.2, 00:04:51, FastEthernet0/0 O 172.30.2.0 [110/2] via 172.16.1.3, 00:04:41, FastEthernet0/0 O 192.168.2.0/24 [110/65] via 10.0.0.2, 00:05:26, Serial0/0 O*E2 0.0.0.0/0 [110/1] via 10.0.0.2, 00:05:26, Serial0/0 Notice, there is no automatic default route on ABR, as there are with the internal stub routers. This default route came from the ASBR. In other words the ABR will inject the default route into the stub area whether or not it has a default route in its routing table. Notice, there is not an automatic default route in the ABR’s routing table like there is with the internal Totally Stubby routers. This default route is from the ASBR.
Quick Review
LSA 1s – Router LSAs LSA 1’s LSA 1’s LSA 1’s show ip ospf database – Router Link States (LSA 1’s) Should display all the RouterIDs of routers in that area, including its own. show ip route – “O” routes Routes within that area
LSA 2s – Network LSAs LSA 2’s LSA 2’s show ip ospf database – Net Link States (LSA 2’s) Net Link States (LSA2’s) should display the RouterIDs of the DRs on all multi-access networks in the area and their IP addresses. show ip route – “O” routes Routes within that area
LSA 3 – Summary LSAs LSA 3’s LSA 3’s LSA 1’s show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 show ip route – “IA” (Inter-Area Routes) Routes in other areas
LSA 4 – ASBR Summary Link States LSA 1’s ebit LSA 4 LSA 4 show ip ospf database – Summary Net Link States (LSA 3’s) Link ID = IP network addresses of networks in other areas ADV Router = ABR Router ID sending the LSA-3 show ip route – “IA” (Inter-Area Routes) Routes in other areas
LSA 5 – External Link States R2 (ASBR) router ospf 1 redistribute static ip route 57.0.0.0 255.0.0.0 ser 0/3 LSA 5 LSA 5’s LSA 5 Redistribute or default-information originate creates an ASBR router. Originated by the ASBR. Describes destination networks external to the OSPF Routing Domain Flooded throughout the OSPF AS except to stub and totally stubby areas
We only see routes in our area, other areas, and a default route. Stub Area LSA 1s still sent within each area. Stub Area LSA 3 LSA 3 LSA 4 LSA 4 Blocked LSA 5 LSA 5 Blocked Default route to ABR injected We only see routes in our area, other areas, and a default route. No external routes. Sent by ABR: LSA 3s (Inter-Area routes) Blocked: LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in External routes no longer affect Stub Area routing tables.
Totally Stubby Area Totally Stubby Area Stub Area Blocked LSA 3 LSA 3 LSA 1s still sent within each area. Totally Stubby Area Stub Area Blocked LSA 3 LSA 3 Blocked LSA 4 LSA 4 Blocked Blocked LSA 5 LSA 5 Blocked Default route to ABR injected Default route to ABR injected We only see routes in our area and a default route. No inter-area or external routes. We only see routes in our area, other areas, and a default route. No external routes. Blocked: LSA 3s (Inter-Area routes) LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in other areas and external routes no longer affect Stub Area routing tables.
NSSA (Not-So-Stubby-Areas)
NSSA (Not So Stubby Area)
NSSA (Not So Stubby Area) Relatively new, standards based OSPF enhancement, RFC 1587. NSSA allows an area to remain a stub area, but carry external routing information (Type 7 LSAs) from its stubby end back towards the OSPF backbone. ASBR in NSSA injects external routing information into the backbone and the NSSA area, but rejects external routing information coming from the ABR. The ABR does not inject a default route into the NSSA. This is true for a NSSA Stub, but a default route is injected for a NSSA Totally Stubby area. Note: RFC 1587, “A default route must not be injected into the NSSA as a summary (type-3) LSA as in the stub area case.” What??? Following scenario is only example of how NSSA works. For the purposes of learning about NSSAs, don’t get hung up on the why’s and what if’s. Relatively new, standards based OSPF enhancement, RFC 1587. NSSA allows an area to remain a stub area, but carry external routing information (Type 7 LSAs) from its stubby end back towards the OSPF backbone. ASBR in NSSA injects external routing information into the backbone and the NSSA area, but rejects external routing information coming from the ABR. The ABR does not inject a default route into the NSSA. This is true for a NSSA Stub, but a default route is injected for a NSSA Totally Stubby area. Note: RFC 1587, “A default route must not be injected into the NSSA as a summary (type-3) LSA as in the stub area case.” What??? Following scenario is only example of how NSSA works. For the purposes of learning about NSSAs, don’t get hung up on the why’s and what if’s.
Default route via RTG NSSA Stub Area Area 2 would like to be a stub network. RTH only supports RIP, so RTG will run RIP and redistribute those routes in OSPF. What type of OSPF router does this make RTG? Unfortunately, this makes the area 2 router, RTG, an ASBR. Why is this a problem? Stub areas cannot contain an ASBR. In this example RTH does not need to learn routes from OSPF, a default route to RTG is all it needs. But all OSPF routers must know about the networks attached to the RIP router, RTH. to route packets to it. NSSA Stub Area Area 2 would like to be a stub network. RTH only supports RIP, so RTG will run RIP and redistribute those routes in OSPF. Unfortunately, this makes the area 2 router, RTG, an ASBR and therefore area 2 can no longer be a stub area. RTH does not need to learn routes from OSPF, a default route to RTG is all it needs. But all OSPF routers must know about the networks attached to the RIP router, RTH, to route packets to them.
NSSA Stub Area (cont.) Default route via RTG LSA 7 LSA 7 LSA 5 LSA 7 LSA 7s Blocked LSA 7 LSA 7 NSSA Stub Area (cont.) NSSA allow external routes to be advertised into the OSPF AS while retaining the characteristics of a stub area to the rest of the OSPF AS. ASBR RTG will originate Type-7 LSAs to advertise the external destinations. These LSA 7s are flooded through the NSSA but are blocked by the NSSA ABR. The NSSA ABR translates LSA 7s into LSA 5s and flood other areas. NSSA Stub Area (cont.) NSSA allow external routes to be advertised into the OSPF AS while retaining the characteristics of a stub area to the rest of the OSPF AS. ASBR RTG will originate Type-7 LSAs to advertise the external destinations. These LSA 7s are flooded through the NSSA but are blocked by the NSSA ABR. The NSSA ABR translates LSA 7s into LSA 5s and flood other areas.
Type 7 LSA NSSA External Link Entry Default route via RTG LSA 7 LSA 7 LSA 5 LSA 7 LSA 7 LSA 7s Blocked LSA 7 LSA 7 Type 7 LSA NSSA External Link Entry Originated by an ASBR connected to an NSSA. Flooded throughout NSSAs and translated into LSA Type 5 messages by ABRs. Routes learned via Type-7 LSAs are denoted by either a default “N1” or an “N2” in the routing table. (Relative to E1 and E2). Type 7 LSA NSSA External Link Entry Originated by an ASBR connected to an NSSA. Type 7 messages can be flooded throughout NSSAs and translated into LSA Type 5 messages by ABRs. Routes learned via Type-7 LSAs are denoted by either a default “N1” or an “N2” in the routing table. (Relative to E1 and E2).
NSSA Generic Default route via RTG Configuring NSSA Stub Area LSA 7 LSA 7s Blocked LSA 7 LSA 7 Configuring NSSA Stub Area Configured for all routers in Area 2: router ospf 1 network 172.16.2.0 0.0.0.255 area 2 area 2 nssa
NSSA (Not So Stubby Area) NSSA Stub and NSSA Totally Stubby There are two flavors in NSSA: Stub Totally Stubby Area 2 routers may or may not receive Inter-area routes from RTA, depending upon NSSA configuration NSSA areas have take on the same characteristics as stub and totally stubby areas, along with the characteristics of NSSA areas. NSSA Stub and NSSA Totally Stubby There are two flavors in NSSA: Stub Totally Stubby Area 2 routers may or may not receive Inter-area routes from RTA, depending upon NSSA configuration NSSA areas have take on the same characteristics as stub and totally stubby areas, along with the characteristics of NSSA areas.
NSSA –Stub router ospf 1 area 2 nssa NSSA stub areas: NSSAs that block type 4 and 5, but allow type 3. To make a stub area into an NSSA, use the following command under the OSPF configuration. This command must be configured on all routers in area 2. router ospf 1 area 2 nssa NSSA stub areas: NSSAs that block type 4 and 5, but allow type 3. To make a stub area into an NSSA, use the following command under the OSPF configuration. This command must be configured on all routers in area 2. router ospf 1 area 2 nssa
X X NSSA Stub Areas Default route via RTG LSA 3s LSA 4s & LSA 5s RTH routes:N1/N2 LSA 4s & LSA 5s X LSA 7 0.0.0.0/0 RTH routes:E1/E2 X LSA 7 LSA 5 LSA 7 LSA 7 LSA 7s Blocked LSA 7 LSA 7 Internal NSSA routers have: All area 2 routes External routes from RTH (N1/N2) Inter-area routes from RTB Area 0 routers have from area 2: External routes from RTH (E1/E2) NSSA Stub Area Routing Tables: RTG: Area 2 routes, Area 0 routes (IA), RTH RIP routes No 0.0.0.0/0 (IA) route from RTB (ABR), despite documentation Area 2 Internal Routers: Area 2 routes, RTH routes (N1/N2), Area 0 routes (IA) RTB: Area 2 routes, Area 0 routes, RTH routes (N1/N2), External routes if redistributed from RTA ASBR (E1/E2) RTA: Area 0 routes, Area 2 routes, RTH routes (E1/E2), External routes if redistributed from RTA (E1/E2) Note: Area 2 routers may or may not receive E1/E2 routes from RTA, depending upon NSSA configuration (next).
X X NSSA Stub Areas Default route via RTG LSA 3s LSA 4s & LSA 5s RTH routes:N1/N2 LSA 4s & LSA 5s X LSA 7 0.0.0.0/0 RTH routes:E1/E2 X LSA 7 LSA 5 LSA 7 LSA 7 LSA 7s Blocked LSA 7 LSA 7 Area 2 routers: router ospf 1 network 172.16.2.0 0.0.0.255 area 2 area 2 nssa
NSSA – Totally Stubby NSSA Totally Stubby Area NSSA totally stub areas: Allow only summary default routes and filters everything else. To configure an NSSA totally stub area, use the following command under the OSPF configuration on the NSSA ABR: router ospf 1 area 2 nssa no-summary Configure this command on NSSA ABRs only. All other routers in area 2 (internal area 2 routers): area 2 nssa After defining the NSSA totally stub area, area 2 has the following characteristics (in addition to the above NSSA characteristics): No type 3 (except default), 4 or 5 LSAs are allowed in area 2. A default route is injected into the NSSA totally stub area as a type 3 summary LSA by the ABR. NSSA Totally Stubby Area NSSA totally stub areas: Allow only summary default routes and filters everything else. To configure an NSSA totally stub area, use the following command under the OSPF configuration on the NSSA ABR: router ospf 1 area 2 nssa no-summary Configure this command on NSSA ABRs only. All other routers in area 2 (internal area 2 routers): area 2 nssa After defining the NSSA totally stub area, area 2 has the following characteristics (in addition to the above NSSA characteristics): No type 3 or 4 summary LSAs are allowed in area 2. This means no inter-area routes are allowed in area 2. A default route is injected into the NSSA totally stub area as a type 3 summary LSA by the ABR.
X X NSSA Totally Stubby Areas Default route via RTG LSA 3s RTH routes: N1/N2 LSA 4s & LSA 5s X LSA 7 0.0.0.0/0 (LSA 3) RTH routes:E1/E2 LSA 7 LSA 5 LSA 7 LSA 7 LSA 7s Blocked LSA 7 LSA 7 RTB (ABR): router ospf 1 network 172.16.1.0 0.0.0.255 area 0 network 172.16.2.0 0.0.0.255 area 2 ... area 2 nssa no-summary Area 2 routers: network 172.16.2.0 0.0.0.255 area 2 area 2 nssa
X X NSSA Totally Stubby Areas Default route via RTG LSA 3s RTH routes: N1/N2 LSA 4s & LSA 5s X LSA 7 0.0.0.0/0 (LSA 3) RTH routes:E1/E2 LSA 7 LSA 5 LSA 7 LSA 7 LSA 7s Blocked LSA 7 LSA 7 Internal NSSA routers have: All area 2 routes External routes from RTH (N1/N2) Default route from RTB Area 0 routers have from area 2: External routes from RTH (E1/E2) NSSA Totally Stubby Area Routing Tables: RTG: Area 2 routes, RTH RIP routes, 0.0.0.0/0 (IA) route from RTB (ABR) Totally Stubby: No Area 0 routes or external routes from RTA Area 2 Internal Routers: Area 2 routes, RTH routes (N1/N2), 0.0.0.0/0 (IA) route from RTB (ABR) RTB: Area 2 routes, Area 0 routes, RTH routes (N1/N2), External routes from RTA ASBR (E1/E2) if redistributed by ASBR RTA: Area 0 routes, Area 2 routes, RTH routes (E1/E2), External routes (E1/E2)
Multiple ABRs and Calculating the Cost of Intra-Area Routes
Cost Inter-Area Routes My cost = 21 10 + 21 = 31 15 + 6 = 21 My cost = 6 ABRs propagate information about the inter-area routes with LSA 3 with their lowest cost to reach a specific subnet in the advertisement. Router adds its cost to reach a specific ABR plus the LSA 3 cost Router selects the route with the lowest total cost as the best route.
Selecting between Intra-Area and Inter-Area Cost = 21 Cost = 16 Intra-Area routes are always preferred over Inter-Area routes, even if the cost is more. This helps prevent routing loops.
Multiple ABRs ABR1 Network X SPF ABR2 LSDB Area 51 Area 0 LSA 1’s Routing Table ABR1 RTA Distribute List Network X LSA 1’s RTB SPF RTC ABR2 LSDB Area 51 Area 0 Intra-area routes, OSPF uses pure Link State logic. All routers inside the area have an identical copy of the LSDB for that area. Intra-area routes, OSPF uses pure Link State logic. All routers inside the area have an identical copy of the LSDB for that area.
Multiple ABRs To ABR ABR1 Network X SPF ABR2 LSDB Area 51 Area 0 Routing Table ABR1 RTA Link State Logic Distribute List LSA 3’s Network X RTB SPF Distance Vector Logic RTC ABR2 LSDB LSA 3’s Area 51 Area 0 Best route to reach each ABR is an intra-area SPF calculation. Interarea routes (LSA 3s) use Distance Vector logic. ABR advertises Type 3 Summary LSAs (metric but not topology information). Total cost to Network X = Cost to ABR + ABR’s cost to Network X. RTB selects best route to Network X via ABR1 and/or ABR2. Best route to reach each ABR is an intra-area SPF calculation. Interarea routes uses Distance Vector logic. ABR advertises Type 3 Summary LSAs (metric but not topology information). Total cost to Network X = Cost to ABR + ABR’s cost to Network X. RTB selects best route to Network X via ABR1 and/or ABR2.
The best path to Network X is via ABR1 with a total cost of 20. Multiple ABRs Normal Area My cost to network X is 10 ABR1 The best path to Network X is via ABR1 with a total cost of 20. RTA Cost = 10 LSA 3’s Network X RTB Cost = 5 My cost to network X is 200 RTC ABR2 Area 51 Area 0 Total cost to Network X = Cost to ABR + ABR’s cost to Network X. RTB selects best route to Network X via ABR1 and/or ABR2. With stub and totally stubby areas this may not be the most optimum route! Total cost to Network X = Cost to ABR + ABR’s cost to Network X. RTB selects best route to Network X via ABR1 and/or ABR2.
Multiple ABRs – Stub Networks Totally Stubby Area ABR2 is “closer” a lesser metric, so I will use ABR2 for all routes outside my area even if its not the most optimum path. My cost to network X is 10 ABR1 RTA Cost = 10 LSA 3’s Network X RTB Cost = 5 Default Route My cost to network X is 200 RTC ABR2 Area 51 Area 0 Stub and totally stubby area ABRs inject a default route into the area. Stub ABRs block LSA 4’s and 5’s (external networks) Totally Stubby ABRs block LSA 3’s (interarea networks), 4’s and 5’s (external networks) In both cases internal routers can only determine the best route to an ABR, which may not be the best route to the destination network. Stub and totally stubby area ABRs inject a default route into the area. Stub ABRs block LSA 4’s and 5’s (external networks) Totally Stubby ABRs block LSA 3’s (interarea networks), 4’s and 5’s (external networks) In both cases internal routers can only determine the best route to an ABR, which may not be the best route to the destination network.
Virtual Links
Virtual Links
Virtual Links All areas in an OSPF autonomous system must be physically connected to the backbone area (area 0). This is not always possible, you can use a virtual link to connect to the backbone through a non-backbone area. Transit area - The area through which you configure the virtual link and must have full routing information. Must be configured between two ABRs. The transit area cannot be a stub area. All areas in an OSPF autonomous system must be physically connected to the backbone area (area 0). In some cases where this is not possible, you can use a virtual link to connect to the backbone through a non-backbone area. The area through which you configure the virtual link, known as a transit area, must have full routing information. Must be configured between two ABRs. The transit area cannot be a stub area.
Virtual Links A virtual link has the following two requirements: It must be established between two routers that share a common area and are both ABRs. One of these two routers must be connected to the backbone. Doyle, “should be used only as a temporary fix to an unavoidable topology problem.” A virtual link has the following two requirements: It must be established between two routers that share a common area and are both ABRs. One of these two routers must be connected to the backbone. Doyle, “should be used only as a temporary fix to an unavoidable topology problem.”
Virtual Links Routers do not have to be directly connected.
The command to configure a virtual link is as follows: area <area-id> virtual-link <remote-router-id> RTA(config)#router ospf 1 RTA(config-router)#network 192.168.0.0 0.0.0.255 area 51 RTA(config-router)#network 192.168.1.0 0.0.0.255 area 3 RTA(config-router)#area 3 virtual-link 10.0.0.1 … RTB(config)#router ospf 1 RTB(config-router)#network 192.168.1.0 0.0.0.255 area 3 RTB(config-router)#network 192.168.2.0 0.0.0.255 area 0 RTB(config-router)#area 3 virtual-link 10.0.0.2
Virtual Links OSPF allows for linking discontinuous parts of the backbone using a virtual link. OSPF messages between virtual link routers sent as unicast. router ospf 1 area 1 virtual-link 4.4.4.4 interface loopback 1 ip address 1.1.1.1 255.255.255.0 router ospf 4 area 1 virtual-link 1.1.1.1 ip address 4.4.4.4 255.255.255.0 C1 C2 OSPF allows for linking discontinuous parts of the backbone using a virtual link. In some cases, different area 0s need to be linked together. This can occur if, for example, a company is trying to merge two separate OSPF networks into one network with a common area 0. A virtual link can be configured between separate ABRs that touch area 0 from each side and having a common area.
Routers use of the Do Not Age (DNA) bit, so periodic reflooding (every 30 minutes) will not occur over this virtual link. OSPF Note: Router IDs do not have to be advertised and therefore may not be pingable. C1# show ip ospf virtual-links Virtual Link OSPF_VL0 to router 4.4.4.4 is up Run as demand circuit DoNotAge LSA allowed. Transit area 1, via interface FastEthernet0/1, Cost of using 3 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:02 Adjacency State FULL (Hello suppressed)
"In the area 0 via interface OSPF VL0" – confirming that the neighbor relationship does indeed exist in area 0. C1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 4.4.4.4 0 FULL/ - - 10.24.1.1 OSPF_VL0 2.2.2.2 1 FULL/DR 00:00:35 10.21.1.2 FastEthernet0/1 C1# show ip ospf neighbor detail 4.4.4.4 Neighbor 4.4.4.4, interface address 10.24.1.1 In the area 0 via interface OSPF_VL0
Route Summarization
Route Summarization Inter-Area Route Summarization - Area Range By default ABRs do not summarize routes between areas. In OSPF, an ABR will advertise networks in one area into another area. If at least one component subnet exists (subnets that sit inside the range), then the ABR advertises the summary route as a Type 3 LSA. If no component subnets exist, the ABR does not advertise the summary. The ABR assigns a metric for the summary route's Type 3 LSA, by default, to match the best (lowest) metric amongst all component subnets. The area range command can also explicitly set the cost of the summary. On the ABR (Summarizes routes before injecting them into different area) Router(config-router)# area area-id range network-address subnet-mask area-id - Identifier of the area about which routes are to be summarized. (From area) Inter-Area Route Summarization - Area Range By default ABRs do not summarize routes between areas. Route summarization is the consolidation of advertised addresses. This feature causes a single summary route to be advertised to other areas by an ABR. In OSPF, an ABR will advertise networks in one area into another area. If the network numbers in an area are assigned in a way such that they are contiguous, you can configure the ABR to advertise a summary route that covers all the individual networks within the area that fall into the specified range. If at least one component subnet exists (subnets that sit inside the range), then the ABR advertises the summary route as a Type 3 LSA. The ABR assigns a metric for the summary route's Type 3 LSA, by default, to match the best metric amongst all component subnets. The area range command can also explicitly set the cost of the summary. If no component subnets exist, the ABR does not advertise the summary. On the ABR (Summarizes routes before injecting them into different area) Router(config-router)# area area-id range network-address subnet-mask area-id - Identifier of the area about which routes are to be summarized. (From area)
Summarize Area 1 172.17.0.0 routes on Area 1 ABRs . 172.17.1.0/24 172.17.2.0/24 172.17.3.0/24 172.17.4.0/24 172.17.5.0/24 172.17.6.0/24 172.17.7.0/24 Summarize Area 1 172.17.0.0 routes on Area 1 ABRs . Summarize Area 1 172.17.0.0 routes on Area 1 ABRs .
172.17.1.0/24 172.17.2.0/24 172.17.3.0/24 172.17.4.0/24 172.17.5.0/24 172.17.6.0/24 172.17.7.0/24 172.17. 0000 0001 . 0000 0000 172.17. 0000 0010 . 0000 0000 172.17. 0000 0011 . 0000 0000 172.17. 0000 0100 . 0000 0000 172.17. 0000 0101 . 0000 0000 172.17. 0000 0110 . 0000 0000 172.17. 0000 0111 . 0000 0000
172.17.1.0/24 172.17.2.0/24 172.17.3.0/24 172.17.4.0/24 172.17.5.0/24 172.17.6.0/24 172.17.7.0/24 172.17.0.0 255.255.248.0 (/21) 172.17. 0000 0001 . 0000 0000 172.17. 0000 0010 . 0000 0000 172.17. 0000 0011 . 0000 0000 172.17. 0000 0100 . 0000 0000 172.17. 0000 0101 . 0000 0000 172.17. 0000 0110 . 0000 0000 172.17. 0000 0111 . 0000 0000
172.17.1.0/24 172.17.2.0/24 172.17.3.0/24 172.17.4.0/24 172.17.5.0/24 172.17.6.0/24 172.17.7.0/24 router ospf 1 area 1 range 172.17.0.0 255.255.248.0
Inter-Area Route Summarization - Area Range Before R2# show ip route 172.17.0.0/24 is subnetted, 7 subnets O IA 172.17.1.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 O IA 172.17.2.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 O IA 172.17.3.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 O IA 172.17.4.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 O IA 172.17.5.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 O IA 172.17.6.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 O IA 172.17.7.1 [110/66] via 10.0.0.1, 00:02:19, Serial0/0 After R2# show ip route O IA 172.17.0.0/21 [110/66] via 10.0.0.1, 00:10:17, Serial0/0
128.213.64.0 /24 … 128.213.95.0 /24 External Route Summarization - summary-address When redistributing routes from other protocols into OSPF (later), each route is advertised individually in an external link state advertisement (LSA). However, you can configure the Cisco IOS software to advertise a single route for all the redistributed routes that are covered by a specified network address and mask. Doing so helps decrease the size of the OSPF link state database. On the ASBR only (Summarizes external routes before injecting them into the OSPF domain.) Router(config-router)# summary-address network-address subnet-mask External Route Summarization - summary-address When redistributing routes from other protocols into OSPF (later), each route is advertised individually in an external link state advertisement (LSA). However, you can configure the Cisco IOS software to advertise a single route for all the redistributed routes that are covered by a specified network address and mask. Doing so helps decrease the size of the OSPF link state database. On the ASBR only (Summarizes external routes before injecting them into the OSPF domain.) Router(config-router)# summary-address network-address subnet-mask
Route Summarization 128.213.64.0 /24 … 128.213.95.0 /24 ASBR 128.213.64.0 /24 … 128.213.95.0 /24 ASBR router ospf 1 summary-address 128.213.64.0 255.255.224.0 redistribute bgp 50 metric 1000 subnets (later)
Default Routes
Injecting Default Routes into OSPF By default, 0.0.0.0/0 route is not propagated from the ASBR to other routers. An autonomous system boundary router (ASBR) can be forced to generate a default route into the OSPF domain. As discussed earlier, a router becomes an ASBR whenever routes are redistributed into an OSPF domain. However, an ASBR does not, by default, generate a default route into the OSPF routing domain. By default, 0.0.0.0/0 route is not propagated from the ASBR to other routers. An autonomous system boundary router (ASBR) can be forced to generate a default route into the OSPF domain. As discussed earlier, a router becomes an ASBR whenever routes are redistributed into an OSPF domain. However, an ASBR does not, by default, generate a default route into the OSPF routing domain.
Injecting Default Routes into OSPF The way that OSPF generates default routes (0.0.0.0) varies depending on the type of area the default route is being injected into. Stub and Totally Stubby Areas For stub and totally stubby areas, the area border router (ABR) to the stub area generates a summary link-state advertisement (LSA) with the link-state ID 0.0.0.0. This is true even if the ABR doesn't have a default route. In this scenario, you don't need to use the default-information originate command. The way that OSPF generates default routes (0.0.0.0) varies depending on the type of area the default route is being injected into. Stub and Totally Stubby Areas For stub and totally stubby areas, the area border router (ABR) to the stub area generates a summary link-state advertisement (LSA) with the link-state ID 0.0.0.0. This is true even if the ABR doesn't have a default route. In this scenario, you don't need to use the default-information originate command.
We only see routes in our area, other areas, and a default route. Stub Area LSA 1s still sent within each area. Stub Area LSA 3 LSA 3 LSA 4 LSA 4 Blocked LSA 5 LSA 5 Blocked Default route to ABR injected We only see routes in our area, other areas, and a default route. No external routes. Sent by ABR: LSA 3s (Inter-Area routes) Blocked: LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in External routes no longer affect Stub Area routing tables.
Totally Stubby Area Totally Stubby Area Stub Area Blocked LSA 3 LSA 3 LSA 1s still sent within each area. Totally Stubby Area Stub Area Blocked LSA 3 LSA 3 Blocked LSA 4 LSA 4 Blocked Blocked LSA 5 LSA 5 Blocked Default route to ABR injected Default route to ABR injected We only see routes in our area and a default route. No inter-area or external routes. We only see routes in our area, other areas, and a default route. No external routes. Blocked: LSA 3s (Inter-Area routes) LSA 4s (reachability to ASBR) LSA 5s (External routes) The ABR injects a default route into the stub area, pointing to the ABR. This does not mean the ABR has a default route of its own. Changes in other areas and external routes no longer affect Stub Area routing tables.
Injecting Default Routes into OSPF Normal Areas By default, in normal areas routers don't generate default routes. To have an OSPF router generate a default route, use the default-information originate command. This generates an external type-2 link with link-state ID 0.0.0.0 and network mask 0.0.0.0. This command should only be used on the ASBR. Some documentation states this command works only on an ASBR while other documentation states this command turns a router into an ASBR. Normal Areas By default, in normal areas routers don't generate default routes. To have an OSPF router generate a default route, use the default- information originate command. This generates an external type-2 link with link-state ID 0.0.0.0 and network mask 0.0.0.0. This command should only be used on the ASBR. Some documentation states this command works only on an ASBR while other documentation states this command turns a router into an ASBR.
Injecting Default Routes into OSPF To have OSPF generate a default route use the following: router ospf 10 default-information originate [always] [metric metric-value] [metric-type type-value] [route-map map-name]
Injecting Default Routes into OSPF There are two ways to generate a default. 1) default-information originate Conditional: If the ASBR already has the default route (ip route 0.0.0.0 0.0.0.0), you can advertise 0.0.0.0 into the area. 2) default-information originate always Unconditional: If the ASBR doesn't have the route (ip route 0.0.0.0 0.0.0.0), you can add the keyword always to the default-information originate command, and then advertise 0.0.0.0. You should be careful when using the always keyword. If your router advertises a default (0.0.0.0) inside the domain and does not have a default itself or a path to reach the destinations, routing will be broken. There are two ways to generate a default. 1) default-information originate Conditional: If the ASBR already has the default route (ip route 0.0.0.0 0.0.0.0), you can advertise 0.0.0.0 into the area. 2) default-information originate always Unconditional: If the ASBR doesn't have the route (ip route 0.0.0.0 0.0.0.0), you can add the keyword always to the default-information originate command, and then advertise 0.0.0.0. You should be careful when using the always keyword. If your router advertises a default (0.0.0.0) inside the domain and does not have a default itself or a path to reach the destinations, routing will be broken.
Injecting Default Routes into OSPF ASBR router ospf 1 network 172.16.1.0 0.0.0.255 area 0 default-information originate ip route 0.0.0.0 0.0.0.0 10.0.0.2
Injecting Default Routes into OSPF No 0.0.0.0/0 route, but propagated anyway or “always” ASBR router ospf 1 network 172.16.1.0 0.0.0.255 area 0 default-information originate always
Redistributing External Routes E1 vs. E2 External Routes External routes fall under two categories: External type 1 External type 2. The difference between the two is in the way the cost (metric) of the route is being calculated. A type 1 (E1) cost is the addition of the external cost and the internal cost used to reach that route. The cost of a type 2 (E2) route is always the external cost, irrespective of the interior cost to reach that route. Type 2 (E2) is the default! E1 vs. E2 External Routes External routes fall under two categories, external type 1 and external type 2. The difference between the two is in the way the cost (metric) of the route is being calculated. A type 1 (E1) cost is the addition of the external cost and the internal cost used to reach that route. The cost of a type 2 (E2) route is always the external cost, irrespective of the interior cost to reach that route. Type 2 (E2) is the default!
Redistributing External Routes (FYI for now) router ospf 1 redistribute routing-protocol metric-type [1|2] subnets metric-type 1 - A type 1 cost is the addition of the external cost and the internal cost used to reach that route. redistribute rip [metric value] metric-type 1 metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. redistribute rip [metric value] metric-type 2 The subnets keyword redistributes subnet details. Without it subnetted networks would not be redistributed. Only classful network addresses (non-subnets) would be distributed. (more later) We will look at this command, along with internal/external costs, later in the chapter discussion route redistribution. router ospf 1 redistribute routing-protocol metric-type [1|2] subnets metric-type 1 - A type 1 cost is the addition of the external cost and the internal cost used to reach that route. redistribute rip [metric value] metric-type 1 metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. redistribute rip [metric value] metric-type 2 The subnets keyword redistributes subnet details. Without it subnetted networks would not be redistributed. Only classful network addresses (non-subnets) would be distributed. (more later) We will look at this command, along with internal/external costs, later in the chapter discussion route redistribution.
Redistributing External Routes (FYI for now) metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. redistribute rip [metric value] metric-type 2 subnets More later, but here is a taste of the metric value option … If a value is not specified for the metric value option, and no value is specified using the default-metric command, the default metric value is 0, except for OSPF where the default cost is 20. 0 is only understood by IS-IS and not by RIP, IGRP and EIGRP. RIP, IGRP and EIGRP must have the appropriate metrics assigned to any redistributed routes, or redistribution will not work. Use a value consistent with the destination protocol. More later! metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. redistribute rip [metric value] metric-type 2 subnets More later, but here is a taste of the metric value option … If a value is not specified for the metric value option, and no value is specified using the default-metric command, the default metric value is 0, except for OSPF where the default cost is 20. 0 is only understood by IS-IS and not by RIP, IGRP and EIGRP. RIP, IGRP and EIGRP must have the appropriate metrics assigned to any redistributed routes, or redistribution will not work. Use a value consistent with the destination protocol. More later!
Redistributing External Routes metric-type 1 RIP routes redistributed with a metric (cost) of 500 plus the outgoing cost of the interface and a metric-type 1 564 564 565 566 ASBR router ospf 1 redistribute rip metric 500 metric-type 1 network 206.202.0.0 0.0.0.255 area 0
Redistributing External Routes metric-type 2 RIP routes redistributed with a metric (cost) of 500 and a metric-type 2 (default) 500 500 500 500 ASBR router ospf 1 redistribute rip metric 500 metric-type 2 network 206.202.0.0 0.0.0.255 area 0
MPLS and OSPF
Adjacency over Layer 2 MPLS VPN EoMPLS is also known as a type of MetroEthernet R1 and R2 exchange Ethernet frames transparently across the MPLS backbone They are connected to Provider Edge (PE) routers. The PE1 router: Takes encapsulates the Ethernet frame into an MPLS packet and forwards it across the backbone to the PE2 router The PE2 router: Decapsulates the MPLS packet Reproduces the Ethernet frame on its Ethernet link to router R2
When deploying OSPF over EoMPLS, there are no changes to the OSPF configuration from the customer perspective. The PE1 and PE2 routers are not visible. A neighbor relationship is established directly between routers R1 and R2 (just like any Ethernet broadcast network). The OSPF network type is a multiaccess broadcast network so DR and BDR routers are elected.
Adjacency over Layer 3 MPLS VPN To the customer routers running OSPF (routers R1 and R2), the Layer 3 MPLS VPN backbone looks like a standard corporate backbone. The CE routers form adjacencies with the PE routers. The OSPF network type of the CE-PE link can be point-to-point, broadcast or NBMA.
OSPF over Frame Relay Frame Relay is a multiaccess network similar to Ethernet LAN. A single access circuit provides access to multiple neighboring routers (networks). Unlike Ethernet: Each virtual circuit between routers needs to be created, managed and maintained by the frame relay service provider. Broadcast and multicast packets must be sent as individual packets for each router. (Non-Broadcast) By default, OSPF cannot build adjacencies with neighbor routers over NBMA interfaces
Full-mesh All routers have virtual circuits (VCs) to all other destinations. Although costly, provides direct connections from each site to all other sites and allows for redundancy. As the number of nodes in the full-mesh topology increases, the topology becomes increasingly expensive. n(n – 1)/2, where n is the number of nodes in the network.
Partial-mesh Not all sites have direct access to a central site. This method reduces the cost compared to implementing a full-mesh topology.
Hub-and-Spoke or Star Most common Frame Relay network topology. Remote sites connect to a central site that generally provides a service or application. The least expensive topology because it requires the fewest PVCs. The central router provides a multipoint connection because it typically uses a single physical interface to interconnect multiple PVCs Each connection between central site and remote sites is a separate PVC
There are many ways to implement OSPF over Frame Relay. In most cases there is more than one way to do it. Decisions: One subnet or individual subnets? Are multicasts and broadcasts supported by the network? Do I want the neighbor adjacencies to be discovered automatically or should I configure them manually? Are all my routers Cisco routers? Do I want the use of a DR/BDR to be the central point of LSA distribution?
ip ospf network To configure the OSPF network type to a type other than the default for a given medium, use the ip ospf network command in interface configuration mode. The default depends upon the type of medium
Broadcast (cisco) Topologies: Full-mesh or Partial-mesh Note: Makes the WAN interface look like a LAN Subnet: One subnet Adjacency: Automatically discovered by OSPF multicasts DR/BDR: Elected RFC or Cisco: Cisco Notes: Workaround for statically listing all existing neighboring routers Take special care to ensure either a full-mesh topology or a static election of the DR based on the interface priority. Router(config-router)#ip ospf network broadcast
Non- Broadcast (RFC) Topologies: Full-mesh or Partial-mesh or Star Router(config-router)#ip ospf network non-broadcast Non- Broadcast (RFC) Topologies: Full-mesh or Partial-mesh or Star Note: OSPF emulates operation over a broadcast network. Subnet: One subnet Adjacency: Must be manually configured using the neighbor command (non-broadcast mode) neighbor statements required only on the DR and BDR DR/BDR: Elected DR and BDR must have full connectivity to all other routers (DROTHERs) DR must be the Hub in Hub-and-Spoke topology RFC or Cisco: RFC Notes: Routers B and C could be configured with the ip ospf priority 0 command and/or Router A includes the priority 0 option in its neighbor command to ensure Router A becomes the DR.
Point-to-Multipoint (broadcast)(RFC) Router(config-router)#ip ospf network point-to-multipoint Point-to-Multipoint (broadcast)(RFC) Topologies: Partial-mesh or Star Note: Used when VCs support multicast and broadcast OSPF treats all router-to-router connections over the nonbroadcast network as if they are point-to-point links. Subnet: One subnet Adjacency: Automatically discovered by OSPF multicasts DR/BDR: None RFC or Cisco: RFC Notes: Multicasts and broadcasts must be enabled on the VCs for RFC compliant point-to-multipoint to be used. If not routers cannot dynamically discover neighbors - Cisco mode should be used (next)
Point-to-Multipoint non-broadcast (cisco) Router(config-router)#ip ospf network point-to-multipoint non-broadcast Point-to-Multipoint non-broadcast (cisco) Topologies: Partial-mesh or Star Note: Used when VCs cannot support multicast and broadcast Subnet: One subnet Adjacency: Must be manually configured using the neighbor command (like in non-broadcast mode) RouterA(config-router)# neighbor 192.168.1.2 RouterA(config-router)# neighbor 192.168.1.3 DR/BDR: None RFC or Cisco: cisco Notes: Used when multicasts and broadcasts cannot be enabled on the VCs, so RFC compliant point-to-multipoint cannot be used because routers cannot dynamically discover neighbors.
Point-to-Point non-broadcast (cisco) Router(config-router)#ip ospf network point-to-point Point-to-Point non-broadcast (cisco) 192.168.1.1 192.168.2.1 192.168.2.2 Topologies: Partial-mesh or Star Note: Used when only two routers need on form an adjacency on a pair of interfaces Subnet: Different IP subnet on each interface Adjacency: Automatically discovered by OSPF multicasts DR/BDR: none RFC or Cisco: cisco Notes: Cisco point-to-point can also be used with Ethernet interfaces. ip ospf network point-to-point on an Ethernet interface means no DR or BDR will be elected.
OSPF LSDB Overload Protection
Router keeps count of the number of received (non-self-generated) LSAs that it keeps in its LSDB. If other routers are misconfigured, causing, for example, a redistribution of a large number of prefixes, large numbers of LSAs can be generated. These excessive LSAs can drain local CPU and memory resources. OSPF LSDB overload protection can be configured to protect against this Cisco IOS Software Release 12.3(7)T and later (and some specific earlier releases) OSPF command: max-lsa maximum-number [threshold-percentage] [warning-only] [ignore-time minutes] [ignore-count count-number] [reset-time minutes]
Error Message Notification Message Router keeps count of the number of received (non-self-generated) LSAs that it keeps in its LSDB. When this number reaches a configured threshold number: An error message is logged A notification is sent when it exceeds the threshold number If the LSA count still exceeds the threshold after one minute: OSPF goes into the ignore state OSPF process takes down all adjacencies Clears the OSPF database No OSPF packets are sent or received by interfaces that belong to that OSPF process. OSPF process remains in the ignore state for the time defined by the ignore-time parameter. ignore-count parameter defines the maximum number of times that the OSPF process can consecutively enter the ignore state before remaining permanently down and requiring manual intervention. reset-time parameter defines the time the OSPF process remains normal and then the ignore state counter is reset to 0.
More on OSPF and External Routes
Determining the Next-hop for Type 2 External Routes - Intra-area Metric = 20 Metric = 20 172.30.26.0/23 LSA 5 Best path Review later slides for explanation
Determining the Next-hop for Type 2 External Routes - Interarea LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. Metric = 20 Best path R5# show ip route O E2 172.30.26.0/23 [110/20] via 172.16.35.3, 05:48:42, Serial0/0 Review later slides for explanation
Comparing E1 and E2 OSPF EIGRP E2 metric=10 E2 metric=20 ASBR1 E2 metric=10 E2 metric=20 ASBR2 The benefits of the different external route types apply mostly to when multiple ASBRs advertise the same subnet. Two ASBRs, ASBR1 and ASBR2, between OSPF and another routing domain. Goal is to always send traffic through ASBR1. Configuration: Use E2 routes Set the metric for ASBR1's redistributed routes to a lower metric than ASBR2. Routers ignore the internal metrics when calculating the E2 metrics, so every router will choose ASBR1 as the better ASBR.
Comparing E1 and E2 Goal is to: Balance the traffic OSPF EIGRP ASBR1 E1 E1 ASBR2 Goal is to: Balance the traffic Make each router pick the closest ASBR Configuration: Use E1 routes Routers closer to each ASBR choosing best routes based on the lower OSPF costs.
Comparing E1 and E2 OSPF EIGRP ASBR1 E1 E2 ASBR2 Note: OSPF routers will always prefers E1 routes over E2 routes for the same networks.
FYI: More on OSPF and External Routes
Redistribution into OSPF EIGRP OSPF Area 0 Area 1 New Topology
Redistribution into OSPF redistribute protocol [process-id | as-number] [metric {metric-value | transparent}] [metric-type type-value] [match {internal | external 1 | external 2 | nssa-external}] [tag tag-value] [route-map map-tag] [subnets] Default if no metric configuration exists Cost 1 for routes learned from BGP Cost 20 for all other route sources default-metric cost OSPF subcommand Setting the default for all redistribute commands metric cost parameters on the redistribute command Setting the metric for one route source Metric transparent parameters on the redistribute command When taking routes from another OSPF process, using the metrics used by that route source Use the route-map parameter on the redistribute command Setting different metrics for routes learned from a single source
Redistribution into OSPF Router that performs redistribution becomes ASBR (Autonomous System Border Router). Injects external routes into OSPF creating a Type 5 LSA for each network/subnet . Type 5 LSA includes: LSID: the subnet number Mask: The subnet mask Advertising router: The RID of the ASBR injecting the route Metric: The metric as set by the ASBR External Metric Type: The external metric type, either 1 or 2
Redistribution into OSPF LSA 5 ASBR floods Type 5 LSAs throughout area. If ABR is: Normal (non-stubby) areas: Flood Type 5 LSAs into area Stub and Totally Stubby areas: No Type 5 LSAs flooded Default route injected by ABR
Redistributing External Type 2 Routes
Redistribution into OSPF LSA 5 Metric = 20 Metric = 20 172.30.26.0/23 E2 route’s metric is simply the metric in the Type 5 LSA. Default = 20 metric parameter R4 has two routes to 172.30.26.0/23: Via R1 Via R8 To avoid loops, OSPF routers use two tiebreaker systems to allow a router to choose a best external route. Router in question resides in the same area as the ASBR (intra-area) Router in question resides in a different area (interarea) than the ASBR
Determining the Next-hop for Type 2 External Routes - Intra-area Metric = 20 Metric = 20 172.30.26.0/23 LSA 5 Router has multiple routes for same E2 destination network: Selects the best route based on the lowest cost to reach any ASBR(s) that advertised the lowest E2 metric. R4: Both routes use metric 20 in this case, so the routes tie. Tiebreaker: Find the advertising ASBR(s) as listed in the Type 5 LSA(s) Using the intra-area LSDB topology calculate the best route to reach the ASBR(s). (This is the route that will be entered into the routing table.) This determines the outgoing interface and next hop based address to to reach the ASBR The route's metric is unchanged in the routing table as listed in theType 5 LSA
Determining the Next-hop for Type 2 External Routes - Intra-area Metric = 20 Metric = 20 172.30.26.0/23 LSA 5 Best path R4 looks in the Type 5 LSA, and sees RID 1.1.1.1 (R1) is the advertising ASBR. R4 then looks at its area 0 LSDB entries, including the Type 1 LSA for RID 1.1.1.1, and calculates all possible area 0 routes to reach 1.1.1.1. R4's best route to reach RID 1.1.1.1 happens to be through its S0/0/0 interface, to next-hop RD1 (172.16.14.1), so R4's route to 172.16.26.0/23 uses these details. The route lists metric 20, as listed in the Type 5 LSA.
Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 5 Metric = 20 Metric = 20 When router is in a different area same issues remain. Different tiebreaker to reach ASBR. Calculation requires more information that previous Intra-area example. To calculate their best route to reach the ASBR, a router in another area: Adds the cost to reach an ABR between the areas Plus that ABR's cost to reach the ASBR
Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 64 1 64 64 Best path R5 has two possible routes to reach ASBR: Via R3 Via R4 Although the metric is 20, R5 will use the cost to the ABR PLUS the ABR’s cost to the ASBR to determine the best path. Via R3: 64 + 1 = 65 Via R4: 64 + 64 = 128 R5 chooses the route via R3 because it is a better path (65). The router’s process for doing this is: Calculate the cost to reach the ABR, based on the area's topology database Add the cost from the ABR to the ASBR, as listed in a Type 4 LSA Let’s talk about that Type 4 LSA!
Determining the Next-hop for Type 2 External Routes - Interarea LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. LSA 4 The following slides provide additional information on LSA 4s if you are interested... Otherwise The End
Determining the Next-hop for Type 2 External Routes - Interarea LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. LSA 4 Type 4 Summary ASBR LSA: RID of the ASBR RID of the ABR that created and flooded the LSA 4 ABR's cost to reach the ASBR ABRs create Type 4 LSAs after receiving an external Type 5 LSA from an ASBR. ABR forwards a Type 5 LSA into an area ABR looks at the RID of the ASBR that created the Type 5 LSA.. ABR creates a Type 4 LSA listing that ASBR, and the cost to reach that ASBR, flooding that LSA into the neighboring areas.
Determining the Next-hop for Type 2 External Routes - Interarea LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. LSA 4 Best path ABR R3 creates and floods Type 4 Summary ASBR LSA into area 1. ASBR 1.1.1.1 (R1), ABR 3.3.3.3 (R3), and cost 1 (R3's cost to reach ASBR). ABR R4 creates and floods Type 4 Summary ASBR LSA into area 1. ASBR 1.1.1.1 (R1), ABR 4.4.4.4 (R4), and lists cost 64 (R4's cost to reach ASBR). When R5 finds two routes for subnet 172.30.26.0/23, and finds both have a metric of 20 Break the tie. For each route: Add intra-area cost to reach the ABR PLUS the ABR's cost to reach the ASBR (as listed in the Type 4 LSA). R5 determines best route is through R3 has the lower cost (65).
Determining the Next-hop for Type 2 External Routes - Interarea LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. Best path R5# show ip route O E2 172.30.26.0/23 [110/20] via 172.16.35.3, 05:48:42, Serial0/0
Configuring OSPF – Part 2 of 2 CIS 185 CCNP ROUTE Rick Graziani Cabrillo College graziani@cabrillo.edu