- Table of Contents
-
- 05-Layer 3 - IP Services Command Reference
- 00-Preface
- 01-ARP commands
- 02-IP addressing commands
- 03-DHCP commands
- 04-DNS commands
- 05-IP forwarding basics commands
- 06-Adjacency table commands
- 07-IP performance optimization commands
- 08-UDP helper commands
- 09-IPv6 basics commands
- 10-DHCPv6 commands
- 11-IPv6 fast forwarding commands
- 12-Fast forwarding commands
- 13-Tunnel commands
- 14-GRE commands
- Related Documents
-
Title | Size | Download |
---|---|---|
02-IP addressing commands | 74.44 KB |
display ip interface
Use display ip interface to display IP configuration and statistics for the specified Layer 3 interface or all Layer 3 interfaces.
Syntax
display ip interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
interface-type interface-number: Specifies an interface by its type and 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, bytes, and number of multicast packets the interface has sent and received, and the number of TTL-invalid packets, ARP packets, and ICMP packets the interface has received.
The packet statistics helps you locate a possible attack on the network.
If you do not specify any interface, the command displays information about all Layer 3 interfaces.
Examples
# Display IP configuration and statistics for VLAN-interface 10.
<Sysname> display ip interface vlan-interface 10
Vlan-interface10 current state : DOWN
Line protocol current state : DOWN
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 |
Current physical state of the interface: · Administrative DOWN—The interface is shut down with the shutdown command. · DOWN—The interface is administratively up but its physical state is down, which may be caused by a connection or link failure. · UP—Both the administrative and physical states of the interface are up. |
Line protocol current state |
Current state of the link layer protocol: · DOWN—The protocol state of the interface is down (typically when no IP address is configured for the interface). · UP—The protocol state of the interface is up. · UP (spoofing)—The protocol state of the interface pretends to be up. However, no corresponding link is present, or the corresponding link is not present permanently but is established as needed. |
Internet Address |
IP address of an interface followed by: · Primary—A primary IP address. · Sub—A secondary IP address. · MTunnel—An MTunnel interface IP address. · SSLVPN—An SSL VPN interface IP address. · Cluster—A cluster IP address. · Mad—A MAD IP address. |
Broadcast address |
Broadcast address of the subnet attached to an interface. |
The Maximum Transmit Unit |
Maximum transmission units on the interface, in bytes. |
input packets, bytes, multicasts output packets, bytes, multicasts |
Unicast packets, bytes, and multicast packets received 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 information for the specified Layer 3 interface or all Layer 3 interfaces.
Syntax
display ip interface [ interface-type [ interface-number ] ] brief
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
interface-type: Specifies the interface type.
interface-number: Specifies the interface number.
Usage guidelines
Use the display ip interface brief command to display brief IP configuration information, including the state, IP address, and description of the physical and link layer protocols, for the specified Layer 3 interface or all Layer 3 interfaces.
If you do not specify the interface type and interface number, this command displays brief IP configuration information for all Layer 3 interfaces.
If you specify only the interface type, this command displays brief IP configuration information for all Layer 3 interfaces of the specified type.
If you specify both the interface type and interface number, this command displays brief IP configuration information for the specified interface is displayed.
Examples
# Display brief IP configuration information for VLAN interfaces.
<Sysname> display ip interface vlan-interface brief
*down: administratively down
(s): spoofing
Interface Physical Protocol IP Address Description
Vlan10 down down 6.6.6.1 Vlan-inte...
Vlan2 down down 7.7.7.1 Vlan-inte...
Table 2 Command output
Field |
Description |
*down: administratively down |
The interface is administratively shut down with the shutdown command. |
(s) : spoofing |
Spoofing attribute of the interface. It indicates that an interface may have no link present even when its link layer protocol is displayed up or the link is set up only on demand. |
Interface |
Interface name. |
Physical |
Physical state of the interface: · *down—The interface is administratively shut down with the shutdown command. · down—The interface is administratively up but its physical state is down (possibly because of poor connection or line 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 (typically when no IP address is configured for the interface). · up—The protocol state of the interface is up. · up(s)—The protocol state of the interface is up (spoofing). |
IP Address |
IP address of the interface. If no IP address is configured, unassigned is displayed. |
Description |
Interface description information, a maximum of 12 characters can be displayed. If there are more than 12 characters, only the first nine characters are displayed. |
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
mdc-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 0 to 32.
mask: Specifies the subnet mask in dotted decimal notation.
sub: Assigns a secondary IP address to the interface.
Usage guidelines
Use this command to configure a primary IP address for an interface. 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.
An interface can have only one primary IP address. A newly configured primary IP address overwrites the previous address.
You cannot assign secondary IP addresses to an interface that obtains an IP address through BOOTP, DHCP, PPP address negotiation, or IP unnumbered.
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. Before removing the primary IP address, remove all secondary IP addresses.
The primary and secondary IP addresses you assign to the interface can be located on the same network segment, but different interfaces on your device must reside on different network segments.
Examples
# Assign VLAN-interface 10 a primary IP address 129.12.0.1 and a secondary IP address 202.38.160.1, with subnet masks being 255.255.255.0.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ip address 129.12.0.1 255.255.255.0
[Sysname-Vlan-interface10] ip address 202.38.160.1 255.255.255.0 sub
Related commands
· display ip interface
· display ip interface brief