- Table of Contents
-
- H3C S6116 Ultra-Low Latency Switch Series Command References-Release 671x-6W101
- 00-Preface
- 01-Interface forwarding commands
- 02-CLI commands
- 03-RBAC commands
- 04-Login management commands
- 05-FTP and TFTP commands
- 06-File system management commands
- 07-Configuration file management commands
- 08-Software upgrade commands
- 09-Device management commands
- 10-Tcl commands
- 11-Bulk interface commands
- 12-IP addressing commands
- 13-IPv6 basics commands
- 14-Static routing commands
- 15-IPv6 static routing commands
- 16-AAA commands
- 17-Public key management commands
- 18-SSH commands
- 19-System maintenance and debugging commands
- 20-NTP commands
- 21-SNMP commands
- 22-RMON commands
- 23-Event MIB commands
- 24-Information center commands
- 25-PTP commands
- 26-Network synchronization commands
- Related Documents
-
Title | Size | Download |
---|---|---|
12-IP addressing commands | 100.58 KB |
IP addressing commands
Only the management Ethernet interfaces of this series support the IP addressing feature.
display ip interface
Use display ip interface to display IP configuration and statistics for Layer 3 interfaces.
Syntax
display ip interface [ interface-type [ interface-number ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type: Specifies an interface by its type.
interface-number: Specifies an interface by its number.
Usage guidelines
Use the display ip interface command to display IP configuration and statistics for the specified Layer 3 interface. The statistics include the number of unicast packets and bytes the interface has sent and received.
If you specify only the interface type, this command displays configuration and statistics for all interfaces of this interface type. If you do not specify any optional parameters, this command displays IP configuration and statistics for all Layer 3 interfaces.
Examples
# Display IP configuration and statistics for M-GigabitEthernet.
<Sysname> display ip interface M-GigabitEthernet 0/0/0
M-GigabitEthernet 0/0/0 current state: UP
Line protocol current state: UP
Internet Address is 1.1.1.1/8 Primary
Broadcast address : 1.255.255.255
The Maximum Transmit Unit : 1500 bytes
input packets : 0, bytes : 0, multicasts : 0
output packets : 0, bytes : 0, multicasts : 0
TTL invalid packet number: 0
Echo reply: 0
Unreachable: 0
Source quench: 0
Routing redirect: 0
Echo request: 0
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0
Table 1 Command output
Field |
Description |
current state |
Physical link state of the interface: · Administrative DOWN—The interface has been shut down by using the shutdown command. · DOWN—The interface is administratively up, but its physical state is down (possibly because no physical link exists or the link has failed). · UP—The interface is both administratively and physically up. |
Line protocol current state |
Data link layer state of the interface. · DOWN—The data link layer protocol is down. · UP—The data link layer protocol is up. · UP (spoofing)—The data link layer protocol is up, but the link is an on-demand link or does not exist. |
Internet Address |
IP address of the interface and type of the address. Possible IP address types include: · Primary—Manually configured primary IP address. · Sub—Manually configured secondary IP address. If the interface has both primary and secondary IP addresses, the primary IP address is displayed. If the interface has only secondary IP addresses, the lowest secondary IP address is displayed. · DHCP-Allocated—DHCP allocated IP address. · BOOTP-Allocated—BOOTP allocated IP address. · Unnumbered—IP address borrowed from another interface. |
Broadcast address |
Broadcast address of the subnet attached to an interface. |
The Maximum Transmit Unit |
MTU of the interface, in bytes. |
input packets, bytes, multicasts output packets, bytes, multicasts |
All received and sent packets and bytes, and received and sent multicast packets on an interface (statistics start at the device startup). |
TTL invalid packet number |
Number of TTL-invalid packets received on the interface (statistics start at the device startup). |
ICMP packet input number: Echo reply: Unreachable: Source quench: Routing redirect: Echo request: Router advert: Router solicit: Time exceed: IP header bad: Timestamp request: Timestamp reply: Information request: Information reply: Netmask request: Netmask reply: Unknown type: |
Total number of ICMP packets received on the interface (statistics start at the device startup): · Echo reply packets. · Unreachable packets. · Source quench packets. · Routing redirect packets. · Echo request packets. · Router advertisement packets. · Router solicitation packets. · Time exceeded packets. · IP header bad packets. · Timestamp request packets. · Timestamp reply packets. · Information request packets. · Information reply packets. · Netmask request packets. · Netmask reply packets. · Unknown type packets. |
Related commands
display ip interface brief
ip address
display ip interface brief
Use display ip interface brief to display brief IP configuration for Layer 3 interfaces.
Syntax
display ip interface [ interface-type [ interface-number ] ] brief [ description ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type: Specifies an interface type. If you do not specify an interface type, this command displays brief IP configuration for all Layer 3 interfaces.
interface-number: Specifies an interface number. If you do not specify an interface number, this command displays brief IP configuration for all Layer 3 interfaces of the specified type.
description: Displays complete interface descriptions. If you do not specify this keyword, the command displays a maximum of 11 characters for each interface description. If the description is longer than 11 characters, the first 8 characters are displayed with an ellipsis (...) followed.
Usage guidelines
Information displayed by the command includes the state of the physical and link layer protocols, IP address, and interface descriptions.
Examples
# Display brief IP configuration for M-GigabitEthernet.
<Sysname> display ip interface M-GigabitEthernet brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
MGE0/0/0 up up 6.6.6.1/24 -- Link to ...
# Display brief IP configuration for M-GigabitEthernet, including complete interface descriptions.
<Sysname> display ip interface M-GigabitEthernet brief description
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
MGE0/0/0 up up 6.6.6.1/24 -- Link to MGT
Table 2 Command output
Field |
Description |
*down: administratively down |
The interface is administratively shut down by using the shutdown command. |
(s) : spoofing |
Spoofing attribute of the interface. The link protocol state of the interface is up, but the link is temporarily established on demand or does not exist. |
Interface |
Interface name. |
Physical |
Physical state of the interface: · *down—The interface is administratively shut down by using the shutdown command. · down—The interface is administratively up but its physical state is down, possibly because of a connection or link failure. · up—Both the administrative and physical states of the interface are up. |
Protocol |
Link layer protocol state of the interface: · down—The protocol state of the interface is down. · down(l)—The protocol state of the interface is down (loopback). · up—The protocol state of the interface is up. · up(l)—The protocol state of the interface is up (loopback). · up(s)—The protocol state of the interface is up (spoofing). |
IP address/Mask |
IP address and mask length of the interface. If no IP address is configured, this field displays hyphens (--). |
VPN instance |
This field is not supported in the current software version. Name of the VPN instance to which the interface belongs. This field displays a maximum of 12 characters. If the VPN instance name is longer than 12 characters, the first 9 characters are displayed, followed by an ellipsis (...). If the interface does not belong to any VPN instance, this field displays hyphens (--). |
Description |
Description of the interface. This field displays a maximum of 11 characters. If the description is longer than 11 characters, the first 8 characters are displayed, followed by an ellipsis (...). If no description is configured, this field displays hyphens (--). |
Related commands
display ip interface
ip address
ip address
Use ip address to assign an IP address to the interface.
Use undo ip address to remove the IP address from the interface.
Syntax
ip address ip-address { mask-length | mask } [ sub ]
undo ip address ip-address { mask-length | mask } [ sub ]
Default
No IP address is assigned to an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the IP address of the interface, in dotted decimal notation.
mask-length: Specifies the subnet mask length in the range of 1 to 31. For a loopback interface, the value range is 1 to 32.
mask: Specifies the subnet mask in dotted decimal notation.
sub: Assigns a secondary IP address to the interface.
Usage guidelines
Use the command to assign a primary or secondary IP address to an interface.
An interface can have only one primary IP address. If you execute this command multiple times to specify different primary IP addresses on an interface, the most recent configuration takes effect. If the interface connects to multiple subnets, configure primary and secondary IP addresses on the interface so the subnets can communicate with each other through the interface.
You cannot assign secondary IP addresses to an interface that obtains an IP address through BOOTP, PPP address negotiation, IP unnumbered, or DHCP.
If you do not specify any parameters, the undo ip address command removes all IP addresses from the interface. The undo ip address ip-address { mask | mask-length } command removes the primary IP address. The undo ip address ip-address { mask | mask-length } sub command removes a secondary IP address.
Examples
# Assign M-GigabitEthernet0/0/0 a primary IP address 129.102.0.1, with the subnet masks 255.255.255.0.
<Sysname> system-view
[Sysname] interface M-GigabitEthernet 0/0/0
[Sysname-M-GigabitEthernet 0/0/0] ip address 129.102.0.1 255.255.255.0
Related commands
display ip interface
display ip interface brief