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

S12700 V200R010C00 Configuration Guide - Interface Management

This document describes the principles and configurations of interfaces and provides configuration examples.
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).
Switching an Interface to Layer 3 Mode

Switching an Interface to Layer 3 Mode

Context

To switch between Layer 2 and Layer 3 modes on multiple interfaces, run the portswitch batch command in the system view.

NOTE:

IP addresses can be assigned to Ethernet interfaces in Layer 3 mode.

By default, an Ethernet interface works at Layer 2 and belongs to VLAN 1. An interface is not removed from VLAN 1 immediately after being switched to Layer 3 mode. It is removed from VLAN 1 only when Layer 3 protocols are Up.

You can configure Layer 2 and Layer 3 modes of an Ethernet interface in the Ethernet interface view or system view. When the configurations in the two views differ, the latest configuration takes effect.

Procedure

  • Switching an Ethernet interface to Layer 3 mode in the Ethernet interface view
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      interface interface-type interface-number

      The Ethernet interface view is displayed.

    3. Run:

      undo portswitch

      The interface is switched to Layer 3 mode.

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

      When you run this command on an interface, the mode switching configuration takes effect when only attribute configurations (such as shutdown and description configurations) exist on the interface. If service configurations (such as the port link-type trunk configuration) exist on the interface, you need to clear all service configurations before running this command.

  • Switching Ethernet interfaces to Layer 3 mode in a batch in the system view
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

      The interfaces are switched to Layer 3 mode in a batch.

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

    NOTE:

    If an Ethernet interface works in Layer 2 mode, the interface uses the system MAC address as its MAC address. If you run the undo portswitch command to switch the interface to Layer 3 mode, the system automatically allocates a MAC address to the interface. For X1E series cards, if the allocated MAC address is the same as an existing MAC address on the network, resulting in a MAC address conflict. To solve this problem, you can run the mac-address mac-address command to manually configure a MAC address for the interface. After running this command, run the reset slot slot-id command to reset the card on which the interface is located to make the configured MAC address take effect.

Checking the Configuration

Run the display interface [ interface-type [ interface-number ] ] command in any view or the display this interface command in the interface view to check the current interface status. The interface is a Layer 2 interface if the Switch Port field is displayed in the command output and is a Layer 3 interface if the Route Port field is displayed. The Hardware address field in the command output indicates the MAC address of the interface.

Translation
Download
Updated: 2019-08-21

Document ID: EDOC1000142085

Views: 22246

Downloads: 69

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