Advanced OSPF Lab2
Advanced OSPF Lab2
Advanced OSPF Lab2
Advanced OSPF
lab2 for
CCNP Students
By
Eng. Abeer Hosni
OSPF Lab2:
R1(config)#int s1/0
R1(config-if)#ip address 172.12.123.1 255.255.255.0
R1(config-if)#encapsulation frame-relay
R1(config-if)#no frame-relay inverse-arp
R1(config-if)#frame-relay map ip 172.12.123.2 102 broadcast
R1(config-if)#frame-relay map ip 172.12.123.3 103 broadcast
R1(config-if)#no shutdown
R1(config-if)#int loop 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R2(config)#int s1/0
R2(config-if)#ip address 172.12.123.2 255.255.255.0
R2(config-if)#encapsulation frame-relay
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#frame-relay map ip 172.12.123.1 201
R2(config-if)#frame-relay map ip 172.12.123.3 201
R2(config-if)#no shutdown
R2(config-if)#int loop 2
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R3(config)#int s1/0
R3(config-if)#ip address 172.12.123.3 255.255.255.0
R3(config-if)#encapsulation frame-relay
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#frame-relay map ip 172.12.123.1 301
R3(config-if)#frame-relay map ip 172.12.123.2 301
R3(config-if)#no shutdown
R3(config-if)#int loop 3
R3(config-if)#ip address 3.3.3.3 255.255.255.255
To run OSPF:
R1(config)#router ospf 1
R1(config-router)#network 172.12.123.1 0.0.0.0 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 1
R2(config)#router ospf 1
R2(config-router)#network 172.12.123.2 0.0.0.0 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 2
R3(config)#router ospf 1
R3(config-router)#network 172.12.123.3 0.0.0.0 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 3
But the adjacency doesn't come up, so we will have to build the neighbor relationship manually:
R1(config)#router ospf 1
R1(config-router)#neighbor 172.12.123.2
R1(config-router)#neighbor 172.12.123.3
*Mar 1 00:26:19.895: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial1/0 from
LOADING to FULL, Loading Done
*Mar 1 00:26:20.283: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial1/0 from
LOADING to FULL, Loading Done
R2(config)#int s1/0
R2(config-if)#ip ospf priority 0
R3(config)#int s1/0
R3(config-if)#ip ospf priority 0
R2#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/88/244 ms
Point-to-point configurations:
R1(config)#in s1/1
R1(config-if)#ip address 172.12.13.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#router ospf 1
R1(config-router)#network 172.12.13.1 0.0.0.0 area 13
R3(config)#int s0/1
R3(config-if)#ip address 172.12.13.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#router ospf 1
R3(config-router)#network 172.12.13.2 0.0.0.0 area 13
Notice that R1 can see his neighbor R3 two times, one using the frame relay cloud and the other
using the point to point interface. And there is no mention for the DR or BDR routers.
R3(config)#int f0/0
R3(config-if)#ip address 172.12.34.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#router ospf 1
R3(config-router)#network 172.12.34.3 0.0.0.0 area 34
R4(config)#int f0/0
R4(config-if)#ip address 172.12.34.4 255.255.255.0
R4(config-if)#no shutdown
R4(config)#int loop 4
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#router ospf 1
R4(config-router)#network 172.12.34.4 0.0.0.0 area 34
R4(config-router)#network 4.4.4.4 0.0.0.0 area 4
R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/88/164 ms
R1(config)#int f0/0
R1(config-if)#ip address 15.0.0.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 15.0.0.0
R5(config)#int f0/0
R5(config-if)#ip address 15.0.0.5 255.255.255.0
R5(config-if)#no shutdown
R5(config)#int loop 5
R5(config-if)#ip address 5.1.1.1 255.255.255.0
R5(config-if)#int loop 6
R5(config-if)#ip address 6.1.1.1 255.255.255.0
R5(config-if)#int loop 7
R5(config-if)#ip address 7.1.1.1 255.255.255.0
R5(config-if)#router rip
R5(config-router)#version 2
R5(config-router)#no auto-summary
R5(config-router)#network 15.0.0.0
R5(config-router)#network 5.0.0.0
R5(config-router)#network 6.0.0.0
R5(config-router)#network 7.0.0.0
We will run redistribution so that the RIP network can see the OSPF network and vice versa.
R1(config)#router ospf 1
R1(config-router)#redistribute rip subnets
R1(config)#router rip.
R1(config-router)#redistribute ospf 1 metric 2
R5#show ip route
<Output omitted>
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/2] via 15.0.0.1, 00:00:00, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/2] via 15.0.0.1, 00:00:00, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/2] via 15.0.0.1, 00:00:00, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
R 4.4.4.4 [120/2] via 15.0.0.1, 00:00:00, FastEthernet0/0
5.0.0.0/24 is subnetted, 1 subnets
C 5.1.1.0 is directly connected, Loopback5
6.0.0.0/24 is subnetted, 1 subnets
C 6.1.1.0 is directly connected, Loopback6
172.12.0.0/24 is subnetted, 3 subnets
R 172.12.34.0 [120/2] via 15.0.0.1, 00:00:03, FastEthernet0/0
R172.12.13.0 [120/2] via 15.0.0.1, 00:00:03, FastEthernet0/0
R172.12.123.0 [120/2] via 15.0.0.1, 00:00:03, FastEthernet0/0
7.0.0.0/24 is subnetted, 1 subnets
C7.1.1.0 is directly connected, Loopback7
15.0.0.0/24 is subnetted, 1 subnets
C15.0.0.0 is directly connected, FastEthernet0/0
R4#show ip route
<Output omitted>
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/75] via 172.12.34.3, 00:15:17, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/75] via 172.12.34.3, 00:15:17, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/11] via 172.12.34.3, 00:17:14, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback4
5.0.0.0/24 is subnetted, 1 subnets
O E2 5.1.1.0 [110/20] via 172.12.34.3, 00:04:18, FastEthernet0/0
6.0.0.0/24 is subnetted, 1 subnets
O E2 6.1.1.0 [110/20] via 172.12.34.3, 00:04:18, FastEthernet0/0
172.12.0.0/24 is subnetted, 3 subnets
C 172.12.34.0 is directly connected, FastEthernet0/0
O IA 172.12.13.0 [110/74] via 172.12.34.3, 00:17:39, FastEthernet0/0
O 172.12.123.0 [110/74] via 172.12.34.3, 00:15:42, FastEthernet0/0
7.0.0.0/24 is subnetted, 1 subnets
O E2 7.1.1.0 [110/20] via 172.12.34.3, 00:04:43, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
O E2 15.0.0.0 [110/20] via 172.12.34.3, 00:04:43, FastEthernet0/0
Summarization Configuration:
In some situations, the area cannot be a stubby area or a totally stubby area like the
backbone area and the transit. So we will configure summarization in a different way.
R1(config)#int loop 8
R1(config-if)#ip address 8.0.0.1 255.255.255.0
R1(config-if)#int loop 9
R1(config-if)#ip address 9.0.0.1 255.255.255.0
R1(config-if)#int loop 10
R1(config-if)#ip address 10.0.0.1 255.255.255.0
R1(config-if)#int loop 11
R1(config-if)#ip address 11.0.0.1 255.255.255.0
R1(config-if)#router ospf 1
R1(config-router)#network 8.0.0.1 0.0.0.0 area 1
R1(config-router)#network 9.0.0.1 0.0.0.0 area 1
R1(config-router)#network 10.0.0.1 0.0.0.0 area 1
R1(config-router)#network 11.0.0.1 0.0.0.0 area 1
R1(config)#router ospf 1
R1(config-router)#area 1 range 8.0.0.0 252.0.0.0
Another way to summarize from an external network to the OSPF network is the
summary-address command:
R1(config)#router ospf 1
R1(config-router)#summary-address 4.0.0.0 252.0.0.0
R3#ping 5.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 116/145/184 ms
Best Wishes
Abeer