VLAN

VLAN配置方法

1:基於端口的VLAN配置實例
SWA
vlan 10
port e1/0/1
quit
vlan 20
port e1/0/2
quit
int e1/0/24
port link-type trunk
port trunk permit vlan 10 20
quit
SWB
vlan 10
port e1/0/1
quit
vlan 20
port e1/0/2
quit
int e1/0/24
port link-type trunk
port trunk permit vlan 10 20
quit

2基於MAC地址的VLAN配置
vlan 10
vlan 20
mac-vlan mac-address 0010-5ce5-fb02 vlan 10
mac-vlan mac-address 0016-ec71-ea50 vlan 20
interface GigabitEthernet 1/0/1
port link-type hybrid
port hybrid vlan 10 20 untagged
mac-vlan enable
interface GigabitEthernet 1/0/2
port link-type hybrid
port hybrid vlan 10 20 untagged
mac-vlan enable

3基於協議的VLAN的配置
vlan 10
protocol-vlan ipv4
vlan 20
protocol-vlan ipv6
interface Ethernet 1/0/1
port link-type hybrid
port hybrid vlan 10 20 untagged
port hybrid protocol-vlan vlan 10 0
port hybrid protocol-vlan vlan 20 0
interface Ethernet 1/0/2
port link-type hybrid
port hybrid vlan 10 20 untagged
port hybrid protocol-vlan vlan 10 0
port hybrid protocol-vlan vlan 20 0

4基於IP子網的VLAN配置
vlan 10
ip-subnet-vlan ip 10.10.10.0 255.255.255.0
vlan 20
ip-subnet-vlan ip 20.20.20.0 255.255.255.0
interface Ethernet 1/0/1
port link-type hybrid
port hybrid vlan 10 20 untagged
port hybrid ip-subnet-vlan vlan 10
port hybrid ip-subnet-vlan vlan 20
interface Ethernet 1/0/2
port link-type hybrid
port hybrid vlan 10 20 untagged
port hybrid ip-subnet-vlan vlan 10
port hybrid ip-subnet-vlan vlan 20

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章