Configuring Multiarea OSPF


Routers Used: 3640 w/ NM-1FE-TX

IOS: c3640-jk9s-mz.124-16a

Objective
  • In this lab configure a multiarea OSPF operation, interarea summarization, external route
    summarization, and default routing.
Scenario
  • International Travel Agency (ITA) maintains a complex OSPF environment. The task is to optimize OSPF routing, which creates the need to design and configure multiarea OSPF on the key routers connecting Asian regional headquarters to Asterix corporate headquarters and its local sites.
Step 1
  • Build and configure the network according to the diagram, but do not configure a routing protocol yet.
    Note: Ignore the ISP cloud for now. Also, the Dion-to-Tegal networks
    192.168.240.0/24, 192.168.244.0/244, 192.168.248.0/24, and 192.168.252.0/24 will be
    configured as static routes to Null0 in Steps 5 and 6, so should be deferred until then.
  • Configure each router with the loopback address indicated in the diagram. Be sure to configure Asterix1 with additional loopbacks of Lo0, Lo1, Lo2, and Lo3. These loopback interfaces simulate the serial links to local Asterix sites: Air, Bumi, Udara, and Api.
  • Use ping to test connectivity between all interfaces. Each router should be able to ping its link partner.
Step 2
  • Configure multiarea OSPF. On Asterix1, configure FastEthernet 0/0 as a member of Area0 and all other interfaces as members of Area 1 by using the following commands:
    Asterix1(config)#router ospf 1
    Asterix1(config-router)#network 192.168.1.0 0.0.0.255 area 0
    Asterix1(config-router)#network 192.168.64.0 0.0.63.255 area 1
  • The last command conveniently enables all loopback interfaces on Asterix1 to participate in the OSPF process.
  • On Asterix3, configure E0 and Lo0 as members of Area 0, but configure Serial 1/0 as part of Area 51 as follows:
    Asterix3(config)#router ospf 1
    Asterix3(config-router)#network 192.168.1.0 0.0.0.255 area 0
    Asterix3(config-router)#network 192.168.224.0 0.0.0.3 area 51
    Asterix3(config-router)#network 192.168.3.0 0.0.0.255 area 0
  • Finally, on Dion, configure Serial 0/0 to belong to Area 51 as follows:
    Dion(config)#router ospf 1
    Dion(config-router)#network 192.168.224.0 0.0.0.3 area 51
  • Issue the show ip ospf command as follows on all three routers:
    Asterix3#sh ip ospf
    Routing Process "ospf 1" with ID 192.168.3.1
    Start time: 00:21:08.924, Time elapsed: 00:22:46.708
    Supports only single TOS(TOS0) routes
    Supports opaque LSA
    Supports Link-local Signaling (LLS)
    Supports area transit capability
    It is an area border router
    Router is not originating router-LSAs with maximum metric
    Initial SPF schedule delay 5000 msecs
    Minimum hold time between two consecutive SPFs 10000 msecs
    Maximum wait time between two consecutive SPFs 10000 msecs
    Incremental-SPF disabled
    Minimum LSA interval 5 secs
    Minimum LSA arrival 1000 msecs
    LSA group pacing timer 240 secs
    Interface flood pacing timer 33 msecs
    Retransmission pacing timer 66 msecs
    Number of external LSA 0. Checksum Sum 0x000000
    Number of opaque AS LSA 0. Checksum Sum 0x000000
    Number of DCbitless external and opaque AS LSA 0
    Number of DoNotAge external and opaque AS LSA 0
    Number of areas in this router is 2. 2 normal 0 stub 0 nssa
    Number of areas transit capable is 0
    External flood list length 0
    Area BACKBONE(0)
    Number of interfaces in this area is 2 (1 loopback)
    Area has no authentication
    SPF algorithm last executed 00:22:10.488 ago
    SPF algorithm executed 4 times
    Area ranges are
    Number of LSA 8. Checksum Sum 0x0417F3
    Number of opaque link LSA 0. Checksum Sum 0x000000
    Number of DCbitless LSA 0
    Number of indication LSA 0
    Number of DoNotAge LSA 0
    Flood list length 0
    Area 51
    Number of interfaces in this area is 1
    Area has no authentication
    SPF algorithm last executed 00:19:09.432 ago
    SPF algorithm executed 4 times
    Area ranges are
    Number of LSA 8. Checksum Sum 0x04AB35
    Number of opaque link LSA 0. Checksum Sum 0x000000
    Number of DCbitless LSA 0
    Number of indication LSA 0
    Number of DoNotAge LSA 0
    Flood list length 0
  • Area border routers connect one or more adjacent OSPF areas to the backbone area.
  • Autonomous system border routers connect external, non-OSPF, networks to the OSPF
    internetwork.
  • Issue the show ip ospf neighbor detail command on Asterix3:
    Asterix3#show ip ospf neighbor detail
    Neighbor 192.168.112.1, interface address 192.168.1.1
    In the area 0 via interface FastEthernet0/0
    Neighbor priority is 1, State is FULL, 6 state changes
    DR is 192.168.1.1 BDR is 192.168.1.3
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:32
    Neighbor is up for 00:35:57
    Index 1/1, 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
    Neighbor 192.168.224.2, interface address 192.168.224.2
    In the area 51 via interface Serial1/0
    Neighbor priority is 0, State is FULL, 6 state changes
    DR is 0.0.0.0 BDR is 0.0.0.0
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:38
    Neighbor is up for 00:32:51
    Index 1/2, 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
  • These are different types of OSPF networks. The Ethernet core network is designated as
    “broadcast”, and the WAN link between Asterix3 and Dion is designated “point-to-point”. On a point-to-point link, there is no need to elect a DR to reduce the number of adjacencies, because only two routers exist in the network. The Ethernet segment has only two routers. However, a DR and BDR are elected because neighbor routers could join the area.
Step 3
  • Check the routing table on each router. The output should show OSPF inter-area routes, which are denoted by an O and other routes denoted by an IA.
    Dion#sh 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

    192.168.224.0/30 is subnetted, 1 subnets
    C 192.168.224.0 is directly connected, Serial0/0
    192.168.64.0/32 is subnetted, 1 subnets
    O IA 192.168.64.1 [110/66] via 192.168.224.1, 01:13:52, Serial0/0
    192.168.80.0/32 is subnetted, 1 subnets
    O IA 192.168.80.1 [110/66] via 192.168.224.1, 01:13:52, Serial0/0
    192.168.96.0/32 is subnetted, 1 subnets
    O IA 192.168.96.1 [110/66] via 192.168.224.1, 01:13:52, Serial0/0
    192.168.112.0/32 is subnetted, 1 subnets
    O IA 192.168.112.1 [110/66] via 192.168.224.1, 01:13:52, Serial0/0
    O IA 192.168.1.0/24 [110/65] via 192.168.224.1, 01:13:52, Serial0/0
    192.168.3.0/32 is subnetted, 1 subnets
    O IA 192.168.3.1 [110/65] via 192.168.224.1, 01:13:52, Serial0/0
  • Check the codes listed with the routing table. Interarea routes point to networks in separate areas within the same OSPF autonomous system.
  • Verify that the routing tables are complete. Notice that Asterix1’s loopback interfaces appear in the other routing tables of other routers that have a 32-bit mask. Any route with a 32-bit mask is called a ‘host route’, because it is a route to a host, not to a network. OSPF does not advertise loopback interfaces as if they were connected to a network.
  • There should be a host route for every remote loopback advertised through OSPF.
  • Verify connectivity. From Dion, ping Asterix3’s Lo0 interface (192.168.3.1) and Asterix1’s Lo2 interface (192.168.96.1).
Step 4
  • To reduce routing table entries it is necessary to implement interarea route summarization
    throughout the internetwork. Start by configuring Asterix1 to summarize the networks for Area 1 and advertise this summary route to Area 0.
  • On Asterix1, enter the following commands to perform interarea summarization:
    Asterix1(config)#router ospf 1
    Asterix1(config-router)#area 1 range 192.168.64.0 255.255.192.0
  • When finished configuring the summary address, check the routing tables of Asterix3 and
    Dion. If the expected changes do not occur, save and reload the routers.
    Dion# sh ip route
    (output omitted)

    192.168.224.0/30 is subnetted, 1 subnets
    C 192.168.224.0 is directly connected, Serial0/0
    O IA 192.168.1.0/24 [110/65] via 192.168.224.1, 01:25:27, Serial0/0
    192.168.3.0/32 is subnetted, 1 subnets
    O IA 192.168.3.1 [110/65] via 192.168.224.1, 01:25:27, Serial0/0
    O IA 192.168.64.0/18 [110/66] via 192.168.224.1, 00:05:35, Serial0/0
  • Dion should have only one host route of 192.168.3.1/32 from Asterix3 Lo0. A host route
    points to one host. A network route points to multiple hosts in one broadcast domain. A summarized route points to a numerically contiguous series of networks.
Step 5
  • Dion must be configured to redistribute external routes from Tegal into the OSPF
    autonomous system. For the purposes of this lab, simulate the Tegal connection by configuring a static route in Dion to the Tegal LAN (192.168.248.0/24). Use the following commands:
    Dion(config)#ip route 192.168.248.0 255.255.255.0 null0
    Dion(config)#router ospf 1
    Dion(config-router)#redistribute static
  • Because the route to 192.168.248.0/24 is imaginary, null0 is used as the exit interface. The
    redistribute command imports the static route into OSPF. Routes originated from anything but OSPF are considered external to the OSPF database. By default, when Dion redistributes into Area 51, it creates and advertises Type 2 (E2) external routes using Type 5 LSAs.
  • The use of static routes to a null interface is a commonly used routing trick. Typically this technique is used to initialize or advertise a supernet route so that packets destined to an unknown subnet of a classful network are forwarded to ‘this’ router for handling. This technique is particularly useful when configuring Border Gateway Protocol (BGP).
  • Issue the show ip ospf command on Dion.
    Dion#sh ip ospf
    Routing Process "ospf 1" with ID 192.168.224.2
    Start time: 00:23:51.652, Time elapsed: 01:34:33.864
    Supports only single TOS(TOS0) routes
    Supports opaque LSA
    Supports Link-local Signaling (LLS)
    Supports area transit capability
    It is an autonomous system boundary router
    Redistributing External Routes from,
    static
    Router is not originating router-LSAs with maximum metric
    Initial SPF schedule delay 5000 msecs
    Minimum hold time between two consecutive SPFs 10000 msecs
    Maximum wait time between two consecutive SPFs 10000 msecs
    Incremental-SPF disabled
    Minimum LSA interval 5 secs
    Minimum LSA arrival 1000 msecs
    LSA group pacing timer 240 secs
    Interface flood pacing timer 33 msecs
    Retransmission pacing timer 66 msecs
    Number of external LSA 1. Checksum Sum 0x0045AC
    Number of opaque AS LSA 0. Checksum Sum 0x000000
    Number of DCbitless external and opaque AS LSA 0
    Number of DoNotAge external and opaque AS LSA 0
    Number of areas in this router is 1. 1 normal 0 stub 0 nssa
    Number of areas transit capable is 0
    External flood list length 0
    Area 51
    Number of interfaces in this area is 1
    Area has no authentication
    SPF algorithm last executed 00:02:18.184 ago
    SPF algorithm executed 3 times
    Area ranges are
    Number of LSA 5. Checksum Sum 0x02AA64
    Number of opaque link LSA 0. Checksum Sum 0x000000
    Number of DCbitless LSA 0
    Number of indication LSA 0
    Number of DoNotAge LSA 0
    Flood list length 0
  • Recall that ASBRs connect external networks to the OSPF autonomous system.
  • Now check the routing table of Asterix1. The routing table should have an E2 route to
    192.168.248.0/24.
    Asterix1#sh ip route
    (output omitted)

    192.168.224.0/30 is subnetted, 1 subnets
    O IA 192.168.224.0 [110/65] via 192.168.1.3, 00:16:06, FastEthernet0/0
    C 192.168.64.0/24 is directly connected, Loopback0
    C 192.168.80.0/24 is directly connected, Loopback1
    10.0.0.0/30 is subnetted, 1 subnets
    C 10.0.0.4 is directly connected, Loopback5
    C 192.168.96.0/24 is directly connected, Loopback2
    O E2 192.168.248.0/24 [110/20] via 192.168.1.3, 00:04:36, FastEthernet0/0
    C 192.168.112.0/24 is directly connected, Loopback3
    C 192.168.1.0/24 is directly connected, FastEthernet0/0
    192.168.3.0/32 is subnetted, 1 subnets
    O 192.168.3.1 [110/2] via 192.168.1.3, 00:16:06, FastEthernet0/0
    O 192.168.64.0/18 is a summary, 00:16:06, Null0
  • Check the routing table of Asterix3. This router should also have the external route.
  • Asterix1 and Asterix3 should have the same cost. This might be surprising, because Asterix1 has an additional network to traverse.
  • A second link to the external network is about to come online. If the network is designed so that OSPF routers can have multiple external routes to the same destination, consider using Type 1 (E1) external routes. Type 2 (E2) external routes have static metrics throughout the OSPF autonomous system (AS). Type 1 routes consider metrics internal and external to the AS for accurate route selection when multiple external routes exist. The decision is made that Dion should advertise external routes as Type 1 (E1). To configure Type 1, use the following commands on Dion:
    Dion(config)#router ospf 1
    Dion(config-router)#redistribute static metric-type 1
  • After reconfiguring Dion, check Asterix3’s table again. Asterix3’s route to 192.168.248.0/24 should now be Serial 1/0.
  • Typically, the cost of a route increases with every hop. Type2 (E2) routes ignore internal OSPF metrics. Type1 (E1) routes accumulate costs while being produced through the OSPF AS. With one exit point for the AS, Type2 (E2) routes might be adequate.
Step 6
  • Over time, notice that as the Tegal office grows, many more Type 1, or FastEthernet 0/1, networks are propagated through the internetwork. To optimize the internetwork by reducing the routing table size, implement Classless Interdomain Routing (CIDR) to advertise all Tegal networks with one route. Create routes to these Tegal networks with three more static routes as follows:
    Dion(config)#ip route 192.168.240.0 255.255.255.0 null0
    Dion(config)#ip route 192.168.244.0 255.255.255.0 null0
    Dion(config)#ip route 192.168.252.0 255.255.255.0 null0
  • Configure Dion to advertise all Tegal networks with a summary route:
    Dion(config)#router ospf 1
    Dion(config-router)#sum
    Dion(config-router)#summary-address 192.168.240.0 255.255.240.0
  • After configuring the summary, check the routing tables on Asterix1 and Asterix3. Both routers should receive and install the supernet route, 192.168.240.0/20.
    Note: On routers with very large routing tables the command show ip route supernet will show only aggregate routes.
    Asterix3#show ip route
    (output omitted)
    192.168.224.0/30 is subnetted, 1 subnets
    C 192.168.224.0 is directly connected, Serial1/0
    C 192.168.1.0/24 is directly connected, FastEthernet0/0
    C 192.168.3.0/24 is directly connected, Loopback0
    O E1 192.168.240.0/20 [110/84] via 192.168.224.2, 00:15:32, Serial1/0
    O IA 192.168.64.0/18 [110/2] via 192.168.1.1, 00:41:40, FastEthernet0/0

    Asterix1#show ip route supernet
    (output omitted)
    O E1 192.168.240.0/20 [110/85] via 192.168.1.3, 00:20:58, FastEthernet0/0
    O 192.168.64.0/18 is a summary, 00:58:30, Null0
  • Is 192.168.248.0/24 still in Asterix1 or Asterix3’s routing table? It should not be present because 192.168.248.0/24 is included in the range 192.168.240.0/20.
  • Internet connectivity is by way of ISP through Asterix1. The link is not active yet, but OSPF is configured in advance. Simulate the link with a loopback interface as follows:
    Asterix1(config)#interface lo5
    Asterix1(config-if)#ip address 10.0.0.6 255.255.255.252
  • Use the following commands to create and advertise a default route on Asterix1:
    Asterix1(config)#router ospf 1
    Asterix1(config-router)#default-information originate always
  • The always keyword instructs OSPF to advertise the default route whether or not the router has one in the routing table. In this case, the router will install a gateway of last resort as displayed in the output. Check the routing tables on Asterix3 and Dion. Both should now have a default route of 0.0.0.0/0.
    Asterix3#show ip route
    (output omitted)

    Gateway of last resort is 192.168.1.1 to network 0.0.0.0

    192.168.224.0/30 is subnetted, 1 subnets
    C 192.168.224.0 is directly connected, Serial1/0
    C 192.168.1.0/24 is directly connected, FastEthernet0/0
    C 192.168.3.0/24 is directly connected, Loopback0
    O*E2 0.0.0.0/0 [110/1] via 192.168.1.1, 00:01:28, FastEthernet0/0
    O E1 192.168.240.0/20 [110/84] via 192.168.224.2, 00:01:28, Serial1/0
    O IA 192.168.64.0/18 [110/2] via 192.168.1.1, 00:01:28, FastEthernet0/0
  • The default route is considered External Type2 (E2). The default cost of one (1) will be retained throughout the autonomous system.
  • Verify that default routing is working by asking Dion to ping a host that is not represented in its routing table. From Dion, ping 10.0.0.6. If the default route is working, Dion should receive replies. Troubleshoot, if necessary.
Download

Popular posts from this blog

Examining the DR/BDR Election Process

Cisco binary image unpacker

How to find Cisco IOS with Google