Sunday, September 4, 2016

configure ospf virtual link on packettracer

virtual link is the way that make the ospf networks that does not directly connect to backbone area (area 0) works.

- for example
you have area 0 and area 1 directly connect to it, and the area 2 that directly connect to area 1 but not area 0. so if we don't configure virtual link the area 2 won't able to join the network.

- diagram



1- ospf configuration on all the routers
- router2
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 2.0.0.0 0.255.255.255 area 0
network 1.0.0.0 0.255.255.255 area 0


-router0
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 1 virtual-link 3.3.3.3
network 2.0.0.0 0.255.255.255 area 0

network 3.0.0.0 0.255.255.255 area 1


-router1
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
area 1 virtual-link 2.2.2.2

network 3.0.0.0 0.255.255.255 area 1

network 4.0.0.0 0.255.255.255 area 2


 -router3
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
network 4.0.0.0 0.255.255.255 area 2
network 5.0.0.0 0.255.255.255 area 2


 2- show ip route on router2 and router3
 -router2
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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

Gateway of last resort is not set

C 1.0.0.0/8 is directly connected, FastEthernet0/0
C 2.0.0.0/8 is directly connected, Serial2/0
O IA 3.0.0.0/8 [110/128] via 2.2.2.2, 00:07:36, Serial2/0
O IA 4.0.0.0/8 [110/192] via 2.2.2.2, 00:07:26, Serial2/0
O IA 5.0.0.0/8 [110/193] via 2.2.2.2, 00:07:26, Serial2/0

- router3
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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

Gateway of last resort is not set

O IA 1.0.0.0/8 [110/193] via 4.4.4.1, 00:07:37, Serial2/0
O IA 2.0.0.0/8 [110/192] via 4.4.4.1, 00:07:37, Serial2/0
O IA 3.0.0.0/8 [110/128] via 4.4.4.1, 00:08:02, Serial2/0
C 4.0.0.0/8 is directly connected, Serial2/0
C 5.0.0.0/8 is directly connected, FastEthernet0/0



you can get the pkt file with the following link

No comments:

Post a Comment