Lab Objective:
The focus of this lab is to understand OSPF implementation and configuration in Cisco IOS routers. Additional technologies tested include authentication, optimization and resiliency.
Lab Topology:
The lab network topology is illustrated below:
|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no interface fastethernet 0/0 Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab. |
Task 1
Configure hostnames and IP addressing on all routers as illustrated in the network topology.
Task 2
Using legacy network x.x.x.x y.y.y.y area <area> OSPF configuration commands, configure OSPF as illustrated in the topology. Ensure that all routers are able to reach each other. Do NOT enable OSPF over the point-to-point link between R1 and R3. Additionally, ensure that no OSPF packets are sent out of the LAN interfaces on any routers. Verify the OSPF configuration using the appropriate commands.
Task 3
Authenticate the OSPF backbone using MD5 authentication with a secret of ‘CCNP’. Verify that all routing is still functional following this change.
Task 4
Management is concerned about how a large Link State Database can cause adverse issues, such as performance issues, on a router. They would link to see if the LSDB on all routers can be restricted to no more than 100 LSAs. As a test, configure your network so that OSPF will limit the size of the LSDB to 100 non self-generated LSAs. For the time being, OSPF should only log a warning message when 80% of this number has been reached.
In addition to this, configure the network so that if any router is rebooted, it will send router LSAs with a metric of infinity for 5 minutes after it has come back up. Verify your configuration using the appropriate commands.
Task 5
Management has stated that the network will grow to significant amount of routers in the near future. This deployment will include numerous OSPF areas. They are worried about convergence and would like you to ensure that only minimal SPF calculations are performed when changes to router or network LSAs occur within an area. Given this, configure your network so that and full SPF calculation is NOT performed, unless these changes are local to the router in question. Verify your configuration using the appropriate commands.
Task 6
The R2-to-R3 link has had a bad history of failures and management is afraid that they might lose connectivity to parts of the network when this goes down. They have therefore decided to get a point-to-point link between R1 and R3 for backup purposes should the link between R2 and R3 fail. They request that you use EIGRP to ensure that R3 and R4 can still communicate with R1 and R2 when the R2-to-R3 link fails.
However, they have made it explicitly clear that when the R2-to-R3 link is up, only OSPF routes should exist in the network. Management is fine with both internal and external OSPF and EIGRP routes when using the backup link. Additionally, you are allowed to make basic modifications to OSPF to get this solution to work. Given this information, implement a routing solution to meet these requirements. Verify your configuration by shutting down the R2-to-R3 point-to-point link and pinging LAN-to-LAN between R4 and R2.
Lab Validation
Task 1
| Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 R1(config-if)#no shutdown R1(config-if)#ip address 150.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface serial 0/0 R1(config-if)#no shutdown R1(config-if)#ip address 10.0.1.1 255.255.255.252 R1(config-if)#clock rate 2000000 R1(config-if)#exit R1(config)#interface serial 0/1 R1(config-if)#ip address 10.0.0.5 255.255.255.252 R1(config-if)#no shutdown R1(config-if)#exit |
| Router(config)#hostname R2 R2(config)#interface fastethernet 0/0 R2(config-if)#no shutdown R2(config-if)#ip address 150.2.2.2 255.255.255.0 R2(config-if)#exit R2(config)#interface serial 0/0 R2(config-if)#no shutdown R2(config-if)#ip address 10.0.1.2 255.255.255.252 R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ip address 10.0.0.9 255.255.255.252 R2(config-if)#no shutdown R2(config-if)#exit |
| Router(config)#hostname R3 R3(config)#interface fastethernet 0/0 R3(config-if)#ip address 150.3.3.3 255.255.255.0 R3(config-if)#exit R3(config)#interface serial 1/0 R3(config-if)#ip address 10.0.0.6 255.255.255.252 R3(config-if)#no shutdown R3(config-if)# clock rate 128000 R3(config-if)#exit R3(config)#interface serial 1/1 R3(config-if)#ip address 10.0.0.10 255.255.255.252 R3(config-if)#no shutdown R3(config-if)# clock rate 128000 R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ip address 10.0.0.13 255.255.255.252 R3(config-if)#no shutdown R3(config-if)# clock rate 128000 R3(config-if)#exit |
| Router(config)#hostname R4 R4(config)#interface fastethernet 0/0 R4(config-if)#ip address 150.4.4.4 255.255.255.0 R4(config-if)#exit R4(config)#interface serial 0/0 R4(config-if)#ip address 10.0.0.14 255.255.255.252 R4(config-if)#no shutdown R4(config-if)#exit |
Task 2
In order to complete this task, you need to ensure that you configure a virtual link across area 1, otherwise area 2 routes will not be reachable from R1 and R2. This is completed as follows:
| R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 150.1.1.1 0.0.0.0 area 0 R1(config-router)#network 10.0.0.1 0.0.0.0 area 0 R1(config-router)#passive-interface fastethernet 0/0 R1(config-router)#exit |
| R2(config)#router ospf 2 R2(config-router)#router-id 2.2.2.2 R2(config-router)#area 1 virtual-link 3.3.3.3 R2(config-router)#network 150.2.2.2 0.0.0.0 area 0 R2(config-router)#network 10.0.0.2 0.0.0.0 area 0 R2(config-router)#network 10.0.0.9 0.0.0.0 area 1 R2(config-router)#passive-interface fastethernet 0/0 R2(config-router)#exit |
| R3(config)#router ospf 3 R3(config-router)#router-id 3.3.3.3 R3(config-router)#area 1 virtual-link 2.2.2.2 R3(config-router)#network 150.3.3.3 0.0.0.0 area 1 R3(config-router)#network 10.0.0.10 0.0.0.0 area 1 R3(config-router)#network 10.0.0.13 0.0.0.0 area 2 R3(config-router)#passive-interface fastethernet 0/0 R3(config-router)#exit |
| R4(config)#router ospf 4 R4(config-router)#router-id 4.4.4.4 R4(config-router)#network 150.4.4.4 0.0.0.0 area 2 R4(config-router)#network 10.0.0.14 0.0.0.0 area 2 R4(config-router)#passive-interface fastethernet 0/0 R4(config-router)#exit |
Verify your OSPF configuration using the show ip ospf neighbor command:
| R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
Task 3
This task is straightforward; however, you must remember that the virtual link is a logical extension of area 0 (the backbone) and this needs authentication configuration as well. This means that area 0 authentication must also be configured on R3 even though no interfaces actually reside within the backbone area. This task is completed as follows:
| R1(config)#router ospf 1 R1(config-router)#area 0 authentication message-digest R1(config-router)#exit R1(config)#interface serial 0/0 R1(config-if)#ip ospf message-digest-key 1 md5 CCNP R1(config-if)#exit |
| R2(config)#router ospf 2 R2(config-router)#area 0 authentication message-digest R2(config-router)#area 1 virtual-link 3.3.3.3 message-digest-key 1 md5 CCNP R2(config-router)#exit R2(config)#interface serial 0/0 R2(config-if)#ip ospf message-digest-key 1 md5 CCNP R2(config-if)#exit |
| R3(config)#router ospf 3 R3(config-router)#area 0 authentication message-digest R3(config-router)#area 1 virtual-link 2.2.2.2 message-digest-key 1 md5 CCNP R3(config-router)#exit |
Following OSPF backbone authentication configuration, verify the backbone area adjacencies:
| R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
NOTE: Use the show ip ospf neighbor detail command for additional detail. To view information about the virtual links, use the show ip ospf virtual-links command:
| R2#show ip ospf virtual-links Virtual Link OSPF_VL0 to router 3.3.3.3 is up Run as demand circuit DoNotAge LSA allowed. Transit area 1, via interface Serial0/1, Cost of using 64 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:06 Adjacency State FULL (Hello suppressed) Index 2/3, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec Message digest authentication enabled Youngest key id is 1 |
Task 4
The OSPF Link-State Database Overload Protection feature allows you to limit the number of non self-generated LSAs for a given OSPF process. Excessive LSAs generated by other routers in the OSPF domain can substantially drain the CPU and memory resources of the router. To complete the first part of this task, you need to enable this feature using the max-lsa <maximum> [threshold-percentage] [warning-only] [ignore-time minutes] [ignore-count count-number] [reset-time minutes] command.
To complete the second part of this task, you will need to enable the Stub Router Advertisement feature which allows a router to advertise infinity metric (0xFFFF) for its connected links in Router LSAs, and advertise normal interface cost if the link is a stub network. The max-metric router-lsa on-startup <seconds> command is used to enable this feature. Be careful when performing such activities in production networks because OSPF adjacencies will be reset.
This task is completed as follows:
| R1(config)#router ospf 1 R1(config-router)#max-lsa 100 80 warning-only R1(config-router)#max-metric router-lsa on-startup 300 R1(config-router)#exit |
| R2(config)#router ospf 2 R2(config-router)#max-lsa 100 80 warning-only R2(config-router)#max-metric router-lsa on-startup 300 R2(config-router)#exit |
| R3(config)#router ospf 3 R3(config-router)#max-lsa 100 80 warning-only R3(config-router)#max-metric router-lsa on-startup 300 R3(config-router)#exit |
| R4(config)#router ospf 4 R4(config-router)#max-lsa 100 80 warning-only R4(config-router)#max-metric router-lsa on-startup 300 R4(config-router)#exit |
Verify your configurations using the show ip ospf command:
| R4#show ip ospf Routing Process “ospf 4” with ID 4.4.4.4 Start time: 02:45:57.136, Time elapsed: 00:52:38.132 Supports only single TOS(TOS0) routes Supports opaque LSA Supports Link-local Signaling (LLS) Supports area transit capability Maximum number of non self-generated LSA allowed 100 (warning-only) Threshold for warning message 80% Originating router-LSAs with maximum metric Condition: on startup for 300 seconds, State: inactive Initial SPF schedule delay 5000 msecs Minimum hold time between two consecutive SPFs 10000 msecs Maximum wait time between two consecutive SPFs 10000 msecs [Truncated Output] |
Task 5
To complete this task, you need to enable the incremental SPF feature. When this feature is enabled, the router will run a partial SPF to recompute the parts of the tree that have been affected, instead of running a full or complete SPF recomputation. This feature saves router resources, such as processor (CPU) and allows for faster OSPF convergence.
When incremental SPF is enabled, the local router will run a full or complete SPF recomputation is when the changes to the router and network LSAs occurred on the local router itself. Incremental SPF is scheduled in the same way as the full SPF. Routers enabled with incremental SPF and routers not enabled with incremental SPF can function in the same internetwork. This task is completed as follows:
| R1(config)#router ospf 1 R1(config-router)#ispf R1(config-router)#exit |
| R2(config)#router ospf 2 R2(config-router)#ispf R2(config-router)#exit |
| R3(config)#router ospf 3 R3(config-router)#ispf R3(config-router)#exit |
| R4(config)#router ospf 4 R4(config-router)#ispf R4(config-router)#exit |
Verify your configuration using the show ip ospf command:
| R1#show ip ospf Routing Process “ospf 1” with ID 1.1.1.1 Start time: 02:42:17.444, Time elapsed: 01:08:22.652 [Truncated Output] Initial SPF schedule delay 5000 msecs |
Task 6
This task may initially seem daunting but after further observation, it is pretty straightforward. The solution is to enable EIGRP on the point-to-point link between R1 and R3 and then redistribute between EIGRP and OSPF on both routers. Because external EIGRP routes have an administrative distance of 170, only OSPF routes will be installed into the routing tables.
The only caveat here is understanding multi-area OSPF behavior. By default, inter-area routes will not be advertised when there is no backbone area. This means that when the R2-to-R3 point-to-point link fails, R4 will not receive the 150.3.3.0/24 route because it resides in area 1. You cannot redistribute this into OSPF on R3 because that results in a Type 5 LSA. Again, without a backbone area, this LSA is not flooded into area 2. The only solution is to reconfigure your OSPF network so that this interface resides in area 2.This task is completed as follows:
| R1(config)#router eigrp 1 R1(config-router)#no auto-summary R1(config-router)#network 10.0.0.5 0.0.0.0 R1(config-router)#redistribute ospf 1 metric 100000 100 255 1 1500 R1(config-router)#exit R1(config)#router ospf 1 R1(config-router)#redistribute eigrp 1 subnets R1(config-router)#exit |
| R3(config)#router eigrp 1 R3(config-router)#no auto-summary R3(config-router)#network 10.0.0.6 0.0.0.0 R3(config-router)#redistribute ospf 3 metric 100000 100 255 1 1500 R3(config-router)#exit R3(config)#router ospf 3 R3(config-router)#network 150.3.3.3 0.0.0.0 area 2 R3(config-router)#redistribute eigrp 1 subnets R3(config-router)#exit |
Following your configuration, first verify EIGRP neighbor relationships:
| R1#show ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.0.0.6 Se0/1 10 00:00:56 14 200 0 5 |
| R3#show ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.0.0.5 Se1/0 10 00:01:23 18 1140 0 3 |
Next, verify the routing tables and ensure that all routes are known via OSPF as required:
| R1#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 4 subnets |
| R2#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 4 subnets |
| R3#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 4 subnets |
| R4#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 4 subnets |
Finally, test your solution by shutting down the link between R2 and R3:
| R3(config)#interface serial 1/1 R3(config-if)#shutdown |
After shutting down the R2-to-R3 link, check the routing tables on all routers again:
| R1#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 3 subnets |
| R2#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 3 subnets |
| R3#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 3 subnets |
| R4#show ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2 E1 – OSPF external type 1, E2 – OSPF external type 2 i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2 ia – IS-IS inter area, * – candidate default, U – per-user static route o – ODR, P – periodic downloaded static route Gateway of last resort is not set 10.0.0.0/30 is subnetted, 3 subnets |
Finally, verify your solution by pinging LAN-to-LAN between R4 and the other routers:
| R4#ping 150.1.1.1 source fastethernet 0/0 repeat 10 size 100
Type escape sequence to abort. |
| R4#ping 150.2.2.2 source fastethernet 0/0 repeat 10 size 100
Type escape sequence to abort. |
| R4#ping 150.3.3.3 source fastethernet 0/0 repeat 10 size 100
Type escape sequence to abort. |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1274 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1206 bytes R2# |
R3
|
R3#term len 0 Current configuration : 1672 bytes R3# |
R4
|
R4#term len 0 Current configuration : 1027 bytes R4# |
