No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring IP Address

Configuring IP Address

This section describes the configuration methods of IP address.

Configuring IP Addresses for Interfaces

To enable network devices to communicate at the network layer, configure interface IP addresses on the device.

Pre-configuration Tasks

Before configuring IP addresses for interfaces, complete the following tasks:

  • Setting link layer parameters for the interfaces to ensure that the link layer protocol status of the interfaces is Up

Configuring a Primary IP Address for an Interface

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

  3. On an Ethernet interface, run:

    undo portswitch

    The interface is switched to Layer 3 mode.

    By default, an Ethernet interface works in Layer 2 mode.

    If an Ethernet interface already has Layer 2 configuration, this command fails to be executed on the interface. Before running this command on the interface, delete all the Layer 2 configuration of the interface.

    NOTE:

    If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to switch these interfaces to Layer 3 mode in batches.

  4. Run:

    ip address ip-address { mask | mask-length }

    A primary IP address is configured for the interface.

    Each interface has only one primary IP address. If you configure a new primary IP address for an interface, the original one is deleted and the new primary IP address takes effect.

  5. Run:

    commit 

    The configuration is committed.

(Optional) Configuring a Secondary IP Address for an Interface

Context

Generally, an interface needs only a primary IP address. In some special scenarios, you need to configure secondary IP addresses for an interface. For example, a switch modules connects to a physical network through an interface, and hosts on this network belong to two network segments. To enable the switch modules to communicate with all hosts on the physical network, configure a primary IP address and a secondary IP address for this interface. You can configure multiple IP address for a Layer 3 interface on a switch modules, one as the primary IP address, and the others as secondary IP addresses. Each Layer 3 interface can have a maximum of 255 secondary IP addresses.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

  3. On an Ethernet interface, run:

    undo portswitch

    The interface is switched to Layer 3 mode.

    By default, an Ethernet interface works in Layer 2 mode.

    If an Ethernet interface already has Layer 2 configuration, this command fails to be executed on the interface. Before running this command on the interface, delete all the Layer 2 configuration of the interface.

    NOTE:

    If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to switch these interfaces to Layer 3 mode in batches.

  4. Run:

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

    A secondary IP address is configured for the interface.

  5. Run:

    commit 

    The configuration is committed.

Checking the Configuration

Procedure

  • Run the display ip interface [ interface-type interface-number] or display ip interface brief [ interface-type [ interface-number ] | slot slot-id [ card card-number ] | ip-configured [ except interface-type ] ] command to check the IP address configuration of an interface.
  • Run the display interface [ interface-type [ interface-number ] ] command to check information about an interface.

Configuring an IP Unnumbered Interface

An IP unnumbered interface can borrow the IP address from another interface when the local interface has no IP address.

Configuring a Primary IP Address for the IP Numbered Interface

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The interface view is displayed.

  3. On an Ethernet interface, run:

    undo portswitch

    The interface is switched to Layer 3 mode.

    By default, an Ethernet interface works in Layer 2 mode.

    If an Ethernet interface already has Layer 2 configuration, this command fails to be executed on the interface. Before running this command on the interface, delete all the Layer 2 configuration of the interface.

    NOTE:

    If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to switch these interfaces to Layer 3 mode in batches.

  4. Run:

    ip address ip-address { mask | mask-length }

    A primary IP address is configured for the interface.

    Each interface has only one primary IP address. If you configure a new primary IP address for an interface, the original one is deleted and the new primary IP address takes effect.

  5. Run:

    commit 

    The configuration is committed.

Configuring IP Unnumbered on an Interface

Context

In some scenarios, an interface can borrow an IP address from another interface to conserve IP addresses. For example, if an interface is seldom used, configure IP unnumbered on this interface so that the interface can share an IP address with another interface.

An IP unnumbered interface cannot run dynamic routing protocols because it does not have an IP address itself. To enable the interface to communicate with a peer network segment, configure a static route to the network segment.

The restrictions for IP unnumbered interface configuration are as follows:

  • The IP address to be borrowed cannot be a borrowed IP address.

  • The IP address can be lent to multiple interfaces.

  • If an interface has more than one IP address, IP unnumbered interfaces can borrow only the primary IP address.

  • If the interface assigned to an IP unnumbered interface has no IP address, the IP unnumbered interface obtains the IP address 0.0.0.0.

  • The interface that borrows an IP address can only be a tunnel interface.

  • The IP address of the virtual loopback interface can be lent to other interfaces, but the virtual loopback interface cannot borrow an IP address from another interface.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface tunnel interface-number

    The tunnel interface view is displayed.

  3. Run:

    ip address unnumbered interface interface-type interface-number

    The tunnel interface is configured to borrow the IP address from a specified interface.

  4. Run:

    commit 

    The configuration is committed.

Checking the Configuration

Procedure

  • Run the display ip interface [ interface-type interface-number ] or display ip interface brief [ interface-type [ interface-number ] | slot slot-id [ card card-number ] | ip-configured [ except interface-type ] ] command to check the IP address configuration of an interface.
  • Run the display interface [ interface-type [ interface-number ] ] command to check information about an interface.
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 59089

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next