ip source binding

Syntax

ip source binding { ip-address ip-address | ip-address ip-address mac-address mac-address | mac-address mac-address } [ vlan vlan-id ]

undo ip source binding { ip-address ip-address | ip-address ip-address mac-address mac-address | mac-address mac-address } [ vlan vlan-id ]

View

Layer 2 Ethernet interface view

Default level

2: System level

Parameters

ip-address ip-address: Specifies the IPv4 address for the static binding entry. The IPv4 address cannot be 127.x.x.x, 0.0.0.0, or a multicast IP address.

mac-address mac-address: Specifies the MAC address for the static binding in the format H-H-H. The MAC address cannot be all 0s, all Fs (a broadcast address), or a multicast address.

vlan vlan-id: Specifies the VLAN for the static binding. vlan-id is the ID of the VLAN to be bound, in the range of 1 to 4094.

Description

Use ip source binding to configure a static IPv4 source guard entry on a port.

Use undo ip source binding to delete a static IPv4 source guard entry from a port.

By default, no static IPv4 binding entry exists on a port.

IP source guard does not use the VLAN information (if specified) in static IPv4 binding entries to filter packets.

When the ARP detection function is configured, be sure to specify the VLAN where ARP detection is configured in static IPv4 binding entries. Otherwise, ARP packets are discarded because they cannot match any static IPv4 binding entry. For more information about the ARP detection function, see Security Configuration Guide.

You cannot configure the same static binding entry repeatedly on one port, but you can configure the same static entry on different ports.

You cannot configure a static binding entry on a port that is in an aggregation group.

Related commands: display ip source binding static.

Examples

# Configure a static IPv4 binding entry (IP+MAC binding) on port Ethernet 1/0/1.

<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] ip source binding ip-address 192.168.0.1 mac-address 0001-0001-0001