拓扑图如上所示,area2和area0没有直接连接,所以网络没有获得全拓扑,此时我们可以在abr上做virtual-link来讲area2和area0连接,以下是配置脚本:
encrypted-password "$1$eb9tNUWo$gYal5nxLO7VdL4n6MrNDY1"; ## SECRET-DATA
encrypted-password "$1$T5KQ/SxD$i12MFkx8PNZTgoxJ5CS5G0"; ## SECRET-DATA
virtual-link neighbor-id 10.0.0.5 transit-area 0.0.0.1;//virtual-link只能在area0里面配置,neighbor-id指对端RID,transit-area指virtual-link要通过的area
virtual-link neighbor-id 10.0.0.5 transit-area 0.0.0.1;
virtual-link neighbor-id 10.0.0.4 transit-area 0.0.0.1;
virtual-link neighbor-id 10.0.0.3 transit-area 0.0.0.1;
olive# run show ospf neighbor logical-system all
logical-system: r2
Address Interface State ID Pri Dead
10.0.4.5 em2.21 Full 10.0.0.1 128 34
10.0.4.9 em2.24 Full 10.0.0.4 128 34
-----
logical-system: r3
10.0.2.6 em3.34 Full 10.0.0.4 128 35
10.0.2.1 em3.35 Full 10.0.0.5 128 33
10.0.4.14 em3.31 Full 10.0.0.1 128 33
10.0.2.1 vl-10.0.0.5 Full 10.0.0.5 0 37
-----
logical-system: r1
10.0.4.6 em1.12 Full 10.0.0.2 128 36
10.0.4.13 em1.13 Full 10.0.0.3 128 31
-----
logical-system: r5
10.0.8.5 em5.56 Full 10.0.0.6 128 34
10.0.8.10 em5.57 Full 10.0.0.7 128 34
10.0.2.2 vl-10.0.0.3 Full 10.0.0.3 0 33
10.0.2.10 vl-10.0.0.4 Full 10.0.0.4 0 34
10.0.2.2 em5.53 Full 10.0.0.3 128 31
10.0.2.10 em5.54 Full 10.0.0.4 128 32
-----
logical-system: r4
10.0.2.5 em4.43 Full 10.0.0.3 128 39
10.0.2.9 em4.45 Full 10.0.0.5 128 37
10.0.4.10 em4.42 Full 10.0.0.2 128 35
10.0.2.9 vl-10.0.0.5 Full 10.0.0.5 0 38
-----
logical-system: r7
10.0.8.9 em7.75 Full 10.0.0.5 128 36
10.0.8.1 em7.76 Full 10.0.0.6 128 31
-----
logical-system: r6
10.0.8.6 em6.65 Full 10.0.0.5 128 34
10.0.8.2 em6.67 Full 10.0.0.7 128 33
-----
olive# run show ospf interface logical-system all
logical-system: r2
Interface State Area DR ID BDR ID Nbrs
em2.21 DR 0.0.0.2 10.0.0.2 10.0.0.1 1
em2.24 BDR 0.0.0.2 10.0.0.4 10.0.0.2 1
-----
logical-system: r3
em3.34 BDR 0.0.0.1 10.0.0.4 10.0.0.3 1
em3.35 BDR 0.0.0.1 10.0.0.5 10.0.0.3 1
em3.31 DR 0.0.0.2 10.0.0.3 10.0.0.1 1
vl-10.0.0.5 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
-----
logical-system: r1
em1.12 BDR 0.0.0.2 10.0.0.2 10.0.0.1 1
em1.13 BDR 0.0.0.2 10.0.0.3 10.0.0.1 1
-----
logical-system: r5
em5.56 BDR 0.0.0.0 10.0.0.6 10.0.0.5 1
em5.57 BDR 0.0.0.0 10.0.0.7 10.0.0.5 1
vl-10.0.0.3 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
vl-10.0.0.4 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
em5.53 DR 0.0.0.1 10.0.0.5 10.0.0.3 1
em5.54 DR 0.0.0.1 10.0.0.5 10.0.0.4 1
-----
logical-system: r4
em4.43 DR 0.0.0.1 10.0.0.4 10.0.0.3 1
em4.45 BDR 0.0.0.1 10.0.0.5 10.0.0.4 1
em4.42 DR 0.0.0.2 10.0.0.4 10.0.0.2 1
vl-10.0.0.5 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
-----
logical-system: r7
em7.75 DR 0.0.0.0 10.0.0.7 10.0.0.5 1
em7.76 DR 0.0.0.0 10.0.0.7 10.0.0.6 1
-----
logical-system: r6
em6.65 DR 0.0.0.0 10.0.0.6 10.0.0.5 1
em6.67 BDR 0.0.0.0 10.0.0.7 10.0.0.6 1