OSPF Virtual Link

Virtual links make it possible to have an area not directly connected to area 0. But, it’s recommended that you redesign your network as soon as possible to connect each non-backbone area to area 0.


Virtual links depend on router-id, that’s why it’s a good idea to set your router-id manually through the router-id command. Because this type of router-id doesn’t change except you change it to another value manually, difference from the active loopback or physical interface which may accidentally change the OSPF router id if you activate another interface which has a higher ip address than the existing one.







To configure a virtual link, go to the ABRs, R2 and R3 in the case above and go to the OSPF process configuration level and use the following command


area AREA-NUMBER virtual-link ROUTER-ID



AREA-NUMBER: the area number that both routers reside in. In the picture above, because both R2 and R3 reside in area 1, the AREA-NUMBER here should be 1..


ROUTER-ID: router-id of the other ABR that you want to associate a virtual link with.


That command should be used at both routers (both ABRs) that need to be associated with a virtual link, in this case a virtual link is needed between R2 and R3.


The virtual link makes R3 believe that it’s directly connected to area 0.


The virtual link command actually creates a tunnel between both routers, in a CCIE lab, you might be asked to create a virtual link without using the virtual-link command.


Let's try to configure virtual link based on the case above. At this point, I have configured the interfaces and OSPF at all three routers in the picture. R3 have loopback interfaces which reside on network 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24 and all routers are running OSPF process number 10. R1 is configured with router id of 1.1.1.1, R2 is configured with router id of 2.2.2.2 and R3 is configured with router id of 3.3.3.3. But, I haven't configure a virtual link between R2 and R3. Here's the configuration of all 3 routers.





At this point, R1 doesn't have the routes to the 172.16.0.0/16 networks behind R3, However R3 have a route to network 192.168.0.0/24 which is the R1-R2 link.







Let's configure a virtual link between R2 and R3. As shown above, the configuration is simple. First we connect to R2, go to the OSPF process number 10 configuration level and enter the command "area 1 virtual-link 3.3.3.3" and at R3 go to the OSPF process number 10 configuration level and enter the command "area 1 virtual-link 2.2.2.2". Now, if we connect to R1 and do the "show ip route" command, we will see routes to 172.16.0.0/16 networks.





You can also do the "show ip ospf neighbor" command at R2 or R3 and see that they are connected through the OSPF_VL0 interface.





0 comments:

top