配置IPv6浮动静态路由
配置IPv6浮动静态路由,可以实现路由备份,提高网络可靠性。
应用环境
为已经存在路由的某一目的地址再配置一条优先级较低的静态路由,可以起到路由备份的作用,提高网络可靠性。这条优先级较低的静态路由称为浮动静态路由,只有当主路由不可用时该静态路由才会被激活,承担数据转发业务;在主路由恢复正常后,该静态路由又变为不活跃状态,数据转发业务仍然由主路由承担。
浮动静态路由主要应用在以下两方面:
为到达同一目的地址的两条静态路由指定不同的优先级,优先级较低的静态路由将成为备份路由。
为已存在动态路由的目的地址再配置一条优先级较低的静态路由,当该动态路由协议重启时,该静态路由将取代暂时不可用的动态路由承担数据转发业务。
操作步骤
- 执行命令system-view,进入系统视图。
- 配置IPv6浮动静态路由。
- 在公网中配置IPv6浮动静态路由:执行命令ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance vpn-destination-name [ nexthop-ipv6-address ] | nexthop-ipv6-address } [ preference preference | tag tag ]* [ description text ]
- 在私网中配置IPv6浮动静态路由:执行命令ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance vpn-destination-name [ nexthop-ipv6-address ] | nexthop-ipv6-address [ public ] } [ preference preference | tag tag ]* [ description text ]
- 在拓扑实例中配置IPv6浮动静态路由:执行命令ipv6 route-static topology topology-name dest-ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | nexthop-ipv6-address } [ preference preference | tag tag ] * [ description text ]
参数preference代表了路由的优先级,数值越大优先级越低。因此,这里需要将浮动静态路由的优先级设置为大于主路由优先级的值,即优先级低于主路由。
- 执行命令commit,提交配置。