You are on page 1of 16

Virtual –link in OSPF –

As we have already discussed that In OSPF must have one area is called area 0 and all the areas
must be connected to area 0. However, it may be difficult for some reason to physically connect
an area to the backbone area (Area 0). In such a scenario we will have to use virtual links
because it is not possible for any organization to take any dedicated leased line because it will
be more costly. With using virtual links we can connect the backbone area which is not directly
connected to backbone area.

. There are two methods to provide logical connection to the backbone area.

1. Virtual link
2. GRE tunnel

But here we will discuss to virtual link in OSPF. The following things are to be remembered.

1. Virtual links are used to connect Discontinuous area to backbone area.


2. Area through which the virtual link is configured known as transit area must have full
routing information.
3. Virtual link must be establish between two router (ABRs) that share a common area and
one of them must be connected to the Backbone area.
4. Router use DNA (DO not age) bit so periodic re-flooding (30minute) will not occurs over
this virtual link.
5. Transit area can’t be a stub area.
6. Transit area means who work between area 0 and any regular area, we use virtual-links
over transits area
7. The area through which you configure the virtual link, known as a transit area, must
have full routing information. The transit area cannot be a stub area. This document
examines the OSPF database in a virtual link environment.

Note – Virtual –link is used for non backbone area that is not directly connected with backbone
area (Area 0).

A virtual link is not a physical link. It is a logical link using the least cost path between the ABR
of the non-backbone connected area and the backbone ABR of the transit area. A virtual
adjacency across the virtual link is formed, and routing information is exchanged.

Now let’s understand below the topology.


Primary configuration on all routers –

R1#show run | section ospf


router ospf 100
router-id 1.1.1.1
log-adjacency-changes
network 10.1.1.0 0.0.0.3 area 0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
R1#
R2#show run | section ospf
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 10.1.1.0 0.0.0.3 area 0
network 20.1.1.0 0.0.0.3 area 1
R2#
R3#show run | section ospf
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 20.1.1.0 0.0.0.3 area 1
network 30.1.1.0 0.0.0.3 area 1
R3#
4#show run | section ospf
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
network 30.1.1.0 0.0.0.3 area 1
network 40.1.1.0 0.0.0.3 area 2
R4#
R5#show run | section ospf
router ospf 100
router-id 5.5.5.5
log-adjacency-changes
network 40.1.1.0 0.0.0.3 area 2
network 192.168.3.0 0.0.0.255 area 2
network 192.168.4.0 0.0.0.255 area 2
R5#

Now I’m going to configure virtual links on R2 & R4 router as you can see in the topology R4 is not
directly connected to Backbone area (Area 0).

➢ R2(config)#router ospf 100


➢ R2(config-router)#no area 1 virtual-link 4.4.4.4
➢ R4(config)#router ospf 100
➢ R4(config-router)#no area 1 virtual-link 2.2.2.2

But before configure above command on R2 & R2 router let’s enable debug command on the router.

➢ R2#debug ip ospf adj


➢ R2#debug ip ospf adj

Now lets check debug out.

On Router 2 debug output-


ON Router4 debug output-

R2 Router Packet capture-


R4 Router – packet capture

Virtual links - Hello suppressed

R2#show ip ospf virtual-links


R4#show ip ospf virtual-links

Database of R2 router –

R2#show ip ospf database

OSPF Router with ID (2.2.2.2) (Process ID 100)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

1.1.1.1 1.1.1.1 392 0x80000008 0x00A965 3

2.2.2.2 2.2.2.2 505 0x80000009 0x00D5ED 2

4.4.4.4 4.4.4.4 1 (DNA) 0x80000005 0x00AA36 1

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

10.1.1.2 2.2.2.2 505 0x80000002 0x001802


Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

20.1.1.0 2.2.2.2 505 0x80000004 0x0023FA

20.1.1.0 4.4.4.4 6 (DNA) 0x80000001 0x00F621

30.1.1.0 2.2.2.2 505 0x80000004 0x00AA68

30.1.1.0 4.4.4.4 6 (DNA) 0x80000001 0x006AA4

40.1.1.0 4.4.4.4 6 (DNA) 0x80000001 0x00E71D

192.168.3.1 4.4.4.4 6 (DNA) 0x80000001 0x004875

192.168.4.1 4.4.4.4 6 (DNA) 0x80000001 0x003D7F

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count

2.2.2.2 2.2.2.2 505 0x80000007 0x000CDC 1

3.3.3.3 3.3.3.3 492 0x80000007 0x00DDB3 2

4.4.4.4 4.4.4.4 497 0x80000009 0x00328F 1

Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

20.1.1.2 3.3.3.3 492 0x80000004 0x00C73A

30.1.1.2 4.4.4.4 497 0x80000004 0x007B70


Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

10.1.1.0 2.2.2.2 505 0x80000004 0x00A582

40.1.1.0 4.4.4.4 497 0x80000002 0x00E51E

192.168.1.1 2.2.2.2 505 0x80000002 0x00982E

192.168.2.1 2.2.2.2 505 0x80000002 0x008D38

192.168.3.1 4.4.4.4 497 0x80000002 0x004676

192.168.4.1 4.4.4.4 498 0x80000002 0x003B80

R2#

Database of R4 router –

R4#show ip ospf database

OSPF Router with ID (4.4.4.4) (Process ID 100)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

1.1.1.1 1.1.1.1 37 (DNA) 0x80000007 0x00AB64 3

2.2.2.2 2.2.2.2 1 (DNA) 0x80000008 0x00D7EC 2

4.4.4.4 4.4.4.4 613 0x80000006 0x00A837 1

Net Link States (Area 0)


Link ID ADV Router Age Seq# Checksum

10.1.1.2 2.2.2.2 45 (DNA) 0x80000001 0x001A01

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

20.1.1.0 2.2.2.2 192 (DNA) 0x80000003 0x0025F9

20.1.1.0 4.4.4.4 613 0x80000002 0x00F422

30.1.1.0 2.2.2.2 192 (DNA) 0x80000003 0x00AC67

30.1.1.0 4.4.4.4 613 0x80000002 0x0068A5

40.1.1.0 4.4.4.4 613 0x80000002 0x00E51E

192.168.3.1 4.4.4.4 613 0x80000002 0x004676

192.168.4.1 4.4.4.4 613 0x80000002 0x003B80

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count

2.2.2.2 2.2.2.2 625 0x80000007 0x000CDC 1

3.3.3.3 3.3.3.3 610 0x80000007 0x00DDB3 2

4.4.4.4 4.4.4.4 613 0x80000009 0x00328F 1

Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

20.1.1.2 3.3.3.3 610 0x80000004 0x00C73A


30.1.1.2 4.4.4.4 613 0x80000004 0x007B70

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

10.1.1.0 2.2.2.2 625 0x80000004 0x00A582

40.1.1.0 4.4.4.4 613 0x80000002 0x00E51E

192.168.1.1 2.2.2.2 625 0x80000002 0x00982E

192.168.2.1 2.2.2.2 625 0x80000002 0x008D38

192.168.3.1 4.4.4.4 613 0x80000002 0x004676

192.168.4.1 4.4.4.4 613 0x80000002 0x003B80

Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count

4.4.4.4 4.4.4.4 613 0x80000008 0x00C4EF 1

5.5.5.5 5.5.5.5 798 0x80000007 0x007E31 3

Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum

40.1.1.1 4.4.4.4 613 0x80000002 0x006B71

Summary Net Link States (Area 2)


Link ID ADV Router Age Seq# Checksum

10.1.1.0 4.4.4.4 613 0x80000002 0x00819E

20.1.1.0 4.4.4.4 613 0x80000002 0x00F422

30.1.1.0 4.4.4.4 613 0x80000002 0x0068A5

192.168.1.1 4.4.4.4 613 0x80000002 0x00704C

192.168.2.1 4.4.4.4 613 0x80000002 0x006556

R4#

Database of R1 router –

R1#show ip ospf virtual-links

R1#show ip os

R1#show ip ospf dat

R1#show ip ospf database

OSPF Router with ID (1.1.1.1) (Process ID 100)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

1.1.1.1 1.1.1.1 617 0x80000008 0x00A965 3

2.2.2.2 2.2.2.2 732 0x80000009 0x00D5ED 2

4.4.4.4 4.4.4.4 2 (DNA) 0x80000005 0x00AA36 1

Net Link States (Area 0)


Link ID ADV Router Age Seq# Checksum

10.1.1.2 2.2.2.2 732 0x80000002 0x001802

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

20.1.1.0 2.2.2.2 732 0x80000004 0x0023FA

20.1.1.0 4.4.4.4 7 (DNA) 0x80000001 0x00F621

30.1.1.0 2.2.2.2 732 0x80000004 0x00AA68

30.1.1.0 4.4.4.4 7 (DNA) 0x80000001 0x006AA4

40.1.1.0 4.4.4.4 7 (DNA) 0x80000001 0x00E71D

192.168.3.1 4.4.4.4 7 (DNA) 0x80000001 0x004875

192.168.4.1 4.4.4.4 7 (DNA) 0x80000001 0x003D7F

R1#

Database of R5 Router –

R5#show ip ospf database

OSPF Router with ID (5.5.5.5) (Process ID 100)

Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count

4.4.4.4 4.4.4.4 806 0x80000008 0x00C4EF 1

5.5.5.5 5.5.5.5 988 0x80000007 0x007E31 3


Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum

40.1.1.1 4.4.4.4 806 0x80000002 0x006B71

Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum

10.1.1.0 4.4.4.4 806 0x80000002 0x00819E

20.1.1.0 4.4.4.4 806 0x80000002 0x00F422

30.1.1.0 4.4.4.4 806 0x80000002 0x0068A5

192.168.1.1 4.4.4.4 806 0x80000002 0x00704C

192.168.2.1 4.4.4.4 806 0x80000002 0x006556

R5#

Database of R3 router –

R3#show ip ospf database

OSPF Router with ID (3.3.3.3) (Process ID 100)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count

2.2.2.2 2.2.2.2 858 0x80000007 0x000CDC 1

3.3.3.3 3.3.3.3 843 0x80000007 0x00DDB3 2


4.4.4.4 4.4.4.4 848 0x80000009 0x00328F 1

Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

20.1.1.2 3.3.3.3 843 0x80000004 0x00C73A

30.1.1.2 4.4.4.4 848 0x80000004 0x007B70

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum

10.1.1.0 2.2.2.2 858 0x80000004 0x00A582

40.1.1.0 4.4.4.4 848 0x80000002 0x00E51E

192.168.1.1 2.2.2.2 858 0x80000002 0x00982E

192.168.2.1 2.2.2.2 858 0x80000002 0x008D38

192.168.3.1 4.4.4.4 848 0x80000002 0x004676

192.168.4.1 4.4.4.4 848 0x80000002 0x003B80

R3#

Lets check ping & trace route output on R1 & R5 router.

R1#ping 192.168.4.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 52/64/76 ms


R1#traceroute 192.168.4.1

Type escape sequence to abort.

Tracing the route to 192.168.4.1

1 10.1.1.2 8 msec 4 msec 40 msec

2 20.1.1.2 24 msec 32 msec 40 msec

3 30.1.1.2 72 msec 76 msec 52 msec

4 40.1.1.2 100 msec 48 msec 64 msec

R1#

R5#ping 192.168.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 60/64/68 ms

R5#traceroute 192.168.1.1

Type escape sequence to abort.

Tracing the route to 192.168.1.1

1 40.1.1.1 24 msec 20 msec 20 msec

2 30.1.1.1 48 msec 16 msec 32 msec

3 20.1.1.1 76 msec 64 msec 64 msec

4 10.1.1.1 96 msec 84 msec 52 msec

R5#
You can use below command to verify it –

➢ R2#show ip protocols
➢ R2#show ip ospf interface br
➢ R2#show ip ospf virtual-links
➢ R2#show ip ospf database
➢ R2#show ip ospf border-routers
➢ R2#show ip ospf database router 2.2.2.2
➢ R2#show ip ospf

Please note that I have designed this topology as per my understanding, request you to please like,
share comment with your connection.

Thank you

Umesh Prajapati

You might also like