Lab 5-3: OSPF

«« Previous
Next »»

Your are tasked with configuring the network shown in Figure 5-15 with OSPF such that:

1. All interfaces on every router is added in OSPF.
2. Router IDs for each router should be:
RouterA – 1.1.1.1
RouterB – 2.2.2.2
RouterC – 3.3.3.3
RouterD – 4.4.4.4
RouterE – 5.5.5.5
3. Any networks created for item 2 on this list should not be advertised in OSPF
4. Router E never becomes the DR/BDR in the 192.1.1.8/29 network segment
5. Router D is always the DR in in the 192.1.1.8/28 network segment
6. RouterE should use RouterC to reach 172.1.1.0/16 network. The other path should be used for backup only.
7. Remember that the DCE side of your DTE/DCE back to back cable should be connected to the interface configured with clock rate.

Figure 5-15 Network for Lab 5-3

Lab 5-3: OSPF, Cisco Tutorials and Materials, Cisco Guides, Cisco Certifications

The initial configuration of the routers is shown below:

RouterA

Router(config)#hostname RouterA
RouterA(config)#interface fa0/0
RouterA(config-if)#ip address 172.1.0.1 255.255.0.0
RouterA(config-if)#no shut
RouterA(config-if)#exit
RouterA(config)#interface s0/0
RouterA(config-if)#ip address 192.168.1.1 255.255.255.252
RouterA(config-if)#clock rate 2000000
RouterA(config-if)#no shut
RouterA(config-if)#exit
RouterA(config)#interface s0/1
RouterA(config-if)#ip address 192.168.1.5 255.255.255.252
RouterA(config-if)#clock rate 2000000
RouterA(config-if)#no shut
RouterA(config-if)#exit

RouterB

Router(config)#hostname RouterB
RouterB(config)#interface s0/0
RouterB(config-if)#ip address 192.168.1.2 255.255.255.252
RouterB(config-if)#no shut
RouterB(config-if)#exit
RouterB(config)#interface fa0/0
RouterB(config-if)#ip address 192.168.1.9 255.255.255.248
RouterB(config-if)#no shut
RouterB(config-if)#exit

RouterC

Router(config)#hostname RouterC
RouterC(config)#interface s0/0
RouterC(config-if)#ip address 192.168.1.6 255.255.255.252
RouterC(config-if)#no shut
RouterC(config-if)#exit
RouterC(config)#interface fa0/0
RouterC(config-if)#ip address 192.168.1.10 255.255.255.248
RouterC(config-if)#no shut
RouterC(config-if)#exit

RouterD

Router(config)#hostname RouterD
RouterD(config)#interface fa0/0
RouterD(config-if)#ip address 192.168.1.11 255.255.255.248
RouterD(config-if)#no shut
RouterD(config-if)#exit
RouterD(config)#interface fa0/1
RouterD(config-if)#ip address 172.2.0.1 255.255.0.0
RouterD(config-if)#no shut
RouterD(config-if)#exit

RouterE


Router(config)#hostname RouterE
RouterE(config)#interface fa0/0
RouterE(config-if)#ip address 192.168.1.12 255.255.255.248
RouterE(config-if)#no shut
RouterE(config-if)#exit
RouterE(config)#interface fa0/1
RouterE(config-if)#ip address 172.3.0.1 255.255.0.0
RouterE(config-if)#no shut
RouterE(config-if)#exit

Solution

Before configuring OSPF globally, configure RouterE with an OSPF priority of 0 and RouterD with a priority of 10 to complete item 4 and 5 in the list. Configuring these before adding networks in OSPF will ensure that DR/BDR is influence at the first go without having to restart OSPF process later.

RouterE(config)#int fa0/0
RouterE(config-if)#ip ospf priority 0

RouterD(config)#int fa0/0
RouterD(config-if)#ip ospf priority 10

Next, configure a loopback interface on each router to change the Router ID as given in item 1 in the list:

RouterA(config)#int loopback0
RouterA(config-if)#ip address 1.1.1.1 255.255.255.0

RouterB(config)#int loopback0
RouterB(config-if)#ip address 2.2.2.2 255.255.255.0

RouterC(config)#int loopback0
RouterC(config-if)#ip address 3.3.3.3 255.255.255.0

RouterD(config)#int loopback0
RouterD(config-if)#ip address 4.4.4.4 255.255.255.0

RouterE(config)#int loopback0
RouterE(config-if)#ip address 5.5.5.5 255.255.255.0

Next, configure OSPF on all routers as shown below. Remember not to use 0.0.0.0 255.255.255.255 to advertise networks since loopback interfaces should not be advertised as per item number 3 in the list.

RouterA(config)#router ospf 1
RouterA(config-router)#network 172.1.0.1 0.0.0.0 area 0
RouterA(config-router)#network 192.1.1.0 0.0.0.255 area 0
RouterA(config-router)#end

RouterB(config)#router ospf 1
RouterB(config-router)#network 192.1.1.2 0.0.0.0 area 0
RouterB(config-router)#network 192.1.1.9 0.0.0.0 area 1
RouterB(config-router)#end

RouterC(config)#router ospf 1
RouterC(config-router)#network 192.1.1.6 0.0.0.0 area 0
RouterC(config-router)#network 192.1.1.10 0.0.0.0 area 1
RouterC(config-router)#end

RouterD(config)#router ospf 1
RouterD(config-router)#network 192.1.1.11 0.0.0.0 area 1
RouterD(config-router)#network 172.2.0.1 0.0.0.0 area 1
RouterD(config-router)#end

RouterE(config)#router ospf 1
RouterE(config-router)#network 192.1.1.12 0.0.0.0 area 1
RouterE(config-router)#network 172.3.0.1 0.0.0.0 area 1
RouterE(config-router)#end

Since RouterE has two equal cost paths to reach the 172.1.0.0/16 network, it will load balance across them. To disable load balancing, the cost needs to be changed as shown below:

RouterB(config)#int s0/0
RouterB(config-if)#ip ospf cost 80
RouterB(config-if)#end

Verification

To verify the solution, first take a look at the routing table of each router in the network:

RouterA#sh ip route
–output truncated—

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
C 172.1.0.0/16 is directly connected, FastEthernet0/0
O IA 172.2.0.0/16 [110/84] via 192.1.1.6, 00:06:30, Serial0/1
[110/84] via 192.1.1.2, 00:01:42, Serial0/0
172.3.0.0/24 is subnetted, 1 subnets
O IA 172.3.0.0 [110/84] via 192.1.1.6, 00:06:30, Serial0/1
[110/84] via 192.1.1.2, 00:01:42, Serial0/0
192.1.1.0/24 is variably subnetted, 3 subnets, 2 masks
C 192.1.1.0/30 is directly connected, Serial0/0
C 192.1.1.4/30 is directly connected, Serial0/1
O IA 192.1.1.8/29 [110/74] via 192.1.1.6, 00:07:03, Serial0/1
[110/74] via 192.1.1.2, 00:01:42, Serial0/0
RouterB#sh ip route
–output truncated—

Gateway of last resort is not set

2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
O 172.1.0.0/16 [110/90] via 192.1.1.1, 00:00:59, Serial0/0
O 172.2.0.0/16 [110/20] via 192.1.1.11, 00:01:51, FastEthernet0/0
172.3.0.0/24 is subnetted, 1 subnets
O 172.3.0.0 [110/20] via 192.1.1.12, 00:01:51, FastEthernet0/0
192.1.1.0/24 is variably subnetted, 3 subnets, 2 masks
C 192.1.1.0/30 is directly connected, Serial0/0
192.1.1.4/30 [110/144] via 192.1.1.1, 00:00:59, Serial0/0
C 192.1.1.8/29 is directly connected, FastEthernet0/0
RouterC#sh ip route
–output truncated–

Gateway of last resort is not set

3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
O 172.1.0.0/16 [110/74] via 192.1.1.5, 00:07:27, Serial0/0
O 172.2.0.0/16 [110/20] via 192.1.1.11, 00:06:47, FastEthernet0/0
172.3.0.0/24 is subnetted, 1 subnets
O 172.3.0.0 [110/20] via 192.1.1.12, 00:06:47, FastEthernet0/0
192.1.1.0/24 is variably subnetted, 3 subnets, 2 masks
O 192.1.1.0/30 [110/128] via 192.1.1.5, 00:07:27, Serial0/0
C 192.1.1.4/30 is directly connected, Serial0/0
C 192.1.1.8/29 is directly connected, FastEthernet0/0
RouterD#sh ip route
–output truncated—

Gateway of last resort is not set

4.0.0.0/24 is subnetted, 1 subnets
C 4.4.4.0 is directly connected, Loopback0
O IA 172.1.0.0/16 [110/84] via 192.1.1.10, 00:01:16, FastEthernet0/0
C 172.2.0.0/16 is directly connected, FastEthernet0/1
172.3.0.0/24 is subnetted, 1 subnets
O 172.3.0.0 [110/20] via 192.1.1.12, 00:08:33, FastEthernet0/0
192.1.1.0/24 is variably subnetted, 3 subnets, 2 masks
O IA 192.1.1.0/30 [110/90] via 192.1.1.9, 00:01:16, FastEthernet0/0
O IA 192.1.1.4/30 [110/74] via 192.1.1.10, 00:06:56, FastEthernet0/0
C 192.1.1.8/29 is directly connected, FastEthernet0/0
RouterE#sh ip route
–output truncated–

Gateway of last resort is not set

5.0.0.0/24 is subnetted, 1 subnets
C 5.5.5.0 is directly connected, Loopback0
O IA 172.1.0.0/16 [110/84] via 192.1.1.10, 00:01:25, FastEthernet0/0
O 172.2.0.0/16 [110/20] via 192.1.1.11, 00:08:42, FastEthernet0/0
172.3.0.0/24 is subnetted, 1 subnets
C 172.3.0.0 is directly connected, FastEthernet0/1
192.1.1.0/24 is variably subnetted, 3 subnets, 2 masks
O IA 192.1.1.0/30 [110/90] via 192.1.1.9, 00:01:25, FastEthernet0/0
O IA 192.1.1.4/30 [110/74] via 192.1.1.10, 00:07:05, FastEthernet0/0
C 192.1.1.8/29 is directly connected, FastEthernet0/0

In the above output notice the following:

1. All networks are seen across the internetwork
2. Loopback networks are not advertised across the network
3. RouterE has a route towards 172.1.0.0/16 network through 192.1.1.10 (RouterC)

Next, verify the DR/BDR election in the Ethernet segment by looking at the neighbor table on RouterE:

RouterE#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 2WAY/DROTHER 00:00:39 192.1.1.9 FastEthernet0/0
3.3.3.3 1 FULL/BDR 00:00:31 192.1.1.10 FastEthernet0/0
4.4.4.4 10 FULL/DR 00:00:31 192.1.1.11 FastEthernet0/0

Notice that the RouterID of every router is as listed in item 2 of the list and that the RouterD is the DR.

Finally, ping the 172.1.0.0/16 network from RouterE to confirm that routing is working properly:

RouterE#ping 172.1.0.1 source fa0/1

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

«« Previous
Next »»

0 comments:

Post a Comment