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 Series Agile Switches Typical Configuration Examples

This document provides examples for configuring features in typical usage scenarios.
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).
Example for Switching an Interface Between Layer 2 and Layer 3 Modes

Example for Switching an Interface Between Layer 2 and Layer 3 Modes

Overview

Due to hardware restrictions of interface cards, some Ethernet interfaces work in only Layer 2 or Layer 3 mode, whereas other Ethernet interfaces can work in both Layer 2 and Layer 3 modes.

Configuration Notes

  • By default, an Ethernet interface works in Layer 2 mode 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. If the configurations in the two views differ, the latest configuration takes effect.
  • The minimum interval between running the portswitch and undo portswitch commands is 30 seconds. That is, after changing the mode of an Ethernet interface, wait at least 30 seconds before changing the mode again.
  • If service configurations (such as the port link-type trunk configuration) exist on an interface, clear all service configurations before switching the interface between Layer 2 and Layer 3 modes. The mode switching configuration takes effect on an interface when only attribute configurations (such as shutdown and description configurations) exist on the interface.
  • Interfaces on all versions of the S12700 can be switched between Layer 2 and Layer 3 modes. IP addresses can be assigned to Ethernet interfaces working in Layer 3 mode.

Networking Requirements

As shown in Figure 6-3, PC1, PC2, PC3, and PC4 are on four network segments, and SwitchB, SwitchC, SwitchD, and SwitchE are access switches for these four network segments, respectively. It is required that four physical Ethernet interfaces on SwitchA be configured as gateway interfaces for these four network segments.

Figure 6-3  Networking diagram for configuring the rate and duplex mode in non-auto-negotiation mode

Configuration Roadmap

The configuration roadmap is as follows:

  • Change interfaces to Layer 3 mode.

  • Configure IP addresses of Layer 3 Ethernet interfaces as gateway addresses.

Procedure

  1. Change interfaces to Layer 3 mode.

    # Change an interface to Layer 3 mode.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] undo portswitch
    [SwitchA-GigabitEthernet1/0/1] quit
    

    # Change Ethernet interfaces to Layer 3 mode in a batch.

    [SwitchA] undo portswitch batch gigabitethernet 1/0/2 to 1/0/4
    

  2. Configure IP addresses of Layer 3 Ethernet interfaces as gateway addresses.

    # Configure the IP address of GE1/0/1 as a gateway address. The configurations of GE1/0/2, GE1/0/3, and GE1/0/4 are similar to the configuration of GE1/0/1, and are not mentioned here. For details, see the configuration files.

    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] ip address 10.10.1.1 24
    [SwitchA-GigabitEthernet1/0/1] quit

  3. Run the display interface gigabitethernet 1/0/1 command in any view to check the interface working mode.

    [SwitchA] display interface gigabitethernet 1/0/1
    ...
    Description:
    Route Port,The Maximum Frame Length is 9216
    Internet Address is 10.10.1.1/24
    ...

    If Switch Port is displayed, the interface works in Layer 2 mode. If Route Port is displayed, the interface works in Layer 3 mode. The preceding command output shows that the interface works in Layer 3 mode.

    Similarly, run the display interface gigabitethernet 1/0/2, display interface gigabitethernet 1/0/3, and display interface gigabitethernet 1/0/4 commands on GE1/0/2, GE1/0/3, and GE1/0/4 respectively to check the interface working mode.

Configuration File

SwitchA configuration file

#
sysname SwitchA
#
interface GigabitEthernet1/0/1
 undo portswitch     
 ip address 10.10.1.1 255.255.255.0
#
interface GigabitEthernet1/0/2
 undo portswitch     
 ip address 10.10.2.1 255.255.255.0
#
interface GigabitEthernet1/0/3
 undo portswitch     
 ip address 10.10.3.1 255.255.255.0
#
interface GigabitEthernet1/0/4
 undo portswitch     
 ip address 10.10.4.1 255.255.255.0
#
return

Applicable products and versions

NOTE:
For details about software mappings, visit Hardware Query Tool and search for the desired product model.
Download
Updated: 2019-05-16

Document ID: EDOC1000069466

Views: 249885

Downloads: 1982

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