Junos OS Fundamentals · Topic 2 of 3

Control and Forwarding Planes, RE and PFE

Learn the Junos control and forwarding planes for JNCIA-Junos JN0-106: what the Routing Engine and Packet Forwarding Engine do and how they share tables.

  • 5 min
In a nutshell
  • Control plane = Routing Engine; forwarding plane = Packet Forwarding Engine.
  • The RE runs Junos OS, routing protocols, the CLI and management; it builds the routing and forwarding tables.
  • The PFE forwards packets, applies firewall filters, policers and CoS, and uses its copy of the forwarding table.

What it is

Every Junos device divides its work into two planes. The control plane decides where traffic should go: it runs the routing protocols, the CLI and the management functions. The forwarding plane moves packets from an input interface to an output interface as fast as possible.

In Junos OS the control plane is the Routing Engine (RE) and the forwarding plane is the Packet Forwarding Engine (PFE). The two are linked by an internal connection, and the RE gives the PFE a copy of the forwarding table.

Routing protocolsRouting Enginerouting tableforwarding tablePFEforwarding tablePacketsout the right interface

How it works

Two planes, two jobs

Control planeForwarding plane
ComponentRouting Engine (RE)Packet Forwarding Engine (PFE)
RunsJunos OS, the kernel and daemonsForwarding hardware, often custom ASICs
Main jobBuild the routing table and the forwarding tableForward packets using the forwarding table
Also doesCLI, configuration, SNMP, system logging, chassis managementFirewall filters, policers, class of service on packets
HandlesException traffic sent up by the PFETransit traffic, at line rate

The RE is the brain. It learns routes, chooses the active route for each destination and builds the routing tables. From the active routes it derives the forwarding table.

The PFE is the muscle. It holds its own copy of the forwarding table and looks up each packet's destination there. It does not run routing protocols and does not need the RE for each transit packet.

The Routing Engine

The RE runs the Junos OS kernel and its daemons. Its main tasks:

  • Runs the routing protocols and keeps the routing tables, such as inet.0 for IPv4.
  • Builds the master copy of the forwarding table and sends it to the PFE.
  • Provides the CLI, J-Web, SSH and other management access.
  • Monitors the chassis, the power and the cooling, and logs events.
  • Processes exception traffic the PFE passes up, such as routing protocol packets.

Larger chassis can hold two Routing Engines, one primary and one backup, for redundancy. Smaller devices such as branch SRX firewalls and many EX switches have the RE and PFE functions in one box, but the logical split is the same.

The Packet Forwarding Engine

The PFE does the per-packet work. Its main tasks:

  • Looks up the destination in its forwarding table and picks the next hop and outgoing interface.
  • Applies firewall filters, policers and class of service to packets.
  • Forwards transit traffic without involving the RE.
  • Sends exception traffic, such as packets addressed to the device, to the RE over the internal link.

On modular routers such as the MX Series, PFEs sit on the line cards, so forwarding capacity grows as you add line cards.

How the tables move

rpdlearns routesRouting tableall routespicks activeForwarding tableon REkernel copiesPFEforwarding table

The routing table can hold several routes to the same prefix from different sources. Only the active route, and its next hop, goes into the forwarding table.

When a route changes, the RE updates the forwarding table and pushes the change to the PFE. The Routing Fundamentals chapter covers the routing and forwarding tables in detail.

Useful commands

CommandShows
show chassis routing-engineRE status, CPU and memory use, uptime
show chassis hardwareInstalled hardware, including REs and line cards
show routeThe routing table on the RE
show route forwarding-tableThe forwarding table the PFE uses
show pfe statistics trafficPacket counters for the PFE

A worked example

A router learns 10.20.0.0/16 from OSPF. rpd puts it into inet.0, marks it active, and the kernel adds it to the forwarding table and copies it to the PFE.

A packet for 10.20.5.9 then arrives on a line card. The PFE finds the match in its forwarding table and sends it out the right interface. The RE never sees that packet.

If the RE CPU is busy with a large BGP update at that moment, the PFE keeps forwarding with the table it has.

How the exam asks about this

  • "Which component maintains the routing table?" → The Routing Engine.
  • "Which component forwards transit packets?" → The Packet Forwarding Engine.
  • "What does the RE send to the PFE?" → A copy of the forwarding table, built from the active routes.

Common mistakes

Saying the PFE runs the routing protocols. Routing protocols run in rpd on the RE. The PFE only receives routing protocol packets and passes them up to the RE as exception traffic.

Confusing the routing table and the forwarding table. The routing table on the RE holds every learned route. The forwarding table holds only the active routes the PFE needs to forward packets.

Thinking the RE touches every packet. Transit traffic stays in the PFE. Sending every packet through the RE would cripple performance, which is the reason for the split.

What to remember for the exam

  • Control plane = Routing Engine; forwarding plane = Packet Forwarding Engine.
  • The RE runs Junos OS, routing protocols, the CLI and management; it builds the routing and forwarding tables.
  • The PFE forwards packets, applies firewall filters, policers and CoS, and uses its copy of the forwarding table.
  • The RE and the PFE talk over an internal link.
  • The PFE keeps forwarding with its current forwarding table while the RE is busy.
Exam tip

When an option says a component "builds", "learns" or "manages", it is the RE. When it says "forwards", "filters packets" or "polices", it is the PFE.

Check yourself

  • Which component holds the routing table, and which holds the forwarding table used for packets?

    The Routing Engine holds the routing table; the Packet Forwarding Engine uses its copy of the forwarding table to forward packets.

  • Does a transit packet pass through the Routing Engine?

    No, the PFE forwards transit packets by itself using its forwarding table.

  • Which routes does the Routing Engine place in the forwarding table?

    Only the active routes, with their next hops, chosen from the routing table.

Topic 2 of 3 in Junos OS Fundamentals

Test yourself on Junos OS Fundamentals

The full Juniper JNCIA-Junos JN0-106 question bank has 1,155 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.