How to bind IP addresses with MAC addresses on the Layer 3 interface of a router

11

The IP Source Guard can be configured only on a Layer 2 interface. Use the following preventive measures:
1. Configure static ARP entries.
2. Configure an ACL to allow IP packets that are bound with the static ARP entries to be released.

Other related questions:
How do I check binding between IP addresses and MAC addresses on a Layer 3 interface
IP source guard can be configured only on a Layer 2 interface, so the following solution is used: 1. Create static ARP entries. 2. Configure ACLs to allows only IP packets matching static ARP entries to pass through.

How to bind the IP address, MAC address, and interface
The Switch implements binding between an interface and a MAC address through the traffic policy and DHCP snooping. Then the interface allows only the packets with the bound MAC address and packets matching the DHCP snooping binding table to pass through. The Switch does support binding of IP address + MAC address + interface. For example, to configure Ethernet 0/0/1 to allow only the packets with the source MAC address being 0-02-02 apart from of the packets matching the DHCP snooping binding table, and discard other packets, do as follows: # Enable DHCP snooping globally. [HUAWEI] dhcp snooping enable# Create an ACL that permits only the packets with the source MAC address being 0-02-02. [HUAWEI] acl 4000 [HUAWEI-acl-L2-4000] rule permit source-mac 0-02-02 ffff-ffff-ffff [HUAWEI-acl-L2-4000] rule deny# Create a traffic classifier that matches ACL 4000. [HUAWEI] traffic classifier c1 [HUAWEI-classifier-c1] if-match acl 4000# Create a traffic behavior and a traffic policy. [HUAWEI] traffic behavior b1 [HUAWEI-behavior-b1] permit [HUAWEI] traffic policy p1 [HUAWEI-trafficpolicy-p1] classifier c1 behavior b1# Apply the traffic policy to Ethernet 0/0/1 so that the interface allows only the packets with the source MAC address 0-02-02 to pass through apart from of the packets matching the DHCP snooping binding table. In V100R005C00 and later versions, the configuration is as follows: [HUAWEI] interface Ethernet 0/0/1 [HUAWEI-Ethernet0/0/1] port default vlan 4094 [HUAWEI-Ethernet0/0/1] ip source check user-bind enable [HUAWEI-Ethernet0/0/1] traffic-policy p1 inbound

Bind IP addresses with MAC addresses in web mode on an AR router
1. Log in to the web NMS, and choose IP Service > ARP. 2. Click Create. In the Create Static ARP Entry that is displayed, select parameters or enter values according to requirements, and configure static ARP entries. 3. Click OK to complete the static ARP entry configuration.

How to implement the function of binding the IP address, MAC address, and interface through configurations
The Switch implements the function of binding the IP address, MAC address, and interface through the DHCP snooping static binding table. To implement the function, configure the static binding table on a VLAN with the IP address and MAC address of the PC being the IP address and MAC address of the static binding table. Then configure the function of checking IP and ARP packets on the interface that connects the PC and Switch. For example, to bind the IP address 10.1.1.1, MAC address 0002-0002-0002, and interface Ethernet 0/0/1, run the following commands: In V100R005 and V100R006, the configuration is as follows: [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable [HUAWEI] vlan 100 [HUAWEI-vlan100] quit [HUAWEI] interface Ethernet 0/0/1 [HUAWEI-Ethernet0/0/1] port default vlan 100 [HUAWEI-Ethernet0/0/1] ip source check user-bind enable [HUAWEI-Ethernet0/0/1] quit [HUAWEI] vlan 100 [HUAWEI-vlan100] dhcp snooping enable [HUAWEI-vlan100] quit [HUAWEI] user-bind static ip-address 10.1.1.1 mac-address 0002-0002-0002 interface Ethernet0/0/1

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top