Popular Posts

Tuesday 30 June 2015

Scenario: Configuring OSPF Summarization

This scenario covers the same network topology shown in Figure 4-4. The aim of any network designer is to use summarization wherever possible. OSPF, as you have seen, has some advanced features to allow summarization. The first method you can apply is intra-area summarization on the backbone Routers R1 and R2. A total of 30 networks (contiguous) exist from 131.108.1.0 to 131.108.31.255.
For the core routers in area 0, namely R1, R2, R3, and R4, which pass on routing information to other core or remote routers, you need to have a more detailed view of the network. This detail is required so you do not perform any summarization on the core network and maintain a full IP routing topology in the core (or backbone) network.
The access-level routers, R5, R6, R7, and R8, do not typically require an IP routing entry for every network in the core because they require access to only the core network in area 0, the backbone. Therefore, these routers are perfect examples of how you can use summarization to reduce the size of routing tables. Only a single exit point to the core of the network exists, so you can configure stubby networks. First, use some summary commands. Example 4-18 displays R5's IP routing table.

Example 4-18. R5's Current IP Routing Table

R5#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, E - EGP
     131.108.0.0/16 is variably subnetted, 41 subnets, 2 masks
O IA    131.108.255.16/30 [110/983] via 131.108.255.9, 04:14:50, Serial0
O IA    131.108.255.20/30 [110/983] via 131.108.255.9, 04:14:50, Serial0
O IA    131.108.255.0/30 [110/128] via 131.108.255.9, 04:14:51, Serial0
O IA    131.108.255.4/30 [110/919] via 131.108.255.9, 04:14:51, Serial0
C       131.108.255.8/30 is directly connected, Serial0
O       131.108.255.12/30 [110/128] via 131.108.255.9, 04:14:51, Serial0
O IA    131.108.131.0/24 [110/993] via 131.108.255.9, 04:05:58, Serial0
O       131.108.130.0/24 [110/138] via 131.108.255.9, 04:14:51, Serial0
O IA    131.108.129.0/24 [110/993] via 131.108.255.9, 04:14:51, Serial0
C       131.108.128.0/24 is directly connected, Ethernet0
O IA    131.108.15.0/24 [110/129] via 131.108.255.9, 03:51:04, Serial0
O IA    131.108.14.0/24 [110/129] via 131.108.255.9, 03:51:04, Serial0
O IA    131.108.13.0/24 [110/129] via 131.108.255.9, 03:51:14, Serial0
O IA    131.108.12.0/24 [110/129] via 131.108.255.9, 03:51:14, Serial0
O IA    131.108.11.0/24 [110/129] via 131.108.255.9, 03:51:14, Serial0
O IA    131.108.10.0/24 [110/129] via 131.108.255.9, 03:51:14, Serial0
O IA    131.108.9.0/24 [110/129] via 131.108.255.9, 03:51:15, Serial0
O IA    131.108.8.0/24 [110/129] via 131.108.255.9, 03:51:25, Serial0
O IA    131.108.7.0/24 [110/129] via 131.108.255.9, 03:51:25, Serial0
O IA    131.108.6.0/24 [110/129] via 131.108.255.9, 03:51:25, Serial0
O IA    131.108.5.0/24 [110/129] via 131.108.255.9, 03:51:25, Serial0
O IA    131.108.4.0/24 [110/129] via 131.108.255.9, 03:51:25, Serial0
O IA    131.108.3.0/24 [110/129] via 131.108.255.9, 03:51:25, Serial0
O IA    131.108.2.0/24 [110/129] via 131.108.255.9, 03:51:35, Serial0
O IA    131.108.1.0/24 [110/138] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.31.0/24 [110/139] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.30.0/24 [110/139] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.29.0/24 [110/139] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.28.0/24 [110/139] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.27.0/24 [110/139] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.26.0/24 [110/139] via 131.108.255.9, 04:14:52, Serial0
O IA    131.108.25.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.24.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.23.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.22.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.21.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.20.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.19.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.18.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.17.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O IA    131.108.16.0/24 [110/139] via 131.108.255.9, 04:14:53, Serial0
O       131.108.36.0/24 [110/11] via 131.108.255.9, 04:14:53, Serial0
Use OSPF summarization for the core IP networks ranging from 131.108.1.0 to 131.108.31.255 on Routers R3 and R4. Example 4-19 displays the use of the IOS area area ID rang e mask command on R3.

Example 4-19. Summary on R3

R3(config)#router ospf 1
R3(config-router)#area 0 ?
  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
R3(config-router)#area 0 range 131.108.0.0 ?
  A.B.C.D  IP mask for address

R3(config-router)#area 0 range 131.108.0.0 255.255.224.0

The IOS tells you only ABRs can perform OSPF summarization. Routers R3 and R4 are ABRs; hence, you can perform network summarization on R3 and R4.
Example 4-20 displays the OSPF summary on R4.

Example 4-20. Summary on R4

R4(config)#router ospf 1
R4(config-router)#area 0 range 131.108.1.0 255.255.224.0

View the IP routing table on R5. Example 4-21 displays R5's routing table after network summarization is configured on R3 and R4. Also displayed in Example 4-21 are a few ping requests to IP networks covered in the summary range 131.108.0.0/19, which are networks covering the range 131.108.1.0 to 131.108.31.255.

Example 4-21. Summary on R5

R5#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, 11 subnets, 3 masks
O IA    131.108.255.16/30 [110/983] via 131.108.255.9, 05:09:00, Serial0
O IA    131.108.255.20/30 [110/983] via 131.108.255.9, 05:09:00, Serial0
O IA    131.108.255.0/30 [110/128] via 131.108.255.9, 05:09:00, Serial0
O IA    131.108.255.4/30 [110/919] via 131.108.255.9, 05:09:00, Serial0
C       131.108.255.8/30 is directly connected, Serial0
O       131.108.255.12/30 [110/128] via 131.108.255.9, 05:09:00, Serial0
O       131.108.36.0/24 [110/11] via 131.108.255.9, 05:14:53, Serial0
O IA    131.108.131.0/24 [110/993] via 131.108.255.9, 05:00:08, Serial0
O       131.108.130.0/24 [110/138] via 131.108.255.9, 05:09:00, Serial0
O IA    131.108.129.0/24 [110/993] via 131.108.255.9, 05:09:01, Serial0
C       131.108.128.0/24 is directly connected, Ethernet0
O IA    131.108.0.0/19 [110/129] via 131.108.255.9, 00:46:25, Serial0
R5#ping 131.108.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 131.108.1.1, timeout is 2 seconds:
!!!!! (R1 Ethernet e0/0 address)
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms
R5#ping 131.108.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 131.108.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms
R5#ping 131.108.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 131.108.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms
R5#ping 131.108.31.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 131.108.31.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/36 ms
By using a simple command on the ABRs, you have significantly reduced the IP routing table size on R5 to nine remote OSPF entries. The same occurs on Routers R6, R7, and R8.
Also because R5 and R7 have single exit points to the core, you can configure a stub network. You cannot configure a stub network on R8 because you have a virtual link. To create a stub network, use the area area id stub command. Create a stub network between Routers R3 (the ABR) and R5. Example 4-22 displays the stub configuration on R3.

Example 4-22. Stub Configuration on R3

R3(config)#router ospf  1
R3(config-router)#area 10 stub

If you attempt to configure a stub network on R4, Cisco's IOS displays the message in Example 4-23.

Example 4-23. Configuring a Stub Area

R4(config)#router ospf 1
R4(config-router)#area 10 stub

   % OSPF: Area cannot be a stub as it contains a virtual link
R4(config-router)#
You cannot create a stub between R4 and R8 because of the virtual link. So, change the area assignments on R8 to area 10 so you can create a stub.
Figure 4-5 displays the change of area assignments to remove the necessity of a virtual link between R8 and R4. To change the area assignment on R8 from 11 to 10, configure the following commands on R8:
04fig05.gif
Figure 4-5 Sample Network After R8 Area Change
no network 131.108.131.0 0.0.0.255 area 11
network 131.108.131.0 0.0.0.255 area 10

Because a change has been made to OSPF area assignment, you must ensure that OSPF is still active on R5. Example 4-24 displays R5's OSPF neighbor state after you configure the ABR R3 as a stub network in area 10.

Example 4-24. show ip ospf neighbor Command on R5

R5#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
131.108.255.13    1   DOWN/  -           -        131.108.255.9   Serial0
The OSPF relationship between R3 and R5 is down because if one router is configured as a stub, the neighboring router must also be configured as a stub, and in this case, R5 has not yet been configured as a stub. Example 4-25 displays the configuration of a stub network on R5 and the OSPF relationship change to full adjacency.

Example 4-25. Stub Configuration on R5

R5(config)#router ospf 1
R5(config-router)#area 10 stub
R5#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
131.108.255.13    1   FULL/  -        00:00:38    131.108.255.9   Serial0

Now, view the IP routing table on R5. Example 4-26 displays the new IP routing table after the stub configuration is completed on both Routers R3 and R5.

Example 4-26. R5's Routing Table

R5#sh ip route

   Gateway of last resort is 131.108.255.9 to network 0.0.0.0
     131.108.0.0/16 is variably subnetted, 10 subnets, 3 masks
O IA    131.108.255.16/30 [110/983] via 131.108.255.9, 00:01:22, Serial0
O IA    131.108.255.20/30 [110/983] via 131.108.255.9, 00:01:22, Serial0
O IA    131.108.255.0/30 [110/128] via 131.108.255.9, 00:01:22, Serial0
O IA    131.108.255.4/30 [110/919] via 131.108.255.9, 00:01:22, Serial0
C       131.108.255.8/30 is directly connected, Serial0
O       131.108.255.12/30 [110/128] via 131.108.255.9, 00:01:22, Serial0
O       131.108.36.0/24 [110/11] via 131.108.255.9, 00:01:22, Serial0
O       131.108.131.0/24 [110/128] via 131.108.255.9, 00:01:22, Serial0
O IA    131.108.131.0/24 [110/993] via 131.108.255.9, 00:01:22, Serial0
O IA    131.108.129.0/24 [110/993] via 131.108.255.9, 00:01:22, Serial0
C       131.108.128.0/24 is directly connected, Ethernet0
O IA    131.108.0.0/19 [110/129] via 131.108.255.9, 00:01:23, Serial0
O*IA 0.0.0.0/0 [110/65] via 131.108.255.9, 00:01:23, Serial0

You now have on R5 a default route labeled 0.0.0.0 through the next hop address 131.108.255.9 (R3). You have a gateway of last resort, which effectively means any packets to unknown destinations are sent to the next hop address 131.108.255.9 (R3). Configuring a stub network performs exactly this function; it provides a default route.
Now, you can assume that all IP traffic from the edge routers is destined for the core network, so there is no reason for R5 or R6 to have network entries for every individual IP route in the core. All IP traffic is destined for the core anyway. To further reduce the IP routing table, you can configure OSPF to stop the entries labeled as O IA (interarea routes) from populating the edge routers by configuring a stubby network with the no-summary option by applying the IOS area area id stub no-summary command.
This option prevents the ABR from sending summary link advertisements from other areas except the area that connects R5, area 10 in this case. To ensure OSPF full adjacency is achieved between R3, R4, R5, R6, R7, and R8, you must configure both the core and edge routers. Example 4-27 displays the configuration of the core router, R3, with the no-summary option.

Example 4-27. Preventing Summary LSAs from Other Areas

R3(config)#router ospf 1
R3(config-router)#area 10 stub no-summary

You also complete the area 10 stub no-summary on the remaining routers. Example 4-28 displays the no-summary option configured on R5.

Example 4-28. no-summary Command Option on R5

R5(config)#router ospf 1
R5(config-router)#area 10 stub no-summary

R5's routing table should now contain even fewer entries. Example 4-29 displays R5 IP routing table. View the IP routing table on R5 in Example 4-29 and compare it to Example 4-26.

Example 4-29. R5's IP Routing Table

R5#show ip route
Gateway of last resort is 131.108.255.9 to network 0.0.0.0
     131.108.0.0/16 is variably subnetted, 9 subnets, 2 masks
O       131.108.255.16/30 [110/138] via 131.108.255.9, 00:01:04, Serial0
O       131.108.255.20/30 [110/138] via 131.108.255.9, 00:01:04, Serial0
C       131.108.255.8/30 is directly connected, Serial0
O       131.108.255.12/30 [110/128] via 131.108.255.9, 00:01:04, Serial0
O       131.108.131.0/24 [110/148] via 131.108.255.9, 00:01:04, Serial0
O       131.108.130.0/24 [110/138] via 131.108.255.9, 00:01:04, Serial0
O       131.108.129.0/24 [110/148] via 131.108.255.9, 00:01:04, Serial0
C       131.108.128.0/24 is directly connected, Ethernet0
O       131.108.36.0/24 [110/74] via 131.108.255.9, 00:01:04, Serial0
O*IA 0.0.0.0/0 [110/65] via 131.108.255.9, 00:01:04, Serial0
The only networks displayed now are the default network and networks residing in the same area as Router R5, which is area 10. You now have only 8 remote entries instead of over 30, as shown in Example 4-18. The use of the stub configuration is effective in this type of network topology.
List the full OSPF working configurations of the ABR Routers R3 and R4 and the edge routers that are configured as stubby networks. Example 4-30 displays R3's OSPF configuration. The shaded portion highlights the configuration required for the stub network.

Example 4-30. R3's OSPF Working Configuration

router ospf 1
 network 131.108.255.0 0.0.0.3 area 0
 network 131.108.255.8 0.0.0.3 area 10
 network 131.108.255.12 0.0.0.3 area 10
 network 131.108.36.0 0.0.0.255 area 10
 area 0 range 131.108.0.0 255.255.224.0
 area 10 stub no-summary

Example 4-31 displays R4's full OSPF working configuration. The shaded portion highlights the configuration required for the stub network.

Example 4-31. R4's OSPF Working Configuration

router ospf 1
 area 0 range 131.108.0.0 255.255.224.0
 area 10 stub no-summary
 network 131.108.36.0 0.0.0.255 area 10
 network 131.108.255.4 0.0.0.3 area 0
 network 131.108.255.16 0.0.0.3 area 10
 network 131.108.255.20 0.0.0.3 area 10
Example 4-32 displays R5's OSPF working configuration. The shaded portion highlights the configuration required for the stub network.

Example 4-32. R5's OSPF Working Configuration

router ospf 1
 area 10 stub no-summary
 network 131.108.128.0 0.0.0.255 area 10
 network 131.108.255.4 0.0.0.3 area 10
!
Example 4-33 displays R6's OSPF working configuration. The shaded portion highlights the configuration required for the stub network.

Example 4-33. R6's OSPF Working Configuration

router ospf 1
 area 10 stub no-summary
 network 131.108.129.0 0.0.0.255 area 10
 network 131.108.255.8 0.0.0.3 area 10
Example 4-34 displays R7's OSPF working configuration. The shaded portion highlights the configuration required for the stub network.

Example 4-34. R7's OSPF Working Configuration

router ospf 1
 area 10 stub no-summary
 network 131.108.130.0 0.0.0.255 area 10
 network 131.108.255.12 0.0.0.3 area 10
Example 4-35 displays R8's OSPF working configuration. The shaded portion highlights the configuration required for the stub network.

Example 4-35. R8's OSPF Working Configuration

router ospf 1
 area 10 stub no-summary
 network 131.108.131.0 0.0.0.255 area 10
 network 131.108.255.20 0.0.0.3 area 10

No comments: