Practical Exercise: Routing OSPF

Configure the network in Figure 3-6 for OSPF routing using the IP addressing scheme provided. Ensure that both routers R1 and R2 have full connectivity to Routers R3 and R6 in the backbone. Use the ping command to ensure all networks are reachable. You must use OSPF as your only dynamic routing protocol.

03fig06.gif

Figure 3-6 Practical Exercise: Routing

Practical Exercise Solution

You will notice that the IP addressing scheme uses VLSM and the serial links use the subnet 141.108.10.0.

The serial link contains a mask that is 255.255.255.252, or /30.

The following example configurations provide a solution using OSPF. This practical example is similar to Scenario 2-2 with the extra link between area 1 and area 0. This means that you need to configure two virtual links: one from router R2 to R6 and another between R1 and R3. This second virtual link is required in case of link failure or hardware failure from the Routers R1 and R2.

Configure the loopbacks with VLSM and experiment with debug commands to discover why IP entries are added or not advertised. Remove the second virtual link from R1 to R3, and see how OSPF behaves when the link between R2 and R6 fails.

You will find that because the areas are partitioned, you actually do need two virtual links to ensure full connectivity in any network failure situation. Example 3-62 displays R1's full working configuration.

Example 3-62. R1's Full Configuration

version 12.0
!
hostname R1
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
interface Loopback0
 ip address 131.108.4.1 255.255.255.128
 ip ospf cost 90
!
interface Loopback1
 ip address 131.108.4.129 255.255.255.128
 ip ospf cost 90
!
interface Loopback2
 ip address 131.108.5.1 255.255.255.224
 ip ospf cost 90
!
interface Ethernet0/0
 ip address 131.108.1.1 255.255.255.0
!
interface Serial0/0
 ip address 141.108.10.9 255.255.255.252
 clockrate 125000
!
interface Serial0/1
 no ip address
 shutdown
 clockrate 128000
!
router ospf 1
 area 2 virtual-link 141.108.2.1
 network 131.108.1.0 0.0.0.255 area 1
 network 131.108.4.0 0.0.0.127 area 1
 network 131.108.4.128 0.0.0.127 area 1
 network 131.108.5.0 0.0.0.31 area 1
 network 141.108.10.8 0.0.0.3 area 2
!
line con 0
line aux 0
line vty 0 4
!
end

Example 3-63 displays R2's full working configuration.

Example 3-63. R2's Full Configuration

version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
!
interface Loopback0
 ip address 131.108.5.33 255.255.255.224
 ip ospf network point-to-point
 ip ospf cost 1000
!
interface Loopback1
 ip address 131.108.6.1 255.255.255.255
!
interface Loopback2
 ip address 131.108.6.2 255.255.255.255
!
interface Ethernet0/0
 ip address 131.108.1.2 255.255.255.0
 ip ospf priority 255
interface Serial1/0
 ip address 141.108.10.1 255.255.255.252
!
interface Serial1/1
 no ip address
shutdown
!
interface Serial1/2
 no ip address
 shutdown
!
interface Serial1/3
 no ip address
 shutdown
!
router ospf 2
 area 2 virtual-link 141.108.12.1
 network 131.108.1.0 0.0.0.255 area 1
 network 131.108.5.32 0.0.0.31 area 1
 network 131.108.6.1 0.0.0.0 area 1
 network 131.108.6.2 0.0.0.0 area 1
 network 141.108.10.0 0.0.0.3 area 2
!
line con 0
line aux 0
line vty 0 4
!
end

Example 3-64 displays R3's working configuration.

Example 3-64. R3's Full Configuration

version 12.0
hostname R3
!
enable password cisco
!
ip subnet-zero
interface Loopback0
 ip address 141.108.1.1 255.255.255.128
 ip ospf network point-to-point
!
interface Loopback1
 ip address 141.108.1.129 255.255.255.128
 ip ospf network point-to-point
!
interface Loopback2
 ip address 141.108.2.1 255.255.255.224
 ip ospf network point-to-point
!
interface Ethernet0
 ip address 131.108.33.1 255.255.255.0
!
interface Serial0
 ip address 141.108.10.10 255.255.255.252
!
interface Serial1
 ip address 141.108.10.5 255.255.255.252
!
router ospf 3
 area 2 virtual-link 131.108.5.1
 network 131.108.33.0 0.0.0.255 area 0
 network 141.108.1.0 0.0.0.127 area 0
 network 141.108.1.128 0.0.0.127 area 0
 network 141.108.2.0 0.0.0.31 area 0
 network 141.108.10.4 0.0.0.3 area 0
 network 141.108.10.8 0.0.0.3 area 2
!
line con 0
line aux 0
line vty 0 4
!
end

Finally, Example 3-65 displays R6's working configuration.

Example 3-65. R6's Full Configuration

version 12.0
hostname r6
!
enable password cisco
ip subnet-zero
!
interface Loopback0
 ip address 141.108.9.1 255.255.255.128
 ip ospf network point-to-point
interface Loopback1
 ip address 141.108.9.129 255.255.255.128
 ip ospf network point-to-point
interface Loopback2
 ip address 141.108.12.1 255.255.255.0
 ip ospf network point-to-point
interface Ethernet0
 ip address 131.108.26.1 255.255.255.0
 media-type 10BaseT
!
interface Serial0
 ip address 141.108.10.6 255.255.255.252
 clockrate 125000
!
interface Serial1
 ip address 141.108.10.2 255.255.255.252
 clockrate 125000
!
interface Serial2
 shutdown
!
interface Serial3
 shutdown
!
router ospf 6
 area 2 virtual-link 131.108.6.2
 network 131.108.26.0 0.0.0.255 area 0
 network 141.108.9.0 0.0.0.127 area 0
 network 141.108.9.128 0.0.0.127 area 0
 network 141.108.10.0 0.0.0.3 area 2
 network 141.108.10.4 0.0.0.3 area 0
 network 141.108.12.0 0.0.0.255 area 0
!
line con 0
line aux 0
line vty 0 4
end

+ Share This