In due process of rectifying my Juniper certifications, I’ve come to review the following JunOS concepts:

  • Preferred / Primary addresses
  • Default addresses (nothing to do with default route!)
  • Primary Interface

Having read Juniper’s explanation on the topic, this time, I found myself asking a few more questions which to me, had no clear answer.

I think that looking at each concept separately, it does make sense. However, things got a little bit blurry in my initial understanding on, how the default interface get its IP address. And since we are talking about interfaces and IP addresses, how do all these concepts actually come together?

In my oppinion, I think Juniper’s article falls short explaining this.

The Primary Interface

Whenever the router has to send locally sourced traffic out, it will have to determine which interface to use. There are occasions when the outgoing interface cannot be matched to one particular interface:

  • Sending a directed broadcast ping to or;
  • some multicast scenarios

Section A

When the interface cannot be determined, the router will use a default interface which in Juniper’s terminology is the primary interfaceBy default, this interface will be the management interface (fxp0 / em0).

The primary interface is determined as below:

  1. Multicast interface with the lowest interface index
  2. P2P interface with the lowest interface index

The Primary & Preferred Addresses

As you know, in order to enable IP communication, an interface needs an IP address. Regardless the number of IPs assigned to one single interface, JunOS will always pick a primary and a preferred interface; they could, of course, match on the same IP.

  • Primary Address will be used for locally sourced multicast and broadcast traffic;
  • Preferred Address will be used for locally sourced, unicast traffic

Section B

Every JunOS interface will have a primary and a preferred address. Both are determined following the steps below, in order of priority:

  1. Statically/manually using the statements primary or preferred“, respectively
  2. By default, the numerically lowest IP address


The Default Address

Lastly, we also have the concept of default address. This is the address used by default to source traffic out un-numbered interfaces. Note that it is also possible to explicitly specify the address to use when configuring the un-numbered interface.

Section C

JunOS determines the default address, in order of preference, as below:

  1. Primary address on the loopback interface, different from
  2. Primary / preferred address (depending on type of traffic) set on the Primary Interface


  1. The primary interface is determined as in section A; it will have a primary and a preferred address determined as in section B
  2. When using the primary interface for outgoing traffic, JunOS will set the source IP to match either the primary or the preferred address, for multicast or unicast traffic respectively
  3. When sending traffic out un-numbered interfaces, the source IP address is set to the default address determined as in section C

Thank you,
View Rafael A Couto Cabral's profile on LinkedIn

Comments are closed.