Skip to content
AK OPTICALSystems Send a project enquiry
Reference library

Huawei Core Switch Layer 2 Interface

Published
  • Huawei
  • Core
  • Switch
Source context

AI source overview

Huawei Layer 2 interfaces operate at the data link layer, forwarding traffic based on MAC addresses and supporting VLANs, link types, and Layer 2 connections. Layer 2 Interface OverviewA Layer 2 interface on a Huawei switch functions at the second layer of the OSI model, forwarding Ethernet frames based on MAC addresses rather than IP addresses. Each port on a Layer 2 switch is part of a collision domain, and the switch maintains a MAC address table to map MAC addresses to specific ports.

When a frame arrives, the switch checks the destination MAC address and forwards it to the appropriate port. Broadcast frames are sent to all ports except the source port.

VLAN and Port Configuration

Layer 2 interfaces are commonly used to assign ports to VLANs. Huawei switches support access ports (assigned to a single VLAN) and trunk ports (carrying multiple VLANs). The default VLAN is VLAN 1, and interfaces can be configured to join other VLANs using commands like port link-type access and port default vlan.

Trunk ports allow VLAN traffic to pass between switches or to routers for inter-VLAN routing. Layer 2 Connections and VXLANHuawei enterprise switches can create Layer 2 connections to link local and remote subnets, enabling Layer 2 communication across VXLAN tunnels. Each switch supports up to six Layer 2 connections, and each connection requires unique tunnel VNIs.

Local subnets must reserve two IP addresses for active and standby interfaces, which cannot overlap with remote subnets. Switching Between Layer 2 and Layer 3By default, Ethernet interfaces operate in Layer 2 mode. To switch an interface to Layer 3 mode, the undo portswitch command is used in the interface view.

Layer 3 mode allows IP addresses to be assigned and enables routing functions. When switching modes, any existing service configurations (like trunk settings) must be cleared for the change to take effect. Integration with RoutersLayer 2 interfaces on Huawei switches cannot perform routing themselves.

To enable inter-VLAN communication or Internet access, a Layer 3 device (router) is required. The switch forwards traffic based on VLAN membership, while the router handles IP routing, DHCP, and NAT functions. This setup is typical in enterprise networks where Layer 2 switches are deployed at the access layer.

Best Practices

Assign access ports to VLANs for end devices and trunk ports for uplinks.

Maintain the MA

C address table and monitor aging times to prevent stale entries. Use Layer 2 connections for VXLAN or multi-site Layer 2 communication. Switch interfaces to Layer 3 mode only when routing is required, and clear service configurations beforehand.

Ensure VLA

Ns and IP addresses are properly planned to avoid conflicts across Layer 2 connections. Huawei Layer 2 interfaces provide flexible Ethernet forwarding, VLAN segmentation, and integration with Layer 3 devices, making them essential for core and access layer deployments in enterprise networks.

Research context

Reference summary

Layer 2 Switching A Layer 2 device works at the second layer of the OSI model and forwards data packets based on media access control (MAC) addresses. Port.

From reference to enquiry

Questions for your project

Use these editorial prompts alongside the linked excerpts. They identify items to confirm for your project.

Technical notes

Illustrative equipment image

Layer 2 Switching

A Layer 2 device works at the second layer of the OSI model and forwards data packets based on media access control (MAC) addresses. Ports on a Layer 2 device send and receive data independently

Creating a Layer 2 Connection_Enterprise Switch-Huawei Cloud

After an enterprise switch is created, you need to create a Layer 2 connection to enable the local Layer 2 connection subnet and the remote VXLAN switch to communicate at Layer 2.

Configuring the Core Switch

In this scenario, IP addresses of the interfaces connecting the core switch to the BRASs and firewalls and OSPF need to be configured on the core switch, so as to implement connectivity

Layer 2 vs Layer 3 Huawei Switches Deep Dive: Internal ASIC

This deep technical review dissects the internal ASIC forwarding logic, packet processing pipelines, and specific performance metrics to provide a comprehensive analysis of Huawei

Layer 2 vs Layer 3 Huawei Switches Deep Dive: Internal ASIC

Core Architecture & Switching Logic: ASIC, CPU, and the Forwarding Pipeline The fundamental difference between Layer 2 and Layer 3 switching in Huawei equipment

VLAN Routing with Layer 2 Switch and Router on Huawei

VLAN Routing with Huawei Layer 2 Switches. Here we will focus How to Configure VLAN Routing on Huawei devices with a configuration example.

Huawei router and switch connection configuration plan, two

So how are Huawei''s routers and switches connected in a network? Today, Linknewnet engineers teach you 2 ways. If the switch under the router is a Layer 2 device, there are two ways for...

Huawei Layer 3 Switch Layer 2 and Layer 3 Port Switching

Because Huawei switch ports work in Layer 2 mode by default, when we need to use Layer 3 functions, we need to switch the interface from Layer 2 to Layer 3. This article will explain the precautions, such

Huawei S2700 Series Switches Product Brochure

The S2700 utilizes cutting-edge switching technologies and Huawei Versatile Routing Platform (VRP) software to meet the demand for multi-service provisioning and access on Ethernet networks.

Switching an Interface Between Layer 2 and Layer 3 Modes

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

Example for Switching an Interface to Layer 3 Mode

Example for Switching an Interface to Layer 3 Mode Networking Requirements As shown in Figure 3-15, PC1, PC2, PC3, and PC4 are on four network segments, and SwitchB, SwitchC,

Layer 2 vs Layer 3 Huawei Switches Deep Dive: Internal ASIC

In most Huawei switches, Ethernet interfaces are set to Layer 2 mode by default. A network administrator can dynamically switch an interface''s working mode using CLI commands. The

Configuring an Ethernet Sub-interface

Ethernet sub-interfaces can share physical layer parameters of their main interface, or be configured with their respective link layer parameters and network layer parameters. Disabling or

Switching an Interface Between Layer 2 and Layer 3 Modes

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.

Configuring Layer 2/Layer 3 Mode Switching on an Ethernet Interface

The mode switching function takes effect when the interface only has attribute configurations, such as shutdown and description configurations, or configurations supported by both Layer 2 and Layer 3

Layer 2 Switching

According to the preceding forwarding process, a Layer 2 device maintains a MAC address table and forwards Ethernet frames based on destination MAC addresses. This forwarding

Example for Configuring a Layer 2 Switch to Work with a Router for

Configure interface-based VLAN assignment on the switch for Layer 2 forwarding. Configure the router as the gateway of users to implement Layer 3 forwarding across network segments through sub

Switches

Switches After more than 20 years of unremitting efforts and stable development, Huawei provides extensive experience in Ethernet switches. With multiple

Related Video Reference

This video was associated with the source search result. Verify technical details against current product documentation and project requirements.

Share your network requirements

Share the fiber interfaces, termination capacity, cable route and evidence required for handover.

Send a project brief