需求
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 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 192.168.2.254 255.255.255.0 dhcp select interfacedhcp server lease day 10 hour 0 minute 0 dhcp server dns-list 8.8.8.8
#
interface GigabitEthernet0/0/0.1dot1q termination vid 2ip address 192.168.1.254 255.255.255.0 arp broadcast enabledhcp select interfacedhcp 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 0authentication-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password simple adminlocal-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 2
#
interface GigabitEthernet0/0/2port hybrid pvid vlan 3port hybrid untagged vlan 3 to 6
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 2 to 6
#
interface GigabitEthernet0/0/4port hybrid tagged vlan 2port 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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password simple adminlocal-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 2
#
interface GigabitEthernet0/0/2port hybrid pvid vlan 4port hybrid untagged vlan 3 to 5
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 2 to 6
#
interface GigabitEthernet0/0/4port link-type trunkport 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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password simple adminlocal-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1port hybrid pvid vlan 5port hybrid untagged vlan 3 to 5
#
interface GigabitEthernet0/0/2port hybrid pvid vlan 6port hybrid untagged vlan 3 6
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4port link-type trunkport 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在同一网段