思科交换机端口配置

  • 前言
  • 保存
  • 重启
  • 强制Trunk模式
  • 主动模式
  • 被动模式
  • 协商
  • 被动模式和被动模式Trunk是建立不成功的
  • 主动模式 和被动模式Trunk是建立成功的
  • 强制关协商帧和强制关协商帧Trunk是建立成功的
  • 强制模式关闭协商帧和被动模式Trunk是建立不成功的
  • 总结


前言

access 接口只属于一个vlan 连接pc

trunk 不属于任何vlan 只能传输多个vlan流量只能连接交换机

批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access

保存

#下输入write

批量交换机端口为access 交换机端口配置access trunk_服务器_02

重启

#下输入reload

批量交换机端口为access 交换机端口配置access trunk_重启_03

强制Trunk模式

在接口模式下进入Trunk模式

批量交换机端口为access 交换机端口配置access trunk_服务器_04

主动模式

在接口模式下输入switchport mode dynamic desirable

批量交换机端口为access 交换机端口配置access trunk_重启_05

被动模式

在接口模式下输入switchport mode dynamic auto

批量交换机端口为access 交换机端口配置access trunk_服务器_06

协商

在接口模式输入switchport nonegotiate

批量交换机端口为access 交换机端口配置access trunk_服务器_07

被动模式和被动模式Trunk是建立不成功的

输入switchport mode dynamic auto

批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_08


输入show interfaces f0/1 switchport

批量交换机端口为access 交换机端口配置access trunk_重启_09


批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_10


sw2

批量交换机端口为access 交换机端口配置access trunk_重启_11


两台交换机都是access模式所以Trunk

主动模式 和被动模式Trunk是建立成功的

输入switchport mode dynamic desirable

批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_12


输入show interfaces f0/1 switchport

批量交换机端口为access 交换机端口配置access trunk_重启_13


输入switchport mode dynamic auto

批量交换机端口为access 交换机端口配置access trunk_重启_14


批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_15


主动模式和被动模式trunk

强制关协商帧和强制关协商帧Trunk是建立成功的

输入switchport mode trunk

关协商输入switchport nonegotiate

批量交换机端口为access 交换机端口配置access trunk_服务器_16


批量交换机端口为access 交换机端口配置access trunk_服务器_17

强制模式关闭协商帧和被动模式Trunk是建立不成功的

批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_18


被动模式下保存 重启下是access

保存

批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_19


重启

批量交换机端口为access 交换机端口配置access trunk_批量交换机端口为access_20

批量交换机端口为access 交换机端口配置access trunk_重启_21

总结

思科默认放行所以vlan
经过协商最终只能两头是access和trunk一致才能正常工作
思科默认接口模式是access
人口access类型纯数据+标签出口access只能解除标签