Static and Default Routes on VRP

Key Takeaways

  • Configure IPv4 static routes in system-view with ip route-static destination mask { nexthop-address | interface-type interface-number [ nexthop ] } and optional preference.
  • A default route uses destination and mask 0.0.0.0 0.0.0.0 and matches all destinations only when no more specific route exists.
  • Verify with display ip routing-table and display ip routing-table protocol static; remove with undo ip route-static matching the original parameters.
  • Next-hop IP form is preferred on multi-access Ethernet; outbound-interface form is common on point-to-point links—know both for HCIA.
  • Static routes are not a substitute for dynamic IGP at scale, but they are exam-critical for stubs, lab control, floating backup, and simple campus edge designs.
Last updated: July 2026

Static routing in the HCIA toolkit

Static routes are administrator-defined paths. You tell the router exactly which destination prefix should use which next hop or outbound interface. On Huawei VRP the configuration command family is ip route-static. H12-811 expects you to read and write that syntax, verify installation in the routing table, and know when a default route is simply a static route to 0.0.0.0/0.

Static routing shines when:

  • A stub site has a single exit toward the core.
  • You need a predictable lab path without running OSPF yet.
  • You implement a backup path with a worse preference (floating static—later section).
  • You blackhole or pull traffic with Null0 (later section).

Static routing becomes painful when topologies change often: every new subnet may need another manual line on multiple routers. That is why the blueprint also spends heavy weight on OSPF. Still, static mastery is non-negotiable for HCIA.

Where you configure static routes

Static routes are entered from system-view (square-bracket prompt), not from user-view:

<Huawei> system-view
[Huawei] ip route-static 192.168.20.0 255.255.255.0 10.1.1.2

After configuration, return to user-view as needed and verify. Remember from earlier chapters: save if you want the static to survive reboot.

Core syntax: destination, mask, and forwarding instruction

General form (conceptual):

ip route-static <destination> <mask> { <next-hop-ip> | <interface> [ <next-hop-ip> ] } [ preference <value> ]
ParameterMeaningExam notes
destinationNetwork address of the remote prefixMust be consistent with the mask
maskDotted-decimal mask (or prefix length on many VRP trains)Mask, not ACL wildcard
next-hop-ipIP address of the adjacent router to receive the packetMust be resolvable
interfaceLocal outbound interfaceCommon on P2P; careful on Ethernet
preferenceOptional Huawei preference for this staticDefault static preference is 60 if omitted

Examples you should recognize instantly:

[Huawei] ip route-static 172.16.0.0 255.255.0.0 10.0.0.2
[Huawei] ip route-static 172.16.0.0 255.255.0.0 GigabitEthernet0/0/1 10.0.0.2
[Huawei] ip route-static 0.0.0.0 0.0.0.0 203.0.113.1
[Huawei] ip route-static 10.9.9.0 255.255.255.0 NULL0

Mask vs prefix length vs wildcard (high-frequency trap)

NotationTypical use on VRP
255.255.255.0Classic mask in ip route-static training examples
/24 (where supported)Compact prefix length form on many modern VRP versions
0.0.0.255 wildcardNot the static-route mask—seen in ACL or some OSPF network styles

If a question shows ip route-static 192.168.1.0 0.0.0.255 ... as if it were a normal Huawei static, treat it as a trap unless the item is explicitly testing that you reject incorrect mask style. Destination 192.168.1.0 with mask 255.255.255.0 is the standard /24 static.

Also check that the destination is the network address for that mask. ip route-static 192.168.1.10 255.255.255.0 ... is sloppy and may be rejected or normalized depending on platform checks—exam items prefer clean network addresses.

Next-hop IP versus outbound interface

Next-hop IP only (very common on Ethernet)

[Huawei] ip route-static 192.168.50.0 255.255.255.0 10.10.10.1

The router recursively resolves 10.10.10.1 to an outbound interface (usually via a Direct route) and uses ARP to rewrite the frame to the next hop’s MAC. This form is the default mental model for broadcast multi-access links with multiple possible routers on a LAN.

Outbound interface only

[Huawei] ip route-static 192.168.50.0 255.255.255.0 GigabitEthernet0/0/0

On true point-to-point links this can be appropriate: there is only one possible receiver on the other end. On Ethernet, interface-only statics can force the router to treat the destination as needing local ARP for remote addresses (proxy ARP dependency)—a classic source of confusion. HCIA best practice for Ethernet is usually next-hop IP (optionally combined with interface for explicitness).

Interface + next-hop together

[Huawei] ip route-static 192.168.50.0 255.255.255.0 GigabitEthernet0/0/0 10.10.10.1

This pins both the exit interface and the Layer 3 next hop—useful when you want unambiguous resolution and cleaner failure behavior if the interface goes down.

FormGood fitRisk if misused
Next-hop IPCampus Ethernet, most labsFails if next hop not resolvable
Interface onlyPoint-to-point serial/P2P Ethernet designsEthernet remote ARP surprises
Interface + next hopExplicit dual specificationSlightly more to type; must match reality
NULL0Discard matching trafficBlackholes on purpose (next sections)

Default routes: 0.0.0.0 0.0.0.0

A default route matches every destination that did not match a more specific prefix. On VRP:

[Huawei] ip route-static 0.0.0.0 0.0.0.0 203.0.113.1
FieldValueMeaning
Destination0.0.0.0Default network
Mask0.0.0.0/0 — zero bits fixed
Next hopEdge/core peerWhere “everything else” goes

Default routes are how branch routers reach the Internet or a central campus without listing every remote enterprise prefix. Remember longest match: a host route or /24 to a partner network still wins over the default when the destination falls into that more specific prefix.

Default routes can also be learned dynamically (for example OSPF external/default origination in later studies). For this section, master the static default form and its appearance as 0.0.0.0/0 in display ip routing-table.

Verification and removal

Verify

<Huawei> display ip routing-table
<Huawei> display ip routing-table protocol static
<Huawei> display ip routing-table 192.168.50.1

What “good” looks like:

  • Proto shows Static.
  • Pre shows 60 unless you set another preference.
  • Destination/mask matches design.
  • NextHop and Interface are what you intended.
  • A lookup for a test host IP hits the expected prefix.

Also verify underlay:

<Huawei> display ip interface brief
<Huawei> ping 10.10.10.1

If the next hop does not answer, fix Layer 2/IP addressing before blaming the static syntax.

Remove

VRP uses undo with the same static parameters you configured:

[Huawei] undo ip route-static 192.168.50.0 255.255.255.0 10.10.10.1

If you omit critical parameters, you may not delete the intended entry. Match destination, mask, and forwarding details carefully—another reason clean documentation of statics matters in labs.

Small topology walk-through

Topology: R1 GE0/0/0 is 10.0.0.1/30 connected to R2 10.0.0.2/30. R2 has LAN 192.168.20.0/24. R1 needs reachability to the LAN.

On R1:

[R1] ip route-static 192.168.20.0 255.255.255.0 10.0.0.2

On R2 (return path—static routing is not automatically bidirectional):

[R2] ip route-static 192.168.10.0 255.255.255.0 10.0.0.1

assuming R1’s LAN is 192.168.10.0/24. Forgetting the return route is the most common student failure: one-way pings and asymmetric mental models.

For Internet-style exit on a stub R1:

[R1] ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

R1 then sends unknown destinations to R2; R2 must still route/NAT onward as designed.

Static routing and Direct routes interaction

You generally do not create statics for prefixes that are already Direct on the local device—the connected route (Pre 0) already covers on-link delivery. Statics are for remote prefixes. If you mistakenly static a connected network to a wrong next hop, behavior depends on selection rules and can create loops or blackholes—avoid it.

When an interface goes down, Direct routes for that subnet disappear, and statics that depended on that next hop/interface become unusable. That failure coupling is exactly what floating statics exploit later.

Operational best practices (exam + lab)

  1. Document every static: prefix, next hop, purpose, preference.
  2. Prefer next-hop IP on Ethernet LANs.
  3. Always configure both directions in pure static designs.
  4. Verify with protocol static filter, then test with ping/tracert.
  5. save after successful verification.
  6. Use dynamic routing when the number of prefixes or exit points grows.

Exam traps for static and default routes

  • Writing wildcard masks instead of subnet masks.
  • Configuring default as 0.0.0.0 255.255.255.255 (host mask) instead of 0.0.0.0 0.0.0.0.
  • Expecting a static on R1 to create the return path on R2 automatically.
  • Putting ip route-static in the wrong view (must be system-view configuration).
  • Using Cisco ip route mental syntax without Huawei’s ip route-static keyword.
  • Believing default route beats a more specific /24 (it does not).

Checklist before you leave a static lab

  • Destination is the correct network address.
  • Mask length matches the design (/24 vs /16 errors are common).
  • Next hop is on a connected subnet and pings.
  • Route appears under display ip routing-table protocol static.
  • Return route exists on the far side.
  • Default route present only if design requires it.
  • Configuration saved if persistence is required.

Master these patterns and the later floating/blackhole section becomes a small extension: same command family, different preference or Null0 destination.

Test Your Knowledge

Which VRP command correctly configures a static route to 192.168.20.0/24 via next hop 10.1.1.2?

A
B
C
D
Test Your Knowledge

How is an IPv4 default static route expressed on Huawei VRP?

A
B
C
D
Test Your Knowledge

Which command filters the routing table to show only static routes on VRP?

A
B
C
D
Test Your Knowledge

R1 has a correct static route to R2’s LAN, but return traffic from R2’s LAN to R1’s LAN fails. R1 and R2 use only static routing. What is the most likely cause?

A
B
C
D