配置公网IPv6 FRR功能示例
通过配置公网IPv6 FRR,主链路故障时,流量可以快速切换到备份链路。
配置思路
采用如下的思路配置公网IPv6 FRR功能:
在DeviceT、DeviceA和DeviceC上使能OSPFv3基本功能。
在DeviceT、DeviceB和DeviceC上使能IPv6 IS-IS基本功能。
在DeviceT上使能公网IPv6 FRR功能,查看备份出接口和备份下一跳的信息。
IPv6 FRR去使能后,查看备份出接口和备份下一跳的信息。
数据准备
为完成此配置例,需准备如下的数据:
DeviceT、DeviceA和DeviceC各自的OSPFv3进程号(进程号为1)。
DeviceT、DeviceB和DeviceC的IPv6 IS-IS区域地址。
操作步骤
- 配置各接口的IPv6地址,请参见配置文件
- 在DeviceT、DeviceA和DeviceC上配置OSPFv3,请参见配置文件
- 在DeviceT、DeviceB和DeviceC上配置IPv6 IS-IS,请参见配置文件
- 查看路由信息
# 在DeviceT上查看到目的地址是2001:db8:20::1的路由信息。
<DeviceT> display ipv6 routing-table 2001:db8:20::1 64 verbose
Routing Table : _public_ Summary Count : 2 Destination : 2001:db8:20:: PrefixLength : 64 NextHop : 2001:db8:200::2 Preference : 10 Neighbour : :: ProcessID : 1 Label : NULL Protocol : OSPFv3 State : Active Adv Cost : 3 Entry ID : 0 EntryFlags : 0x00000000 Reference Cnt: 0 Tag : 0 IndirectID : 0x69 Age : 269sec RelayNextHop : :: TunnelID : 0x0 Interface : gigabitethernet 0/2/0 Flags : D Destination : 2001:db8:20:: PrefixLength : 64 NextHop : 2001:db8:100::2 Preference : 15 Neighbour : :: ProcessID : 1 Label : NULL Protocol : ISIS State : Inactive Adv Cost : 30 Entry ID : 0 EntryFlags : 0x00000000 Reference Cnt: 0 Tag : 0 IndirectID : 0xb5 Age : 201sec RelayNextHop : :: TunnelID : 0x0 Interface : gigabitethernet 0/3/0 Flags : 0
从路由表中可以看到:到达目的地址2001:db8:20::1/64有两条路由,其下一跳为2001:db8:200::2的路由是最优路由(因为OSPFv3路由的优先级比IPv6 IS-IS路由的优先级高一些)。
- 使能公网IPv6 FRR功能
# 在DeviceT上使能IPv6 FRR功能。
[~DeviceT] ipv6 frr
[*DeviceT] commit
# 在DeviceT上查看备份出接口和备份下一跳信息。
<DeviceT> display ipv6 routing-table 2001:db8:20::1 64 verbose
Routing Table : _public_ Summary Count : 2 Destination : 2001:db8:20:: PrefixLength : 64 NextHop : 2001:db8:200::2 Preference : 10 Neighbour : :: ProcessID : 1 Label : NULL Protocol : OSPFv3 State : Active Adv Cost : 3 Entry ID : 0 EntryFlags : 0x00000000 Reference Cnt: 0 Tag : 0 IndirectID : 0x69 Age : 553sec RelayNextHop : :: TunnelID : 0x0 Interface : gigabitethernet 0/2/0 Flags : D BkNextHop : 2001:db8:100::2 BkInterface : gigabitethernet 0/3/0 BkLabel : NULL BkTunnelID : 0x0 BkPETunnelID : 0x0 BkIndirectID : 0xb5 Destination : 2001:db8:20:: PrefixLength : 64 NextHop : 2001:db8:100::2 Preference : 15 Neighbour : :: ProcessID : 1 Label : NULL Protocol : ISIS State : Inactive Adv Cost : 30 Entry ID : 0 EntryFlags : 0x00000000 Reference Cnt: 0 Tag : 0 IndirectID : 0xb5 Age : 485sec RelayNextHop : :: TunnelID : 0x0 Interface : gigabitethernet 0/3/0 Flags : 0
从路由表中可以看到:到达目的地址2001:db8:20::1/64的路由有备份出接口和备份下一跳(IS-IS路由成为了备份路由)。
- 检查配置结果
# 在DeviceT上模拟链路故障。
[~DeviceT] interface gigabitethernet 0/2/0
[~DeviceT-GigabitEthernet0/2/0] shutdown
[*DeviceT-GigabitEthernet0/2/0] commit
[~DeviceT-GigabitEthernet0/2/0] quit
# 在DeviceT上,查看到达2001:db8:20::1/64的路由信息。
<DeviceT> display ipv6 routing-table 2001:db8:20::1 64 verbose
Routing Table : _public_ Summary Count : 1 Destination : 2001:db8:20:: PrefixLength : 64 NextHop : 2001:db8:100:2 Preference : 15 Neighbour : :: ProcessID : 1 Label : NULL Protocol : ISIS State : Active Adv Cost : 30 Entry ID : 0 EntryFlags : 0x00000000 Reference Cnt: 0 Tag : 0 IndirectID : 0xb5 Age : 1279sec RelayNextHop : :: TunnelID : 0x0 Interface : gigabitethernet 0/3/0 Flags : D
从路由表中可以看到,当链路A故障时,转发路径快速切换到链路B上。
配置文件
DeviceT的配置文件
#
sysname DeviceT
#
ipv6 frr
#
isis 1
is-level level-1
ipv6 enable topology standard
network-entity 10.0000.0000.0001.00
#
ospfv3 1
router-id 1.1.1.1
area 0.0.0.0
area 0.0.0.1
#
interface GigabitEthernet0/1/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:10::1/64
ospfv3 1 area 0.0.0.1
isis ipv6 enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:200::1/64
ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/3/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:100::1/64
isis enable 1
isis ipv6 enable 1
return
DeviceA的配置文件
#
sysname DeviceA
#
ospfv3 1
router-id 2.2.2.2
area 0.0.0.0
#
interface GigabitEthernet0/1/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:200::2/64
ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/2/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:201::2/64
ospfv3 1 area 0.0.0.0
return
DeviceB的配置文件
#
sysname DeviceB
#
isis 1
is-level level-1
ipv6 enable topology standard
network-entity 10.0000.0000.0002.00
#
interface GigabitEthernet0/1/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:100::2/64
isis ipv6 enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:101::2/64
isis ipv6 enable 1
#
return
DeviceC的配置文件
#
sysname DeviceC
#
isis 1
is-level level-1
ipv6 enable topology standard
network-entity 10.0000.0000.0003.00
#
ospfv3 1
router-id 1.1.1.1
area 0.0.0.0
area 0.0.0.2
#
interface GigabitEthernet0/1/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:20::1/64
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:201::1/64
ospfv3 1 area 0.0.0.2
#
interface GigabitEthernet0/3/0
undo shutdown
ipv6 enable
ipv6 address 2001:db8:101::1/64
isis enable 1
isis ipv6 enable 1
#
return