Popular Posts

Tuesday 30 June 2015

Scenario: Configuring OSPF with Multiple Areas

In this scenario, you configure an eight-router, three-area network with OSPF. Figure 4-4 displays the OSPF topology and area assignment.
04fig04.gif
Figure 4-4 Topology and Area Assignment
This scenario represents a typical OSPF network with semi-redundancy and a hierarchical address assignment. To simulate a large network environment, you configure several loopback address assignments on R1 and R2. Typically in an environment like this, the hosts (devices, such as mainframes, large computer hosts, or printers) reside in the backbone and the end users are connected to the remote sites. Assume all IP traffic is between the edge, or access, routers and the backbone network in area 0.
Table 4-5 displays the IP address assignment used in Figure 4-4.

Table 4-5. IP Address and Area Assignments

RouterIP Address RangeArea
R1131.108.2.0–15/320
R2131.108.16.0–31/320
R3131.108.32–33/320
R4131.108.34–35/320
R5131.108.128.0/2410
R6131.108.129.0/2410
R7131.108.130.0/2410
R8131.108.131.0/2411
WAN links131.108.255.030-bit subnet masks applied to all WAN links
LAN link between R3 and R4131.108.36.00
To start OSPF on the eight routers, you must first enable the OSPF process by using the command router ospf process ID. In this scenario, use the same process ID of 1 on all routers, and remember that the process ID is locally significant only. To send and receive LSAs per interface, use the network command.
From Figure 4-4, the remote network on Router R8, with the IP subnet 131.108.131.0/24, resides in area 11. Area 11 is partitioned from the backbone and hence requires a virtual link so that all OSPF routers have a routing entry for the subnet 131.108.131.0/24. Example 4-4 displays the IP routing table on R1 after OSPF has been configured on all the routers in this network.

Example 4-4. R1 Routing Table

R1#show ip route
Codes: C - connected, 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,
     131.108.0.0/16 is variably subnetted, 39 subnets, 2 masks
O IA    131.108.255.16/30 [110/855] via 131.108.1.2, 00:08:21, Ethernet0/0
O IA    131.108.255.20/30 [110/855] via 131.108.1.2, 00:05:29, Ethernet0/0
C       131.108.255.0/30 is directly connected, Serial0/0
O       131.108.255.4/30 [110/791] via 131.108.1.2, 00:12:44, Ethernet0/0
O IA    131.108.255.8/30 [110/128] via 131.108.255.2, 00:10:15, Serial0/0
O IA    131.108.255.12/30 [110/128] via 131.108.255.2, 00:07:02, Serial0/0
O IA    131.108.129.0/24 [110/865] via 131.108.1.2, 00:07:51, Ethernet0/0 - To R6
O IA    131.108.128.0/24 [110/138] via 131.108.255.2, 00:09:16, Serial0/0 - To R5
O IA    131.108.130.0/24 [110/138] via 131.108.255.2, 00:00:18, Serial0/0 - To R7
C       131.108.15.0/24 is directly connected, Loopback13
C       131.108.14.0/24 is directly connected, Loopback12
C       131.108.13.0/24 is directly connected, Loopback11
C       131.108.12.0/24 is directly connected, Loopback10
C       131.108.11.0/24 is directly connected, Loopback9
C       131.108.10.0/24 is directly connected, Loopback8
C       131.108.9.0/24 is directly connected, Loopback7
C       131.108.8.0/24 is directly connected, Loopback6
C       131.108.7.0/24 is directly connected, Loopback5
C       131.108.6.0/24 is directly connected, Loopback4
C       131.108.5.0/24 is directly connected, Loopback3
C       131.108.4.0/24 is directly connected, Loopback2
C       131.108.3.0/24 is directly connected, Loopback1
C       131.108.2.0/24 is directly connected, Loopback0
C       131.108.1.0/24 is directly connected, Ethernet0/0
O       131.108.31.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.30.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.29.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.28.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.27.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.26.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.25.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.24.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.23.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.22.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.21.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.20.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.19.0/24 [110/11] via 131.108.1.2, 00:12:47, Ethernet0/0
O       131.108.18.0/24 [110/11] via 131.108.1.2, 00:17:10, Ethernet0/0
O       131.108.17.0/24 [110/11] via 131.108.1.2, 00:17:10, Ethernet0/0
O       131.108.16.0/24 [110/11] via 131.108.1.2, 00:17:10, Ethernet0/0
O       131.108.36.0/24 [110/11] via 131.108.1.2, 00:17:10, Ethernet0/0
Example 4-4 displays the remote routers learned through Ethernet interface and the next hop address of 131.108.1.2, which is R2. There is, of course, another path on R1 through the serial link to R2. Because the cost is lower through the Ethernet LAN segment, R1 chooses the path to R2 as the preferred path.
The three remote networks on the access Routers R5, R6, and R7 are listed in Example 4-4, but the network on R8 is not. Configure a virtual link between R4 and R8. Before you can configure a virtual link, you must know the router ID on R4 and R8. Theshow ip ospf database command displays the local router ID, which is typically a loopback address or the highest IP address assignment. Loopbacks are always preferred because a loopback interface is logically never going to become unavailable unless the network administrator removes it. A router ID that is a physical interface is prone to network failure and OSPF recalculations, which lead to network downtimes.
To configure a virtual link, use the IOS command area transit area router-id. The transit area in this example is area 10, and the router ID is the IP address of the remote router. Example 4-5 displays the router ID on Routers R4 and R8.

Example 4-5. Router ID on R4 and R8

R4#show ip ospf database
       OSPF Router with ID (131.108.255.6) (Process ID 1)
R8#show ip ospf database
            OSPF Router with ID (131.108.255.22) (Process ID 1)
Example 4-6 displays the virtual link configuration on R4.

Example 4-6. Virtual Link Configuration on R4

R4(config-router)#router ospf 1
R4(config-router)#area 10 virtual-link 131.108.255.22
Example 4-7 displays the virtual link configuration on R8 along with the IOS ? command to display the available options.

Example 4-7. Virtual Link Configuration and Options on R8

R8(config-router)#area 10 ?
  authentication  Enable authentication
  default-cost    Set the summary default-cost of a NSSA/stub area
  nssa            Specify a NSSA area
  range           Summarize routes matching address/mask (border routers only)
  stub            Specify a stub area
  virtual-link    Define a virtual link and its parameters
R8(config-router)#area 10 virtual-link ?
  A.B.C.D  ID (IP addr) associated with virtual link neighbor
R8(config-router)#area 10 virtual-link 131.108.255.6

Example 4-8 displays the IP routing table on the core router, R1, along with the remote network 131.108.131.0 because of the virtual link configuration.

Example 4-8. show ip router ospf Command on R1

R1#show ip route ospf
     131.108.0.0/16 is variably subnetted, 41 subnets, 2 masks
O IA    131.108.255.16/30 [110/855] via 131.108.1.2, 00:00:47, Ethernet0/0
O IA    131.108.255.20/30 [110/855] via 131.108.1.2, 00:00:47, Ethernet0/0
O       131.108.255.4/30 [110/791] via 131.108.1.2, 00:00:47, Ethernet0/0
O IA    131.108.255.8/30 [110/128] via 131.108.255.2, 00:00:47, Serial0/0
O IA    131.108.255.12/30 [110/128] via 131.108.255.2, 00:00:47, Serial0/0
O IA    131.108.131.0/24 [110/865] via 131.108.1.2, 00:00:47, Ethernet0/0
O IA    131.108.130.0/24 [110/138] via 131.108.255.2, 00:00:48, Serial0/0
O IA    131.108.129.0/24 [110/865] via 131.108.1.2, 00:00:48, Ethernet0/0
O IA    131.108.128.0/24 [110/138] via 131.108.255.2, 00:00:48, Serial0/0
O       131.108.31.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.30.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.29.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.28.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.27.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.26.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.25.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.24.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.23.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.22.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.21.0/24 [110/11] via 131.108.1.2, 00:00:48, Ethernet0/0
O       131.108.20.0/24 [110/11] via 131.108.1.2, 00:00:49, Ethernet0/0
O       131.108.19.0/24 [110/11] via 131.108.1.2, 00:00:49, Ethernet0/0
O       131.108.18.0/24 [110/11] via 131.108.1.2, 00:00:50, Ethernet0/0
O       131.108.17.0/24 [110/11] via 131.108.1.2, 00:00:50, Ethernet0/0
O       131.108.16.0/24 [110/11] via 131.108.1.2, 00:00:50, Ethernet0/0
O       131.108.36.0/24 [110/11] via 131.108.1.2, 00:17:10, Ethernet0/0
To view the status of the virtual link, use the show ip ospf virtual-links command. Example 4-9 displays sample output from this command used on R4.

Example 4-9. show ip ospf virtual-links on R4

R4#sh ip ospf virtual-links

   Virtual Link OSPF_VL0 to router 131.108.255.22 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 10, via interface Serial2, 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:09
    Adjacency State FULL (Hello suppressed)
    Index 2/4, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransmission scan time is 0 msec, maximum is 0 msec
You have successfully configured a complex network with eight Cisco routers in multiple areas. The routing table, even with only eight routers, has over 20 IP route entries.
Before using summarization on this network to reduce the IP routing table size, look at the full working configurations on all routers. Pay particular attention to the shaded sections and the router functions within the OSPF network. Also note how the clockratecommand is used to enable back-to-back serial high-level data link control (HDLC) connections among Cisco routers. Example 4-10 displays R1's full working configuration. R1 is a backbone router.

Example 4-10. R1's Full Configuration

hostname R1
!
logging buffered 64000 debugging
enable password cisco
!
ip subnet-zero
no ip domain-lookup
!
interface Loopback0
 ip address 131.108.2.1 255.255.255.0
   ip ospf network point-to-point
!
interface Loopback1
 ip address 131.108.3.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback2
 ip address 131.108.4.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback3
 ip address 131.108.5.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback4
 ip address 131.108.6.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback5
 ip address 131.108.7.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback6
 ip address 131.108.8.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback7
 ip address 131.108.9.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback8
 ip address 131.108.10.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback9
 ip address 131.108.11.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback10
 ip address 131.108.12.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback11
 ip address 131.108.13.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback12
 ip address 131.108.14.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback13
 ip address 131.108.15.1 255.255.255.0
 ip ospf network point-to-point
!
interface Ethernet0/0
 ip address 131.108.1.1 255.255.255.0
!
interface Serial0/0
 ip address 131.108.255.1 255.255.255.252
   clockrate 125000
!
interface Serial0/1
 shutdown
!
router ospf 1
 network 131.108.0.0 0.0.255.255 area 0
!
line con 0
line aux 0
line vty 0 4
end
Example 4-11 displays R2's full working configuration.

Example 4-11. R2's Full Configuration

hostname R2
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
!
interface Loopback0
 ip address 131.108.16.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback1
 ip address 131.108.17.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback2
 ip address 131.108.18.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback3
 ip address 131.108.19.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback4
 ip address 131.108.20.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback5
 ip address 131.108.21.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback6
 ip address 131.108.22.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback7
 ip address 131.108.23.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback8
 ip address 131.108.24.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback9
 ip address 131.108.25.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback10
 ip address 131.108.26.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback11
 ip address 131.108.27.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback13
 ip address 131.108.28.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback14
 ip address 131.108.29.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback15
 ip address 131.108.30.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback16
 ip address 131.108.31.1 255.255.255.0
 ip ospf network point-to-point
!
interface Ethernet0/0
 ip address 131.108.1.2 255.255.255.0
!
interface Serial1/0
 ip address 131.108.255.5 255.255.255.252
 clockrate 128000
!
interface Serial1/1
 shutdown
!
interface Serial1/2
 shutdown
!
interface Serial1/3
 shutdown
!
router ospf 1
 network 131.108.0.0 0.0.255.255 area 0
!
ip classless
!
line con 0
line aux 0
line vty 0 4
!
end
Example 4-12 displays R3's full working configuration. R3 is an ABR.

Example 4-12. R3's Full Configuration

hostname R3
!
enable password cisco
!
no ip domain-lookup
!
interface Ethernet0
ip address 131.108.36.3 255.255.255.0
!
interface Serial0
 ip address 131.108.255.2 255.255.255.252
!
interface Serial1
 ip address 131.108.255.9 255.255.255.252
 clockrate 128000
!
interface Serial2
 ip address 131.108.255.13 255.255.255.252
 clockrate  128000
!
interface Serial3
 shutdown
!
router ospf 1
 network 131.108.255.0 0.0.0.3 area 0
 network 131.108.36.0 0.0.0.255 area 10
 network 131.108.255.8 0.0.0.3 area 10
 network 131.108.255.12 0.0.0.3 area 10
!
line con 0
line aux 0
line vty 0 4
!
end
Example 4-13 displays R4's full working configuration. R4 is an ABR.

Example 4-13. R4's Full Configuration

hostname R4
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
!
interface Ethernet 0
ip address 131.108.36.4 255.255.255.0
!
interface Serial0
 ip address 131.108.255.6 255.255.255.252
!
interface Serial1
 ip address 131.108.255.17 255.255.255.252
  clockrate 128000
!
interface Serial2
 ip address 131.108.255.21 255.255.255.252
  clockrate 128000
!
interface Serial3
shutdown
!
router ospf 1
 area 10 virtual-link 131.108.255.22
 network 131.108.255.4 0.0.0.3 area 0
network 131.108.36.0 0.0.0.255 area 10
 network 131.108.255.16 0.0.0.3 area 10
 network 131.108.255.20 0.0.0.3 area 10
!
line con 0
line aux 0
line vty 0 4
!
end
Example 4-14 displays R5's full working configuration. R5 is an internal OSPF area.

Example 4-14. R5's Full Configuration

hostname R5
!
enable password cisco
!
interface Ethernet0
 ip address 131.108.128.1 255.255.255.0
!
interface Serial0
 ip address 131.108.255.10 255.255.255.252
!
interface Serial1
 shutdown
!
router ospf 1
 network 131.108.128.0 0.0.0.255 area 10
 
   network 131.108.255.8 0.0.0.3 area 10
!
line con 0
line aux 0
line vty 0 4
end
Example 4-15 displays R6's full working configuration. R6 is an internal OSPF router.

Example 4-15. R6's Full Configuration

hostname R6
!
enable password cisco
!
ip subnet-zero
!
interface Ethernet0
 ip address 131.108.129.1 255.255.255.0
!
interface Serial0
 ip address 131.108.255.18 255.255.255.252
interface Serial1
 shutdown
!
router ospf 1
 network 131.108.129.0 0.0.0.255 area 10
 
   network 131.108.255.16 0.0.0.3 area 10
!
line con 0
line aux 0
line vty 0 4
!
end
Example 4-16 displays R7's full working configuration. R7 is an internal OSPF area.

Example 4-16. R7's Full Configuration

hostname R7
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
interface Ethernet0
 ip address 131.108.130.1 255.255.255.0
interface Serial0
 ip address 131.108.255.14 255.255.255.252
!
interface Serial1
 shutdown
!
router ospf 1
 network 131.108.130.0 0.0.0.255 area 10
 network 131.108.255.12 0.0.0.3 area 10
!
line con 0
line aux 0
line vty 0 4
!
end
Example 4-17 displays R8's full working configuration. R8 is an internal OSPF area, requiring a virtual link because area 11 is not connected to area 0.

Example 4-17. R8's Full Configuration

hostname R8
enable password cisco
!
no ip domain-lookup
!
interface Ethernet0
 ip address 131.108.131.1 255.255.255.0
!
interface Serial0
 ip address 131.108.255.22 255.255.255.252
interface Serial1
 shutdown
!
router ospf 1
 area 10 virtual-link 131.108.255.6
 network 131.108.131.0 0.0.0.255 area 11
 network 131.108.255.20 0.0.0.3 area 10
!
line con 0
line aux 0
line vty 0 4
!
end

No comments: