其他分享
首页 > 其他分享> > 华为三层vlan配置

华为三层vlan配置

作者:互联网

 

# 华为三层交货vlan互通配置 #

配置SW1和SW2

  1. 进入系统
  2. 改命
  3. 创建vlan
  4. 改变端口访问模式
  5. 分配端口
  6. 进入汇聚端口
  7. 更改端口为trunk模式
  8. 分配vlan权限
  9. 保存
<Huawei>sys
[Huawei]sysname sw1
[sw1]vlan 10
[sw1-vlan10]q
[sw1]interface Ethernet 0/0/1
[sw1-Ethernet0/0/1]port link-type access 
[sw1-Ethernet0/0/1]port default vlan 10
[sw1-Ethernet0/0/1]dis this
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
[sw1]vlan 20
[sw1-vlan20]q
[sw1]interface Eth 0/0/2
[sw1-Ethernet0/0/2]port link-type a
[sw1-Ethernet0/0/2]port def vlan 20
[sw1-Ethernet0/0/2]dis this
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
[sw1-Ethernet0/0/2]q
[sw1]int Gig 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk 
[sw1]q
<sw1>save
<Huawei>sys
[Huawei]sysname sw1
[sw2]vlan 10
[sw2-vlan10]q
[sw2]interface Ethernet 0/0/1
[sw2-Ethernet0/0/1]port link-type access 
[sw2-Ethernet0/0/1]port default vlan 10
[sw2-Ethernet0/0/1]dis this
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
[sw2]vlan 20
[sw2-vlan20]q
[sw2]interface Eth 0/0/2
[sw2-Ethernet0/0/2]port link-type a
[sw2-Ethernet0/0/2]port def vlan 20
[sw2-Ethernet0/0/2]dis this
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
[sw2-Ethernet0/0/2]q
[sw2]int Gig 0/0/1
[sw2-GigabitEthernet0/0/1]port link-type trunk 
[sw2]q
<sw2>save

配置SW3

  1. 进入系统
  2. 改命
  3. 创建vlan
  4. 配置vlan网关地址
  5. 改变端口访问模式
  6. 分配端口
  7. 创建trunk通道
  8. 分配权限
  9. 保存
<Huawei>sys
[Huawei]sysname sw3
[sw3]vlan batch 10 20
[sw3]interface Vlanif 10
[sw3-Vlanif10]ip address 192.168.1.254 24
[sw3]interface vlanif 20
[sw3-Vlanif20]ip add 192.168.2.254 24
[sw3-Vlanif20]q
[sw3]int GigabitEthernet 0/0/1
[sw3-GigabitEthernet0/0/1]port link-type trunk 
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[sw3]int GigabitEthernet 0/0/2
[sw3-GigabitEthernet0/0/2]port link-type trunk 
[sw3-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[sw3]q
<sw3>sa

标签:sw2,Ethernet0,vlan,华为,sw1,sw3,三层,port
来源: https://www.cnblogs.com/xzbell/p/14814465.html