华为三层vlan配置
作者:互联网
# 华为三层交货vlan互通配置 #
配置SW1和SW2
- 进入系统
- 改命
- 创建vlan
- 改变端口访问模式
- 分配端口
- 进入汇聚端口
- 更改端口为trunk模式
- 分配vlan权限
- 保存
<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
- 进入系统
- 改命
- 创建vlan
- 配置vlan网关地址
- 改变端口访问模式
- 分配端口
- 创建trunk通道
- 分配权限
- 保存
<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