欢迎user
03-IPV6_静态路由命令
本章节下载 (80.49 KB)
目 录
1.1.1 delete ipv6 static-routes all 1-1
【命令】
delete ipv6 static-routes all
【视图】
系统视图
【参数】
无
【描述】
delete ipv6 static-routes all命令用来删除包括缺省路由在内的所有IPv6静态路由。
使用本命令删除IPv6静态路由时,系统会提示确认,确认后才会删除所配置的所有静态路由。
相关配置可参考命令display ipv6 routing-table和ipv6 route-static。
【举例】
# 删除所有IPv6静态路由。
<VG> system-view
[VG] delete ipv6 static-routes all
This will erase all ipv6 static routes and their configurations, you must reconfigure all static routes
Are you sure?[Y/N]Y
【命令】
对于出接口为广播(如以太网接口、VLAN接口等)或者NBMA(如封装X.25或者帧中继的接口等)类型的接口,使用如下命令:
ipv6 route-static ipv6-address prefix-length [ interface-type interface-number ] nexthop-address [ preference preference-value ]
undo ipv6 route-static ipv6-address prefix-length [ interface-type interface-number ] [ nexthop-address ] [ preference preference-value ]
对于出接口为点到点(如串口等)类型的接口,使用如下命令:
ipv6 route-static ipv6-address prefix-length { interface-type interface-number | nexthop-address } [ preference preference-value ]
undo ipv6 route-static ipv6-address prefix-length [ interface-type interface-number | nexthop-address ] [ preference preference-value ]
【视图】
系统视图
【参数】
ipv6-address prefix-length:IPv6地址及前缀长度。
interface-type interface-number:路由的出接口类型和接口号。
nexthop-address:下一跳的IPv6地址。
preference-value:路由的优先级,取值范围为1~255,缺省值为60。
【描述】
ipv6 route-static命令用来配置IPv6静态路由。undo ipv6 route-static命令用来删除已配置的IPv6静态路由。
如果配置的IPv6静态路由指定目的地址为::/0(前缀长度为0),则表示配置了一条IPv6缺省路由。如果报文的目的地址无法匹配路由表中的任何一项,设备将选择IPv6缺省路由来转发IPv6报文。
在配置静态路由时,可以指定出接口(interface-type interface-number),也可指定下一跳地址(nexthop-address),具体采用哪种方法,需要根据实际情况而定:
l 如果出接口类型为广播(如以太网接口、VLAN接口等)或者NBMA类型(如封装X.25或者帧中继的接口等),必须指定下一跳地址;
l 如果出接口类型为点到点类型(如串口等),可以指定出接口,也可以指定下一跳地址,但不能同时指定二者。
相关配置可参考命令display ipv6 routing-table和delete ipv6 static-routes all。
【举例】
# 配置IPv6静态路由,该路由的目的地址为1:1:2::/24,下一跳地址为1:1:3::1。
<VG> system-view
[VG] ipv6 route-static 1:1:2:: 24 1:1:3::1
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!