如何设置交换机端口的中继协议?

网络工程 思科 转变 树干
2022-02-01 05:47:11

如何设置交换机端口的中继协议?

我看到那里可以使用命令设置中继模式:

SW(config-if)# switch trunk encapsulation ?
    dot1q
    isl
    negotiate

但我试过下面的命令没有找到命令。

Switch(config-if)#switchport mode trunk 
Switch(config-if)#switchport trunk en?
% Unrecognized command
Switch(config-if)#switchport ?
  access         Set access mode characteristics of the interface
  mode           Set trunking mode of the interface
  nonegotiate    Device will not engage in negotiation protocol on this
                 interface
  port-security  Security related command
  priority       Set appliance 802.1p priority
  protected      Configure an interface to be a protected port
  trunk          Set trunking characteristics of the interface
  voice          Voice appliance attributes
Switch(config-if)#switchport trunk ?
  allowed  Set allowed VLAN characteristics when interface is in trunking mode
  native   Set trunking native characteristics when interface is in trunking
           mode

我在 Cisco Packet Tracer 中使用 Switch 2950T-24。

2个回答

只有仍支持isl中继的 Cisco 交换机平台需要配置中继协议。

较新的平台不再支持isl trunking,因此interface命令switchport trunk encapsulation dot1q为default/implicit/unsupported,无需配置。刚设置switchport mode trunk

在仍然支持 isl 的那些中,Cat3750、3550、3560 浮现在脑海中,还有 Cat4000 和 Cat4500 系列(包括它们的 4900M 和 4948 表亲),可能还有一些较旧的。

编辑:以下部分不正确,因为 29xx 范围似乎根本不支持 isl 中继。


我不能说 ISL 中继支持何时从 2950/2960G/2960-S/2960-X 产品线中删除。


最终,这只是一个尝试的问题。如果交换机端口不接受switchport mode trunk,则可能需要设置中继封装。

在 cisco 交换机 2950 中,它是第 2 层交换机中继端口,配置为休闲

Switch(config)#intf0/1

Switch(config)#switchport mode trunk

Switch(config)#switchport mode trunk allowed vlan all

Switch(config)#noshutdown

以下命令用于catalyst layer3 switch 3750 ,3850

Switch(config)#int f0/1

Switch(config)#Switchport mode trunk

Switch(config)#switchport trunk encapsulation dot q

Switch(config)#no shutdown