Lab Objective:
The focus of this lab is to understand OSPF implementation and configuration in Cisco IOS routers. Additional technologies tested include Frame Relay connectivity and redistribution.
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. Also, if you are using the www.howtonetwork.net racks, configure R3 as the Frame Relay switch using the following configuration commands: hostname R3-Frame-Relay-Switch |
Task 1
Configure hostnames and IP addressing on all routers as illustrated in the network topology.
Task 2
Configure the Frame Relay network so that all routers can ping each others’ WAN interfaces. Verify your configuration by pinging the WAN interfaces of all routers from each other.
Task 3
Using interface-based configuration, configure OSPF using process ID number 1 on all routers for the Frame Relay WAN connecting routers R1, R2, and R4. Use the default network type and ensure that R1 is always elected DR even if it fails and comes back up. Verify your configuration.
Task 4
Using interface-based configuration, enable OSPF for the LAN segment connected to R1. This LAN segment should reside on OSPF area 1. No Hellos should be sent on this segment.
Task 5
Using interface-based configuration, configure OSPF using process ID number 2 on the LAN segment connected to R2 and R4. Ensure that no DR/BDR election takes place on this segment; however, ensure that multiple routers can still exist on the segment.
Task 6
Configure and perform mutual redistribution between OSPF process 1 and OSPF process 2 on routers R2 and R4. Ensure that routes from one process are not re-advertised back to the same process. You are NOT allowed to use any ACLs or IP prefix lists in your solution. Verify the configuration using the appropriate commands.
Task 7
Configure your network so that R1 prefers the path via R2 to reach the 150.5.5.0/24 subnet. In the event that R2 is down, the path via R4 should be used. Additionally, configure R4 so that it prefers the path via R2 to reach the 150.1.1.0/24 subnet. In the event that R2 is down, it should use the Frame Relay WAN connection to R1. Verify your configuration.
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/1 R1(config-if)#ip address 10.0.0.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#encapsulation frame-relay 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.5.5.2 255.255.255.0 R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ip address 10.0.0.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#encapsulation frame-relay R2(config-if)#exit |
| Router(config)#hostname R4 R4(config)#interface fastethernet 0/0 R4(config-if)#no shutdown R4(config-if)#ip address 150.5.5.4 255.255.255.0 R4(config-if)#exit R4(config)#interface serial 0/0 R4(config-if)#ip address 10.0.0.4 255.255.255.0 R4(config-if)#no shutdown R4(config-if)#encapsulation frame-relay R4(config-if)#exit |
Task 2
Although Frame Relay configuration is not a CCNP topic, per se, it is still important that you remember your Frame Relay configurations from the CCNA. The task is completed as follows:
| R1(config)#interface serial 0/1 R1(config-if)#frame-relay map ip 10.0.0.2 102 broadcast R1(config-if)#frame-relay map ip 10.0.0.4 104 broadcast R1(config-if)#exit |
On the spoke routers, because the same DLCI is being used, the broadcast keyword should only be specified once to avoid duplicate Broadcast packets across the Frame Relay WAN. This task is completed as follows:
| R2(config)#interface serial 0/1 R2(config-if)#frame-relay map ip 10.0.0.1 201 broadcast R2(config-if)#frame-relay map ip 10.0.0.4 201Â Â Â Â Â Â Â Â Â R2(config-if)#exit |
| R4(config)#interface serial 0/0 R4(config-if)#frame-relay map ip 10.0.0.1 401 broadcast R4(config-if)#frame-relay map ip 10.0.0.2 401Â Â Â Â Â Â Â Â Â R4(config-if)#exit |
Verify your Frame Relay configuration using the show frame-relay map command:
| R1#show frame-relay map Serial0/1 (up): ip 10.0.0.2 dlci 102(0x66,0x1860), static, broadcast, CISCO, status defined, active Serial0/1 (up): ip 10.0.0.4 dlci 104(0x68,0x1880), static, broadcast, CISCO, status defined, active |
| R2#show frame-relay map Serial0/1 (up): ip 10.0.0.1 dlci 201(0xC9,0x3090), static, broadcast, CISCO, status defined, active Serial0/1 (up): ip 10.0.0.4 dlci 201(0xC9,0x3090), static, CISCO, status defined, active |
| R4#show frame-relay map Serial0/0 (up): ip 10.0.0.1 dlci 401(0x191,0x6410), static, broadcast, CISCO, status defined, active Serial0/0 (up): ip 10.0.0.2 dlci 401(0x191,0x6410), static, CISCO, status defined, active |
Finally, verify that you can ping between all routers across the Frame Relay WAN:
| R1#ping 10.0.0.2 repeat 10
Type escape sequence to abort. Type escape sequence to abort. |
| R2#ping 10.0.0.1 repeat 10
Type escape sequence to abort. Type escape sequence to abort. |
| R4#ping 10.0.0.1 repeat 10
Type escape sequence to abort. Type escape sequence to abort. |
Task 3
In order to ensure that R1 is always elected DR even if it fails and comes back up, you need to disable DR/BDR election on R2 and R4 by assigning them an OSPF priority of 0. Also, when configuring OSPF on NBMA networks, you need to manually specify neighbors, even though the broadcastkeyword has been specified for the static Frame Relay map statements:
| R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#neighbor 10.0.0.2 R1(config-router)#neighbor 10.0.0.4 R1(config-router)#exit R1(config)#interface serial 0/1 R1(config-if)#ip ospf 1 area 0 R1(config-if)#exit |
| R2(config)#router ospf 1 R2(config-router)#router-id 2.2.2.2 R2(config-router)#neighbor 10.0.0.1 R2(config-router)#exit R2(config)#interface serial 0/1 R2(config-if)#ip ospf 1 area 0 R2(config-if)#ip ospf priority 0 R2(config-if)#exit |
| R4(config)#router ospf 1 R4(config-router)#router-id 4.4.4.4 R4(config-router)#exit R4(config)#interface serial 0/0 R4(config-if)#ip ospf 1 area 0 R4(config-if)#ip ospf priority 0 R4(config-if)#exit |
Verify your 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 |
| R4#show ip ospf neighbor
Neighbor ID  Pri  State          Dead Time  Address        Interface |
Task 4
| R1(config)#router ospf 1 R1(config-router)#passive-interface fastethernet 0/0 R1(config-router)#exit R1(config)#interface fastethernet 0/0 R1(config-if)#ip ospf 1 area 1 R1(config-if)#exit |
Verify your configuration using the show ip ospf <options> commands:
| R1#show ip ospf Routing Process “ospf 1” with ID 1.1.1.1 Start time: 03:04:16.984, Time elapsed: 00:10:22.164 [Truncated Output] Number of areas in this router is 2. 2 normal 0 stub 0 nssa |
| R1#show ip ospf interface brief Interface   PID  Area         IP Address/Mask   Cost State Nbrs F/C Se0/1       1    0            10.0.0.1/24       64   DR   2/2 Fa0/0       1    1            150.1.1.1/24      1    DR   0/0 |
Task 5
To prevent DR/BDR election but allow multiple routers to exist on the same multi-access segment, you need to configure a point-to-multipoint network type:
| R2(config)#router ospf 2 R2(config-router)#router-id 22.22.22.22 R2(config-router)#exit R2(config)#interface fastethernet 0/0 R2(config-if)#ip ospf network point-to-multipoint R2(config-if)#ip ospf 2 area 0 R2(config-if)#exit |
| R4(config)#router ospf 2 R4(config-router)#router-id 44.44.44.44 R4(config-router)#exit R4(config)#interface fastethernet 0/0 R4(config-if)#ip ospf network point-to-multipoint R4(config-if)#ip ospf 2 area 0 R4(config-if)#exit |
Verify your configuration using the show ip ospf neighbor command:
| R4#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 |
Task 6
To complete this task you need to use route tags. This task is completed as follows:
| R2(config)#route-map OSPF1-INTO-OSPF2 deny 10 R2(config-route-map)#match tag 444 R2(config-route-map)#exit R2(config)#route-map OSPF1-INTO-OSPF2 permit 20 R2(config-route-map)#set tag 222 R2(config-route-map)#exit R2(config)#route-map OSPF2-INTO-OSPF1 deny 10 R2(config-route-map)#match tag 444 R2(config-route-map)#exit R2(config)#route-map OSPF2-INTO-OSPF1 permit 20 R2(config-route-map)#set tag 222 R2(config-route-map)#exit R2(config)#router ospf 1 R2(config-router)#redistribute ospf 2 subnets route-map OSPF2-INTO-OSPF1 R2(config-router)#exit R2(config)#router ospf 2 R2(config-router)#redistribute ospf 1 subnets route-map OSPF1-INTO-OSPF2 R2(config-router)#exit |
| R4(config)#route-map OSPF1-INTO-OSPF2 deny 10 R4(config-route-map)#match tag 222 R4(config-route-map)#exit R4(config)#route-map OSPF1-INTO-OSPF2 permit 20 R4(config-route-map)#set tag 444 R4(config-route-map)#exit R4(config)#route-map OSPF2-INTO-OSPF1 deny 10 R4(config-route-map)#match tag 222 R4(config-route-map)#exit R4(config)#route-map OSPF2-INTO-OSPF1 permit 20 R4(config-route-map)#set tag 444 R4(config-route-map)#exit R4(config)#router ospf 1 R4(config-router)#redistribute ospf 2 subnets route-map OSPF2-INTO-OSPF1 R4(config-router)#exit R4(config)#router ospf 2 R4(config-router)#redistribute ospf 1 subnets route-map OSPF1-INTO-OSPF2 R4(config-router)#exit |
While this configuration seems complex, it is actually quite simple. The logic is as follows:
When OSPF process ID 1 on R2 redistributes routes from OSPF process ID 2, it denies all routes with an administrative route tag of 444. This tag is specified when OSPF process ID 2 on R4 redistributes OSPF process ID 1 routes. This prevents R2 from re-advertising these same routes back across the Frame Relay WAN. After denying these routes, OSPF process ID 1 on R2 accepts all other routes and sets an administrative tag of 222 for those routes.
When those routes are received by R4 via the Frame Relay WAN, they are denied by OSPF process ID 2 on R4, again preventing those same routes from being re-advertised across the LAN between R2 and R4. The same logic works in the reverse direction.
Verify your configuration by looking at the Link State Database on all routers in the network:
| R1#show ip ospf database
           OSPF Router with ID (1.1.1.1) (Process ID 1)                Router Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum Link count                Net Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum                Summary Net Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum                Router Link States (Area 1) Link ID        ADV Router     Age        Seq#      Checksum Link count                Summary Net Link States (Area 1) Link ID        ADV Router     Age        Seq#      Checksum                Summary ASB Link States (Area 1) Link ID        ADV Router     Age        Seq#      Checksum                Type-5 AS External Link States Link ID        ADV Router     Age        Seq#      Checksum Tag |
| R2#show ip ospf database
           OSPF Router with ID (22.22.22.22) (Process ID 2)                Router Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum Link count                Type-5 AS External Link States Link ID        ADV Router     Age        Seq#      Checksum Tag            OSPF Router with ID (2.2.2.2) (Process ID 1)                Router Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum Link count                Net Link States (Area 0) Link ID        ADV Router      Age        Seq#      Checksum                Summary Net Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum                Type-5 AS External Link States Link ID        ADV Router     Age        Seq#      Checksum Tag |
| R4#show ip ospf database
           OSPF Router with ID (44.44.44.44) (Process ID 2)                Router Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum Link count                Type-5 AS External Link States Link ID        ADV Router     Age        Seq#      Checksum Tag            OSPF Router with ID (4.4.4.4) (Process ID 1)                Router Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum Link count                Net Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum                Summary Net Link States (Area 0) Link ID        ADV Router     Age        Seq#      Checksum                Type-5 AS External Link States Link ID        ADV Router     Age        Seq#      Checksum Tag |
Task 7
While the first option that might come to mind might be specifying costs using the neighbor command, keep in mind that you cannot specify cost when using the default NBMA network type. If you do attempt to do so, you will receive the following error message:
| R1(config)#router ospf 1 R1(config-router)#neighbor 10.0.0.2 cost 10 R1(config-router)# *May 10 06:59:25.183: %OSPF-4-CFG_NBR_INVAL_NBMA_OPT: Can not use configured neighbor: cost and database-filter options are allowed only for a point-to-multipoint network |
Prior to any configuration changes, the routing table on R1 shows the following entries:
| R1#show ip route ospf 150.5.0.0/16 is variably subnetted, 3 subnets, 2 masks O E2Â Â Â 150.5.5.4/32 [110/1] via 10.0.0.2, 00:24:53, Serial0/1 O E2Â Â Â 150.5.5.2/32 [110/1] via 10.0.0.4, 00:24:53, Serial0/1 O E2Â Â Â 150.5.5.0/24 [110/1] via 10.0.0.4, 00:24:53, Serial0/1 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â [110/1] via 10.0.0.2, 00:24:53, Serial0/1 |
To complete this task, you need to modify redistribution metrics. The most simple way is to increment the redistribution metric configured on R4:
| R4(config)#router ospf 1 R4(config-router)#redis ospf 2 su route-ma OSPF2-INTO-OSPF1 met 4 R4(config-router)#end R4#clear ip ospf redistribution |
Following this change, the routing table on R1 now shows the following entries:
| R1#show ip route ospf 150.5.0.0/16 is variably subnetted, 3 subnets, 2 masks O E2Â Â Â 150.5.5.4/32 [110/1] via 10.0.0.2, 00:27:18, Serial0/1 O E2Â Â Â 150.5.5.2/32 [110/4] via 10.0.0.4, 00:00:19, Serial0/1 O E2Â Â Â 150.5.5.0/24 [110/1] via 10.0.0.2, 00:00:19, Serial0/1 |
To complete the second part of this task, you need to modify default administrative distance values. You cannot use the cost because the route via the Frame Relay WAN is internal and while the route via the LAN is external. Internal will always be preferred over external. This task is completed by modifying OSPF process ID 2s administrative distance on R4. Prior to configuration changes, the routing table on R4 shows the following entries:
| R4#show ip route ospf 150.1.0.0/24 is subnetted, 1 subnets O IAÂ Â Â 150.1.1.0 [110/65] via 10.0.0.1, 00:04:41, Serial0/0 150.5.0.0/16 is variably subnetted, 2 subnets, 2 masks OÂ Â Â Â Â Â 150.5.5.2/32 [110/1] via 150.5.5.2, 00:29:22, FastEthernet0/0 |
This task is completed as follows:
| R4(config)#router ospf 2 R4(config-router)#distance ospf external 100 R4(config-router)#exit |
Following this change, the routing table on R4 shows the following entries:
| R4#show ip route ospf 150.1.0.0/24 is subnetted, 1 subnets O E2Â Â Â 150.1.1.0 [100/65] via 150.5.5.2, 00:00:42, FastEthernet0/0 150.5.0.0/16 is variably subnetted, 2 subnets, 2 masks OÂ Â Â Â Â Â 150.5.5.2/32 [110/1] via 150.5.5.2, 00:00:42, FastEthernet0/0 |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1090 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1426 bytes R2# |
R3
|
R3-Frame-Relay-Switch#term len 0 Current configuration : 1556 bytes R3-Frame-Relay-Switch# |
R4
|
R4#term len 0 Current configuration : 1463 bytes R4# |
