OSPF Not So Stubby Area Lab

This lab was taken from gns3vault.com. Click here to go to the lab page.

Table of Contents

Goal:

All IP addresses have been preconfigured for you

  • Every router has a loopback interface:
    • Router Wodan: L0: 1.1.1.1 /24
    • Router Zeus: L0: 2.2.2.2 /24
    • Router Thor: L0: 3.3.3.3 /24
  1. Configure OSPF on all routers, configure the areas as specified in the topology picture.
    • Router Wodan: Loopback0 should be Area 0.
    • Router Zeus: Loopback0 should be Area 4.
  2. Area 4 has no direct connection to Area 0, solve this by using OSPF commands.
  3. Ensure you have full reachability.
  4. Configure Area 3 into a NSSA (Not so stubby area).
  5. Router Thor: add the following loopbacks:
    • Loopback1: 172.16.0.3 /24
    • Loopback2: 172.16.1.3 /24
  6. Advertise these networks into OSPF, do not use the "network" command to achieve this!
  7. Router Thor: configure a summary towards Area 0 for the 2 loopbacks you just created, make sure you do not advertise networks you do not have.
  8. Router Zeus: add the following loopbacks:
    • Loopback1: 172.16.2.2 /24
    • Loopback2: 172.16.3.2 /24
  9. Router Zeus: configure a summary towards Area 0 for the 2 loopbacks you just created, make sure you do not advertise networks you do not have.
  10. When you look in the routing table of Router Wodan you see some of the loopbacks advertised as /32's. Make sure you see the correct subnet mask that has been configured.

Topology

c4ospf4.png

Configuration

1

Zeus(config)#router ospf 1
Zeus(config-router)#network 192.168.12.2 0.0.0.0 area 2
Zeus(config-router)#network 2.2.2.2 0.0.0.0 area 4

Wodan(config)#router ospf 1
Wodan(config-router)#network 192.168.12.1 0.0.0.0 area 2
Wodan(config-router)#network 192.168.13.1 0.0.0.0 area 3
Wodan(config-router)#network 1.1.1.1 0.0.0.0 area 0

Thor(config)#router ospf 1
Thor(config-router)#network 3.3.3.3 0.0.0.0 area 3
Thor(config-router)#network 192.168.13.3 0.0.0.0 area 3

2

Area 4 needs a virtual-link to the backbone area 0 through area 2.

Zeus(config)#router ospf 1
Zeus(config-router)#area 2 virtual-link 1.1.1.1

Wodan(config)#router ospf 1
Wodan(config-router)#area 2 virtual-link 2.2.2.2

Virtual-link requires the router ID's (not the interface IP addresses) as parameters.

3

All loopbacks can ping each other:

Zeus#ping 3.3.3.3 source l0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/44/56 ms

Zeus#ping 1.1.1.1 source l0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/21/28 ms

Thor#ping 1.1.1.1 source l0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/22/32 ms

4

All routers connected to area 3 must agree that area 3 is a NSSA.

Wodan(config)#router ospf 1
Wodan(config-router)#area 3 nssa

Thor(config)#router ospf 1
Thor(config-router)#area 3 nssa

5

Thor(config)#int l0
Thor(config-if)#ip add 172.16.0.1 255.255.255.0
Thor(config)#int l1
Thor(config-if)#ip add 172.16.1.1 255.255.255.0

6

The routes must be redistributed in OSPF.

Thor(config)#router ospf 1
Thor(config-router)#redistribute connected subnets

Redistributing all connected subnets is generally a bad idea. While the exercise does not require it, I added a distribute-list to allow only the 172.16.0.0/24 and 172.16.1.0/24 subnets to be advertised.

Thor(config)#access-list 1 permit 172.16.0.0 0.0.1.255
Thor(config-router)#distribute-list 1 out

Access-list 1 is applied outbound as a distribute-list in OSPF process 1. This permits all routes matching access-list 1 to be advertised. To confirm this I also added a loopback and set it up with the IP address 172.16.2.1/24, which is not advertised to Wodan.

Wodan#sh ip route
[...]
C    192.168.12.0/24 is directly connected, Serial0/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
C    192.168.13.0/24 is directly connected, Serial0/1
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 192.168.12.2, 00:04:18, Serial0/0
     172.16.0.0/24 is subnetted, 2 subnets
O N2    172.16.0.0 [110/20] via 192.168.13.3, 00:04:18, Serial0/1
O N2    172.16.1.0 [110/20] via 192.168.13.3, 00:04:18, Serial0/1

Because area 3 is configured as a Not-so-stubby-area, it allows routes to be redistributed into OSPF from outside the OSPF domain. In this case, the two loopbacks are considered outside routes and are advertised as N2 (NSSA Type 2) routes using Type 7 LSA's.

Zeus does not see them as N2 LSA's because they are transformed into type 5 LSA's (External routes advertised by the backbone ASBR).

7

Thor is not an ABR and thus cannot do area summarization. However, the two loopbacks are redistributed into OSPF, they do not belong to an area within OSPF.
Thor can summarize external routes:

Thor(config)#router ospf 1
Thor(config-router)#summary-address 172.16.0.0 255.255.254.0

8

Zeus(config)#int l1
Zeus(config-if)#ip add 172.16.2.2 255.255.255.0
Zeus(config)#int l2
Zeus(config-if)#ip add 172.16.3.2 255.255.255.0

9

First, the routes have to be advertised into OSPF:

Zeus(config)#router ospf 1
Zeus(config-router)#network 172.16.2.2 0.0.0.0 area 4
Zeus(config-router)#network 172.16.3.2 0.0.0.0 area 4

Zeus is an ABR and can summarize area 4 routes:

Zeus(config-router)#area 4 range 172.16.2.0 255.255.254.0

Wodan now has the summarized routes:

Wodan#sh ip route
[...]
C    192.168.12.0/24 is directly connected, Serial0/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
C    192.168.13.0/24 is directly connected, Serial0/1
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 192.168.12.2, 00:07:25, Serial0/0
     172.16.0.0/23 is subnetted, 2 subnets
O N2    172.16.0.0 [110/20] via 192.168.13.3, 00:00:12, Serial0/1
O IA    172.16.2.0 [110/65] via 192.168.12.2, 00:00:17, Serial0/0

10

By default, OSPF treats loopbacks as stub hosts, advertising the with a /32 mask. The network type of the loopback interfaces must be set to something other than LOOPBACK.

Zeus(config)#int l0
Zeus(config-if)#ip ospf network point-to-point

Wodan(config)#int l0
Wodan(config-if)#ip ospf network point-to-point

The routes now have the correct mask.

Wodan#sh ip route
[...]
C    192.168.12.0/24 is directly connected, Serial0/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
C    192.168.13.0/24 is directly connected, Serial0/1
     2.0.0.0/24 is subnetted, 1 subnets
O IA    2.2.2.0 [110/65] via 192.168.12.2, 00:00:21, Serial0/0
     172.16.0.0/23 is subnetted, 2 subnets
O N2    172.16.0.0 [110/20] via 192.168.13.3, 00:00:21, Serial0/1
O IA    172.16.2.0 [110/65] via 192.168.12.2, 00:00:21, Serial0/0
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License