题目
交换机上接口配置
SW1
interface GigabitEthernet0/0/1
port hybrid tagged vlan 2
port hybrid untagged vlan 3 to 6
interface Ethernet0/0/2
port hybrid pvid vlan 3
port hybrid untagged vlan 2 to 6
interface Ethernet0/0/3
port link-type access
port default vlan 2
interface Ethernet0/0/4
port hybrid pvid vlan 4
port hybrid tagged vlan 5 to 6
port hybrid untagged vlan 2 to 4
interface GigabitEthernet0/0/1
port hybrid tagged vlan 2
port hybrid untagged vlan 3 to 6
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
SW2
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/1
port hybrid pvid vlan 5
port hybrid tagged vlan 4 6
port hybrid untagged vlan 2 to 3 5
interface Ethernet0/0/2
port hybrid pvid vlan 6
port hybrid tagged vlan 4 to 5
port hybrid untagged vlan 2 to 3 6
网段192.168.1.0DHCP
地址池配置:
ip pool v2
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
interface GigabitEthernet0/0/1.1
dot1q termination vid 2
ip address 192.168.1.1 255.255.255.0
arp broadcast enable
dhcp select global
网段192.168.2.0DHCP
地址池配置:
ip pool vvv
gateway-list 192.168.2.1
network 192.168.2.0 mask 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
dhcp select global
结果