一 华三交换机

1.交换接口切换为路由接口

interface GigabitEthernet 1/0/24  port link-mode route # 切换为三层路由接口  ip address 192.168.100.2 24

2.路由接口切换为交换接口

#

vlan 100

interface GigabitEthernet 1/0/24

  port link-mode bridge   # 切换为交换接口  

  port link-type access  port default vlan 100

#

interface GigabitEthernet 1/0/1

  port link-mode bridge   # 切换为交换接口  

  port link-type trunk  port trunk permit vlan 10 100

#

二 华为交换机

1.交换接口切换为路由接口

interface GigabitEthernet 1/0/24  undo portswitch # 切换为三层路由接口  ip address 192.168.100.2 24

2.路由接口切换为交换接口

vlan 100

interface GigabitEthernet 1/0/24

  portswitch   # 切换为交换接口  

  port link-type access  port default vlan 100

#

interface GigabitEthernet 1/0/1

  portswitch   # 切换为交换接口  

  port link-type trunk  port trunk allow vlan 10 100

#

三 锐捷/迈普交换机

!

interface gi0/24

  no switchport  # 切换为三层路由接口

  ip address 192.168.100.2 255.255.255.0

!

vlan 100

interface gi0/24

 

 switchport  # 切换为交换接口  

 

 switchport mode access  

 switchport access vlan 100

!

interface gi0/1

 

 switchport  # 切换为交换接口  

 

  switchport mode trunk

  switchport trunk allowed vlan only 20,30

!

四 中兴交换机

$        

interface xlgei-0/2/0/1

  switch attribute disable  # 切换为三层路由接口

 

  ip address 192.168.100.2 24 

 

$

vlan 100

interface xlgei-0/1/0/36

  switch attribute enable # 切换为交换接口

  switchport mode access  

  switchport access vlan 100

$

interface xlgei-0/1/0/1

  switch attribute enable # 切换为交换接口

  switchport mode trunk  

  switchport trunk vlan 100

$

 

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐