H3C S9500 Command Manual-Release2132[V2.03]-02 IP Services Volume

HomeSupportSwitchesH3C S9500 Series SwitchesReference GuidesCommand ReferencesH3C S9500 Command Manual-Release2132[V2.03]-02 IP Services Volume
04-IP Addressing Commands
Title Size Download
04-IP Addressing Commands 62.78 KB

Chapter 1  IP Addressing Configuration Commands

1.1  IP Addressing Configuration Commands

1.1.1  display ip interface

Syntax

display ip interface [ interface-type interface-number ]

View

Any view

Default Level

1: Monitor level

Parameters

interface-type interface-number: Specifies an interface by its type and number.

Description

Use the display ip interface command to display information about a specified or all Layer 3 interfaces.

Examples

# Display information about the interface VLAN-interface 1.

<Sysname> display ip interface vlan-interface 1

Vlan-interface1 current state :DOWN

Line protocol current state :DOWN

Internet Address is 2.2.2.2/24 Primary

Broadcast address : 2.2.2.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-1 Description on fields of the display ip interface command

Field

Description

current state

Current physical state of an interface

Line protocol current state

Current state of the link layer protocol

Internet Address

IP address of the interface:

l      Primary: Identifies a primary IP address, or

l      Sub: Identifies a secondary IP address.

Broadcast address

Broadcast address of the subnet attached to an interface

The Maximum Transmit Unit

Maximum transmission units on an interface

input packets : 0, bytes : 0, multicasts : 0

output packets : 0, bytes : 0, multicasts : 0

Unicast packets, bytes, and multicast packets received on an interface

Unicast packets, bytes, and multicast packets sent on an interface

ARP packet input number

Total number of ARP packets received on an interface

Request packet

Number of ARP request packets received on an interface

Reply packet

Number of ARP reply packets received on an interface

Unknown packet

Number of unknown packets received on an interface

TTL invalid packet number

Number of TTL-invalid packets received on an interface

ICMP packet input number:          0

Total number of ICMP packets received on an interface

DHCP packet deal mode

DHCP packet processing mode.

 

1.1.2  display ip interface brief

Syntax

display ip interface brief [ interface-type [ interface-number ] ]

View

Any view

Default Level

1: Monitor level

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the display ip interface brief command to display brief information about a specified or all Layer 3 interfaces.

If neither interface type nor interface number is specified, information about all layer 3 interfaces is displayed; with only the interface type specified, information about all layer 3 interfaces of the specified type is displayed; with both the interface type and interface number specified, only information about the specified interface is displayed.

Related commands: display ip interface.

Examples

# Display brief information about VLAN-interface 22.

<Sysname> display ip interface brief vlan-interface 22

*down: administratively down

(s): spoofing

Interface                         Physical   Protocol   IP Address

Vlan-interface22                    down       down     10.2.2.2

Table 1-2 Description on fields of the display ip interface brief command

Field

Description

*down

The interface is administratively shut down with the shutdown command.

(s)

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.

Interface

Interface name

Physical

Physical state of interface

Protocol

Link layer protocol state of interface

IP Address

IP address of interface (if no IP address is configured, “unassigned” is displayed.)

 

1.1.3  ip address

Syntax

ip address ip-address { mask | mask-length } [ sub ]

undo ip address [ ip-address { mask | mask-length } [ sub ] ]

View

Interface view

Default Level

2: System level

Parameters

ip-address: IP address of interface, in dotted decimal notation.

mask: Subnet mask in dotted decimal notation.

mask-length: Subnet mask length, the number of consecutive ones in the mask.

sub: Indicates the specified IP address is a secondary IP address.

Description

Use the ip address command to assign an IP address and mask to the specified interface.

Use the undo ip address command to remove all IP addresses from the interface.

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.

You cannot assign a secondary IP address when the interface is configured to obtain an IP address through PPP negotiation, or to borrow an IP address through IP unnumbered.

By default, no IP address is assigned to any interface.

When assigning IP addresses to an interface, consider the following:

l           You can assign only one primary IP address to an interface.

l           The primary and secondary IP addresses can be located in the same network segment.

l           Before removing the primary IP address, remove all secondary IP addresses.

Related commands: display ip interface.

Examples

# Assign VLAN-interface 1 a primary IP address and a secondary IP address, with subnet masks being 255.255.255.0.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] ip address 129.12.0.1 255.255.255.0

[Sysname-Vlan-interface1] ip address 202.38.160.1 255.255.255.0 sub

1.1.4  ip address unnumbered

Syntax

ip address unnumbered interface interface-type interface-number

undo ip address unnumbered

View

POS interface view

Default Level

2: System level

Parameters

interface interface-type interface-number: Type and number of 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.

 

  Caution:

l      One interface cannot borrow an IP address from an unnumbered interface.

l      Multiple interfaces can use the same unnumbered IP address.

l      One interface borrows only the primary IP address among multiple IP addresses from another interface.

l      The IP address of the borrowing interface always varies and keeps consistent with that of the borrowed interface. That is, if an IP address is configured for the borrowed interface, the IP address of the borrowing interface is the same as that of the borrowed interface; if no IP address is configured for the borrowed interface, no IP address is assigned for the borrowing interface.

l      VLAN interfaces, tunnel interfaces, and loopback interfaces cannot borrow IP addresses of other interfaces, but other interfaces can borrow IP addresses of these interfaces.

l      A VLAN interface should be created before its IP address can be borrowed.

 

Examples

# Configure the POS interface with PPP encapsulation to borrow the IP address from VLAN-interface 22.

<Sysname> system-view

[Sysname] interface pos 2/1/2

[Sysname-Pos2/1/2] ip address unnumbered interface vlan-interface 22

 

  • 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
新华三官网