Study guide

VLANIF and Inter-VLAN Routing

Huawei Certified ICT Associate - Datacom HCIA-Datacom H12-811 V1.0

Track your progress as you read

Finished sections get a check mark.

1 Introduction

About HCIA-Datacom H12-811 V1.0 Study Strategies and Exam Logistics

2 Chapter 1: Network Models and Ethernet Fundamentals

OSI and TCP/IP Models Ethernet Technology and MAC Addressing Data Forwarding and Campus Network Lifecycle

3 Chapter 2: IPv4 Addressing and Transport Protocols

IPv4 Addressing and Subnetting ARP and ICMP TCP and UDP Principles Common Ports and Application Protocols

4 Chapter 3: Huawei VRP Basics and Device Management

VRP CLI Views and Core Commands Configuration Save, Reset, and File System SSH, Telnet, and Console Access Display Commands and Basic Troubleshooting

5 Chapter 4: Ethernet Switching and VLANs

Switch Forwarding and MAC Address Tables VLAN Concepts and Segmentation Access, Trunk, and Hybrid Link Types VLANIF and Inter-VLAN Routing

6 Chapter 5: STP, RSTP/MSTP, and Link Aggregation

STP Concepts and Election RSTP and MSTP Eth-Trunk Static and LACP Stacking Basics for Campus Switches

7 Chapter 6: IP Routing Fundamentals

RIB, FIB, and Forwarding Decisions Static and Default Routes on VRP Route Preference and Longest Match Floating Static Routes and Blackhole Routes

8 Chapter 7: OSPF Fundamentals

OSPF Areas and Router Types Neighbor States and Adjacency LSA Types and LSDB DR/BDR Election and VRP OSPF Configuration

9 Chapter 8: ACLs and AAA

Basic and Advanced ACLs traffic-filter Application and Matching Order AAA with Local, RADIUS, and HWTACACS

10 Chapter 9: DHCP, NAT, and Network Services

DHCP Server, Relay, and Snooping NAT, Easy IP, and NAT Server FTP, TFTP, DNS, NTP, HTTP Basics

11 Chapter 10: WLAN Basics

WLAN Architecture: AC, AP, and Fit Mode CAPWAP Tunnels and Forwarding Modes WPA2, WPA3, and WLAN Security Basics Basic WLAN Configuration Concepts

12 Chapter 11: WAN Basics

WAN Concepts and Encapsulation PPP Authentication: PAP and CHAP PPPoE Basics and Client Configuration

13 Chapter 12: IPv6 Fundamentals

IPv6 Address Types and Format Neighbor Discovery and ICMPv6 Stateful and Stateless DHCPv6 IPv6 Static Routes on VRP

14 Chapter 13: SDN and NFV Fundamentals

SDN and NFV Fundamentals

15 Chapter 14: Network Management and O&M

Network Management, O&M, and Automation Basics

VLANIF and Inter-VLAN Routing

Key Takeaways Explain This Topic AI

Hosts in different VLANs need Layer 3 routing to communicate; VLANIF interfaces provide gateway IPs on Huawei multilayer switches.

Configure interface vlanif <id> with ip address and ensure the VLAN exists and has active ports or trunks carrying that VLAN.

Each VLANIF typically maps one-to-one with a user subnet and becomes the default gateway for hosts in that VLAN.

Router-on-a-stick uses a trunk to a router with per-VLAN sub-interfaces when the switch is Layer 2 only.

Inter-VLAN failure checkpoints: wrong gateway, missing VLANIF, trunk allow-pass, and hosts not in the intended VLAN.

Last updated: July 2026

Why Layer 2 isolation is not enough for real networks

VLANs successfully isolate broadcast domains. Employees in VLAN 10 should not share ARP floods with guests in VLAN 20. Yet employees still need the Internet, printers in another VLAN, and servers in a data VLAN. That requires inter-VLAN routing : forwarding IP packets between subnets that map to different VLANs.

HCIA-Datacom emphasizes two common campus patterns:

VLANIF on a multilayer switch (SVI-style) — preferred modern campus core/distribution approach on Huawei.

Router-on-a-stick — external router (or L3 device) with sub-interfaces over a trunk to a Layer 2 switch.

Both deliver the same user outcome: Host A’s default gateway is in its VLAN; the gateway routes to Host B’s subnet and rewrites the Ethernet header for the destination VLAN.

Mental model: one subnet per VLAN

  • VLAN Subnet Gateway (VLANIF)
  • 10 192.168.10.0/24 192.168.10.1
  • 20 192.168.20.0/24 192.168.20.1
  • 30 192.168.30.0/24 192.168.30.1

Host in VLAN 10: IP 192.168.10.10/24 , gateway 192.168.10.1 . Host in VLAN 20: 192.168.20.20/24 , gateway 192.168.20.1 . Same-switch Layer 2 never bridges these VLANs; the VLANIF interfaces route between them if routing is enabled and interfaces are up.

  • VLANIF configuration on Huawei VRP
  • Prerequisites

VLAN created ( vlan 10 or vlan batch ... ).

At least one access/hybrid/trunk path actually carries that VLAN (otherwise the SVI may stay down/down depending on platform rules).

No IP conflict with another interface.

  • Create and address VLANIF 10: [Huawei] vlan 10
  • [Huawei] interface Vlanif 10
  • [Huawei-Vlanif10] ip address 192.168.10.1 255.255.255.0
  • [Huawei-Vlanif10] quit
  • VLANIF 20: [Huawei] vlan 20
  • [Huawei] interface Vlanif 20
  • [Huawei-Vlanif20] ip address 192.168.20.1 255.255.255.0
  • [Huawei-Vlanif20] quit
  • Verification: <Huawei> display ip interface brief
  • <Huawei> display interface Vlanif 10
  • <Huawei> display ip routing-table

You should see connected routes for 192.168.10.0/24 and 192.168.20.0/24 . On devices that route by default between connected SVIs, hosts with correct gateways can already ping across VLANs. Some platforms require enabling routing features or ensuring no policy blocks traffic—HCIA scenarios typically assume connected VLANIF routes are enough for basic inter-VLAN pings.

Why the VLANIF can be down

Common reasons:

VLAN has no up ports in that VLAN (no access member and no trunk allowing it).

Interface administratively down ( shutdown ).

Hardware/license layer-3 limitations on pure access-only models (know your device class).

display vlan and display interface Vlanif 10 tell you whether the logical gateway is live.

Packet walk: VLAN 10 host to VLAN 20 host

PC-A ( 192.168.10.10 ) sends to 192.168.20.20 → different subnet → ARP for gateway 192.168.10.1 if needed.

Frame to VLANIF 10 MAC arrives on access VLAN 10; switch delivers to the L3 engine.

Router logic decrements TTL, looks up destination 192.168.20.20 → connected via VLANIF 20.

ARP for PC-B on VLAN 20 if needed; new frame sourced from VLANIF 20 MAC toward PC-B.

Access port in VLAN 20 delivers untagged frame to PC-B.

Notice: MAC addresses change at the gateway ; IP addresses stay end-to-end . That is the OSI Layer 2/3 split you must narrate on the exam.

  • Router-on-a-stick overview
  • When the access switch is Layer 2 only: PC-A --(access VLAN10)-- L2 Switch --(trunk allow 10,20)-- Router
  • PC-B --(access VLAN20)--/

On the router, sub-interfaces (or equivalent) carry encapsulation per VLAN: [Router] interface GigabitEthernet0/0/0.10

  • [Router-GigabitEthernet0/0/0.10] dot1q termination vid 10
  • [Router-GigabitEthernet0/0/0.10] ip address 192.168.10.1 255.255.255.0
  • [Router-GigabitEthernet0/0/0.10] arp broadcast enable [Router] interface GigabitEthernet0/0/0.20
  • [Router-GigabitEthernet0/0/0.20] dot1q termination vid 20
  • [Router-GigabitEthernet0/0/0.20] ip address 192.168.20.1 255.255.255.0
  • [Router-GigabitEthernet0/0/0.20] arp broadcast enable

Exact sub-interface keywords vary by VRP version and router model; HCIA wants the architecture :

One physical link, 802.1Q trunk .

One logical interface per VLAN with the gateway IP.

Switch trunk must allow-pass every routed VLAN.

Compared with VLANIF on a multilayer switch, router-on-a-stick can become a bandwidth bottleneck (all inter-VLAN traffic hairpins through one link) but remains a valid small-site or teaching design.

VLANIF vs physical interface addressing

  • Approach Where IP lives Typical role
  • Physical routed port interface GE0/0/1 + ip address Point-to-point, WAN, pure router ports
  • VLANIF interface Vlanif 10 + ip address Campus gateway for a whole VLAN
  • Sub-interface GE0/0/0.10 + VLAN encapsulation Router-on-a-stick

Do not put the user gateway on a random physical access port unless that port is intentionally a routed port design. Campus users almost always point to a VLANIF or sub-interface gateway.

Inter-VLAN ACL and services (preview)

Once routing works, security often applies ACLs on VLANIF interfaces ( traffic-filter in later chapters) so guests cannot initiate sessions into employee VLANs. DHCP pools bind to VLANIF networks; NAT may hide private subnets toward the WAN. Inter-VLAN routing is therefore the foundation for those services—not an isolated trick.

Troubleshooting checklist (HCIA gold)

Work top-down:

Host VLAN membership — access/hybrid PVID correct? display vlan .

Host IP and mask — same subnet as its VLANIF? Gateway correct?

VLANIF up with correct IP — display ip interface brief .

Trunk path to gateway — if host is on a remote access switch, trunks must allow the VLAN all the way to the L3 device.

ARP — display arp on the gateway; host ARP table for gateway MAC.

Routing table — connected routes present; no conflicting static blackhole.

ACL / zone policy — advanced, but remember after basics work.

Classic traps

Hosts in different VLANs but same IP subnet configured by mistake—routing and ARP behavior becomes pathological.

VLANIF created without creating the VLAN.

Gateway IP correct on paper but host default gateway still points to an old address.

Router-on-a-stick trunk missing allow-pass for one VLAN—only some subnets work.

  • Expecting two VLANs to communicate because they share a physical switch—“same switch” ≠ “same VLAN.”
  • Design notes for larger campuses

Distribution/core switches host many VLANIFs; access switches stay Layer 2 with trunks. First-hop redundancy (VRRP) may present a virtual gateway IP—concepts appear in broader Huawei materials. For H12-811, nail single gateway VLANIF labs first, then connect them to static routing and OSPF chapters where VLANIF networks are advertised or used as next-hop connected routes.

Lab sequence to cement skills

Two VLANs, two access ports, same switch: confirm no cross-VLAN ping without VLANIF.

Add VLANIF 10 and 20 with gateways: confirm yes cross-VLAN ping.

Move one host to a second switch over a trunk: break allow-pass and watch failure; restore and succeed.

Optional: replace VLANIF design with router-on-a-stick and repeat pings.

Chapter synthesis

MAC tables forward frames inside a VLAN; unknown traffic floods inside that VLAN.

VLANs define those flood domains; vlan batch creates them; same VLAN is mandatory for L2 adjacency.

Access / trunk / hybrid place ports into VLANs and control tags; never forget trunk allow-pass .

VLANIF / router-on-a-stick restore IP reachability between VLANs with proper gateways.

If you can configure a two-VLAN lab from scratch on VRP—including verification commands—you have the Ethernet switching core that HCIA-Datacom weights heavily alongside STP and Eth-Trunk in the broader switching domain.