344
Figure 130 Network diagram
Switch A
Switch B
Host A Host B
Eth1/0/3
Vlan-int10
10.1.1.1/24
Gateway
DHCP server
Eth1/0/1
Eth1/0/3
Eth1/0/2
DHCP client
VLAN 10
DHCP snooping
10.1.1.6
0001-0203-0607
Configuration procedure
1. Configure VLAN 10, add ports to VLAN 10, and configure the IP address of the VLAN-interface,
as shown in Figure 126. (Details not shown)
2. Configure the DHCP server on Switch A.
# Configure DHCP address pool 0.
<SwitchA> system-view
[SwitchA] dhcp enable
[SwitchA] dhcp server ip-pool 0
[SwitchA-dhcp-pool-0] network 10.1.1.0 mask 255.255.255.0
3. Configure the DHCP client on Hosts A and B. (Details not shown)
4. Configure Switch B.
# Enable DHCP snooping, and configure Ethernet 1/0/3 as a DHCP-trusted port.
<SwitchB> system-view
[SwitchB] dhcp-snooping
[SwitchB] interface ethernet 1/0/3
[SwitchB-Ethernet1/0/3] dhcp-snooping trust
[SwitchB-Ethernet1/0/3] quit
# Enable ARP detection.
[SwitchB] vlan 10
[SwitchB-vlan10] arp detection enable
# Configure Ethernet 1/0/3 as an ARP-trusted port.
[SwitchB-vlan10] interface ethernet 1/0/3
[SwitchB-Ethernet1/0/3] arp detection trust
[SwitchB-Ethernet1/0/3] quit
# Configure a static IP source guard entry on interface Ethernet 1/0/2.
[SwitchB] interface ethernet 1/0/2
[SwitchB-Ethernet1/0/2] ip source binding ip-address 10.1.1.6 mac-address 0001-0203-0607
[SwitchB-Ethernet1/0/2] quit