欢迎来到天天文库
浏览记录
ID:9293374
大小:49.50 KB
页数:12页
时间:2018-04-26
《路由交换机命令大全》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、路由/交换机命令大全~!交换机命令switch> 用户模式1:进入特权模式 enableswitch>enableswitch#2:进入全局配置模式 configureterminalswitch>enableswitch#configureterminalswitch(conf)#3:交换机命名hostnameaptech2950 以aptech2950为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch-2950aptech2950(conf)#4:配置使能
2、口令 enablepasswordcisco 以cisco为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablepasswordcisco5:配置使能密码 enablesecretciscolab 以cicsolab为例switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#enablesecretciscola
3、b6:设置虚拟局域网vlan1 interfacevlan1switch>enableswitch#configureterminalswitch(conf)#hostnameaptch2950aptech2950(conf)#interfacevlan1aptech2950(conf-if)#ipaddress192.168.1.1255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#noshut 是配置处于运行中aptech2950(conf-if)#e
4、xitaptech2950(conf)#ipdefault-gateway设置端口VLANSwitch>conftSwitch(sonfig)#vlan1name**(命名**)Switch(config)#inte0/2(进入端口)Switch(config)#vlan-menbershipstatic(静态)1192.168.254 设置网关地址如何在交换机上配置VLAN责任编辑:admin 更新日期:2005-8-61.设置VLAN名称2.应用到端口 我们先设置VLAN的名称。使用vlanvlan号namevlan名称。在特权配置模式下进行配置:
5、1900Switch(config)#vlan2nameaccounting1900Switch(config)#vlan3namemarketing 我们新配置了2个VLAN,为什么VLAN号从2开始呢?这是因为默认情况下,所有的端口否放在VLAN1上,所以要从2开始配置。1900系列的交换机最多可以配置1024个VLAN,但是,只能有64个同时工作,当然了,这是理论上的,我们应该根据自己网络的实际需要来规划VLAN的号码。配置好了VLAN名称后我们要进入每一个端口来设置VLAN。在交换机中,要进入某个端口比如说第4个端口,要用interfaceEthernet0/4,好的,结
6、合上面给出的图我们让端口2、3、4和5属于VLAN2,端口17---22属于VLAN3。命令是vlan-membershipstatic/dynamicVLAN号。静态的或者动态的两者必须选择一个,后面是刚才配置的VLAN号。好的,我们看结果:1900Switch(config)#interfaceethernet0/21900Switch(config-if)#vlan-membershipstatic21900Switch(config-if)#inte0/31900Switch(config-if)#vlan-membershipstatic21900Switch(confi
7、g-if)#inte0/41900Switch(config-if)#vlan-membershipstatic21900Switch(config-if)#inte0/51900Switch(config-if)#vlan-membershipstatic21900Switch(config-if)#inte0/171900Switch(config-if)#vlan-membershipstatic3。。。。。。1900Switch(config-if)#inte
此文档下载收益归作者所有