Lab 5 - OSPF Full Lab
Lab 5 - OSPF Full Lab
In this lab you will configure the OSPF routing protocol. IP addresses have
already been configured on the router interfaces.
Lab Topology
On routers R1 to R5:
R1(config)#interface loopback0
R1(config-if)#ip address 192.168.0.1 255.255.255.255
2) Enable single area OSPF on routers R1 to R5. Ensure all networks except
172.16.0.0/24 and 203.0.113.0/24 are advertised.
On routers R1 to R5:
R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#network 192.168.0.0 0.0.0.255 area 0
You can use different network statements, as long as they cover the range of IP
addresses configured on the router interfaces.
3) What do you expect the OSPF Router ID to be on R1? Verify this.
R1#sh ip protocols
*** IP Routing is NSF aware ***
R1#sh ip route
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
+ - replicated route, % - next hop override
6) Set the reference bandwidth so that a 100 Gbps interface will have a cost of 1.
R1(config)#router ospf 1
R1(config-router)#auto-cost reference-bandwidth 100000
7) What will the OSPF cost be on the FastEthernet links? Verify this.
8) What effect does this have on the cost to the 10.1.2.0/24 network from R1?
R1#sh ip route
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
+ - replicated route, % - next hop override
R1#sh ip route
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
+ - replicated route, % - next hop override
9) There are two possible paths which R1 could use to reach the 10.1.2.0/24
network – either through R2 or R5. Which route is in the routing table?
R1#sh ip route
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
+ - replicated route, % - next hop override
10) Change this so that traffic from R1 to 10.1.2.0/24 will be load balanced via both
R2 and R5.
Since we changed the reference bandwidth, all interfaces have a cost of 1000. The
current path from R1 > R5 > R4 has a cost of 3000 (the cost of the destination
interface itself is also counted in the total cost).
R1(config)#int f1/1
R1(config-if)#ip ospf cost 1500
R5(config)#int f0/0
R5(config-if)# ip ospf cos 150
t 0
R5(config)#int f0/1
R5(config-if)# ip ospf cos 150
t 0
R4(config)#int f1/0
R4(config-if)# ip ospf cos 150
t 0
11) Verify that traffic to the 10.1.2.0/24 network from R1 is load balanced via both
R2 and R5.
R1#sh ip route
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
+ - replicated route, % - next hop override
The 203.0.113.0/24 network must be added to the OSPF process on R4, and
interface FastEthernet 1/1 facing the service provider configured as a passive
interface to avoid sending out internal network information.
R4(config)#router ospf 1
R4(config-router)#passive-interface f1/1
R4(config-router)#network 203.0.113.0 0.0.0.255 area 0
R1#sh ip route
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
+ - replicated route, % - next hop override
15) Ensure that routers R1 to R5 learn via OSPF how to reach the Internet.
R4(config)#router ospf 1
R4(config-router)#default-information originate
R1#sh ip route
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
+ - replicated route, % - next hop override
17) Convert the network to use multi-area OSPF. R3 and R4 should be backbone
routers, R1 a normal router in Area 1, and R2 and R5 ABRs as shown in the
diagram below.
Save your changes to the startup config and reboot the routers to ensure the
changes take effect.
R5
R3 and R4 require no change as all their interfaces are already in Area 0. R1’s
R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 1
R1(config-router)#network 192.168.0.0 0.0.0.255 area 1
R1#copy run start
R1#reload
R2 interface FastEthernet 0/1 should remain in Area 0. FastEthernet 0/0 needs to be
reconfigured to be in Area 1. I used a 10.0.0.0/8 network statement originally so I need
to remove that and add more granular statements.
R2(config)#router ospf 1
R2(config-router)#no network 10.0.0.0 0.255.255.255 area 0
R2(config-router)#network 10.1.0.0 0.0.0.255 area 0
R2(config-router)#network 10.0.0.0 0.0.0.255 area 1
R2#copy run start
R2#reload
R5(config)#router ospf 1
R5(config-router)#no network 10.0.0.0 0.255.255.255 area 0
R5(config-router)#network 10.1.3.0 0.0.0.255 area 0
R5(config-router)#network 10.0.3.0 0.0.0.255 area 1
R5#copy run start
R5#reload
18) Verify the router’s interfaces are in the correct areas.
The networks beyond R2 and R5 will appear as Inter Area routes (apart from the
default route which will appear as an external route as it was redistributed into OSPF).
R1#sh ip route
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
+ - replicated route, % - next hop override
21) Do you see less routes in R1’s routing table? Why or why not?
R1 has the same amount of routes in its routing table because OSPF does not perform
automatic summarisation. You must configure manual summarisation to reduce the
size of the routing table.
22) Configure summary routes on the Area Border Routers for the 10.0.0.0/16 and
10.1.0.0/16 networks.
R2(config)#router ospf 1
R2(config-router)#area 0 range 10.1.0.0 255.255.0.0
R2(config-router)#area 1 range 10.0.0.0 255.255.0.0
R5(config-if)#router ospf 1
R5(config-router)#area 0 range 10.1.0.0 255.255.0.0
R5(config-router)#area 1 range 10.0.0.0 255.255.0.0
23) Verify R1 now sees a single summary route for 10.1.0.0/16 rather than
individual routes for the 10.1.x.x networks.
R1#sh ip route
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
+ - replicated route, % - next hop override
We configured the link from R1 to R5 to have a higher cost than the link from R1 to R2
earlier.
On routers R6 to R9:
R6(config)#interface loopback0
R6(config-if)#ip address 192.168.0.6 255.255.255.255
27) Enable OSPF for Area 0 on the Loopback 0 and FastEthernet 0/0
interfaces on routers R6 to R9.
On routers R6 to R9:
R1(config)#router ospf 1
R1(config-router)#network 172.16.0.0 0.0.0.255 area 0
R1(config-router)# network 192.168.0.0 0.0.0.255 area 0
You can use different network statements, as long as they cover the range of IP
addresses configured on the router interfaces.
28) Set the reference bandwidth on routers R6 to R9 so that a 100 Gbps
interface will have a cost of 1.
R6(config)#router ospf 1
R6(config-router)#auto-cost reference-bandwidth 100000
29) Which routers do you expect to be the DR and BDR on the Ethernet
segment? Verify this.
OSPF priority has not been set so all routers will have the default of 1.
R9 and R8 will be elected as the DR and BDR respectively because the have the highest
Router IDs (because they have the highest IP addresses on their loopback interfaces).
R6(config)#interface FastEthernet0/0
R6(config-if)#ip ospf priority 100
R6(config-if)#end
R6#clear ip ospf process
Page
21