- 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-NAT Commands
- 06-IP Performance Optimization Commands
- 07-Adjacency Table Commands
- 08-UDP Helper Commands
- 09-IPv6 Basics Commands
- 10-DHCPv6 Commands
- 11-IPv6 DNS Commands
- 12-NAT-PT Commands
- 13-Tunneling Commands
- 14-GRE Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
02-IP Addressing Commands | 97.1 KB |
display ip interface
Syntax
display ip interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and 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 the display ip interface command to display IP configuration information for a specified Layer 3 interface or all Layer 3 interfaces.
Examples
# Display IP configuration information for interface GigabitEthernet 3/1/1.
<Sysname> display ip interface gigabitethernet 3/1/1
GigabitEthernet3/1/1 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
ARP packet input number: 0
Request packet: 0
Reply packet: 0
Unknown packet: 0
TTL invalid packet number: 0
ICMP packet input 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
DHCP packet deal mode: global
Table 1 Output description
Field |
Description |
current state |
Current physical state of the interface: · Administrative DOWN—Indicates that the interface is administratively down; that is, the interface is shut down with the shutdown command. · DOWN—Indicates that the interface is administratively up but its physical state is down, which may be caused by a connection or link failure. · UP—Indicates that both the administrative and physical states of the interface are up. |
Line protocol current state |
Current state of the link layer protocol: · DOWN—Indicates that the protocol state of the interface is down. · UP—Indicates that the protocol state of the interface is up. · UP (spoofing)—Indicates that 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—Identifies a primary IP address, or · Sub—Identifies a secondary IP address. · negotiated—Identifies a PPP negotiated IP address. · unnumbered—Identifies an unnumbered IP address. · acquired via DHCP—Identifies an IP address obtained through DHCP. · acquired via BOOTP—Identifies an IP address obtained through BOOTP. · Cluster—Identifies a cluster IP address. · Mad—Identifies 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 (the statistics start at the router startup). |
ARP packet input number: Request packet Reply packet Unknown packet |
Total number of ARP packets received on an interface (the statistics start at the router startup), including: · ARP request packets · ARP reply packets · Unknown packets |
TTL invalid packet number |
Number of TTL-invalid packets received on an interface (the statistics start at the router 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 an interface (the statistics start at the router startup), including the following packets: · 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 · Network mask request packets · Network mask reply packets · Unknown type packets |
display ip interface brief
Syntax
display ip interface [ interface-type [ interface-number ] ] brief [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type: Interface type.
interface-number: 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 the display ip interface brief command to display brief IP configuration information about a specified Layer 3 interface or all Layer 3 interfaces.
Note that:
· Without the interface type and interface number specified, the brief IP configuration information for all Layer 3 interfaces is displayed;
· With only the interface type specified, the brief IP configuration information about all Layer 3 interfaces of the specified type is displayed;
· With both the interface type and interface number specified, only the brief IP configuration information for the specified interface is displayed.
Related commands: display ip interface.
Examples
# Display brief information about GigabitEthernet interfaces.
<Sysname> display ip interface GigabitEthernet brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP Address Description
GE1/0/1 up up 192.168.20.231 --
GE1/0/5 down down -- --
Table 2 Output description
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 whose link layer protocol is displayed up may have no link present or the link is set up only on demand. |
(l) : loopback |
PPP and HDLC support link loopback detection. |
Interface |
Interface name. |
Physical |
Physical state of interface: · *down—Indicates that the interface is administratively down; that is, the interface is shut down with the shutdown command. · down—Indicates that the interface is administratively up but its physical state is down, which may be caused by a connection or link failure. · up—Indicates that both the administrative and physical states of the interface are up. · up(l)—Indicates that the protocol state of the interface is loopback up. · down(l)—Indicates that the protocol state of the interface is loopback down. |
Protocol |
Link layer protocol state of interface: · down—Indicates that the protocol state of the interface is down. · up—Indicates that the protocol state of the interface is up. · up(s)—Indicates that the protocol state of the interface is spoofing up. |
IP Address |
IP address of interface (If no IP address is configured, “--” is displayed.) |
Description |
Interface description information (If no IP address is configured, “--” is displayed), for which at most 27 characters can be displayed. If there are more than 27 characters, only the first 24 characters and “…” are displayed. |
ip address
Syntax
ip address ip-address { mask-length | mask } [ sub ]
undo ip address [ ip-address { mask-length | mask } [ sub ] ]
View
Interface view
Default level
2: System level
Parameters
ip-address: IP address of interface, in dotted decimal notation.
mask-length: Subnet mask length, the number of consecutive ones in the mask, in the range of 0 to 32.
mask: Subnet mask in dotted decimal notation.
sub: Secondary IP address for the interface.
Description
Use the ip address command to assign an IP address and mask to the interface.
Use the undo ip address command to remove all IP addresses.
Use the undo ip address ip-address { mask | mask-length } command to remove the primary IP address.
Use the undo ip address ip-address { mask | mask-length } sub command to remove a secondary IP address.
By default, no IP address is assigned to any interface.
When assigning IP addresses to an interface, consider the following:
· You can assign only one primary IP address to an interface.
· The primary and secondary IP addresses can be located on the same network segment.
· Before removing the primary IP address, remove all secondary IP addresses.
· You can assign a secondary IP address only when the interface is not configured to borrow an IP address through IP unnumbered or obtain one through PPP address negotiation.
Related commands: display ip interface.
Examples
Assign GigabitEthernet 3/1/1 a primary IP address and a secondary IP address, with the subnet masks both being 255.255.255.0.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/1/1
[Sysname-GigabitEthernet3/1/1] ip address 129.102.0.1 255.255.255.0
[Sysname-GigabitEthernet3/1/1] ip address 202.38.160.1 255.255.255.0 sub
ip address unnumbered
Syntax
ip address unnumbered interface interface-type interface-number
undo ip address unnumbered
View
Interface view
Default level
2: System level
Parameters
interface interface-type interface-number: Specifies an interface from which the current interface can borrow an IP address.
Description
Use the ip address unnumbered command to configure the current interface as IP unnumbered to borrow an IP address from another interface.
Use the undo ip address unnumbered command to disable IP unnumbered on the interface.
By default, the interface does not borrow IP addresses from other interfaces.
Examples
# Configure the interface Serial 3/1/9/1:23 supporting PPP-encapsulation to borrow the IP address of the interface GigabitEthernet 3/1/1.
<Sysname> system-view
[Sysname] interface serial 3/1/9/1:23
[Sysname-Serial3/1/9/1:23] ip address unnumbered interface GigabitEthernet 3/1/1