网络安全工程(实验20)二层交换与三层交换机使处于不同vlan的主机通信

 

 

 SW1的配置:

sysname sw1

vlan batch 100 200

interface GigabitEthernet0/0/1
port link-type access
port default vlan 100

interface GigabitEthernet0/0/2
port link-type access
port default vlan 200

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 100 200

 

  SW2的配置:

sysname sw2

vlan batch 100 200

interface Vlanif100
ip address 192.168.1.254 255.255.255.0

interface Vlanif200
ip address 192.168.2.254 255.255.255.0

interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200

验证:

 

posted @ 2022-01-25 11:36  Stary_tx  阅读(93)  评论(0)    收藏  举报