交换机怎么设置?思科交换机和华为交换机是目前最为著名的品牌产品,大部分的大型企业都使用思科交换机或者华为交换机,其它品牌交换机明显没有这么受欢迎。有的思科交换机用户不知道怎么配置,且因为思科有一款模拟器软件,本文就以思科交换机的设置作为示例。这次我们来介绍一下思科交换机怎么设置虚拟串口配置vlantrunk的步骤。
交换机串口(trunk)的作用:
p.p1{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangsc';color:#1b1b1b;-webkit-text-stroke:#1b1b1b}p.p2{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangscsemibold';color:#1b1b1b;-webkit-text-stroke:#1b1b1b}p.p3{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangsc';color:#1b1b1b;-webkit-text-stroke:#1b1b1b;background-color:#fbfbfb}span.s1{font-kerning:none;background-color:#fbfbfb}span.s2{font:16.0px'pingfangsc';font-kerning:none;background-color:#fbfbfb}span.s3{font-kerning:none}
在以太网上通过交换机的串口实现中继可以使用如下两种封装类型:
—ieee802.1q
p.p1{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangsc';color:#1b1b1b;-webkit-text-stroke:#1b1b1b}p.p2{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangsc';color:#1b1b1b;-webkit-text-stroke:#1b1b1b;background-color:#fbfbfb}span.s1{font-kerning:none;background-color:#fbfbfb}span.s2{font-kerning:none}—isl(interswitchlink,cisco私有)
配置步骤:
p.p1{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangscsemibold';color:#1b1b1b;-webkit-text-stroke:#1b1b1b}p.p2{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangsc';color:#1b1b1b;-webkit-text-stroke:#1b1b1b}p.p3{margin:0.0px0.0px0.0px0.0px;font:16.0px'pingfangsc';color:#1b1b1b;-webkit-text-stroke:#1b1b1b;background-color:#fbfbfb}span.s1{font:16.0px'pingfangsc';font-kerning:none;background-color:#fbfbfb}span.s2{font-kerning:none;background-color:#fbfbfb}span.s3{font-kerning:none}span.s4{text-decoration:underline;font-kerning:none;color:#416ed2;-webkit-text-stroke:0px#416ed2}交换机怎么设置-第一步:在交换机上添加vlan
交换机怎么设置-第二步:将接口添加到相应的vlan中
switch1#configterminal
switch1(config)#interfacefastethernet0/1
switch1(config-if-range)#switchportaccessvlan2
switch1(config)#interfacefastethernet0/2
switch1(config-if-range)#switchportaccessvlan3
交换机怎么设置-第三步:配置交换机之间互联的端口为串口(trunk)
switch1(config)#interfacef0/15
switch1(config-if-range)#switchportmodetrunk
相关其他命令
去除vlan:
switch(config-if)#switchporttrunkallowedvlanremovevlan-list
添加vlan:
switch(config-if)#switchporttrunkallowedvlanaddvlan-list
查看端口状态:
switch#showinterfacef0/15switchport
检查中继端口允许vlan的列表:
switch#showinterfaceinterface-idswitchport
查看vlan信息:
switch#showvlanbrief
查看配置:
switch#showrunning-config
编后语:关于交换机怎么设置相关问题就到这里了,除了思科交换机,华为等其他品牌的交换机设置方法也大同小异,不会设置或者第一次设置怕交换机出现问题,大家可以先在ciscopackettracer模拟器软件上先自行测试,可以ping通即可将此配置设置到真实的交换机上。