Study guide
RIB, FIB, and Forwarding Decisions
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
RIB, FIB, and Forwarding Decisions
Key Takeaways Explain This Topic AI
The RIB (routing information base / IP routing table) stores candidate and selected routes learned from connected interfaces, static configuration, and routing protocols.
The FIB (forwarding information base) is what the data plane uses for actual packet forwarding after the control plane installs selected routes.
Longest-prefix match selects the most specific destination network first; only among equal-prefix candidates does Huawei preference (administrative distance equivalent) break ties.
On Huawei VRP, display ip routing-table shows the RIB view used on HCIA; Proto, Pre, Cost, NextHop, and Interface columns explain why a path won.
Recursive next-hops are resolved against other routes; if the next-hop is not reachable, the static or protocol route may not become usable for forwarding.
Last updated: July 2026
Why routing tables matter on H12-811
HCIA-Datacom moves from Layer 2 switching into IP routing : how a router or Layer 3 switch decides the next hop and outbound interface for a packet whose destination is not a connected host MAC on a local segment. Exam items rarely ask philosophy; they ask you to interpret a routing table, explain why one route beat another, and predict what happens when a next hop disappears.
This section builds the mental model used for the rest of the IP routing and OSPF chapters: control plane learns and selects routes; data plane forwards packets . On Huawei literature and HCIA materials you will see RIB and FIB language even when day-to-day CLI shows a single display ip routing-table view. Treat RIB as “what the router knows and prefers” and FIB as “what the hardware or forwarding engine actually uses after installation.”
Control plane vs data plane (exam-friendly view)
Plane Role Typical inputs Typical outputs
Control plane Learn topology and select best routes Connected interfaces, ip route-static , OSPF/RIP/BGP, policy Selected entries in the RIB (IP routing table)
Data plane Move packets at line rate Destination IP of each packet, FIB/CEF-like structures Forward, drop, or punt to CPU
When you type a static route or when OSPF finishes SPF, you are changing control-plane state . Successful selection then installs a forwarding entry so the next customer packet does not require a full software route calculation per packet on modern platforms.
You do not need vendor micro-architecture depth on H12-811. You do need this chain:
Sources inject candidate routes.
The router selects among candidates using match rules (longest prefix, then preference/cost as applicable).
Selected routes appear in display ip routing-table (and related views).
Forwarding uses those selected paths; verification with ping / tracert confirms end-to-end behavior.
RIB: the IP routing table you study for HCIA
The Routing Information Base (RIB) is the collection of routing information maintained by the IP routing process. In practical HCIA language, the IP routing table is the RIB view candidates stare at for hours: <Huawei> display ip routing-table
A healthy table always contains Direct (connected) routes for networks configured on up interfaces, often a Local host route for the interface IP itself, plus any static or dynamic routes that won selection. Without connected routes, static next hops that rely on those interfaces cannot resolve, and local services on that subnet break.
Reading the columns that decide exam answers
Exact column labels vary slightly by VRP version, but HCIA expects you to interpret this family of fields:
- Field (typical) Meaning Why it matters
- Destination/Mask Prefix the route covers Longest match is decided here
- Proto Source protocol (Direct, Static, OSPF, RIP, …) Explains origin; ties to default preference
- Pre Preference (Huawei AD equivalent) Lower Pre wins among same-prefix competitors
- Cost Metric within/as advertised by that protocol Breaks ties after preference rules allow comparison
- Flags Status indicators (platform-dependent) Active/selected hints in richer outputs
- NextHop IP address of the next router (or 0.0.0.0 style local) Where to send the packet next
- Interface Outbound interface chosen for that path Final Layer 2 exit toward the next hop
Proto tells you who offered the route . Pre tells you how trusted that source is by default . Cost is not the same as preference: cost compares routes from comparable selection contexts (for example two OSPF paths), while preference compares different sources to the same prefix.
- Filter views you will use constantly: <Huawei> display ip routing-table
- <Huawei> display ip routing-table protocol static
- <Huawei> display ip routing-table protocol direct
- <Huawei> display ip routing-table 192.168.10.0
protocol static isolates operator-configured static routes—perfect when troubleshooting “I typed the static but traffic still goes via OSPF.” Looking up a specific destination shows which prefix actually matches that IP under longest-match rules.
FIB: forwarding after selection
The Forwarding Information Base (FIB) is the optimized structure the data plane consults to forward packets. After the RIB selects a best path for a prefix, the device installs a corresponding forwarding entry (conceptually into the FIB). On many platforms engineers also say “FIB” when discussing hardware forwarding tables; for HCIA, remember:
RIB selection problems → wrong or missing routes in display ip routing-table .
Forwarding/adjacency problems → route exists, but ARP/ND for the next hop fails, interface is down, or policy drops traffic.
A route can exist in the RIB discussion yet still fail to forward if the outbound interface is down , the next hop is unreachable , or a security feature (ACL, blackhole, URPF-style behaviors on some platforms) discards the packet. Always separate “Is the route selected?” from “Can Layer 2 reach the next hop?”
Local delivery vs transit routing
- Situation Decision
- Destination IP is configured on a local interface Device is the endpoint for that address (local/receive)
Destination is on a connected subnet but not local IP ARP/ND resolve host MAC; Layer 2 deliver on that interface
- Destination is remote Longest-match route → send to NextHop out Interface
- No match (and no default) Drop (typically unreachable behavior toward the sender when ICMP is generated)
Campus designs often combine VLANIF gateways (connected routes for user subnets) with static or OSPF routes toward the core. The RIB glues those pieces together.
Longest-prefix match: the first rule of destination selection
When a packet arrives with destination D , the router does not pick “any route that includes D.” It picks the route whose prefix covers D and has the longest mask (most specific network). Only after that prefix is chosen do preference and cost matter among competing routes to that same prefix .
Example prefixes in the table:
- Destination/Mask Covers 10.1.1.50? Specificity
- 10.0.0.0/8 Yes Less specific
- 10.1.0.0/16 Yes More specific
- 10.1.1.0/24 Yes Most specific among these
- 0.0.0.0/0 Yes Least specific (default)
Packet to 10.1.1.50 uses 10.1.1.0/24 even if a default route or a summary has a better (lower) preference. Specificity beats preference. That single sentence eliminates many wrong exam answers.
Preference vs longest match (do not reverse them)
Step Question the router answers
1. Longest match Which prefix best matches the destination IP?
2. Preference (Pre) Among routes to that prefix , which source is most trusted (lower Pre)?
3. Cost / other tie-breakers Among remaining equals, which path has better metric or platform tie-break rules?
If Static 10.1.1.0/24 Pre 60 and OSPF 10.1.0.0/16 Pre 10 both exist, traffic to 10.1.1.50 still follows the /24 because the match is longer—even though OSPF’s preference number is “better.” Preference never overrides a more specific prefix.
Recursive next-hop resolution
A recursive route is one whose next hop is not itself a connected address requiring only ARP on a known interface without further IP lookup—commonly a static route that points to a next-hop IP that must be resolved through another route.
Example: ip route-static 172.16.0.0 255.255.0.0 10.0.0.2
For this to work, the router must know how to reach 10.0.0.2 —typically via a Direct route on a connected interface. If 10.0.0.2 is only reachable through yet another static or dynamic route, resolution continues until a connected exit is found or resolution fails.
Exam traps:
Configuring a static to a next hop on a subnet that is not in the table.
Pointing a static to a next hop learned only via a route that depends on the static (recursion loop / unusable route).
Using an interface-only static on Ethernet without understanding ARP behavior (next section covers static forms).
If display ip routing-table shows the static missing or inactive, ask: Is the next hop resolved? Is the outbound interface up?
How routes enter the RIB (sources you must recognize)
- Source (Proto) How it appears HCIA focus
- Direct Interface IP/mask up and operational Always foundation; Pre 0
- Static ip route-static configuration Manual paths, floating backup, default route
- OSPF Link-state calculation installs intra/inter routes Dynamic enterprise IGP (next chapter)
- RIP Distance-vector advertisements Lower preference trust than OSPF by default
BGP variants Policy-heavy WAN/Internet (beyond deep HCIA lab focus) Know IBGP preference is very untrusted by default
Connected routes are not “optional decoration.” They are how the router knows which prefixes are on-link . Static and OSPF build remote reachability on top of that foundation.
End-to-end packet walk (RIB in action)
Packet arrives on GE0/0/1; destination IP is 192.168.50.10 .
Device checks whether destination is local/connected; if not, performs longest-prefix lookup in the routing table.
Match hits 192.168.50.0/24 via next hop 10.10.10.1 out GE0/0/2 (selected static or OSPF path).
Data plane resolves Layer 2 adjacency for 10.10.10.1 on GE0/0/2 (ARP on IPv4).
Frame is rewritten toward the next hop and sent; TTL decrements on the routed hop.
If step 3 fails → no route / default missing. If step 4 fails → route looks fine in RIB but pings fail with encapsulation/ARP symptoms.
Verification habits that score points
Symptom First RIB checks Next checks
No connectivity to remote subnet display ip routing-table for that destination Interface up/ display ip interface brief
Unexpected path Compare mask length , then Pre , then Cost display ip routing-table protocol ...
Static configured but absent Next-hop reachability; syntax; undo mistakes Interface for interface-type static
Works for some hosts not others Different longest matches / more specific routes Overlapping summaries, host routes
Exam traps for RIB/FIB thinking
Treating preference as more important than longest match .
Confusing cost/metric with preference .
Believing the RIB lists every protocol’s candidates equally as active paths— selection leaves one (or ECMP set) installed for forwarding.
Assuming a displayed route guarantees ARP success to the next hop.
Mixing mask (routing table, static config) with wildcard (some ACL/OSPF network statements)—wrong mask length changes the prefix entirely.
What “done” looks like for this section
You can open display ip routing-table , identify connected versus static versus OSPF entries, explain why a packet matches a /24 instead of a default, and describe preference as a same-prefix tie-breaker—not a global “always use OSPF” switch. That model is the foundation for static routes, preference design, floating backups, and OSPF in the following sections and chapter.