【HCL】dhcp

The main task is to do DHCP Snooping.
DHCP server on the router, while the VLAN on SWA 3, belong to three different network segments,
DHCP request packet is broadcast, the relay must be set to be able to spread on the SWA router.
Pseudo DHCP Server has been configured to publish 172.22.1.1-99 address pool gateway 172.22.1.254, DNS 9.9.9.9

Configuration Step
(1) # router.
<H3C>-View System
[H3C] interface G 0/0
[[the GigabitEthernet0-H3C / 0]] IP 30 address 10.1.1.2
[[the GigabitEthernet0-H3C / 0]] quit
enabled DHCP server #.
[H3C] dhcp enable

DHCP address pool # 1, the address allocated to the client from the network segment 192.168.1.0/24.
[H3C] DHCP Server IP-the pool. 1
[DHCP-the pool-H3C-0] Network mask 192.168.10.0 255.255.255.0
[DHCP-the pool-H3C-0] DNS-List 8.8.8.8
[DHCP-the pool-H3C-0] List-192.168.10.254 Gateway
[DHCP-the pool-H3C-0] quit

DHCP address pool # 2, the address assigned to the client from the network segment 192.168.20.0/24.
[H3C] the pool DHCP Server IP-2
[DHCP-the pool-H3C-0] Network mask 192.168.20.0 255.255.255.0
[DHCP-the pool-H3C-0] DNS-List 8.8.8.8
[DHCP-the pool-H3C-0] List 192.168.20.254-Gateway
[DHCP-the pool-H3C-0] quit

DHCP address pool 3, assign an address to the client from the network segment 192.168.30.0/24.
[H3C] DHCP Server IP-the pool. 3
[DHCP-the pool-H3C-0] Network mask the 192.168.30.0 255.255.255.0
[DHCP-the pool-H3C-0] DNS-List 8.8.8.8
[DHCP-the pool-H3C-0] List 192.168.30.254-Gateway
[DHCP-the pool-H3C-0] quit

# Configure a static route to 192.168.0.0/16 segment
[H3C] ip route-static 192.168.0.0 16 10.1.1.1

(2) Configuration # switch SWA.
# Establish vlan, and an IP address for each interface.
<H3C>-View System
[H3C] VLAN 10
[H3C-VLAN10] quit
[H3C] VLAN 20 is
[H3C-VLAN20] quit
[H3C] VLAN 30
[H3C-VLAN30] quit

[H3C]inter range g 1/0/1 to g 1/0/5
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 10
[H3C-if-range]quit
[H3C]inter range g 1/0/6 to g 1/0/10
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 20
[H3C-if-range]quit
[H3C]inter range g 1/0/11 to g 1/0/15
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 30
[H3C-if-range]quit

[H3C]inter vlan 10
[H3C-Vlan-interface10]ip add 192.168.10.254 24
[H3C-Vlan-interface10]quit
[H3C]inter vlan 20
[H3C-Vlan-interface20]ip add 192.168.20.254 24
[H3C-Vlan-interface20]quit
[H3C]inter vlan 30
[H3C-Vlan-interface30]ip add 192.168.30.254 24
[H3C-Vlan-interface30]quit
[H3C]
[H3C]inter g 1/0/23
[H3C-GigabitEthernet1/0/23]port link-t
[H3C-GigabitEthernet1/0/23]ip add 10.1.1.1 30
[H3C-GigabitEthernet1/0/23]quit

(3) # Configure DHCP relay (SWA switch)
# enable DHCP services.
[H3C] dhcp enable

# VLAN-interface 10 the DHCP relay.
[H3C] interface VLAN-interface 10
[H3C-of Vlan-interface10 For] SELECT DHCP Relay
# Configure address of the DHCP server.
[H3C-of Vlan-interface10 For] DHCP Relay Server-address 10.1.1.2
[H3C-of Vlan-interface10 For] quit
【HCL】dhcp

# VLAN-interface 20 the DHCP relay.
[H3C] interface VLAN-interface 20 is
[H3C-of Vlan-interface20] SELECT DHCP Relay
[H3C-of Vlan-interface20] DHCP Relay Server-address 10.1.1.2
[H3C-of Vlan-interface20] quit

# VLAN-interface 30 the DHCP relay.
[H3C] interface VLAN-interface 30
[H3C-of Vlan-interface30] SELECT DHCP Relay
[H3C-of Vlan-interface30] DHCP Relay Server-address 10.1.1.2
[H3C-of Vlan-interface30] quit

(4) # Configure DHCP Snooping (SWB Switch)
# Enable DHCP Snooping function.
[H3C] dhcp Snooping enable
# Set GigabitEthernet1 / 0/21 port as a trusted port.
[H3C] interface of GigabitEthernet 1/0/21
[H3C-GigabitEthernet / 0/21 is] DHCP Snooping Trust
[H3C-GigabitEthernet / 0/21 is] quit
# enabled, DHCP Snooping functions on GigabitEthernet1 / 0/1.
[H3C] interface of GigabitEthernet 1/0/1
[H3C-GigabitEthernet / 0 /. 1] DHCP Snooping Binding Record
[H3C-GigabitEthernet / 0 /. 1] quit

Guess you like

Origin blog.51cto.com/14220604/2413936