410
To do…
Command…
Remarks
Display dynamic IP source guard
binding entries on a centralized
router
display ip check source
[
interface
interface-type interface-number |
ip-
address
ip-address |
mac-address
mac-
address
] [
slot
slot-number
] [
|
{
begin
|
exclude
|
include
}
regular-expression
]
Available in any view
IP source guard configuration examples
Static IPv4 source guard binding entry configuration example
Network requirements
, Host A and Host B are connected to ports GigabitEthernet 1/0/2 and
GigabitEthernet 1/0/1 of Router B, respectively. Host C is connected to port GigabitEthernet 1/0/2 of
Router A, and Router B is connected to port GigabitEthernet 1/0/1 of Router A. All hosts use static IP
addresses.
Configure static IPv4 source guard binding entries on Router A and Router B to meet the following
requirements:
•
On port GigabitEthernet 1/0/2 of Router A, only IP packets from Host C can pass.
•
On port GigabitEthernet 1/0/1 of Router A, only IP packets from Host A can pass.
•
On port GigabitEthernet 1/0/2 of Router B, only IP packets from Host A can pass.
•
On port GigabitEthernet 1/0/1 of Router B, only IP packets sourced from 192.168.0.2/24 can
pass. Host B can communicate with Host A by using this IP address even if it uses another NIC.
Figure 141
Network diagram for configuring static IPv4 source guard binding entries
IP: 192.168.0.3/24
MAC : 0001-0203-0405
IP: 192.168.0.1/24
MAC: 0001-0203-0406
Host A
IP: 192.168.0.2/24
MAC: 0001-0203-0407
Host B
Host C
GE1/0/2
GE1/0/1
GE1/0/2
GE1/0/1
Router A
Router B
Configuration procedure
1.
Configure Router A.
# Configure port GigabitEthernet 1/0/2 of Router A 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.
<RouterA> system-view
[RouterA] interface gigabitethernet 1/0/2
[RouterA-GigabitEthernet1/0/2] user-bind ip-address 192.168.0.3 mac-address 0001-0203-
0405
[RouterA-GigabitEthernet1/0/2] quit