赞
踩
配置命令
1、关联下一跳IP的方式
[Huawei] ip route-static ip-address { mask | mask-length } nexthop-address
2、关联出接口的方式
[Huawei] ip route-static ip-address { mask | mask-length } interface-type interface-number
3、关联出接口和下一跳IP方式
[Huawei] ip route-static ip-address { mask | mask-length } interface-type interface-number [ nexthop-address ]
在创建静态路由时,可以同时指定出接口和下一跳。对于不同的出接口类型,也可以只指定出接口或只指定下一跳。
对于点到点接口(如串口),必须指定出接口。
配置举例
- RTA
-
- system-view
- sysname RTA
- interface GigabitEthernet 0/0/0
- ip address 10.0.0.1 255.255.255.0
- quit
- ip route-static 20.1.1.0 255.255.255.0 10.0.0.2
- RTB
-
- system-view
- sysname RTB
- interface GigabitEthernet 0/0/0
- ip address 10.0.0.2 255.255.255.0
- interface GigabitEthernet 0/0/1
- ip address 20.1.1.2 255.255.255.0
- RTC
-
- system-view
- sysname RTC
- interface GigabitEthernet 0/0/1
- ip address 20.1.1.1 255.255.255.0
- quit
- ip route-static 10.0.0.0 255.255.255.0 20.1.1.2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。