cisco思科交换机配置篇
要进行思科交换机的配置,首先就得进入交换机的全局配置模式,在成功连接交换机并且登陆成功进入特权模式下,下面跟本站小编一起来学习一下思科交换机的配置命令吧!
1、输入进入全局配置模式:
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#
switch(config)#
这么简单的一条命令,俺们就进入到全局配置模式了,还记得上一篇中查看端口所查询到的信息中name字段下的'值吗?这字段其实代表的是交换机端口的描述信息
2、修改端口描述
switch#
switch#
switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#desc
switch(config-if)#description updateDesc
switch(config-if)#
switch(config-if)#exit
switch(config)#exit
switch#
switch#show inter
switch#show interfaces statu
switch#show interfaces status
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
Fa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTX
Fa0/6 notconnect 1 auto auto 10/100BaseTX
修改描述的关键命令在于,在配置模式下,进入到要修改的端口下,然后使用description + “内容”!效果应该很直观了吧,接下来就是修改端口的所在Vlan了
3、修改端口Vlan
switch#
switch#
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#sw acc vl 2
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 2 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
Fa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTX
Fa0/6 notconnect 1 auto auto 10/100BaseTX
逻辑和修改端口描述是一样的,对于配置来说,肯定是到了能有配置权限的地方和要配置的对象,这里修改端口Vlan的关键命令为:sw acc vl + vlantag,命令很明显被简写了,但是不影响执行,命令的全写为:switchport access vlan + vlantag
还有一些对端口的简单操作,譬如修改端口的模式,
4、修改端口模式
switch(config-if)#switchport trunk encap dot1q ----------------设置vlan 中继的封装协议
注:dot1q就是 IEEE 802.1Q协议,是vlan的一种封装方式,是公有协议。还有一种trunk协议,是ISL,也是vlan的一种封装方式,不过这是Cisco思科私有协议,其他厂商不能用。
switch(config-if)#switchport mode trunk ------------------------设置端口类型为trunk
switch(config-if)#switchport trunk allowed vlan 1,2 ---------设置允许的vlan,默认不用配置,为所有vlan
switch(config-if)#switchport trun native vlan 999 ---------------设置trunk口的native vlan
5、端口状态
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#
switch(config-if)#sw acc vl 1
switch(config-if)#
switch(config-if)#
switch(config-if)#shutd
switch(config-if)#shutdown
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc disabled 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
上面的一系列为切换Vlan,并且shutdown端口,这时候大家可能看到了交换机3号端口的状态已变成disable了,如果我们要启用端口只需
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#no shut
switch(config-if)#no shutdown
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
-
H3C云计算销售专家认证
H3C云计算销售专家认证是H3C公司推出的针对渠道销售人员资质评定的能力认证,通过该认证的学员已具备基本的云计算产品销售能力,对服务器、存储、云管理平台等云产品和行业应用有了基本了解,能够独立与客户进行日常交流并进一步挖掘用户需求。1.考试及费用代码名称...
-
2016年计算机应用能力模拟考试题
2016年4月计算机应用能力考试即将开始了,下面本站小编为大家分享的是最新的计算机应用能力考试模拟试题及答案,希望对大家有所帮助!1.请将WindowsXP中文版注销。点击左下角开始菜单——最下面一行有注销2.设置虚拟内存初始大小值和最大值都为1152MB。...
-
2016年J2EE认证试题(附答案)
J2EE用来建设大型的分布式企业级应用程序。或者用更时髦的名词说就是电子商务应用程序。下面本站小编为大家推荐的是J2EE认证考试题,希望对大家有所帮助!一、基础问答1.下面哪些类可以被继承?java.lang.Thread(T)java.lang.Number(T)java.lang.Double(F)java.la...
-
2017年计算机二级office高级应用试题
多媒体技术是一种迅速发展的综合性电子信息技术,它给传统的计算机系统、音频和视频设备带来了方向性的变革,将对大众传媒产生深远的影响。下面是小编整理的计算机二级office高级应用试题,欢迎大家参考!一、选择题[单选题]计算机软件的确切含义是()。A.计算机程序...