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

Configuration Guide - IP Service

CloudEngine 12800 and 12800E V200R005C00

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DNS, IP performance optimization, IPv6, DHCPv6, and IPv6 DNS.
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 Addresses on an Interface

Configuring IP Addresses on an Interface

Usage Scenario

To run IP services on an interface, configure an IP address for the interface. Each interface on a device can be configured with multiple IP addresses. If IP addresses are configured in primary or secondary mode, one primary and multiple secondary IP addresses can be configured on an interface. If the primary or secondary status of IP addresses is ignored, the device does not differentiate primary IP addresses from secondary IP addresses.

If IP addresses are configured in primary or secondary mode, you need to configure only one primary IP address for an interface. In some special cases, you need to configure one or more secondary IP addresses for an interface. For example, a device connects to a physical network through one of its interfaces. Hosts on the physical network belong to two different Class C networks. To allow the device to communicate with all the hosts on the physical network, configure a primary IP address and a secondary IP address for the interface on the device.

If the device ignores the primary or secondary status of IP addresses, you need to configure only one IP address for an interface. In some special cases, you need to configure multiple IP addresses for an interface. For example, multiple IP addresses need to be configured on an interface to differentiate user services. To delete an IP address on an interface without affecting other IP addresses during a service cutover, enable the device to ignore the primary or secondary status of IP addresses so that any IP address configured on the interface can be deleted.

By default, IP addresses are configured in primary or secondary mode.

NOTE:
  • For IP addresses in primary or secondary mode:
    • One primary IP address and multiple secondary IP addresses can be configured on an interface.
    • If a secondary IP address exists, the primary IP address cannot be deleted.
    • If both primary and secondary IP addresses are configured on an interface of a device, the device cannot be enabled to ignore the primary or secondary status of IP addresses.
  • For IP addresses whose primary or secondary status is ignored:
    • Multiple IP addresses can be configured on an interface.
    • Any IP address configured on an interface can be deleted.
    • If multiple IP addresses are configured on an interface of a device, the device cannot be configured to differentiate primary IP addresses from secondary IP addresses.

Pre-configuration Tasks

Before configuring IP addresses on an interface, configure link layer protocol parameters for the interface and ensure that the link layer protocol of the interface is Up.

Procedure

  • For IP addresses whose primary or secondary status is ignored:
    1. Run system-view

      The system view is displayed.

    2. Run ip address ignore primary-sub enable

      The device is enabled to ignore the primary or secondary status of IP addresses.

      By default, a device differentiates primary IP addresses from secondary IP addresses.

      In primary/secondary IP address mode, the device uses the primary IP address of an interface to interact with other devices while processing specific services. When a device is enabled to ignore the primary or secondary status of IP addresses, the device uses the first IP address of an interface to interact with other devices while processing specific services. For example, the device uses the first IP address of an interface to establish a neighbor relationship while processing a routing protocol service (the neighbor relationship can be viewed using the display this command on the interface).

    3. Run commit

      The configuration is committed.

    4. Run interface interface-type interface-number

      The interface view is displayed.

    5. 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.

      The mode switching function takes effect when the interface only has attribute configurations (for example, shutdown and description configurations). Alternatively, if configuration information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp and lacp system-id configurations), no configuration that is not supported after the working mode of the interface is switched can exist. If unsupported configurations exist on the interface, delete the configurations first and then run the undo portswitch command.

      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.

    6. Run ip address ip-address { mask | mask-length }

      An IP address is configured for the interface.

      By default, no IP address is configured for an interface.

      Run this command multiple times on the interface to configure multiple IP addresses for the interface.

      A maximum of 256 IP addresses can be configured for each interface.

    7. Run commit

      The configuration is committed.

  • For IP addresses in primary or secondary mode:
    1. Run system-view

      The system view is displayed.

    2. (Optional) Run undo ip address ignore primary-sub enable

      The device is configured to differentiate primary IP addresses from secondary IP addresses.

    3. Run interface interface-type interface-number

      The interface view is displayed.

    4. 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.

      The mode switching function takes effect when the interface only has attribute configurations (for example, shutdown and description configurations). Alternatively, if configuration information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp and lacp system-id configurations), no configuration that is not supported after the working mode of the interface is switched can exist. If unsupported configurations exist on the interface, delete the configurations first and then run the undo portswitch command.

      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.

    5. Run ip address ip-address { mask | mask-length }

      A primary IP address is configured.

      By default, no IP address is configured for an interface.

      An interface can have only one primary IP address. If the ip address ip-address { mask | mask-length } command is run more than once to configure a primary IP address for an interface, the latest configuration overrides the previous one.

    6. (Optional) Run ip address ip-address { mask | mask-length } sub

      A secondary IP address is configured for the interface.

      By default, no IP address is configured for an interface.

      To save the IP address space, you can configure secondary IP addresses with 31-bit masks for an interface.

      A maximum of 255 secondary IP addresses can be configured for each interface.

    7. Run commit

      The configuration is committed.

Checking the Configurations

  • 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 interface information.
  • Run the display ip interface multi-address command to check all interfaces configured with multiple IP addresses.
Translation
Download
Updated: 2019-04-18

Document ID: EDOC1100039535

Views: 43864

Downloads: 25

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