Junos OS Fundamentals · Topic 3 of 3

Transit and Exception Traffic

Learn how Junos handles transit and exception traffic for JNCIA-Junos JN0-106: PFE forwarding, host-bound packets, special handling and RE protection.

  • 6 min
  • Includes a diagram
In a nutshell
  • Transit traffic passes through the device and is handled entirely by the PFE.
  • Exception traffic is host-bound or needs special handling, and the PFE sends it to the RE.
  • Examples of exception traffic: routing protocol updates, SSH, Telnet, SNMP, ping to the device, expired TTL, IP options.

What it is

Transit traffic is traffic that passes through a Junos device: it enters one interface and leaves another, and it is not addressed to the device itself. The Packet Forwarding Engine handles it from start to finish.

Exception traffic is traffic the PFE cannot simply forward. It includes packets addressed to the device, such as SSH sessions and routing protocol updates, and packets that need special handling, such as a packet whose TTL expires. The PFE sends exception traffic to the Routing Engine.

Packetarrives at PFEfor another hostTransitforwarded by PFENext hopPacketarrives at PFEfor this deviceExceptionsent to RERE processsuch as rpd or sshd

How it works

Transit traffic processing

For a transit packet the PFE does all the work:

  1. The packet arrives on an ingress interface, and any input firewall filter on that interface is applied.
  2. The PFE looks up the destination address in its forwarding table, using the longest match.
  3. It applies any output firewall filter and class of service on the egress interface.
  4. It sends the packet to the next hop.

The RE is not involved in this per-packet path. Transit traffic is forwarded at line rate, so it scales with the forwarding hardware.

Ingressinterfaceinput filterForwardingtable lookupoutput filterEgressinterfaceNext hop

Exception traffic

A packet enters the ingress interface through the input filter to the forwarding table lookup in the Packet Forwarding Engine. Transit traffic leaves through the output filter and egress interface; exception traffic goes over the internal link to the Routing Engine. Exception traffic falls into a few groups.

GroupExamples
Host-bound traffic, addressed to the deviceRouting protocol updates such as OSPF hellos and BGP messages, SSH and Telnet sessions to the device, SNMP and NTP, ping to the device's own address
Packets needing special handlingPackets with IP options, packets whose TTL expires and need an ICMP time exceeded reply, packets matching a reject route that need an ICMP unreachable
Traffic the device originatesA ping or traceroute you run from the CLI, routing updates the device sends, syslog messages

Host-bound and special-handling packets travel from the PFE to the RE over the internal link. Packets the RE creates go the other way, down to the PFE and out an interface.

OSPF helloto the routerPFEsees local destinationinternal linkRErpd processes it

Protecting the Routing Engine

The internal link between the PFE and the RE has limited bandwidth, and the RE has a general purpose CPU. A flood of exception traffic could overload it and disturb routing and management.

Junos OS protects the RE in two ways:

  • Rate limiting. Exception traffic sent to the RE is rate limited, so the RE is not swamped.
  • Loopback filter. A firewall filter applied as an input filter on the loopback interface lo0 filters the traffic destined to the RE. The filter is applied in the PFE, so unwanted host-bound packets are dropped before they reach the RE.
user@router# set interfaces lo0 unit 0 family inet filter input PROTECT-RE

Writing the filter terms themselves is covered in the Routing Policy and Firewall Filters chapter. What matters here is the idea: a filter on lo0 controls host-bound traffic, and a filter on a transit interface controls traffic on that interface.

Seeing the difference with commands

CommandWhat it sees
monitor traffic interface ge-0/0/0Only traffic to and from the Routing Engine on that interface, so exception traffic
monitor interface ge-0/0/0Real-time counters for all traffic on the interface, including transit
show interfaces ge-0/0/0 extensiveFull interface counters and errors

This is a classic exam trap. monitor traffic is a packet capture of host traffic. It does not show transit packets passing through the PFE.

A worked example

A traceroute from a PC crosses router R2. The first probe reaches R2 with a TTL of 1. R2 cannot forward it, so the packet is exception traffic: the PFE passes it to the RE, and the RE sends an ICMP time exceeded message back to the PC.

The next probe arrives with a TTL of 2. R2 decrements it to 1 and forwards it, so this probe is transit traffic and only the PFE touches it. The same router handles one packet as exception traffic and the next as transit.

How the exam asks about this

  • "An SSH session is opened to the router's loopback address. What type of traffic is this?" → Exception traffic, processed by the RE.
  • "A packet passes through the router to a server. Which component processes it?" → The PFE, as transit traffic.
  • "Where do you apply a filter to protect the Routing Engine?" → As an input filter on the loopback interface lo0.

Common mistakes

Treating all ICMP as transit. A ping through the router is transit, but a ping to the router's own address is exception traffic. So is the ICMP time exceeded the router creates when a TTL expires.

Expecting monitor traffic to show transit packets. It captures only traffic to and from the RE. Use monitor interface or interface counters to see transit volume.

Putting an RE protection filter on a transit interface. A filter on ge-0/0/0 affects traffic on that interface. To filter what reaches the RE from every interface, apply the filter to lo0.

What to remember for the exam

  • Transit traffic passes through the device and is handled entirely by the PFE.
  • Exception traffic is host-bound or needs special handling, and the PFE sends it to the RE.
  • Examples of exception traffic: routing protocol updates, SSH, Telnet, SNMP, ping to the device, expired TTL, IP options.
  • Exception traffic to the RE is rate limited to protect the RE.
  • An input filter on lo0 protects the RE; monitor traffic shows only RE traffic.
Exam tip

Ask "Is the destination address one of this device's own addresses?" If yes, it is exception traffic. If no, it is transit, unless something forces special handling such as an expired TTL or IP options.

Check yourself

  • Is an OSPF hello received from a neighbor transit or exception traffic?

    Exception traffic, because it is addressed to the router and the PFE passes it to the RE for rpd.

  • Why is exception traffic to the Routing Engine rate limited?

    To stop a flood of host-bound packets from overloading the RE and its internal link to the PFE.

  • Which interface do you put an input firewall filter on to protect the Routing Engine?

    The loopback interface lo0, because its filter applies to traffic destined to the device.

Topic 3 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.