最多支持16条静态路由
交换机型号如下:
Switch#sh inventory
NAME: "1", DESCR: "WS-C2960X-48FPS-L"
PID: WS-C2960X-48FPS-L , VID: V02 , SN: FOC1849S5YM
> 这里是引用
关于型号的说明:
WS-C:cisco交换机前缀```
2960X: 2960X系列
FP: Full POE供电 740W,端口POE功率支持15W和30W (802.3af, 803.at)
S:uplink为4个SFP接口
L:LAN-Base
以下是配置静态路由步骤
配置多于16条并不会报错,但多于16条以上的配置会直接丢失
以下以刷入20条为例, 刷完后我们看实际生效几条
```bash
Switch(config)#ip route 1.1.1.1 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.2 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.3 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.4 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.5 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.6 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.7 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.8 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.9 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.10 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.11 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.12 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.13 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.14 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.15 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.16 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.17 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.18 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.19 255.255.255.255 192.168.0.100
Switch(config)#ip route 1.1.1.20 255.255.255.255 192.168.0.100
查看实际生效的静态条目数量, 16条
Switch#sh ip route static
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 16 subnets
S 1.1.1.1 [1/0] via 192.168.0.100
S 1.1.1.2 [1/0] via 192.168.0.100
S 1.1.1.3 [1/0] via 192.168.0.100
S 1.1.1.4 [1/0] via 192.168.0.100
S 1.1.1.5 [1/0] via 192.168.0.100
S 1.1.1.6 [1/0] via 192.168.0.100
S 1.1.1.7 [1/0] via 192.168.0.100
S 1.1.1.8 [1/0] via 192.168.0.100
S 1.1.1.9 [1/0] via 192.168.0.100
S 1.1.1.10 [1/0] via 192.168.0.100
S 1.1.1.11 [1/0] via 192.168.0.100
S 1.1.1.12 [1/0] via 192.168.0.100
S 1.1.1.13 [1/0] via 192.168.0.100
S 1.1.1.14 [1/0] via 192.168.0.100
S 1.1.1.15 [1/0] via 192.168.0.100
S 1.1.1.16 [1/0] via 192.168.0.100
Switch#
Switch# sh ip route summary
IP routing table name is default (0x0)
IP routing table maximum-paths is 32
Route Source Networks Subnets Replicates Overhead Memory (bytes)
connected 0 6 0 432 1104
static 0 **16** 0 1152 2944
ospf 100 0 0 0 0 0
Intra-area: 0 Inter-area: 0 External-1: 0 External-2: 0
NSSA External-1: 0 NSSA External-2: 0
internal 4 2136
Total 4 22 0 1584 6184
Switch#
Switch#sh run | in ip r
ip routing
no ip route-cache
ip route 1.1.1.1 255.255.255.255 192.168.0.100
ip route 1.1.1.2 255.255.255.255 192.168.0.100
ip route 1.1.1.3 255.255.255.255 192.168.0.100
ip route 1.1.1.4 255.255.255.255 192.168.0.100
ip route 1.1.1.5 255.255.255.255 192.168.0.100
ip route 1.1.1.6 255.255.255.255 192.168.0.100
ip route 1.1.1.7 255.255.255.255 192.168.0.100
ip route 1.1.1.8 255.255.255.255 192.168.0.100
ip route 1.1.1.9 255.255.255.255 192.168.0.100
ip route 1.1.1.10 255.255.255.255 192.168.0.100
ip route 1.1.1.11 255.255.255.255 192.168.0.100
ip route 1.1.1.12 255.255.255.255 192.168.0.100
ip route 1.1.1.13 255.255.255.255 192.168.0.100
ip route 1.1.1.14 255.255.255.255 192.168.0.100
ip route 1.1.1.15 255.255.255.255 192.168.0.100
ip route 1.1.1.16 255.255.255.255 192.168.0.100
Switch#
当前这台硬件为LAN-base,如果是LanLite硬件,则完全不支持静态路由。
另外LAN-BASE与LAN-LITE可以通过换IOS而实现功能互换吗?
没戏,硬件写死的,换不了
link