Configure Vlan Vlan Configuration

Configure Vlan

 

First configure each host ip address and mask, and then create vlan 10 vlan 20 on the switch, then to enter the interface with the interface

The host 1 and 2 is configured vlan10, 3 and 4 is configured as a host vlan20. After creating vlan 10 and vlan 20 on the switch r2, then enter the interface with the interface

The host 1 is configured to vlan10, the host computer 2 is configured to vlan20. Then after two switches are used trunk mode.

system-view
vlan batch 10 20

interface  Ethernet 0/0/1
port link-type access  
port default vlan 10
 
interface  Ethernet 0/0/2
port link-type access  
port default vlan 10
 
interface  Ethernet 0/0/3
port link-type access  
port default vlan 20
 
interface  Ethernet 0/0/4
port link-type access  
port default vlan 20
quit
 
system-view
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan10  20

First configure each host ip address and mask, and then create vlan 10 vlan 20 on the switch, then to enter the interface with the interface

The host 1 and 2 is configured vlan10, 3 and 4 is configured as a host vlan20. After creating vlan 10 and vlan 20 on the switch r2, then enter the interface with the interface

The host 1 is configured to vlan10, the host computer 2 is configured to vlan20. Then after two switches are used trunk mode.

system-view
vlan batch 10 20

interface  Ethernet 0/0/1
port link-type access  
port default vlan 10
 
interface  Ethernet 0/0/2
port link-type access  
port default vlan 10
 
interface  Ethernet 0/0/3
port link-type access  
port default vlan 20
 
interface  Ethernet 0/0/4
port link-type access  
port default vlan 20
quit
 
system-view
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan10  20

Guess you like

Origin www.cnblogs.com/wangzhipeng414148874/p/11922029.html