Figure 97 Network diagram
Configuration procedure
Configure VLAN 10, add ports to VLAN 10, and configure the IP address of the VLAN-interface,
1.
as shown in the above figure. (Details not shown.)
Configure DHCP address pool 0 for the DHCP server on Switch A.
2.
<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
Configure the DHCP client on Hosts A and B. (Details not shown.)
3.
Configure Switch B:
4.
# Enable DHCP snooping, and configure GigabitEthernet 3/0/3 as a DHCP-trusted port.
<SwitchB> system-view
[SwitchB] dhcp-snooping
[SwitchB] interface GigabitEthernet 3/0/3
[SwitchB-GigabitEthernet3/0/3] dhcp-snooping trust
[SwitchB-GigabitEthernet3/0/3] quit
# Enable ARP detection.
[SwitchB] vlan 10
[SwitchB-vlan10] arp detection enable
# Configure GigabitEthernet 3/0/3 as an ARP-trusted port.
[SwitchB-vlan10] interface GigabitEthernet 3/0/3
[SwitchB-GigabitEthernet3/0/3] arp detection trust
[SwitchB-GigabitEthernet3/0/3] quit
# Configure a static IP source guard entry on interface GigabitEthernet 3/0/2.
[SwitchB] interface GigabitEthernet 3/0/2
[SwitchB-GigabitEthernet3/0/2] ip source binding ip-address 10.1.1.6 mac-address
0001-0203-0607 vlan 10
[SwitchB-Ethernet3/0/2] ip verify source ip-address mac-address
[SwitchB-GigabitEthernet3/0/2] quit
280