当我在 Cisco 3850 交换机堆栈上运行 show ip route 时,我得到以下输出
PO-SW-SVR-SS-02(config)#do show ip route
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
+ - replicated route, % - next hop override
Gateway of last resort is 10.20.25.254 to network 0.0.0.0
S* 0.0.0.0/0 [254/0] via 10.20.25.254
10.0.0.0/8 is variably subnetted, 31 subnets, 3 masks
S 10.0.0.0/8 [1/0] via 10.6.9.0
C 10.6.9.0/24 is directly connected, Vlan2
L 10.6.9.6/32 is directly connected, Vlan2
C 10.6.10.0/24 is directly connected, Vlan10
L 10.6.10.254/32 is directly connected, Vlan10
C 10.6.11.0/24 is directly connected, Vlan11
L 10.6.11.254/32 is directly connected, Vlan11
C 10.6.12.0/24 is directly connected, Vlan12
L 10.6.12.254/32 is directly connected, Vlan12
C 10.6.13.0/24 is directly connected, Vlan13
L 10.6.13.254/32 is directly connected, Vlan13
C 10.6.14.0/24 is directly connected, Vlan14
L 10.6.14.254/32 is directly connected, Vlan14
C 10.6.15.0/24 is directly connected, Vlan15
L 10.6.15.254/32 is directly connected, Vlan15
C 10.6.16.0/24 is directly connected, Vlan16
L 10.6.16.254/32 is directly connected, Vlan16
C 10.6.101.0/24 is directly connected, Vlan101
L 10.6.101.254/32 is directly connected, Vlan101
C 10.6.102.0/24 is directly connected, Vlan102
L 10.6.102.254/32 is directly connected, Vlan102
C 10.6.103.0/24 is directly connected, Vlan103
L 10.6.103.254/32 is directly connected, Vlan103
C 10.6.104.0/24 is directly connected, Vlan104
L 10.6.104.254/32 is directly connected, Vlan104
C 10.6.200.0/24 is directly connected, Vlan200
L 10.6.200.254/32 is directly connected, Vlan200
C 10.20.25.0/24 is directly connected, Vlan25
L 10.20.25.172/32 is directly connected, Vlan25
C 10.50.1.0/24 is directly connected, Vlan50
L 10.50.1.253/32 is directly connected, Vlan50
但是,我不希望我的最后网关设置10.20.25.254
为 network 0.0.0.0
。
我需要这个交换机堆栈的网关指向的网络是10.6.9.10
这样它就可以连接到 Internet。我尝试10.6.9.10
使用以下命令将最后的网关设置为:
ip default-gateway 10.6.9.10
ip default-network 10.6.9.0
但是,万不得已的门户不知何故还是显示出来10.20.25.254
了。我猜我错过了一些东西。谁能指出我正确的方向,让我的交换机堆栈指向10.6.9.10
?我不确定网关10.20.25.254
最初是如何设置的:\ 我10.20.25.254
在整个配置中没有看到对任何地方的引用。
作为旁注,VLAN2 ( 10.6.9.0/24
) 是我的本地 VLAN,并且此交换机堆栈中继到具有10.6.9.10
地址的交换机堆栈。话虽如此,既然设备是直接连接的,而且两个交换机堆栈在 VLAN2 中都有一个接口,这是否有必要?