ALFA PROCOMMUNICATION INFRASTRUCTURE Request a Quote

Huawei Core Switch Layer 2 Interface

Huawei core switch Layer 2 interfaces forward traffic based on MAC addresses, support VLANs, and can be configured as access or trunk ports to interconnect with routers or other switches.Layer 2 Interface Basics

A Layer 2 interface on a Huawei switch operates at the data link layer of the OSI model, forwarding Ethernet frames based on MAC addresses. Each port belongs to a separate collision domain, and the switch maintains a MAC address table to map MAC addresses to 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, and MAC table entries are aged out if not updated within a set time .

VLAN Configuration

Layer 2 interfaces are typically assigned to VLANs to segment network traffic. On Huawei switches, you can configure a port as:

  • Access port: Assigned to a single VLAN, used for end devices.
  • Trunk port: Carries multiple VLANs, used for inter-switch links or router connections. Example configuration for access ports:

vlan batch 2 3interface g0/0/2[Huawei-GigabitEthernet0/0/2] port link-type access[Huawei-GigabitEthernet0/0/2] port default vlan 2[Huawei-GigabitEthernet0/0/2] quit

This sets GigabitEthernet0/0/2 as an access port in VLAN 2 .

Interfacing with Routers

When connecting a Layer 2 switch to a router, there are two common methods:

  1. Router with Layer 3 interface: Configure multiple subinterfaces on the router for each VLAN (single-arm routing). The switch ports remain Layer 2 access or trunk ports.
  2. Router with Layer 2 interface: The router uses a VLANIF interface to assign an IP address for the VLAN. The switch ports are configured as access ports in the corresponding VLAN, allowing Layer 2 communication .
Layer 2 Connections in Enterprise Networks

Huawei enterprise switches can create Layer 2 connections to extend VLANs across remote sites using VXLAN tunnels. Each connection links a local and remote Layer 2 subnet, with unique tunnel VNIs and reserved IP addresses for active and standby interfaces. This allows Layer 2 communication between on-premises data centers and cloud-based enterprise switches .

Core Switch Considerations

On Huawei core switches, Layer 2 interfaces are often used to interconnect with BRAS devices, firewalls, or aggregation switches. VLANs are created on the core switch, and interfaces are added to these VLANs. For Layer 2 interfaces that require IP routing, a VLANIF interface can be bound to a VPN instance to isolate traffic and configure OSPF or other Layer 3 protocols .

Summary
  • Layer 2 interfaces forward traffic based on MAC addresses and maintain a MAC table.
  • Ports can be configured as access or trunk depending on network design.
  • VLANs segment traffic, and VLANIF interfaces provide Layer 3 IP connectivity if needed.
  • Layer 2 connections can extend VLANs across sites using VXLAN tunnels.
  • Core switch Layer 2 interfaces often interconnect with routers, firewalls, or aggregation switches, supporting both Layer 2 forwarding and optional Layer 3 routing through VLANIF interfaces.
Huawei Core Switch Layer 2 Interface

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)

Native AC Solution: Core Switches Function as the Gateway for Wired

Configure interfaces and VLANs on switches to implement Layer 2 communication. Configure DHCP on the CSS so that the CSS

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

Step 3: Create 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

Network Switches | Huawei Enterprise

Huawei campus switches are ideal for building future-proof campus networks with simplified management,

Deploying an S Series Switch as a Layer 2 Switch on a LAN

Provides guidance for configuring VLAN, QinQ, and various loop prevention protocols on a Layer 2 network.

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

CloudEngine S5732-H Series Switches | Huawei

Designed to work seamlessly alongside Wi-Fi 6 APs. Next generation CloudEngine S5732-H Series Multi

Configuring the Core Switches to Be Managed by the Controller

To manage a core switch on iMaster NCE-Campus using commands, you need to connect the core switch to iMaster NCE-Campus

MTU on layer 2 interfaces?

Even within Cisco switches, not all switches are jumbo capable, for those that are, some require all interfaces use a

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)

Huawei router and switch connection configuration plan, two

Today, Linknewnet engineers teach you 2 ways. If the switch under the router is a Layer 2 device, there are two ways

CloudEngine S6730-H-V2 Series 10 GE Switches

Huawei S6730-H V2 10G switches provide 24, 28, or 48 downlink ports plus 6 x 40 GE uplink ports,

Configuring a Sub-interface

Configuring an Ethernet Sub-interface Context When a Layer 3 switch connects to users on different network segments

Switches

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

Native AC Solution: Core Switches Function as the Gateway for Wired

Native AC Solution: Core Switches Function as the Gateway for Wired and Wireless Users (Three-Layer Network Architecture)

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.

Data Center Switches

Data Center Switches CloudEngine Data Center Switches — Ethernet switches widely used in diverse applications and in different

Configuring the Core Switch

Configuring the Core Switch Context In this scenario, IP addresses of the interfaces connecting the core switch to the

CloudEngine S5735-L-V2 Series Switches | Huawei Enterprise

Based on the next-generation high-performance hardware and Huawei''s unified software platform, the CloudEngine S5735-L-V2

Deploying an S Series Switch as a Layer 2 Switch on a LAN

Configuring Interface-based VLAN Assignment on S Series Switches 4. Configuring Interface-based VLAN Assignment on S Series

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

Determine whether to switch the working mode of an interface between Layer 2 and Layer 3 based on the interface

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

Example for Configuring a Layer 3 Switch to Work with a Router for Internet Access Layer 3 Switch Layer 3 switches provide the

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

Deploying an S Series Switch as a Layer 2 Switch on a LAN

Configuring Interface-based VLAN Assignment on S Series Switches 4. Configuring Interface-based VLAN Assignment on S Series

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

Determine whether to switch the working mode of an interface between Layer 2 and Layer 3 based on the interface

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

Example for Configuring a Layer 3 Switch to Work with a Router for Internet Access Layer 3 Switch Layer 3 switches provide the

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

CX320 Switch Module V100R001 Command Reference 14

The interface mode l2 command creates a Layer 2 sub-interface and displays the Layer 2 sub-interface view. The undo interface

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

Example for Switching an Interface to Layer 3 Mode

It is required that four physical Ethernet interfaces on SwitchA be configured as gateway interfaces for these four

CloudEngine 12800 Series Data Center Core Switches

Product Overview The CloudEngine 12800 (CE12800) series switches are next-generation, high-performance core switches

Example for Switching an Interface Between Layer 2 and Layer 3

Overview Due to hardware restrictions of interface cards, some Ethernet interfaces work in only Layer 2 or Layer 3 mode, whereas

CloudEngine S5731-S Series Switches | Huawei Enterprise

The CloudEngine S5731-S series offers a range of standard gigabit access switches, with all-GE electrical/optical ports and fixed 10

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

Configure interface-based VLAN assignment on the switch for Layer 2 forwarding. Configure the firewall as the

Typical VLAN Configuration

You can configure interface-based VLAN assignment on the switch so that the switch adds interfaces connected to users using the

Basic Configuration for Interfaces

Basic Configuration for Interfaces This chapter describes interface types, interface numbering rules, and configuration parameters

Basic Interface Configuration Commands

The display ip interface description command displays IP-related information (such as the IP address, subnet mask, physical layer

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)

Huawei router and switch connection configuration plan, two

Today, Linknewnet engineers teach you 2 ways. If the switch under the router is a Layer 2 device, there are two ways

CloudEngine S6730-H-V2 Series 10 GE Switches

Huawei S6730-H V2 10G switches provide 24, 28, or 48 downlink ports plus 6 x 40 GE uplink ports,

Configuring a Sub-interface

Configuring an Ethernet Sub-interface Context When a Layer 3 switch connects to users on different network segments

Switches

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

Native AC Solution: Core Switches Function as the Gateway for Wired

Native AC Solution: Core Switches Function as the Gateway for Wired and Wireless Users (Three-Layer Network Architecture)

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.

Data Center Switches

Data Center Switches CloudEngine Data Center Switches — Ethernet switches widely used in diverse applications and in different

Configuring the Core Switch

Configuring the Core Switch Context In this scenario, IP addresses of the interfaces connecting the core switch to the

CloudEngine S5735-L-V2 Series Switches | Huawei Enterprise

Based on the next-generation high-performance hardware and Huawei''s unified software platform, the CloudEngine S5735-L-V2

Deploying an S Series Switch as a Layer 2 Switch on a LAN

Configuring Interface-based VLAN Assignment on S Series Switches 4. Configuring Interface-based VLAN Assignment on S Series

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

Determine whether to switch the working mode of an interface between Layer 2 and Layer 3 based on the interface

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

Example for Configuring a Layer 3 Switch to Work with a Router for Internet Access Layer 3 Switch Layer 3 switches provide the

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

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)

Native AC Solution: Core Switches Function as the Gateway for Wired

Configure interfaces and VLANs on switches to implement Layer 2 communication. Configure DHCP on the CSS so that the CSS

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

Step 3: Create 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

Network Switches | Huawei Enterprise

Huawei campus switches are ideal for building future-proof campus networks with simplified management,

Deploying an S Series Switch as a Layer 2 Switch on a LAN

Provides guidance for configuring VLAN, QinQ, and various loop prevention protocols on a Layer 2 network.

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

CloudEngine S5732-H Series Switches | Huawei

Designed to work seamlessly alongside Wi-Fi 6 APs. Next generation CloudEngine S5732-H Series Multi

Configuring the Core Switches to Be Managed by the Controller

To manage a core switch on iMaster NCE-Campus using commands, you need to connect the core switch to iMaster NCE-Campus

MTU on layer 2 interfaces?

Even within Cisco switches, not all switches are jumbo capable, for those that are, some require all interfaces use a

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)

Native AC Solution: Core Switches Function as the Gateway for Wired

Configure interfaces and VLANs on switches to implement Layer 2 communication. Configure DHCP on the CSS so that the CSS

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

Step 3: Create 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

Network Switches | Huawei Enterprise

Huawei campus switches are ideal for building future-proof campus networks with simplified management,

Deploying an S Series Switch as a Layer 2 Switch on a LAN

Provides guidance for configuring VLAN, QinQ, and various loop prevention protocols on a Layer 2 network.

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

CloudEngine S5732-H Series Switches | Huawei

Designed to work seamlessly alongside Wi-Fi 6 APs. Next generation CloudEngine S5732-H Series Multi

Configuring the Core Switches to Be Managed by the Controller

To manage a core switch on iMaster NCE-Campus using commands, you need to connect the core switch to iMaster NCE-Campus

MTU on layer 2 interfaces?

Even within Cisco switches, not all switches are jumbo capable, for those that are, some require all interfaces use a

Related Video Reference

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

Technical note

This reference is intended for preliminary fiber and communications infrastructure research. Optical interface, fiber type, port or core capacity, electrical input and output, enclosure protection, cooling, installation limits and applicable standards must be verified for the specific project.

Still Have a Technical Question?

Use the inquiry form to describe the product category, application, interfaces, capacity and installation environment.

Start a Project Inquiry