05-Layer 3 - IP Services Command Reference

HomeSupportRoutersH3C SR8800 Router SeriesReference GuidesCommand ReferencesH3C SR8800 Command Reference-Release3347-6W10305-Layer 3 - IP Services Command Reference
01-ARP Commands
Title Size Download
01-ARP Commands 110.38 KB

arp check enable

Syntax

arp check enable

undo arp check enable

View

System view

Default level

2: System level

Parameters

None

Description

Use the arp check enable command to enable dynamic ARP entry check.

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

By default, dynamic 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

Ethernet interface 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. The value ranges from 0 to 65533 when the system works in SPE or SPC mode, and ranges from 0 to 16381 when the system works in hybrid mode. For more information about system working modes, see Fundamentals Configuration Guide.

Description

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

Use the undo arp max-learning-num command to restore the default value.

By default, an interface can learn up to 65533 ARP entries when the system works in SPE or SPC mode, and 16381 ARP entries when the system works in hybrid mode.

When the number argument is set to 0, the 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/1/1 to learn up to 1000 dynamic ARP entries.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/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 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 to, in the range of 1 to 4094.

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

vpn-instance vpn-instance-name: Specifies the MPLS L3 VPN for a static ARP entry. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. Without this option, the static ARP entry belongs to the public network.

Description

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

Use the undo arp command to remove an ARP entry.

Note that:

·           A static ARP entry is effective when the router works normally. 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 specifies the VLAN corresponding to 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 both the vlan-id and ip-address arguments are specified, the IP address of the VLAN interface corresponding to the vlan-id argument must belong to the same network segment as the IP address specified by the ip-address argument.

Related commands: display arp and reset arp.

Examples

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

<Sysname> system-view

[Sysname] arp static 202.38.10.2 00e0-fc01-0000 10 gigabitethernet 3/1/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: Aging time for dynamic ARP entries in minutes, in the range of 1 to 1,440.

Description

Use the arp timer aging command to set aging time for dynamic ARP entries.

Use the undo arp timer aging command to restore the default.

By default, the aging time for dynamic ARP entries is 20 minutes.

Related commands: display arp timer aging.

Examples

# Set aging time for dynamic ARP entries to 10 minutes.

<Sysname> system-view

[Sysname] arp timer aging 10

display arp

Syntax

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

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.

vlan vlan-id: Displays the ARP entries of the specified VLAN. The VLAN ID ranges from 1 to 4,094.

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

count: Displays the number of ARP entries.

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.

Description

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

If no parameter is specified, all ARP entries are displayed.

Related commands: arp static and reset arp.

Examples

# Display the detailed information of all ARP entries.

<Sysname> display arp all verbose

                Type: S-Static    D-Dynamic    A-Authorized

IP Address       MAC Address     VLAN ID  Interface              Aging Type

Vpn-instance Name

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

test

193.1.1.70       00e0-fe50-6503  100      GE3/1/1                N/A    D

[No Vrf]

Table 1 Output description

Field

Description

IP Address

IP address in an ARP entry.

MAC Address

MAC address in an ARP entry.

VLAN ID

VLAN ID contained a static ARP entry.

Interface

Outbound interface in an ARP entry.

Aging

Aging time for an ARP entry in minutes (DIS or N/A means unknown aging time or no aging time).

Type

ARP entry type: D for dynamic, S for static, and A for authorized.

Vpn-instance Name

Name of VPN instance. [No Vrf] means no VPN instance is configured for the corresponding ARP.

 

# Display the number of all ARP entries

<Sysname> display arp all count

Total entry(ies): 2

The output shows a total number of two ARP entries.

display arp ip-address

Syntax

display arp ip-address [ 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.

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 the display arp ip-address command to display the ARP entry for a specified IP address.

Related commands: arp static and reset arp.

Examples

# Display the corresponding ARP entry for the IP address 20.1.1.1.

<Sysname> display arp 20.1.1.1

                Type: S-Static    D-Dynamic   A-Authorized

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 the display arp timer aging command to display the aging time for dynamic ARP entries.

Related commands: arp timer aging.

Examples

# Display the aging time for dynamic ARP entries.

[Sysname] display arp timer aging

Current ARP aging time is 10 minute(s)

The output shows that the aging time for dynamic ARP entries is 10 minutes.

display arp vpn-instance

Syntax

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

View

Any view

Default level

1: Monitor level

Parameters

vpn-instance-name: Name of 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 the display arp vpn-instance command to display the ARP entries for a specified VPN.

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     A-Authorized

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 the naturemask-arp enable command to enable the support for ARP requests that are from a natural network.

Use the undo naturemask-arp enable command 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

reset arp { all | dynamic | slot slot-number | static | 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.

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

Description

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

With interface interface-type interface-number or slot slot-id specified, the command clears only dynamic ARP entries of the interface or the interface card.

Related commands: arp static and display arp.

Examples

# Clear all static ARP entries.

<Sysname> reset arp static

 


arp send-gratuitous-arp

Syntax

arp send-gratuitous-arp [ interval milliseconds ]

undo arp send-gratuitous-arp

View

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

Default Level

2: System level

Parameters

interval milliseconds: Sets the interval at which gratuitous ARP packets are sent, in the range of 200 to 200000 milliseconds. The default value is 2000.

Description

Use the arp send-gratuitous-arp command to enable periodic sending of gratuitous ARP packets and set the sending interval for the interface.

Use the undo arp send-gratuitous-arp command to disable the interface from periodically sending gratuitous ARP packets.

By default, an interface is disabled from sending gratuitous ARP packets periodically.

Note that:

·           This function takes effect only when the link of the enabled interface goes up and an IP address has been assigned to the interface.

·           The IP address contained in a gratuitous ARP request can be the VRRP virtual IP address, or the primary IP address or a manually configured secondary IP address of the sending interface only. The primary IP address can be configured manually or automatically, whereas the secondary IP address must be configured manually.

·           If you change the interval for sending gratuitous ARP packets, the configuration is effective at the next sending interval.

·           The frequency of sending gratuitous ARP packets may be much lower than is expected if this function is enabled on multiple interfaces, or each interface is configured with multiple secondary IP addresses, or a small sending interval is configured in the preceding cases.

Examples

# Enable GigabitEthernet 5/0/1 to send gratuitous ARP packets every 300 milliseconds.

<Sysname> system-view

[Sysname] interface GigabitEthernet 5/0/1

[Sysname-GigabitEthernet5/0/1] arp send-gratuitous-arp interval 300

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 the gratuitous-arp-sending enable command to enable the router to send gratuitous ARP packets upon receiving ARP requests from another network segment.

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

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

Examples

# Disable the router from sending gratuitous ARP packets.

<Sysname> system-view

[Sysname] undo gratuitous-arp-sending enable

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 the gratuitous-arp-learning enable command to enable the gratuitous ARP packet learning function.

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

By default, the function is enabled.

With this function enabled, a router receiving a gratuitous ARP packet adds the sender IP and MAC addresses in the packet to its dynamic ARP table if it finds no corresponding ARP entry exists. If the corresponding ARP entry exists, the router 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

 


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 interface-type interface-number argument.

|: 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 the display local-proxy-arp command to display the local proxy ARP status.

If no interface is specified, the local proxy ARP status of all interfaces is displayed.

Related commands: local-proxy-arp enable.

Examples

# Display the local proxy ARP status 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.

|: 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 the display proxy-arp command to display the proxy ARP status.

If an interface is specified, proxy ARP status of the specified interface is displayed; if no interface is specified, proxy ARP status of all interfaces is displayed.

Related commands: proxy-arp enable.

Examples

# Display the proxy ARP status on GigabitEthernet3/1/1.

<Sysname> display proxy-arp interface gigabitethernet 3/1/1

Interface GigabitEthernet 3/1/1

 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 within which local proxy ARP is enabled. The start IP address must be lower than or equal to the end IP address.

Description

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

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

By default, local proxy ARP is disabled.

Note that 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 GigabitEthernet 3/1/2 for a specific IP address range.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/2

[Sysname-GigabitEthernet3/1/2] 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 the proxy-arp enable command to enable proxy ARP.

Use the undo proxy-arp enable command to disable proxy ARP.

By default, proxy ARP is disabled.

Related commands: display proxy-arp.

Examples

# Enable proxy ARP on GigabitEthernet 3/1/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet 3/1/1] 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网