如圖所示,AR2是一個ASBR路由器,一端連接配接了OSPFv3網絡,另一端連接配接了IS-IS IPv6網絡。現要求網絡能實作三層互通
要實作OSPFv3和IS-IS IPv6網絡三層互通,就需要在彼此路由程序中互相引入對方路由,但前提要完成OSPFv3基本功能和IS-IS IPv6基本功能的配置,故可得出本示例的如下基本配置思路
① 配置各路由器的接口IPv6位址
② 配置AR1、AR2上的OSPFv3基本功能。
③ 配置AR2和AR3的IS-IS IPv6基本功能。
④ 在AR2的OSPFv3程序上配置引入IS-IS IPv6程序路由,此時檢查到AR1的OSPFv3路由表中會有IS-IS網絡中的3::/64和4::/64兩段網絡路由,但AR3上仍沒有OSPFv3網絡中的1::/64和2::/64網段路由,此時AR1和AR3仍不能互通。
⑤ 在AR2的IS-IS程序上配置引入OSPFv3程序路由,此時檢查AR3的IS-IS路由表中會有OSPFv3網絡中的1::/64和2::/64兩個 網段路由,AR1和AR3已能互通了。
1) 配置各路由器的接口IPv6位址。
【AR1路由器IPv6位址配置】
sysname AR1
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 1::1/64
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2::1/64
#
【AR2路由器IPv6位址配置】
sysname AR2
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 1::2/64
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 3::1/64
#
【AR3路由器IPv6位址配置】
sysname AR3
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 3::2/64
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 4::1/64
#
2) 配置AR1和AR2的OSPFv3基本功能,假設AR1的Router ID為1.1.1.1、AR2的Router ID為2.2.2.2,均在區域10中,均使能1号OSPFv3路由程序
【AR1路由器OSPFv3配置】
ospfv3 1
router-id 1.1.1.1
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 1::1/64
ospfv3 1 area 0.0.0.10
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2::1/64
ospf
【AR2路由器OSPFv3配置】
ospfv3 1
router-id 2.2.2.2
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 1::2/64
ospfv3 1 area 0.0.0.10
#
3) 配置AR2和AR3的IS-IS IPv6基本功能,假設AR2的系統ID為0000.0000.0002,AR3的系統ID為0000.0000.0003,均為L1類型路由器,均在區域20中,均使能1号IS-IS IPv6路由程序
【AR2路由器IS-IS IPv6配置】
isis 1
is-level level-1
network-entity 20.0000.0000.0002.00
#
ipv6 enable topology standard
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 3::1/64
isis ipv6 enable 1
#
【AR3路由器IS-IS IPv6配置】
isis 1
is-level level-1
network-entity 20.0000.0000.0003.00
#
ipv6 enable topology standard
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 3::2/64
isis ipv6 enable 1
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 4::1/64
isis ipv6 enable 1
#
【在AR1上執行display ospfv3 routing指令】會發現沒有區域20中的所有路由,【在AR3上執行display isis route指令】也麼有發現區域10中的所有路由,這是因為這連個區域運作的時不同的路由協定,預設是隔離的。
<AR1>display ospfv3 routing
Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,
N - NSSA, U - Uninstalled
OSPFv3 Process (1)
Destination Metric Next-hop
1::/64 1 directly connected, GigabitEthernet0/0/0
2::/64 1 directly connected, GigabitEthernet0/0/1
<AR1>
[R3]display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV6 Dest. ExitInterface NextHop Cost Flags
--------------------------------------------------------------------------
4::/64 GE0/0/1 Direct 10 D/L/-
3::/64 GE0/0/0 Direct 10 D/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
4) 在AR2的OSPFv3程序中配置引入IS-IS IPv6程序1的路由。假設引入後的AS外部路由的開銷值為3。
ospfv3 1
router-id 2.2.2.2
import-route isis 1
#
再在AR1上執行display ospfv3 routing指令,檢視其OSPFv3路由表資訊,會發現有區域20的路由3::/64路由了。參見輸出資訊中的輸出資訊中的粗兔子䦹,見第2類向外部路由。
<AR1>dis ospfv3 routing
Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,
N - NSSA, U - Uninstalled
OSPFv3 Process (1)
Destination Metric Next-hop
1::/64 1 directly connected, GigabitEthernet0/0/0
2::/64 1 directly connected, GigabitEthernet0/0/1
E2 3::/64 1 via FE80::2E0:FCFF:FEDD:38AF, GigabitEthernet0/0/0
E2 4::/64 1 via FE80::2E0:FCFF:FEDD:38AF, GigabitEthernet0/0/0
<AR1>R
此時雖然AR1上有連接配接在AR3上兩段路由,但兩裝置直連網段仍不能實作三層互通,此時可通過AR1上ping AR1上的3::1/64、4::1/64位址驗證。
<AR1>ping ipv6 3::1
PING 3::1 : 56 data bytes, press CTRL_C to break
Reply from 3::1 bytes=56 Sequence=1 hop limit=64 time = 30 ms Reply from 3::1 bytes=56 Sequence=2 hop limit=64 time = 20 ms Reply from 3::1 bytes=56 Sequence=3 hop limit=64 time = 30 ms Reply from 3::1 bytes=56 Sequence=4 hop limit=64 time = 20 ms Reply from 3::1 bytes=56 Sequence=5 hop limit=64 time = 20 ms
--- 3::1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/24/30 ms
<AR1>ping ipv6 4::1
PING 4::1 : 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 4::1 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
round-trip min/avg/max = 0/0/0 ms
如果在AR2的IS-IS 1好程序中也引入OSPFv3 1号程序路由(因為本執行個體中AR2和AR3均為L1路由器,是以需要向L1區域釋出,預設是向L2區域釋出的),則在AR3上也有區域10中的路由了,AR1和AR3之間就可以互相ping通了。這時因為通信時雙向的,隻要一方向另一方發送封包時找不到可用的路由就不能實作互相通信,是以兩個路由隔離的程序中,要實作互通,需要互相引入對方程序的路由。
在AR2上配置
isis 1
is-level level-1
network-entity 20.0000.0000.0002.00
#
ipv6 enable topology standard
ipv6 import-route ospfv3 1 level-1
#
<R3>dis isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV6 Dest ExitInterface NextHop Cost Flags
---------------------------------------------------------------------------
4::/64 GE0/0/1 Direct 10 D/L/-
3::/64 GE0/0/0 Direct 10 D/L/-
2::/64 GE0/0/0 FE80::2E0:FCFF:FEDD:38B0 10 A/-/-
1::/64 GE0/0/0 FE80::2E0:FCFF:FEDD:38B0 10 A/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
<AR1>ping ipv6 3::2
PING 3::2 : 56 data bytes, press CTRL_C to break
Reply from 3::2 bytes=56 Sequence=1 hop limit=63 time = 70 ms
Reply from 3::2 bytes=56 Sequence=2 hop limit=63 time = 20 ms
Reply from 3::2 bytes=56 Sequence=3 hop limit=63 time = 30 ms
Reply from 3::2 bytes=56 Sequence=4 hop limit=63 time = 30 ms
Reply from 3::2 bytes=56 Sequence=5 hop limit=63 time = 20 ms
--- 3::2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/34/70 ms
<R3>ping ipv6 2::1
PING 2::1 : 56 data bytes, press CTRL_C to break
Reply from 2::1 bytes=56 Sequence=1 hop limit=63 time = 20 ms
Reply from 2::1 bytes=56 Sequence=2 hop limit=63 time = 20 ms
Reply from 2::1 bytes=56 Sequence=3 hop limit=63 time = 40 ms
Reply from 2::1 bytes=56 Sequence=4 hop limit=63 time = 40 ms
Reply from 2::1 bytes=56 Sequence=5 hop limit=63 time = 40 ms
--- 2::1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/32/40 ms