华为dhcp snooping配置

dhcp snooping 配置方式:
华为dhcp snooping配置_第1张图片

需求:PC1通过DHCP服务器1获取地址;PC2通过DHCP服务器2获取地址,并且在LSW2上面开启dhcp snooping;
配置方式:
1.在LSW1 也就是dhcp服务器1上面开启vlan100的dhcp服务。
2.在LSW2也就是dhcp服务器2上面开启vlan200的dhcp服务,并配置vlan100的dhcp中继服务;在LSW2上面开启dhcp snooping ;开启dhcp snooping后在所以的接口上面配置dhcp snooping trusted
LSW2交换机具体配置:
sysname Huawei

vlan batch 100 200

cluster enable
ntdp enable
ndp enable

drop illegal-mac alarm

dhcp enable

dhcp snooping enable 开启dhcp snooping

diffserv domain default

drop-profile default

dhcp server group vlan100 dhcp中继配置
dhcp-server 10.253.104.1 0

ip pool vlan200
gateway-list 172.16.200.1
network 172.16.200.0 mask 255.255.255.0

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 Vlanif100
ip address 10.253.104.2 255.255.255.0
dhcp select relay 针对vlan100开启dhcp中继
dhcp relay server-select vlan100

interface Vlanif200
ip address 172.16.200.1 255.255.255.0
dhcp select global

interface MEth0/0/1

interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
dhcp snooping trusted 接口开启dhcp信任端口

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094

LSW3交换机具体配置:
sysname Huawei

vlan batch 100 200

dhcp enable

dhcp snooping enable

interface Vlanif1

interface MEth0/0/1

interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
dhcp snooping trusted

interface GigabitEthernet0/0/2 连接PC1
port link-type access
port default vlan 100

interface GigabitEthernet0/0/3
port link-type access
port default vlan 200 连接PC2

interface GigabitEthernet0/0/4 下联交换机
port link-type trunk
port trunk allow-pass vlan 2 to 4094
dhcp snooping trusted

LSW4交换机具体配置:
vlan batch 100

dhcp enable

dhcp snooping enable

interface Vlanif1

interface MEth0/0/1

interface GigabitEthernet0/0/1 上联LSW3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
dhcp snooping trusted

interface GigabitEthernet0/0/2 接PC4
port link-type access
port default vlan 100

你可能感兴趣的:(数通)