Juniper Junos OS OSPF Virtual Links
NOTE: All configurations were taken from a lab environment.
Adding the OSPF Configuration to mxA# & mxC# Routers
mxA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[edit protocols ospf]
lab@mxA# show | compare
[edit protocols ospf]
+ area 0.0.0.0 {
+ interface lo0.0;
+ interface ge-0/0/0.0;
+ }
+ area 0.0.0.20 {
+ interface ge-0/0/1.0;
+ }
+ area 0.0.0.10 {
+ nssa {
+ default-lsa default-metric 10;
+ }
+ interface ge-0/0/3.0;
+ }
[edit protocols ospf]
lab@mxA# show | display set
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.20 interface ge-0/0/1.0
set protocols ospf area 0.0.0.10 nssa default-lsa default-metric 10
set protocols ospf area 0.0.0.10 interface ge-0/0/3.0
[edit protocols ospf]
lab@mxA#
mxC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[edit protocols ospf]
lab@mxC# show | compare
[edit protocols ospf]
+ area 0.0.0.0 {
+ interface lo0.0;
+ interface ge-0/0/0.0;
+ }
+ area 0.0.0.20 {
+ interface ge-0/0/1.0;
+ }
+ area 0.0.0.10 {
+ nssa {
+ default-lsa default-metric 10;
+ }
+ interface ge-0/0/3.0;
+ }
[edit protocols ospf]
lab@mxC# show | display set
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.20 interface ge-0/0/1.0
set protocols ospf area 0.0.0.10 nssa default-lsa default-metric 10
set protocols ospf area 0.0.0.10 interface ge-0/0/3.0
[edit protocols ospf]
lab@mxC#
OSPF interface and neighborship status
mxA
show ospf interface
1
2
3
4
5
6
7
8
9
10
[edit protocols ospf]
lab@mxA# run show ospf interface
Interface State Area DR ID BDR ID Nbrs
ge-0/0/0.0 BDR 0.0.0.0 172.31.100.1 172.16.1.1 1
lo0.0 DR 0.0.0.0 172.16.1.1 0.0.0.0 0
ge-0/0/3.0 BDR 0.0.0.10 172.16.1.2 172.16.1.1 1
ge-0/0/1.0 BDR 0.0.0.20 172.31.101.1 172.16.1.1 1
[edit protocols ospf]
lab@mxA#
show ospf neighbor
1
2
3
4
5
6
7
8
9
[edit protocols ospf]
lab@mxA# run show ospf neighbor
Address Interface State ID Pri Dead
172.22.121.2 ge-0/0/0.0 Full 172.31.100.1 128 37
10.0.10.2 ge-0/0/3.0 Full 172.16.1.2 128 31
172.22.123.2 ge-0/0/1.0 Full 172.31.101.1 128 34
[edit protocols ospf]
lab@mxA#
mxC
show ospf interface
1
2
3
4
5
6
7
8
9
10
[edit protocols ospf]
lab@mxC# run show ospf interface
Interface State Area DR ID BDR ID Nbrs
ge-0/0/0.0 BDR 0.0.0.0 172.31.100.1 172.16.2.1 1
lo0.0 DR 0.0.0.0 172.16.2.1 0.0.0.0 0
ge-0/0/3.0 BDR 0.0.0.10 172.16.2.2 172.16.2.1 1
ge-0/0/1.0 BDR 0.0.0.20 172.31.101.1 172.16.2.1 1
[edit protocols ospf]
lab@mxC#
show ospf neighbor
1
2
3
4
5
6
7
8
9
[edit protocols ospf]
lab@mxC# run show ospf neighbor
Address Interface State ID Pri Dead
172.22.122.2 ge-0/0/0.0 Full 172.31.100.1 128 33
10.0.20.2 ge-0/0/3.0 Full 172.16.2.2 128 37
172.22.124.2 ge-0/0/1.0 Full 172.31.101.1 128 36
[edit protocols ospf]
lab@mxC#
Adding the OSPF Virtual Link Configuration
mxA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[edit protocols ospf]
lab@mxA# set area 0 virtual-link transit-area 20 neighbor-id 172.16.2.1
[edit protocols ospf]
lab@mxA# show | compare
[edit protocols ospf area 0.0.0.0]
+ virtual-link neighbor-id 172.16.2.1 transit-area 0.0.0.20;
[edit protocols ospf]
lab@mxA# show | display set
set protocols ospf area 0.0.0.0 virtual-link neighbor-id 172.16.2.1 transit-area 0.0.0.20
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.20 interface ge-0/0/1.0
set protocols ospf area 0.0.0.10 nssa default-lsa default-metric 10
set protocols ospf area 0.0.0.10 interface ge-0/0/3.0
[edit protocols ospf]
lab@mxA# commit
commit complete
[edit protocols ospf]
lab@mxA#
mxC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[edit protocols ospf]
lab@mxC# set area 0 virtual-link transit-area 20 neighbor-id 172.16.1.1
[edit protocols ospf]
lab@mxC# show | compare
[edit protocols ospf area 0.0.0.0]
+ virtual-link neighbor-id 172.16.1.1 transit-area 0.0.0.20;
[edit protocols ospf]
lab@mxC# show | display set
set protocols ospf area 0.0.0.0 virtual-link neighbor-id 172.16.1.1 transit-area 0.0.0.20
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.20 interface ge-0/0/1.0
set protocols ospf area 0.0.0.10 nssa default-lsa default-metric 10
set protocols ospf area 0.0.0.10 interface ge-0/0/3.0
[edit protocols ospf]
lab@mxC#
OSPF interface and neighborship status with Virtual Link configuration
mxA
show ospf interface
1
2
3
4
5
6
7
8
9
10
11
[edit protocols ospf]
lab@mxA# run show ospf interface
Interface State Area DR ID BDR ID Nbrs
ge-0/0/0.0 BDR 0.0.0.0 172.31.100.1 172.16.1.1 1
lo0.0 DR 0.0.0.0 172.16.1.1 0.0.0.0 0
vl-172.16.2.1 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
ge-0/0/3.0 BDR 0.0.0.10 172.16.1.2 172.16.1.1 1
ge-0/0/1.0 BDR 0.0.0.20 172.31.101.1 172.16.1.1 1
[edit protocols ospf]
lab@mxA#
show ospf neighbor
1
2
3
4
5
6
7
8
9
10
[edit protocols ospf]
lab@mxA# run show ospf neighbor
Address Interface State ID Pri Dead
172.22.121.2 ge-0/0/0.0 Full 172.31.100.1 128 30
172.22.124.1 vl-172.16.2.1 Full 172.16.2.1 0 33
10.0.10.2 ge-0/0/3.0 Full 172.16.1.2 128 39
172.22.123.2 ge-0/0/1.0 Full 172.31.101.1 128 38
[edit protocols ospf]
lab@mxA#
mxC
show ospf interface
1
2
3
4
5
6
7
8
9
10
11
[edit protocols ospf]
lab@mxC# run show ospf interface
Interface State Area DR ID BDR ID Nbrs
ge-0/0/0.0 BDR 0.0.0.0 172.31.100.1 172.16.2.1 1
lo0.0 DR 0.0.0.0 172.16.2.1 0.0.0.0 0
vl-172.16.1.1 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
ge-0/0/3.0 BDR 0.0.0.10 172.16.2.2 172.16.2.1 1
ge-0/0/1.0 BDR 0.0.0.20 172.31.101.1 172.16.2.1 1
[edit protocols ospf]
lab@mxC#
show ospf neighbor
1
2
3
4
5
6
7
8
9
10
[edit protocols ospf]
lab@mxC# run show ospf neighbor
Address Interface State ID Pri Dead
172.22.122.2 ge-0/0/0.0 Full 172.31.100.1 128 37
172.22.123.1 vl-172.16.1.1 Full 172.16.1.1 0 39
10.0.20.2 ge-0/0/3.0 Full 172.16.2.2 128 38
172.22.124.2 ge-0/0/1.0 Full 172.31.101.1 128 39
[edit protocols ospf]
lab@mxC#
Change on Route Table example on mxC
Before Virtual Link
1
2
3
4
5
6
7
8
9
10
11
[edit protocols ospf]
lab@mxC# run show route 172.16.1.1
inet.0: 23 destinations, 23 routes (23 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.1.1/32 *[OSPF/10] 00:01:32, metric 2
> to 172.22.122.2 via ge-0/0/0.0
[edit protocols ospf]
lab@mxC#
After Virtual Link
1
2
3
4
5
6
7
8
9
10
11
12
[edit protocols ospf]
lab@mxC# run show route 172.16.1.1
inet.0: 23 destinations, 23 routes (23 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.1.1/32 *[OSPF/10] 00:00:56, metric 2
to 172.22.122.2 via ge-0/0/0.0
> to 172.22.124.2 via ge-0/0/1.0
[edit protocols ospf]
lab@mxC#
This post is licensed under CC BY 4.0 by the author.