ip default-gateway在思科3650三层交换机里没用? 在线等待,求解释

在思科模拟器Cisco Packet Tracer下出现这个:
DistributeSwitch1#ip default-gateway 192.168.0.254
^
% Invalid input detected at '^' marker.
启动完全后
分布层show ip route
Gateway of last resort is 192.168.0.254 to network 0.0.0.0
C 192.168.0.0/24 is directly connected, Vlan1
C 192.168.1.0/24 is directly connected, Vlan10
C 192.168.2.0/24 is directly connected, Vlan20
C 192.168.3.0/24 is directly connected, Vlan30
C 192.168.4.0/24 is directly connected, Vlan40
C 192.168.5.0/24 is directly connected, Vlan50
C 192.168.6.0/24 is directly connected, Vlan60
C 192.168.7.0/24 is directly connected, Vlan70
C 192.168.8.0/24 is directly connected, Vlan80
C 192.168.10.0/24 is directly connected, Vlan100
S* 0.0.0.0/0 [1/0] via 192.168.0.254
核心层show ip route
Gateway of last resort is 192.168.0.254 to network 0.0.0.0
C 192.168.0.0/24 is directly connected, Vlan1
S* 0.0.0.0/0 [1/0] via 192.168.0.254

你是在模拟器上做的?
应该是不支持这个命令的,只有 ip default-network ,没有ip default-gateway

ip default-gateway 及ip default-network和ip route 0.0.0.0 0.0.0.0的区别
指定默认路由(last resort gateway)的指令供有3种,可以分成两类:
1、ip default-gateway
当路由器上的ip routing无效时,使用它指定默认路由,用于RXBoot模式(no ip routing)下安装IOS等。或者关闭ip routing 让路由器当主机用,此时需要配置默认网关

2、ip default-network和ip route 0.0.0.0 0.0.0.0
两者都用于ip routing有效的路由器上,区别主要在于路由协议是否传播这条路由信息。比如:IGRP无法识别0.0.0.0,因此传播默认路由时必须用ip default-network。

当用ip default-network指令设定多条默认路由时,administrative distance最短的成为最终的默认路由;如果有复数条路由distance值相等,那么在路由表(show ip route)中靠上的成为默认路由。
同时使用ip default-network和ip route 0.0.0.0 0.0.0.0双方设定默认路由时,如果ip default-network设定的网络是直连(静态、且已知)的,那么它就成为默认路由;如果ip default-network指定的网络是由交换路由信息得来的,则ip route 0.0.0.0 0.0.0.0指定的表项成为默认路由。
最后,如果使用多条ip route 0.0.0.0 0.0.0.0指令,则流量会自动在多条链路上负载均衡。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-06-17
是不是模式进错了啊?你这个是特权模式嘛!在全局配置模式试试?
第2个回答  2012-06-17
DistributeSwitch1#conf t
ip default-gateway 192.168.0.254
相似回答