Note: You must perform Lab 0 for loading the initial configurations before starting this lab.
● Configure OSPF in area 0 between R7 and R9.
● Create Loopback161 on R7 and R9 with IP addressing in the format of 161.1.Y.Y/24, where Y is the router number.
✓ Advertise these Loopbacks into OSPF area 0.
● Create Loopback171 on R7 and R9 with IP addressing in the format of 171.1.Y.Y/24, where Y is the router number.
✓ Advertise these Loopbacks into OSPF area 0.
✓ Use a OSPF network type of point-to-point.
Configurations
R7:
!
enable
configure terminal
!
interface GigabitEthernet0/2
ip ospf 1 area 0
!
interface Loopback161
ip address 161.1.7.7 255.255.255.0
ip ospf 1 area 0
!
interface Loopback171
ip address 171.1.7.7 255.255.255.0
ip ospf 1 area 0
ip ospf network point-to-point
!
end
!
write
!
R9:
!
enable
configure terminal
!
interface GigabitEthernet0/0
ip ospf 1 area 0
!
interface Loopback161
ip address 161.1.9.9 255.255.255.0
ip ospf 1 area 0
!
interface Loopback171
ip address 171.1.9.9 255.255.255.0
ip ospf 1 area 0
ip ospf network point-to-point
!
end
!
write
!
Verifications
OSPF network type Loopback is a special case that is used for Loopback and looped-back interfaces. Similar to point-to-multipoint, an interface running network type Loopback is advertised as a stub endpoint instead of a transit subnet. The result of this network type that we see in our configuration is that when the Loopback161 interfaces of these devices are advertised into OSPF, they appear in the routing table as /32 host routes instead of the actual subnet mask of /24.
Because network type for Loopback171 interfaces has been changed, these are correctly advertised with their subnet mask:
R7#show ip route ospf
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
161.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
O 161.1.9.9/32 [110/2] via 177.1.79.9, 00:00:04, GigabitEthernet0/2
171.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
O 171.1.9.0/24 [110/2] via 177.1.79.9, 00:00:04, GigabitEthernet0/2
R9#show ip route ospf
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
161.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
O 161.1.7.7/32 [110/2] via 177.1.79.7, 00:00:39, GigabitEthernet0/0
171.1.0.0/16 is variably subnetted, 3 subnets, 2 masks
O 171.1.7.0/24 [110/2] via 177.1.79.7, 00:00:39, GigabitEthernet0/0
Verify how these Loopbacks appear in the OPSF database, for example on R7:
R7#show ip ospf database router self-originate
OSPF Router with ID (177.1.7.7) (Process ID 1)
Router Link States (Area 0)
LS age: 59
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 177.1.7.7
Advertising Router: 177.1.7.7
LS Seq Number: 80000005
Checksum: 0x2FE3
Length: 60
Number of Links: 3
Link connected to: a Stub Network
(Link ID) Network/subnet number: 161.1.7.7
(Link Data) Network Mask: 255.255.255.255
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 171.1.7.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 177.1.79.9
(Link Data) Router Interface address: 177.1.79.7
Number of MTID metrics: 0
Verify the OSPF network types for the two Loopbacks:
R7#show ip ospf interface loopback 161
Loopback161 is up, line protocol is up
Internet Address 161.1.7.7/24, Area 0, Attached via Interface Enable
Process ID 1, Router ID 177.1.7.7, Network Type LOOPBACK, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Enabled by interface config, including secondary ip addresses
Loopback interface is treated as a stub Host
R7#show ip ospf interface loopback 171
Loopback171 is up, line protocol is up
Internet Address 171.1.7.7/24, Area 0, Attached via Interface Enable
Process ID 1, Router ID 177.1.7.7, Network Type POINT_TO_POINT, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Enabled by interface config, including secondary ip addresses