|
通过配置静态路由,用户可以人为地指定对某一网络访问时所要经过的路径,网络结构比较简单,且一般到达某一网络所经过的路径唯一的情况下采用静态路由。
|
|
|
|
在创建静态路由时,可以同时指定出接口和下一跳。对于不同的出接口类型,也可以只指定出接口或只指定下一跳。
|
|
|
|
.对于NBMA(Non Broadcast Multiple Access)接口,指定下一跳。
|
|
|
|
在创建相同目的地址的多条静态路由时,如果指定相同优先级,则可实现负载分担,如果指定不同优先级,则可实现路由备份。
|
|
|
在创建静态路由时,如果将目的地址与掩码配置为全零,则表示配置的是IPv4静态缺省路由。缺省情况下,没有创建IPv4静态缺省路由。操作步骤如下。
|
|
|
(1)执行命令system-view,进入系统视图。
|
|
|
|
.在公网上配置IPv4静态路由:ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address}[preference preference | tag tag ]* [description text]
|
|
|
.在VPN实例中配置IPv4静态路由:ip route-static vpn-instance vpn-source-name destination-address {mask | mask-length } {nexthop-address [ public ] | interface-type interface-number [ nexthop-address ]| vpn-instance vpn-instance-name nexthop-address} [preference preference | tag tag ] * [ description text ]
|
|
|
|
在创建静态路由时,可以同时指定出接口和下一跳。对于不同的出接口类型,也可以只指定出接口或只指定下一跳。
|
|
|
|
.对于NBMA(Non Broadcast Multiple Access)接口,指定下一跳。
|
|
|
.对于广播类型接口,指定出接口。如果也指定下一跳,下一跳地址可以不是链路本地地址。
|
|
|
在创建相同目的地址的多条静态路由时,如果指定相同优先级,则可实现负载分担,如果指定不同优先级,则可实现路由备份。
|
|
|
在创建静态路由时,如果将目的地址与掩码配置为全零,则表示配置的是IPv6静态缺省路由。缺省情况下,没有创建IPv6静态缺省路由。
|
|
|
|
(1)执行命令system-view,进入系统视图。
|
|
|
|
.在公网上配置IPv6静态路由:ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | nexthop-ipv6-address } [ preference preference | tag tag ]* [ description text ]
|
|
|
.在VPN实例中配置IPv6静态路由:ipv6 route-static vpn-instance vpn-instance-name dest-ipv6-address prefix-length { [ interface-type interface-number ] nexthop-ipv6-address | nexthop-ipv6-address [ public ]| vpn-instance vpn-destination-name nexthop-ipv6-address } [ preference preference | tag tag ] * [ description text ]
|
|
|