通过全部手写打字,可以更新的记忆交换机的学习程度,以下是我的交换机学习笔记全部都是手写打字完成,理解更加深刻。
trunk作用是将不同交换机的vlan连接到一起。trunk中断是将交换机端口之间或交换机和路由之间的一条点对点的链路,中断可以传输多个vlan数据流。
中继配置模式
1.开启(on)将端口设置为永久中继模式,相邻端不同意此配置,该端口也将配置为中为端口。开启模式不充许对封装类型进行协商。因此要在配置前确定封装格式。
2.关闭(off)将端口设置为永久非中继模式,并将链路转为非中断链路,即使相邻端口不同意这个配轩,该端口也将变成一个永久非中继端口。
3.企望(desirable)让端口主动试图将链路转变成中继链路。如果相邻端口被设置成开启,企望或自动模式,则该端口可以变成中继模试。
4.自动(auto)使该端口原意将链路变成中继链路。如果相邻端口设置为开启或企望模式,则试端口就可以变成中继端口。
中继模式命令
非中继:switchport mode access 主动尝试: switchport mode dynamic desirable 自动转为中继链路:
switch mode dynamic auto 永久中继:switch mode trunk 永久中继,但禁止产生DTP:switch nonegtiate
配置中继 vlan trunk
将端口转为中继trunk模式命令
switch(config)#int f0/4
switch(config-if)# switchport mode trunk
将端口配为动态协商模式
switch(config)# int f0/4
switch(config-if)# switchport mode dynamic desiable/atuo
查看trunk中继配置信息
switch# show int f0/4 switchport
删除不需要trunk传输的vlan数据
switch(config)# int f0/4
switch(config-if)# switchport trunk allowed vlan remove 22
在trunk上添加可以传输vlan
switch(config)# int f0/4
switch(config-if)# switchport trunk allowed vlan add 22