Study guide

6.3 Junos Load Balancing & Filter-Based Forwarding (FBF)

JNCIS-ENT Enterprise Routing and Switching Study Guide 2026 Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & Junos Enterprise Fundamentals

1.1 JNCIS-ENT Exam Logistics & Blueprint Breakdown 1.2 Junos CLI, Enterprise Platforms & Interface Families 1.3 Layer 2 Bridging Mechanics & Packet Forwarding

2 Chapter 2: VLANs & Inter-VLAN Routing

2.1 VLAN Segmentation and 802.1Q Tags 2.2 Access, Trunk, Native and Voice VLANs 2.3 IRB Architecture and Interface Families 2.4 IRB Configuration and Packet Walk 2.5 VLAN Configuration, Verification & Troubleshooting

3 Chapter 3: Spanning Tree Protocols

3.1 Layer 2 Loops and Root Bridge Election 3.2 STP Costs, Port Roles, States and BPDUs 3.3 RSTP Rapid Convergence & Link Types 3.4 MSTP Architecture & Spanning Tree Operations

4 Chapter 4: Layer 2 Security & Feature Protection

4.1 Edge BPDU and Root Protection 4.2 Loop Protection and Diagnostic States 4.3 Port Security, MAC Limiting & Persistent MAC Learning 4.4 DHCP Snooping, Dynamic ARP Inspection (DAI) & IP Source Guard 4.5 Layer 2 Firewall Filters: Types, Order and Actions

5 Chapter 5: Advanced Layer 2 Features & Storm Control

5.1 Storm Control & Broadcast/Multicast Suppression 5.2 MACsec Link Security and Key Agreement 5.3 LLDP and LLDP-MED Operations & Verification

6 Chapter 6: Protocol-Independent Routing & Load Balancing

6.1 Static, Aggregate, and Generated Routes 6.2 Routing Instances and RIB Groups 6.3 Junos Load Balancing & Filter-Based Forwarding (FBF) 6.4 Martian Routes and Route Acceptance

7 Chapter 7: Junos Routing Policy & Firewall Filters

7.1 Routing Policy Framework & Term Evaluation 7.2 Prefix Lists & Route Filters 7.3 Firewall Filters & Policers

8 Chapter 8: Open Shortest Path First (OSPF) Operation

8.1 OSPF Architecture & Neighbor Adjacency Formation 8.2 OSPF Areas & LSA Types 8.3 OSPFv2 & OSPFv3 Configuration and Verification

9 Chapter 9: Advanced OSPF Features & Routing Policies

9.1 OSPF Special Area Types 9.2 Route Summarization & OSPF Authentication 9.3 OSPF Diagnostics & Common Failure Scenarios

10 Chapter 10: Intermediate System to Intermediate System (IS-IS)

10.1 IS-IS Encapsulation and NET Identity 10.2 IS-IS Levels, Areas and Default Routing 10.3 IS-IS PDU Families and Neighbor Exchange 10.4 IS-IS Database Synchronization and DIS 10.5 IS-IS Configuration, Metrics & Troubleshooting

11 Chapter 11: Border Gateway Protocol (BGP)

11.1 BGP Roles, AS Numbers and TCP Transport 11.2 EBGP/IBGP Sessions, State Machine and Messages 11.3 BGP Attributes & Junos Path Selection Algorithm 11.4 BGP Configuration & Policy Implementation 11.5 BGP Scaling with Route Reflection & Diagnostics

12 Chapter 12: IP Tunneling & High Availability

12.1 GRE & IP-IP Tunneling Architecture 12.2 Link Aggregation (LAG/LACP) & Redundant Trunk Groups (RTG) 12.3 Virtual Chassis Roles and Elections 12.4 Virtual Chassis Links, Splits and Provisioning 12.5 Routing Engine Redundancy: GRES, NSR, NSB and GR 12.6 BFD Detection and VRRP Gateway Redundancy 12.7 Unified ISSU: Requirements and Verification

6.3 Junos Load Balancing & Filter-Based Forwarding (FBF)

Key Takeaways Explain This Topic AI

In default Junos OS operation, even when multiple equal-cost paths exist in the Routing Information Base (inet.0), only a single next-hop is installed into the Packet Forwarding Engine (PFE).

Enabling Equal-Cost Multi-Path (ECMP) forwarding on the traditional single-next-hop default requires creating a routing policy with then load-balance per-packet and exporting that policy into routing-options forwarding-table.

On current forwarding hardware, load-balance per-packet commonly enables per-flow hashing; the exact hash inputs depend on platform, packet type and configuration.

Filter-Based Forwarding (FBF) overrides standard destination-based routing by inspecting Layer 3 and Layer 4 header fields to steer traffic into non-default routing instances.

Deploying FBF requires a strict three-step configuration: 1) create a firewall filter with then routing-instance, 2) define a routing instance of instance-type forwarding, and 3) apply the filter as an input filter on the ingress interface.

Last updated: October 2026

Junos Load Balancing & Filter-Based Forwarding (FBF)

Standard IP routing operates on a "hop-by-hop" destination-based paradigm: a router consults its forwarding table, matches the destination IP address against the longest prefix match, and transmits the packet out the designated next-hop interface. However, modern enterprise networks require greater agility—specifically, distributing traffic across parallel equal-cost uplinks and steering specific application flows through specialized security devices or cost-effective WAN connections. This section explores Equal-Cost Multi-Path (ECMP) load balancing and Filter-Based Forwarding (FBF) in Junos OS.

1. Equal-Cost Multi-Path (ECMP) Routing & Junos Forwarding Defaults

When dynamic routing protocols (such as OSPF, IS-IS, or BGP) or static routing identify multiple paths to the same destination prefix with identical metric and preference, all eligible paths can be represented in the Routing Information Base (RIB, inet.0 ) .

The Critical Junos Default Forwarding Behavior +---------------------------------------------------------------------------------------------------+

  • | JUNOS ROUTING TABLE (RIB) VS FORWARDING TABLE (FIB / PFE) DEFAULTS |
  • +------------------------------------+--------------------------------------------------------------+
  • | Component | Default Multi-Path Behavior |
  • +------------------------------------+--------------------------------------------------------------+
  • | Routing Table (RIB / inet.0) | Installs ALL equal-cost paths learned from protocols. |
  • | Forwarding Table (FIB / PFE ASIC) | Installs ONLY A SINGLE NEXT-HOP chosen arbitrarily! |
  • +------------------------------------+--------------------------------------------------------------+

The #1 Junos Load Balancing Trap: In default Junos OS operation, the Packet Forwarding Engine (PFE) does not load-balance across equal-cost links! Even if show route displays four equal-cost OSPF next-hops in inet.0 , the PFE installs only a single next-hop into the hardware forwarding table. All transit packets flow across that single interface, leaving the remaining links completely idle. To utilize multiple paths simultaneously, you must explicitly enable multi-path forwarding.

2. Enabling Per-Packet (Flow-Based Hash) Load Balancing

To instruct the PFE to install all equal-cost next-hops into the active forwarding table, an administrator must configure a routing policy and export it into the forwarding table.

  • Step-by-Step ECMP Configuration
  • Step 1: Define the Load-Balancing Policy

Create a policy statement under [edit policy-options] with the action load-balance per-packet : [edit policy-options]

  • user@router# set policy-statement ecmp-load-balance then load-balance per-packet
  • Step 2: Export the Policy to the Forwarding Table
  • Apply the policy under the [edit routing-options forwarding-table] hierarchy: [edit routing-options]
  • user@router# set forwarding-table export ecmp-load-balance
  • Demystifying "Per-Packet" vs. "Per-Flow"

Although the Junos CLI command explicitly uses the keyword per-packet , modern Junos hardware platforms (including EX Series switches, QFX Series switches, MX Series routers, and SRX Series firewalls) perform per-flow hashing , not true round-robin packet-by-packet forwarding.

Why True Round-Robin Fails: Transmitting individual packets of a single TCP session across alternating links causes packets to arrive out of order due to micro-variations in serialization delay. Out-of-order packets trigger duplicate ACKs, false packet-loss detection, and catastrophic TCP window collapsing.

Junos Hardware Flow Hashing: The PFE ASIC extracts header fields from incoming IP packets to compute a hash key. A common 5-tuple key can include:

  • Source IP Address
  • Destination IP Address
  • Protocol Field (e.g., TCP = 6, UDP = 17)
  • Source Layer 4 Port
  • Destination Layer 4 Port

Flow Consistency: With stable forwarding state, packets sharing the configured hash inputs map consistently to a next hop. Exact fields vary by platform, packet type and configuration; do not assume every device includes transport ports by default. Distinct flows can collide in the hash, so equal utilization is not guaranteed. A failed member or changed next-hop set can remap flows.

3. Filter-Based Forwarding (FBF) Architecture

While ECMP balances traffic matching identical destination prefixes, Filter-Based Forwarding (FBF) (known conceptually as Policy-Based Routing, or PBR) selects an alternative routing table before that table performs its destination-prefix lookup. FBF inspects Layer 3 and Layer 4 packet header fields—such as source IP address, source subnet, TCP/UDP port number, or DSCP marking—and redirects matching packets into dedicated routing instances.

Enterprise FBF Use Cases

Selective Internet Breakout: Routing guest Wi-Fi subnets out an inexpensive commodity broadband connection while routing corporate subnets through a high-assurance MPLS WAN.

Security Service Chaining: Intercepting HTTP/HTTPS traffic (TCP ports 80/443) and steering it through a dedicated proxy or Next-Generation Firewall (NGFW) cluster before reaching the internet.

Voice / Real-Time Traffic Steering: Routing DSCP EF (Expedited Forwarding) voice packets over low-jitter links while routing standard bulk file transfers over secondary circuits.

4. The Three-Step FBF Configuration Workflow

Implementing FBF in Junos OS follows a mandatory three-step sequence: +---------------------------------------------------------------------------------------------------+

  • | THE THREE-STEP JUNOS FILTER-BASED FORWARDING (FBF) WORKFLOW |
  • +---------------------------------------------------------------------------------------------------+
  • | Step 1: Create a Firewall Filter matching packet criteria with action "then routing-instance". |
  • | Step 2: Create a Routing Instance of "instance-type forwarding" containing alternative paths. |
  • | Step 3: Apply the Firewall Filter as an "input" filter on the ingress interface. |
  • +---------------------------------------------------------------------------------------------------+
  • Step 1: Define the Firewall Filter

Configure a firewall filter under [edit firewall family inet filter <name>] . The matching term evaluates packet attributes and directs matches to the target instance. A default accept term is mandatory to permit standard forwarding for non-matching traffic: [edit firewall family inet filter redirect-web-traffic]

  • user@router# set term match-http from destination-port [ 80 443 ]
  • user@router# set term match-http from protocol tcp
  • user@router# set term match-http then routing-instance web-proxy-vr
  • user@router# set term allow-remaining then accept

Exam Trap: If you omit term allow-remaining then accept , Junos applies its implicit default action: then discard . All traffic that is not HTTP/HTTPS will be dropped at the interface!

Step 2: Create the forwarding Routing Instance

Define the routing instance specified in the filter. Crucially, the instance must be configured with instance-type forwarding : [edit routing-instances web-proxy-vr]

  • user@router# set instance-type forwarding
  • user@router# set routing-options static route 0.0.0.0/0 next-hop 192.168.200.1

A forwarding instance type does not run dynamic routing protocols; it serves exclusively as a container for alternative static routes or leaked RIB entries used by the PFE.

Step 3: Apply the Filter to the Ingress Interface

Apply the firewall filter to the incoming interface under unit <unit> family inet filter input : [edit interfaces ge-0/0/0 unit 0 family inet]

user@router# set filter input redirect-web-traffic

FBF filters must strictly be applied on ingress ( input ) . Applying an FBF filter on egress ( output ) will not divert packets because the routing lookup has already occurred before egress filter evaluation.

5. RIB Groups Integration with FBF

In many enterprise FBF deployments, the forwarding instance must reach internal subnets as well as its specialized gateway. Because a forwarding instance does not run dynamic routing protocols, an administrator uses a RIB group to leak connected interface routes and core prefixes from inet.0 into web-proxy-vr.inet.0 : [edit routing-options]

  • user@router# set rib-groups fbf-leak import-rib [ inet.0 web-proxy-vr.inet.0 ]
  • user@router# set interface-routes rib-group inet fbf-leak

This ensures that return paths and directly connected gateways are resolvable within the forwarding instance table.

  • 6. Verification and Troubleshooting CLI Commands
  • Verifying ECMP in the Forwarding Table

To confirm that multiple next-hops are installed in hardware, query the forwarding table directly: user@router> show route forwarding-table destination 10.50.0.0/16

In the output, verify that multiple entries for the destination prefix appear forming a composite/list next hop and its component interfaces. A ucst entry by itself does not prove multipath forwarding.

  • Verifying FBF Operation user@router> show firewall filter redirect-web-traffic
  • user@router> show route table web-proxy-vr.inet.0

The filter example has no counter action. On platforms supporting counting with an FBF routing-instance action, add a supported counter; otherwise compare route resolution, egress/interface statistics, and controlled test traffic. Do not assume every term automatically has counters.

Output note: Command output shown here is a schematic teaching example, not a captured device session. Field names and feature support depend on platform and Junos release.

Official references checked 2026-10-18: Per-flow behavior and platform context , Hash-key configuration .

Loading diagram... Junos ECMP Load Balancing and Filter-Based Forwarding (FBF) Flow