好像3640不支持 no switchport 这个命令。在别的交换机上就可以用。Switch(config-if)#int f0/0
Switch(config-if)#no switchport
% Incomplete command.
Switch(config-if)#int f0/0
Switch(config-if)#no switchport access vlan
Switch(config-if)#ip add 192.168.5.1 255.255.255.0
% IP addresses may not be configured on L2 links.
应该怎么配IP呀???
Switch(config)#ip routing
Switch(config)#exit
Switch#
*Mar 1 00:06:27.899: %SYS-5-CONFIG_I: Configured from console by console
Switch#show ip int f0/0
FastEthernet0/0 is administratively down, line protocol is down
Internet protocol processing disabled
好像Internet protocol也不能开启。请问得用什么命令呀???
问题补充:我用的是小凡的模拟机,3640的IOS文件是:c3640-jk9o3s-mz.123-22.bin 会不会是IOS的版本的问题,哪有3640IOS的下载呀?
你用的是交换机模块?交换机端口无法配置IP。
% IP addresses may not be configured on L2 links.
这句话已经说得很清楚了。
我整理一下:
1、使用NM-16ESW模块,这个是交换机模块,不允许给单个端口设置IP,顶多为每个VLAN设置IP地址。在模拟交换机时,3640只允许加载这个模块,除非你把3640当做路由器使用,同时f0/0不是交换机模块,才能够为其设置IP地址。
2、你的no switchport后面还有其他不可省略的内容没输入,所以交换机不接受这个命令。no switchport access vlan这条命令就能正确接受
3、在端口上开启IP协议,这个实际上跟我回复的第一条是一个问题,第二层设备无法设置第三层的东西
参考知识1
交换机是不让在端口上配置IP地址的,交换机的本质就是一个HUB升级版。
如果你在交换机上设置了VLAN,那你可以再VLAN上配置IP地址和虚拟IP。
参考知识B
Incomplete command.
意思是:命令不完整 你在no switchport 后面敲 ? 试试