
207
1/0/2 of Switch A. Switch B is connected to port Ten-GigabitEthernet 1/0/1 of Switch A. All hosts use
static IP addresses.
Configure static IPv4 source guard binding entries on Switch A and Switch B to meet the following
requirements:
•
On port Ten-GigabitEthernet 1/0/2 of Switch A, only IP packets from Host C can pass.
•
On port Ten-GigabitEthernet 1/0/1 of Switch A, only IP packets from Host A can pass.
•
On port Ten-GigabitEthernet 1/0/2 of Switch B, only IP packets from Host A can pass.
•
On port Ten-GigabitEthernet 1/0/1 of Switch B, only IP packets from Host B can pass.
Figure 64
Network diagram
Configuration procedure
1.
Configure Switch A:
# Configure IP addresses for the interfaces. (Details not shown.)
# Enable IPv4 source guard on port Ten-GigabitEthernet 1/0/2.
<SwitchA> system-view
[SwitchA] interface ten-gigabitEthernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] ip verify source ip-address mac-address
# On Ten-GigabitEthernet 1/0/2, configure a static IPv4 source guard binding entry to allow only
IP packets with the source MAC address of 0001-0203-0405 and the source IP address of
192.168.0.3 to pass.
[SwitchA-Ten-GigabitEthernet1/0/2] ip source binding ip-address 192.168.0.3
mac-address 0001-0203-0405
[SwitchA-Ten-GigabitEthernet1/0/2] quit
# Enable IPv4 source guard on port Ten-GigabitEthernet 1/0/1.
[SwitchA] interface ten-gigabitEthernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] ip verify source ip-address mac-address
# On Ten-GigabitEthernet 1/0/1, configure a static IPv4 source guard binding entry to allow only
IP packets with the source MAC address of 0001-0203-0406 and the source IP address of
192.168.0.1 to pass.
[SwitchA-Ten-GigabitEthernet1/0/1] ip source binding ip-address 192.168.0.1
mac-address 0001-0203-0406
[SwitchA-Ten-GigabitEthernet1/0/1] quit
2.
Configure Switch B:
# Configure an IP address for each interface. (Details not shown.)
# Enable IPv4 source guard on port Ten-GigabitEthernet 1/0/2.