06-Layer 3 - IP Services Command Reference

HomeSupportSwitchesH3C S9500E Switch SeriesReference GuidesCommand ReferencesH3C S9500E Command References-Release1828P04-6W18206-Layer 3 - IP Services Command Reference
01-ARP Commands
Title Size Download
01-ARP Commands 110.35 KB

arp check enable

Syntax

arp check enable

undo arp check enable

View

System view

Default level

2: System level

Parameters

None

Description

Use arp check enable to enable dynamic ARP entry check.

Use undo arp check enable to disable dynamic ARP entry check.

By default, ARP entry check is enabled.

Examples

# Enable dynamic ARP entry check.

<Sysname> system-view

[Sysname] arp check enable

arp max-learning-num

Syntax

arp max-learning-num number

undo arp max-learning-num

View

Layer 2 Ethernet interface view, Layer 3 Ethernet interface view, Layer 3 Ethernet subinterface view, VLAN interface view, Layer 2 aggregate interface view, Layer 3 aggregate interface view, Layer 3 aggregate subinterface view

Default level

2: System level

Parameters

number: Maximum number of dynamic ARP entries that an interface can learn.

Description

Use arp max-learning-num to configure the maximum number of dynamic ARP entries that an interface can learn.

Use undo arp max-learning-num to restore the default number of dynamic ARP entries.

By default, the maximum number of dynamic ARP entries that an interface can learn is the maximum remaining resource of the switch.

When the number argument is set to 0, an interface is disabled from learning dynamic ARP entries.

Examples

# Specify VLAN-interface 40 to learn up to 500 dynamic ARP entries.

<Sysname> system-view

[Sysname] interface vlan-interface 40

[Sysname-Vlan-interface40] arp max-learning-num 500

# Specify GigabitEthernet 3/0/1 to learn up to 1000 dynamic ARP entries.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] arp max-learning-num 1000

# Specify Layer 2 aggregate interface Bridge-aggregation 1 to learn up to 1000 dynamic ARP entries.

<Sysname> system-view

[Sysname] interface bridge-aggregation 1

[Sysname-Bridge-Aggregation1] arp max-learning-num 1000

# Specify Layer 3 aggregate interface Route-aggregation 1 to learn up to 1000 dynamic ARP entries.

<Sysname> system-view

[Sysname] interface route-aggregation 1

[Sysname-Route-Aggregation1] arp max-learning-num 1000

arp static

Syntax

arp static ip-address mac-address [ vlan-id interface-type interface-number ] [ vpn-instance vpn-instance-name ]

undo arp ip-address [ vpn-instance-name ]

View

System view

Default level

2: System level

Parameters

ip-address: IP address in an ARP entry.

mac-address: MAC address in an ARP entry, in the format H-H-H.

vlan-id: ID of a VLAN to which a static ARP entry belongs, in the range 1 to 4094.

interface-type interface-number: Interface type and interface number.

vpn-instance vpn-instance-name: Specifies the VPN where a static ARP entry resides. The vpn-instance-name argument specifies the VPN instance name, a case-sensitive string of 1 to 31 characters. Without this argument, the static ARP entry resides on the public network.

Description

Use arp static to configure a static ARP entry in the ARP mapping table.

Use undo arp to remove an ARP entry.

A static ARP entry is effective when the switch works correctly. However, when the VLAN or VLAN interface to which an ARP entry corresponds is deleted, the entry, if long, will be deleted, and if short and resolved, will become unresolved.

The vlan-id argument is used to specify the VLAN of an ARP entry and must be the ID of an existing VLAN. In addition, the Ethernet interface following the argument must belong to that VLAN. The VLAN interface of the VLAN must have been created.

If you specify both the vlan-id and the ip-address arguments, the IP address of the VLAN interface corresponding to the vlan-id argument must be in the same network segment as the IP address specified by the ip-address argument.

Related commands: reset arp and display arp.

Examples

# Configure a static ARP entry, with the IP address 202.38.10.2, MAC address 00e0-fc01-0000, and outbound interface GigabitEthernet 3/0/1 of VLAN 10.

<Sysname> system-view

[Sysname] arp static 202.38.10.2 00e0-fc01-0000 10 GigabitEthernet 3/0/1

arp timer aging

Syntax

arp timer aging aging-time

undo arp timer aging

View

System view

Default level

2: System level

Parameters

aging-time: Age timer for dynamic ARP entries in minutes, in the range of 1 to 1440.

Description

Use arp timer aging to set age timer for dynamic ARP entries.

Use undo arp timer aging to restore the default.

By default, the age timer for dynamic ARP entries is 20 minutes.

Related commands: display arp timer aging.

Examples

# Set the age timer for dynamic ARP entries to 10 minutes.

<Sysname> system-view

[Sysname] arp timer aging 10

display arp

Syntax

In standalone mode:

display arp [ [ all | dynamic | static ] [ slot slot-number ] | vlan vlan-id | interface interface-type interface-number ] [ [ verbose ] [ | { begin | exclude | include } regular-expression ] | count ]

In IRF mode:

display arp [ [ all | dynamic | static ] [ chassis chassis-number slot slot-number ] | vlan vlan-id | interface interface-type interface-number ] [ [ verbose ] [ | { begin | exclude | include } regular-expression ] | count ]

View

Any view

Default level

1: Monitor level

Parameters

all: Displays all ARP entries.

dynamic: Displays dynamic ARP entries.

static: Displays static ARP entries.

slot slot-number: Displays the ARP entries for the interface card specified by the slot number. (In standalone mode.)

chassis chassis-number slot slot-number: Displays the ARP entries of a card on an IRF member switch. The chassis-number argument specifies the ID of the IRF member switch. The slot-number argument specifies the number of the slot where the card resides, which you can display with the display device command. (In IRF mode.)

vlan vlan-id: Displays the ARP entries of the specified VLAN. The value for the vlan-id argument is in the range of 1 to 4094.

interface interface-type interface-number: Displays the ARP entries of the interface specified by the argument interface-type interface-number.

verbose: Displays detailed information about ARP entries.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

count: Displays the number of ARP entries.

Description

Use display arp to display ARP entries in the ARP mapping table.

If you do not specify any parameter, this command displays all ARP entries.

Related commands: arp static and reset arp.

Examples

# Display detailed information about all ARP entries.

<Sysname> display arp all verbose

                Type: S-Static    D-Dynamic    A-Authorized      M-Multiport

IP Address       MAC Address     VLAN ID  Interface              Aging Type

Vpn-instance Name

192.168.1.250    0015-e943-9fc9  100      GE3/0/18               18    D

[No Vrf]

192.168.2.222    00e0-fc00-1601  1000     GE3/0/19               20    D

[No Vrf]

192.168.1.1      00e0-fc01-0000  N/A      N/A                    N/A   M

[No Vrf]

Table 1 Command output

Field

Description

IP Address

IP address in an ARP entry.

MAC Address

MAC address in an ARP entry.

VLAN ID

VLAN ID contained in a static ARP entry.

Interface

Outbound interface in an ARP entry.

Aging

Age timer for a dynamic ARP entry in minutes (DIS or N/A indicates that the age timer is unknown or there is no age timer).

Type

ARP entry type:

·     D—Dynamic.

·     S—Static.

·     A—Authorized.

·     M—Multiple ports.

Vpn-instance Name

Name of VPN instance. [No Vrf] indicates that no VPN instance is configured for the ARP entry.

 

# Display the number of all ARP entries.

<Sysname> display arp all count

 Total Entry(ies): 5

display arp ip-address

Syntax

In standalone mode:

display arp ip-address [ slot slot-number ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

In IRF mode:

display arp ip-address [ chassis chassis-number slot slot-number ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

ip-address: Displays the ARP entry for the specified IP address.

slot slot-number: Displays the ARP entries for the interface card specified by the slot number. (In standalone mode.)

chassis chassis-number slot slot-number: Displays the ARP entries of a card on an IRF member switch. The chassis-number argument specifies the ID of the IRF member switch. The slot-number argument specifies the number of the slot where the card resides, which you can display with the display device command. (In IRF mode.)

verbose: Displays the detailed information about ARP entries.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display arp ip-address to display the ARP entry for the specified IP address.

Related commands: arp static and reset arp.

Examples

# Display the ARP entry for the IP address 20.1.1.1.

<Sysname> display arp 20.1.1.1

                Type: S-Static    D-Dynamic    A-Authorized    M-Multiport

IP Address       MAC Address     VLAN ID  Interface              Aging Type

20.1.1.1         00e0-fc00-0001  N/A      N/A                    N/A   S

display arp timer aging

Syntax

display arp timer aging [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

2: System level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display arp timer aging to display the age timer for dynamic ARP entries.

Related commands: arp timer aging.

Examples

# Display the age timer for dynamic ARP entries.

<Sysname> display arp timer aging

Current ARP aging time is 10 minute(s)

display arp vpn-instance

Syntax

display arp vpn-instance vpn-instance-name [ count ] [ | { begin | exclude | include } regular-expression | count ]

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance-name: Specifies the name of an MPLS L3VPN, a case-sensitive string of 1 to 31 characters.

count: Displays the number of ARP entries.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display arp vpn-instance to display the ARP entries for the specified VPN instance.

Related commands: arp static and reset arp.

Examples

# Display ARP entries for the VPN instance named test.

<Sysname> display arp vpn-instance test

                Type: S-Static    D-Dynamic

IP Address       MAC Address     VLAN ID  Interface              Aging Type

20.1.1.1         00e0-fc00-0001  N/A      N/A                    N/A   S

naturemask-arp enable

Syntax

naturemask-arp enable

undo naturemask-arp enable

View

System view

Default level

2: System level

Parameters

None

Description

Use naturemask-arp enable to enable the support for ARP requests that are from a natural network.

Use undo naturemask-arp enable to restore the default.

By default, the support for ARP requests from a natural network is disabled.

Examples

# Enable the support for ARP requests from a natural network.

<Sysname> system-view

[Sysname] naturemask-arp enable

reset arp

Syntax

In standalone mode:

reset arp { all | dynamic | static | slot slot-number | interface interface-type interface-number }

In IRF mode:

reset arp { all | dynamic | static | chassis chassis-number slot slot-number | interface interface-type interface-number }

View

User view

Default level

2: System level

Parameters

all: Clears all ARP entries except authorized ARP entries.

dynamic: Clears all dynamic ARP entries.

static: Clears all static ARP entries.

slot slot-number: Clears the ARP entries for the interface card specified by the slot number. (In standalone mode.)

chassis chassis-number slot slot-number: Clears the ARP entries of a card on an IRF member switch. The chassis-number argument specifies the ID of the IRF member switch. The slot-number argument specifies the number of the slot where the card resides, which you can display with the display device command. (In IRF mode.)

interface interface-type interface-number: Clears the ARP entries for the interface specified by the argument interface-type interface-number.

Description

Use reset arp to clear ARP entries except authorized ARP entries from the ARP mapping table.

If you specify an interface, the command clears only dynamic ARP entries of the interface.

If you specify an interface card, the command clears only dynamic ARP entries of the card.

Related commands: arp static and display arp.

Examples

# Clear all static ARP entries.

<Sysname> reset arp static


gratuitous-arp-learning enable

Syntax

gratuitous-arp-learning enable

undo gratuitous-arp-learning enable

View

System view

Default level

2: System level

Parameters

None

Description

Use gratuitous-arp-learning enable to enable the gratuitous ARP packet learning function.

Use undo gratuitous-arp-learning enable to disable the function.

By default, gratuitous ARP packet learning is enabled.

With this function enabled, a device creates a dynamic ARP entry by using the sender IP and MAC addresses in a received gratuitous ARP packet if no matching ARP entry exists. If a matching ARP entry exists, the device updates the ARP entry regardless of whether this function is enabled.

Examples

# Enable the gratuitous ARP packet learning function.

<Sysname> system-view

[Sysname] gratuitous-arp-learning enable

gratuitous-arp-sending enable

Syntax

gratuitous-arp-sending enable

undo gratuitous-arp-sending enable

View

System view

Default level

2: System level

Parameters

None

Description

Use gratuitous-arp-sending enable to enable a switch to send gratuitous ARP packets when receiving ARP requests from another network segment.

Use undo gratuitous-arp-sending enable to restore the default.

By default, a switch cannot send gratuitous ARP packets when receiving ARP requests from another network segment.

Examples

# Disable a switch from sending gratuitous ARP packets.

<Sysname> system-view

[Sysname] undo gratuitous-arp-sending enable


display local-proxy-arp

Syntax

display local-proxy-arp [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

2: System level

Parameters

interface interface-type interface-number: Displays the local proxy ARP status of the interface specified by the argument interface-type interface-number.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display local-proxy-arp to display the status of the local proxy ARP.

If you specify an interface, this command displays the local proxy ARP status of the specified interface. If you do not specify any interface, this command displays the local proxy ARP status of all interfaces.

Related commands: local-proxy-arp enable.

Examples

# Display the status of the local proxy ARP on VLAN-interface 2.

<Sysname> display local-proxy-arp interface vlan-interface 2

Interface Vlan-interface2

 Local Proxy ARP status: enabled

display proxy-arp

Syntax

display proxy-arp [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

2: System level

Parameters

interface interface-type interface-number: Displays the proxy ARP status of the interface specified by the argument interface-type interface-number.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display proxy-arp to display the proxy ARP status.

If you specify an interface, this command displays proxy ARP status of the specified interface. If you do not specify any interface, this command displays proxy ARP status of all interfaces.

Related commands: proxy-arp enable.

Examples

# Display the proxy ARP status on VLAN-interface 2.

[Sysname] display local-proxy-arp interface Vlan-interface 2

Interface Vlan-interface2

 Local Proxy ARP status: disabled

local-proxy-arp enable

Syntax

local-proxy-arp enable [ ip-range startIP to endIP ]

undo local-proxy-arp enable

View

VLAN interface view, Layer 3 Ethernet interface view, Layer 3 Ethernet subinterface view, Layer 3 aggregate interface view, Layer 3 aggregate subinterface view

Default level

2: System level

Parameters

ip-range startIP to endIP: Specifies the IP address range for which local proxy ARP is enabled. The start IP address must be lower than or equal to the end IP address.

Description

Use local-proxy-arp enable to enable local proxy ARP.

Use undo local-proxy-arp enable to disable local proxy ARP.

By default, local proxy ARP is disabled.

Only one IP address range can be specified by using the ip-range keyword on an interface.

Related commands: display local-proxy-arp.

Examples

# Enable local proxy ARP on VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] local-proxy-arp enable

# Enable local proxy ARP on VLAN-interface 2 for the specified IP address range.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] local-proxy-arp enable ip-range 1.1.1.1 to 1.1.1.20

proxy-arp enable

Syntax

proxy-arp enable

undo proxy-arp enable

View

VLAN interface view, Layer 3 Ethernet interface view, Layer 3 Ethernet subinterface view, Layer 3 aggregate interface view, Layer 3 aggregate subinterface view

Default level

2: System level

Parameters

None

Description

Use proxy-arp enable to enable proxy ARP.

Use undo proxy-arp enable to disable proxy ARP.

By default, proxy ARP is disabled.

Related commands: display proxy-arp.

Examples

# Enable proxy ARP on VLAN-interface 2.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] proxy-arp enable

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网