需求
1 PC1和PC3所在接口为Access接口
PC2/4/5/6处于同一网段,其中pc2可以访问pc4/5/6
PC4可以访问pc5,但不能访问pc6
PC5不能访问PC6
2 PC1/3与PC2/4/5/6不再同一网段
3 所有PC通过DHCP获取IP地址,且PC1/3可以正常访问PC2/4/5/6
R1
[V200R003C00]
#
sysname r1
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
dhcp enable
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 192.168.2.254 255.255.255.0
dhcp select interface
dhcp server lease day 10 hour 0 minute 0
dhcp server dns-list 8.8.8.8
#
interface GigabitEthernet0/0/0.1
dot1q termination vid 2
ip address 192.168.1.254 255.255.255.0
arp broadcast enable
dhcp select interface
dhcp server lease day 10 hour 0 minute 0
dhcp server dns-list 8.8.8.8
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
SW1
#
sysname sw1
#
vlan batch 2 to 6
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port hybrid pvid vlan 3
port hybrid untagged vlan 3 to 6
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 6
#
interface GigabitEthernet0/0/4
port hybrid tagged vlan 2
port hybrid untagged vlan 3 to 6
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
port-group link-type
#
return
SW2
#
sysname sw2
#
vlan batch 2 to 6
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port hybrid pvid vlan 4
port hybrid untagged vlan 3 to 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 6
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 6
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
SW3
#
sysname sw3
#
vlan batch 2 to 6
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port hybrid pvid vlan 5
port hybrid untagged vlan 3 to 5
#
interface GigabitEthernet0/0/2
port hybrid pvid vlan 6
port hybrid untagged vlan 3 6
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 6
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
测试
PC1 PC3 在同一网段
PC2 PC4 PC5 PC6在同一网段