Day One. ADVPN Design and Implementation
Day One. ADVPN Design and Implementation
Neither the fully-meshed nor hub-and-spoke approaches to IPsec VPNs are optimal for
modern network deployments where customers demand both the ease of provisioning
encrypted overlay security services and the optimum flow of traffic to minimize ap-
plication traffic latency. What is needed is an approach that takes the simplified provi-
sioning of hub-and-spoke with the low application latency of fully-meshed.
Spokes should have the capability to temporary build tunnels between each other on
an on-demand basis to create the most efficient forwarding path, so if a particular flow
is required, the spokes build dynamic tunnels between themselves for that communi-
cation and then clear the tunnel when idle. In this way the fully-meshed approach is
available to the network without the overhead of configuring all the necessary com-
munication paths. The hub takes care of the task of identifying whether dynamic con-
nections are required. The SRX Series employs a feature called AutoVPN to deliver this
capability, which has been shipping since Junos 12.1X44. Now AutoVPN deployments
can use the Auto Discovery VPN (ADVPN) protocol to dynamically establish spoke-to-
spoke VPN tunnels.
This Day One book will tell you why and show you how, while providing sample imple-
mentations to investigate in your lab.
IT’S DAY ONE AND YOU HAVE A JOB TO DO, SO LEARN HOW TO:
nn Gain an appreciation of the main issues surrounding the integration of encryption technology
into networking products.
nn Understand the need for a standards-based approach to solving network integration issues.
nn Understand Juniper’s AutoDiscovery VPN (ADVPN) solution.
nn Learn how to incorporate the ADVPN feature into a design.
nn Explore the detailed steps required to implement and tune ADVPN in your network.
nn Take architectural blueprint designs as a base template to be tailored for your specific scenario.
Juniper Networks Books are singularly focused on network productivity and efficiency. Peruse the
complete library at www.juniper.net/books.
ISBN 978-1941441169
51800
9 781941 441169
Juniper Networking Technologies
ADVPN Environments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
iv
© 2015 by Juniper Networks, Inc. All rights reserved. About the Authors
Juniper Networks, Junos, Steel-Belted Radius,
NetScreen, and ScreenOS are registered trademarks of Mark Barrett
Juniper Networks, Inc. in the United States and other Mark Barrett has been working in the networking
countries. The Juniper Networks Logo, the Junos logo, industry for 28 years. He has been through many
and JunosE are trademarks of Juniper Networks, Inc. All networking technology transitions (both protocols and
other trademarks, service marks, registered trademarks, transmission techniques) from his part time University
or registered service marks are the property of their jobs, to IBM, Cisco, and the Australian Federal Police, to
respective owners. Juniper Networks assumes no his current position as a Juniper Networks Systems
responsibility for any inaccuracies in this document. Engineer. No matter the technology, Mark has main-
Juniper Networks reserves the right to change, modify, tained a keen interest in high speed networking LAN and
transfer, or otherwise revise this publication without WAN technologies and, in particular, how they need to
notice. be secured.
Published by Juniper Networks Books To the rest of the author team, thank you for your
Authors: Mark Barrett, Dale Shaw, and Scott McKinnon persistence as we all have busy day jobs that often turned
Technical Reviewers: Johan Andersson, Anubhav Garg, into our night jobs as well, to get the book completed. To
Bill Shelton the engineering team (Praveen Sathyanarayan, Anubhav
Editor in Chief: Patrick Ames Gar, Suresh Melam and, Rajendra Kandukuri) putting up
Copyeditor and Proofer: Nancy Koerbel with field SEs pestering and challenging to go the extra
Illustrator: Karen Joice mile for the first release of ADVPN through the alpha
J-Net Community Manager: Julie Wider and beta phases. To our review team (Bill Shelton, Gavin
Thirlwall, Johan Andersson) for making sure what we
ISBN: 978-1-936779-16-9 (print) wrote would be useful to people in the field. To our
Printed in the USA by Vervante Corporation. editing support team, Nancy Koerbel sorry for the
ISBN: 978-1-936779-17-6 (ebook) Australian English and Karen Joice thanks for turning
our diagrams into something nice. And finally Patrick
Version History: v1, September 2015 Ames, giving us the confidence to start the project,
2 3 4 5 6 7 8 9 10 keeping the relatively big author team on track, and
cracking the whip when we all needed a push.
This book is available in a variety of formats at:
http://www.juniper.net/dayone.
v
Preface
IP Security, or more simply IPsec, is the Internet Engineering Task Force
(IETF’s) standard for securing the network layer in IP systems, covering
both IPv4 and IPv6. IPsec was originally defined by the IETF in 1998
and since then has been defined as an optional element for IPv4 and a
mandatory element for IPv6. IPsec has gone through a number of
iterations over the years and many additional RFCs have been defined to
augment the main elements of the protocol with new encryption algo-
rithms, authentication functions, and modes of operation.
While IPsec has been around for awhile, implementing such a protection
suite in IP networks remains a challenge. Network devices such as
routers and firewalls require the protocol to be integrated into their
operating systems to assert security policy. The security capabilities of
IPsec must be deployed in network topologies that are evolving to
support the demands of ever-newer applications and services, and the
protocol must coexist with dynamic routing protocols in order to
maintain efficient forwarding of traffic in the event of disruption. These
conflicting challenges have resulted in unfortunate compromises being
made between ease-of-design, deployment, ongoing management, and
securing the application traffic efficiently within a service oriented
network model. Until now.
viii
Scope of Book
This Day One book attempts to cover the following ADVPN concepts,
and was written in such a way that you can follow along in your own
lab:
Configuration
Tuning
Service Management
Blueprints
Automation
Futures
Chapter 1
Why ADVPN?
NOTE Use Case One is the typical “secure router” model and it is the focus of
this book. The other two use cases are included in this chapter to
provide a complete discussion.
Hub-and-Spoke VPNs
domain, via the common hub. Now configuration tasks are simpler
and the active tunnel count on a per-node basis is significantly lower,
meaning more cost-effective nodes can be deployed and managed.
As with the fully-meshed approach, there are drawbacks: the hub
requires configuration changes each and every time a node is added or
removed from the VPN domain and application latency is increased.
Also, all traffic must first leave the source node, traverse the transit
network to the hub, and then return to the sink node in a non-direct
and sub-optimal manner.
A New Approach
Neither the fully-meshed nor hub-and-spoke approaches are optimal
for modern network deployments where customers demand both the
ease of provisioning encrypted overlay security services and the
optimum flow of traffic to minimize application traffic latency. Table
1.1 summarizes these approaches and evaluates their ability to meet
the requirements.
Fully-Meshed Hub-and-Spoke
The Solution
What is needed today is an approach that takes the simplified provi-
sioning of hub-and-spoke with the low application latency of fully-
meshed.
Summary
Table 1.2 compares ADVPN with the fully-meshed and hub-and-spoke
approaches and evaluates them for desirability. As you can see,
ADVPN is simple to provision with low application latency, making it
highly desirable.
A Standards-based Approach
MORE? The draft RFC containing the solution is located here as it temporar-
ily awaits publication as an informational RFC: http://tools.ietf.org/
html/draft-sathyanarayan-ipsecme-advpn.
16 Day One: ADVPN Design and Implementation
Solution Status
Several competing solutions to the ADVPN problem statement were
submitted to the IETF IPsec IPSECME Work Group for consideration.
No agreement was ultimately reached on which solution to take forward
as the formal IETF standard, leaving the various teams of authors the
option to publish as Informational RFCs.
This is the intended path that Juniper and co-authors from Check Point,
Orange (France Telecom), and the European Center for Information and
Communication Technologies (EICT) intend to take.
However, in the name of full disclosure, the current document is not an
IETF-approved Standards Track RFC.
20 Day One: ADVPN Design and Implementation
Shortcut Suggester
The role of the suggester SRX, as the names implies, is to tell its peers
of a potential peer-to-peer relationship that can be formed, so the
suggester does not need to be involved in a flow. The message sent
from the suggester to the partner is called a shortcut exchange. How
does this work? A suggester is looking at transit flows – where the
flow has an ingress IPsec tunnel and an egress IPsec tunnel and both
IPsec tunnels have formed with ADVPN-capable peers. It should be
noted the suggester is only looking at flows that transit the SRX itself
– the SRX has no concept of the rest of the network topology. This
becomes an important factor in network design, something that is
covered a little later in this book. Once the suggester tells its peers of
the potential peer-to-peer relationship via the shortcut exchange, and
receives acknowledgement of the exchange, the function of the
suggester is complete.
NOTE For a shortcut to be initiated, the suggester needs to have peer rela-
tionships with the partner nodes. Hence a suggester is likely to be a
core/ hub node in the network. In many network scenarios, the
Suggester SRX will have a peer relationship with all Partner SRXs.
22 Day One: ADVPN Design and Implementation
Shortcut Partner
The role of the Partner SRX is to listen for short exchange messages that
are sent from the suggester. Based on the Partner SRX’s local policy, it
will decide whether to take any action on this message. Assuming local
policy is met, the partner will take the information contained in the
message and form an IKE association, then an IPsec association to the
other partner peer, as outlined in the shortcut message. The partner
function continues to monitor any shortcut tunnels being created by this
method, and by policy, will tear down a tunnel when it is no longer
needed.
NOTE A partner is likely to be at the edge of the network, with static IKE/IPsec
security associations to at least one suggester node in the network.
Identity Management
The nature of ADVPN means new relationships are created on an
as-needed basis. How can each SRX trust that the dynamic peer SRX is
a node it is willing to form a relationship with? The number of potential
relationships is a n*(n-1)/2 function. As n grows beyond even a rela-
tively small number, the relationship count starts to become very large.
Fortunately, this problem was solved long ago using Public Key Infra-
structure (PKI). The draft response to RFC 7018 includes a Pre-Shared
Keys (PSK) scenario, but PSK is not implemented in the first instance of
ADVPN capabilities in the SRX. This is due to the additional infrastruc-
ture that would be required to make such a solution work (while
avoiding the undesirable approach of using a single PSK for the entire
network, making the implementation inherently unsecure). For this
reason, Identity Management in the SRX implementation requires the
use of PKI.
Capability Exchange
As part of the initial IKEv2 exchange, ADVPN-capable SRXs advertise
their ADVPN capabilities. The messages format is as follows:
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Next Payload !C! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Protocol ID ! SPI Size ! ADVPN Supported Message Type !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Capabilities ... !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Shortcut Exchange
Once a suggester node has decided there is a peer-to-peer relationship
that can be formed to optimize the network, the partner peer is informed
via a shortcut message. When this exchange is initiated, the partner acts
as a RFC 5996 responder. The format of the exchange is as follows:
HDR, SK {IDa, ADVPN_INFO, IDi,
IDr[, TSi][, TSr][, VID]} -->
<== HDR, SK {N(ADVPN_STATUS)}
24 Day One: ADVPN Design and Implementation
The suggester expects that the shortcut request sent to the Partner will
be acknowledged.
IDa is a specific ADPVN informational element that contains the IP
address or FQDN of the peer gateway. While the address information
could have been derived from the underlying streams, this would not
have allowed for sending the FQDN. By having this specific informa-
tion element, there is complete flexibility in how to identify the partner.
The ADVPN_INFO information element provides specific information
related to the shortcut:
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Next Payload !C! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! SHORTCUT Identifier !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Lifetime !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! R | Reserved | PSK Length | Peer Port !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Pre-Shared Key (variable length) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Peer Description (variable length) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The IDi (IKE Initiator) and IDr (IKE responder) and TSi (traffic
selector initiator) and TSr (traffic selector responder) parameters are
the same as what would be used in a non-ADPVN IKEv2 exchange.
Finally, once the data element has been sent, a status message from the
partner is used to ascertain what the partner has done with the short-
cut request.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Next Payload !C! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Protocol ID ! SPI Size ! ADVPN Status Message Type !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! SHORTCUT Identifier !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!F|C|E| Reserved | RCODE |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Timeout !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The fields corresponding to the first four octets are defined (as de-
scribed) in RFC 5996; the remaining fields are defined as follows:
Protocol ID (1 octet) must be zero, as specified in RFC 5996.
SPI Size (1 octet) must be zero, in conformance with RFC 5996.
ADVPN Status Message Type (2 octets) SHORTCUT Identifier -
the 32-bit field from the SHORTCUT_INFO notification.
F (1 bit) - Fatal. Set if this notification means that the SHORT-
CUT no longer exists.
C (1 bit) - Critical. Set if the peer must understand this RCODE,
or else delete the shortcut if the F bit is not set.
E (1 bit) - Error. Indicates an error condition (rather than a policy
change).
RCODE (2 octets) - a 16-bit result code field described below.
Timeout - this 32-bit field indicates the maximum number of
seconds that the shortcut service is not available by the peer.
There are two possible RCODES that are sent in the status message:
Value Description
0 SHORTCUT_ACK
3 TEMPORARILY_DISABLING_SHORTCUT
26 Day One: ADVPN Design and Implementation
Note that only a subset of messages has been implemented from the draft
standard. If the partner accepts the shortcut suggestion, an RCODE of 0
will be returned. If the partner rejects the shortcut suggestion, an RCODE
of 3 will be returned.
Summary
ADVPN is an extension to the IPsec control plane made possible by the
extensibility of IKEv2. SRX gateways can take on the role of a suggester,
that is, they can create shortcut suggestions to hint at new IPsec tunnels to
optimize traffic flow. SRX gateways can take on the role of partners, which
is to listen out for shortcut suggestions and create a new IPsec tunnel,
assuming local policy is met. Identity in an ADVPN network is solved using
PKI. Network reachability will be managed using the OSPF routing proto-
col.
Now that the architecture of ADVPN has been covered and how it works
from a protocol perspective, Chapter 4 will cover the key configuration
steps.
Chapter 4
The proposal and policy configurations for both the suggester and
partner should be very similar. What differences there are, are in the
configuration center on the IKE gateway and the IPsec VPN defini-
tions. As you will read in the subsequent sections of this chapter,
enabling ADVPN is straightforward if the requisite configuration is
already in place.
Let’s start the real work of this book by working through the configu-
ration of a suggester and partner. Because AutoVPN Zero Touch Hub
configurations are a relatively new Juniper configuration concept, an
overview of what they require is covered as well.
Suggester Configuration
Let’s start with an IKE proposal and policy:
policy ikepol-advpn {
certificate {
local-certificate srx550-1;
}
proposal-set suiteb-gcm-256;
}
You can see that in this example a local certificate srx550-1 has been
created and the built-in proposal-set suiteb-gcm-256 has been
referenced. The certificate generated must be capable of being used
with the ciphers selected. Hence certificate srx550-1 is an Elliptic
Curve (ECDSA) certificate with a size of 384 bits, using SHA384 as a
hash.
Now let’s look at the IKE gateway definition:
gateway hub-gw {
ike-policy ikepol-advpn;
dynamic {
distinguished-name {
wildcard ST=ACT,O=Juniper;
}
ike-user-type group-ike-id;
}
local-identity distinguished-name;
external-interface ge-0/0/0.0;
advpn {
partner {
disable;
}
}
version v2-only;
}
Chapter 4: Key Configuration Steps 29
Here the IKE gateway definition binds the policy to gateway, and the next
stanza is the dynamic hierarchy. This configuration was first introduced
with AutoVPN Zero Touch Hub in Junos 12.1X44, allowing the SRX to
accept dynamic neighbors, and in this case, it’s looking for a wildcard
match in the certificate subject line of ST=ACT,O=Juniper of the IKE peer.
The local-identity that is used is the certificate name as bound by the
IKE policy. The external-interface is the interface the SRX will listen
on for incoming IKE requests. Up to this point, the configuration is
exactly as per a Zero Touch Hub configuration. Finally, the ADVPN
configuration is set and the Partner function is disabled – this signals that
the suggester function is enabled. The configuration ends with the
IKEv2-only designation that must be used for ADVPN operation.
Once the IKE configuration is complete, let’s turn to the IPsec configura-
tion. First, create the policies:
policy standard {
proposal-set suiteb-gcm-256;
}
Now let’s build the VPN definition for this particular gateway, which is
no different than any other SRX IPsec configuration:
vpn advpn {
bind-interface st0.0;
ike {
gateway hub-gw;
ipsec-policy standard;
}
This process can be repeated for additional suggester functions if you are
running routing instances in the SRX to create separate WAN domains
that function completely independently of each other. It’s particularly
useful when separation functions need to be stronger than simply routing
instance separation – a common requirement for security conscious
customers. In order to follow best practices, different certificates should
be created for each routing instance and the subject should be distinct so
accidental misconfiguration does not join the two security domains. An
example of this architecture is discussed in more detail in Chapter 9,
Architectural Blueprints.
30 Day One: ADVPN Design and Implementation
Partner Configuration
Let’s look at the IKE proposal and policy:
policy ikepol-advpn {
certificate {
local-certificate srx550-2;
}
proposal-set suiteb-gcm-256;
}
It’s exactly the same as at the suggester end, though the certificate, of
course, is created for this particular SRX. Now let’s look at the IKE
gateway definition:
gateway advpn-hub {
ike-policy ikepol-advpn;
address 192.168.66.1;
local-identity distinguished-name;
remote-identity distinguished-name container
ST=ACT,O=Juniper;
external-interface ge-0/0/0.0;
advpn {
suggester {
disable;
}
partner {
connection-limit 10;
idle-time 60;
idle-threshold 10;
}
}
version v2-only;
}
You can see that you start with binding the policy to the gateway and
set the IP address of the suggester. The identity of the SRX is set to the
distinguished-name in the local certificate. When this partner SRX
creates a session to the suggester SRX, the partner SRX will be looking
for the suggester SRX certificate to have a part of the subject be
ST=ACT,O=Juniper. The external interface is the interface from which
the IKE sessions will be sourced. So far, this is a standard IKE gateway
configuration using certificates. The ADVPN partner definition is
next. Because this is an ADVPN partner configuration, the ADVPN
suggester function needs to be explicitly disabled.
Chapter 4: Key Configuration Steps 31
Under the partner stanza, there are three possible options. These
options control how many outbound shortcut security associations to
allow from the SRX, and the traffic characteristics that control when
shortcut security associations are torn down.
NOTE All three options have defaults and if you are happy with these defaults
there is no need to configure them.
vpn spoke {
bind-interface st0.0;
ike {
gateway advpn-hub;
ipsec-policy standard;
}
establish-tunnels immediately;
}
32 Day One: ADVPN Design and Implementation
NOTE In subsequent releases of Junos for the SRX, the ADVPN suggester and
partner functions will be able to operate on the same IKE gateway
definition, allowing for many possible cross domain examples (as
outlined in the draft response to RFC 7018) to be implemented.
Routing Protocols
The first implementations of ADVPN will require the configuration of
dynamic protocols in order to use the additional paths that are created
once the Partner SRXs have established a shortcut tunnel. The sup-
ported protocol is OSPF. Subsequent releases of ADVPN are planned
to use a traffic selector configuration. Depending on your perspective,
if you want the most automatic and least configuration effort avail-
able, then choosing a dynamic routing protocol is the preferred path.
Take a step back for a moment. The problem to solve is how to
configure a routing protocol where interfaces are dynamic and can
appear or disappear at any stage. If you think about it, that problem is
very similar to backup scenarios from network designs in years past.
The same principles used then are readily used again today and the
routing protocol needs to be able to cater to these dynamic characteris-
tics.
For an OSPF configuration, this is achieved by tailoring the character-
istics of the st0.0 interface, an example shown here:
ospf {
area 0.0.0.0 {
interface st0.0 {
interface-type p2mp;
demand-circuit;
dynamic-neighbors;
}
}
}
Chapter 4: Key Configuration Steps 33
Summary
ADVPN configuration builds on existing SRX IPsec configuration. For
users converting from an existing AutoVPN configuration, the addi-
tions are minimal. ADVPN functions of suggester or partner are
defined in the IKE gateway stanzas of configuration. OSPF configura-
tion will require some tuning to cater to the dynamic nature of AD-
VPN with tunnels being added and removed from the network.
As simple as the ADVPN configuration is, Chapter 5 will cover the
tuning considerations of deploying ADVPN – like all network designs
there are a multitude of factors to consider.
34 Day One: ADVPN Design and Implementation
Chapter 5
From the smallest branch office device to the largest core/data center
SRX Series, the SRX family has considerable capabilities. The AD-
VPN feature is supported on all SRX platforms as partner roles.
Support for the branch SRX came in 12.3X48-D10, while support for
the HE SRX will be introduced in Junos 12.3X48-D20. The ADVPN
Suggester function is only supported on the SRX240 and above models
(due to the extra control plane processing that is required for the
function to operate successfully).
Table 5.1 below shows the supported number of tunnels for each SRX
model when acting in suggester or partner roles.
Table 5.1 Choosing a SRX Series Device for ADVPN
SRX100 32 N/A
SRX110 32 N/A
SRX210 64 N/A
SRX220 64 N/A
Table 5.2 IPsec Capabilities for SRX Series Devices as Measured With an IMIX Traffic Profile
Platform IMIX
SRX100 25 Mbps
SRX110 29 Mbps
SRX210 29 Mbps
SRX220 33 Mbps
Note that the throughput rates listed in Table 5.2 do not take into
consideration the performance impact of other enabled features. If
additional services are enabled on these platforms, the throughput
numbers can reduce as additional service processing takes away from the
encryption/decryption performance.
Another point to make about Table 5.2 is that there are two models of
SPCs for the SRX5000 platform. For the original (first generation) SPC,
there are two SPUs on each card. For the second generation SPC, there
are four SPUs on each card, and each SPU is approximately twice as
powerful as a first generation SPU. The numbers quoted in Table 5.2 are
per SPU. Also note that on SRX1000, SRX3000, and SRX5000 plat-
forms, the first SPU is used for the Central Point (CP) housekeeping
function; this will reduce the encryption/decryption capability of the SPU
that is performing the CP function.
IP Addressing
From a reachability point of view, ADVPN essentially flattens the
network. The effect of ADVPN is to put all other nodes, and hence
branch offices or locations, one hop away from one another. It may seem
that addressing schemes, which are often based on hierarchy or geogra-
phy to achieve easy address summarization, don’t matter as much in
these environments. But IP addressing schemes are still valid in an
ADVPN domain, it’s just that how you go about carving up the address
space should be thought of a little differently.
38 Day One: ADVPN Design and Implementation
IGP Metrics
Fine-tuning of OSPF metrics is required in an ADVPN environment to
ensure that traffic flows through a suggester node when the IPsec tunnel
is not a shortcut peer. This is important for two reasons. The first is that
additional shortcut tunnels cannot be created if the traffic does not flow
through a SRX with the suggester function enabled. The second is that
partner nodes may not be sized either by SRX capacity, or bandwidth, or
both, to that site to perform any transit IPsec functions.
To illustrate this point, let’s take the following simple network of one
suggester and three partner SRX nodes.
You can see that in terms of the metrics there are two formulas in play.
The partner SRX nodes’ metric must be higher than either of the sug-
gester nodes. The primary suggester node’s metric must be lower than
the secondary suggester node. It sounds pretty simple that Suggester 1, as
the designated primary suggester, is configured with a metric of 1,
Suggester 2 as the secondary suggester is configured with a metric of 2,
and the partner SRXs are all configured with a value of 3. The paths
available, with their associated metrics, from Partner 1 to Partner 3,
would then be:
P1-S1-P3 = 4
P1-S2-P3 = 5
P1-P2-P3 = 6
These metrics work, but they don’t take into account operational or
maintenance needs in case mistakes or other events happen during
change windows. For example, let’s say Suggester 1 requires mainte-
nance and needs to be taken offline. To minimize the disruption to the
rest of the network, the st.0 OSPF metric is changed from 1 to 3 at the
first step of the maintenance window. This effectively promotes Sug-
gester 2 to the role of the primary suggester as that SRX will have the
lowest metric. The network converges by active signaling rather than a
box simply disappearing from the OSPF domain, so now:
P1-S1-P3 = 6
P1-S2-P3 = 5
P1-P2-P3 = 6
Now, let’s say just by chance that Suggester 2 has had a loss of WAN
connectivity before Suggester 1’s maintenance takes the SRX offline.
This now leads to the following metrics being active in the network:
P1-S1-P3 = 6
P1-P2-P3 = 6
As discussed earlier, this can lead to some undesirable results. To work
around the problem, a gap between suggester metrics and partner metrics
can be reserved for maintenance. Reworking this example, the primary
suggester gets a value of 1, the secondary suggester gets a value of 2, the
metric 3 is reserved, and the partner SRXs have a metric value of 4. In
steady state, this leads to the following metrics per the last example:
P1-S1-P3 = 5
P1-S2-P3 = 6
P1-P2-P3 = 8
Chapter 5: Tuning Considerations for ADVPN 41
There are two actions that need to be configured when enabling LFA:
1. Tell the IGP to calculate a LFA, by nominating which interfaces are
to be protected.
2. Have the forwarding table reflect the backup routes.
For OSPF’s configuration of LFA, the key word link-protection needs
to be added to the configuration:
root@vSRXB1> show configuration protocols ospf
area 0.0.0.0 {
interface st0.0 {
interface-type p2mp;
link-protection;
metric 100;
demand-circuit;
dynamic-neighbors;
}
interface st0.10 {
interface-type p2mp;
link-protection;
metric 101;
demand-circuit;
dynamic-neighbors;
}
}
As mentioned earlier in this chapter, for LFA to make sense there needs
to be two distinct IP interfaces that are eligible for link protection.
The second item to configure is getting the forwarding table to reflect
the routes as calculated by OSPF. This involves creating a policy and
setting the policy to load-balance on a per-packet basis. The per-pack-
et keyword, harks back to older Juniper routing platforms, when it
was actually possible to forward traffic on a packet-by-packet basis.
Traffic forwarding today is on a flow basis, but the old per-packet
keyword remains. The configuration below creates a policy named
ecmp with the load-balance statement:
Now let’s get the RIB to be exported to the forwarding table based on
the policy that has just been created. The following configuration
creates a forwarding table with the loop free alternate routes in the
forwarding table:
Chapter 5: Tuning Considerations for ADVPN 43
To verify that the loop free alternate routes are now part of the for-
warding table, a show route is performed. In this example the specific
route 10.1.12.1/32 is reachable via st0.0 as the primary path and via
st0.10 as the secondary path:
root@vSRXB1> show route 10.1.2.12
This default behavior can be overridden to allow TCP sessions that are
in mid-session to be eligible to create a SRX flow, as well as a DNS
reply and embedded ICMP replies. The configuration is as follows:
admin@srx650-02> show configuration security flow
allow-dns-reply;
allow-embedded-icmp;
tcp-session {
no-syn-check;
no-syn-check-in-tunnel;
no-sequence-check;
}
WAN Transport
One of the significant advantages of ADVPN over Group VPN (RFC
6407) is the wider choice of WAN transport. In Group VPN, the
protected IP addresses must be routable across the WAN, as that is the
encapsulation method for that VPN technology. This almost always
means the transport must be a private WAN. ADVPN imposes no such
restriction because the encapsulation used hides the protected tunnel
addresses, allowing ADVPN to use the Internet as a transport.
As discussed in Chapter 3: ADVPN Key Concepts, ADVPN also has
the ability to traverse NATs. The following condition must be met,
however, for a shortcut session to be initiated: of the two partners, only
one of them can be behind a NAT in the network, not both. In such a
scenario, the shortcut suggester picks the SRX partner node behind the
NAT to be the shortcut initiator, which makes sense because it allows
an additional NAT to be built as the traffic is initiated from the inside
interface of the NAT device. If both partner nodes are behind NATs,
the shortcut suggester will not send a shortcut exchange, as the IKE
negotiation is likely to fail.
And the whitelist traffic use case only allows traffic that is expected to
flow from partner SRX to partner SRX. An example of this is in an
enterprise where all data processing takes place in the data center and
there should be no data traffic flowing from partner SRX to partner
SRX. However, on the same network, voice traffic is allowed to flow
from partner SRX to partner SRX. The policy rules in this example
would allow voice traffic and specifically deny all other traffic as such:
root@vSRXB1> show configuration security address-book
global {
address ADVPNspokes 10.1.128.0/17;
}
The SRX has a complete list of tools that can be used to create black or
white lists, in the form of SRX security policies. As noted in preceding
IP Addressing section, the creation of rules can be greatly simplified if
an IP addressing scheme that allows supernetting has been implement-
ed. For many installations, traditional SRX security policy will be
sufficient in terms of classification.
For a very fine granularity of the rules, the SRX application firewall
feature can be used, allowing for traffic to be classified beyond Layer 4
where applications can be rather stealthy in terms of port number
used. It should be noted that rules based on SRX application firewall
may still trigger a shortcut suggestion to be made and tunnel being
formed. The reason for this is some traffic needs to flow from end
station to end station before a determination is made whether the
Chapter 5: Tuning Considerations for ADVPN 49
Now, looking at the BFD sessions from the suggester SRX, SRXHQ,
and the two partner SRXs, SRXB1, and SRXB2:
Chapter 5: Tuning Considerations for ADVPN 51
root@vSRXHQ> show bfd session
Detect Transmit
Address State Interface Time Interval Multiplier
10.1.1.11 Up st0.0 9.000 3.000 3
10.1.1.12 Up st0.0 9.000 3.000 3
root@vSRXB1> show bfd session
Detect Transmit
Address State Interface Time Interval Multiplier
10.1.1.1 Up st0.0 9.000 3.000 3
root@vSRXB2> show bfd session
Detect Transmit
Address State Interface Time Interval Multiplier
10.1.1.1 Up st0.0 9.000 3.000 3
You can see that BFD has negotiated the less aggressive of the two
timers. A ping is initiated to trigger a shortcut suggestion, and shortcut
tunnels are established between the two partners:
root@vSRXB1> ping 10.1.1.12 rapid
PING 10.1.1.12 (10.1.1.12): 56 data bytes
!!!!!
The BFD sessions are inspected again and this time, as the partners are
negotiating with a common shared BFD value, a more aggressive set of
timers is put in place. The BFD sessions to the suggester node remains
more conservative:
root@vSRXB1> show bfd session
Detect Transmit
Address State Interface Time Interval Multiplier
10.1.1.1 Up st0.0 9.000 3.000 3
10.1.1.12 Up st0.0 0.900 0.300 3
root@vSRXB2> show bfd session
Detect Transmit
Address State Interface Time Interval Multiplier
10.1.1.1 Up st0.0 9.000 3.000 3
10.1.1.11 Up st0.0 0.900 0.300 3
Summary
ADVPN tuning considerations, like many network designs, consist of
trade-offs between hardware sizing, policy objectives, and what service
level targets are required by the business. Hopefully by this stage you
have your ADVPN environment created in a lab and can be experi-
menting with the factors you need to consider in your network designs.
In the next chapter you’ll be moving past the configuration stage of
deploying an ADVPN enabled network, and start focusing on how you
go about managing the network.
Chapter 6
SNMP MIBs
Most of the Juniper security-related management objects are contained
within the jnxJsSecurity branch of the Juniper enterprise MIB
hierarchy. Along with IPsec VPN, this branch contains entries for
features such as NAT, screens, IDP, UTM, and LSYS.
TIP The show snmp mib walk command allows interrogation of the various
MIBs supported by Junos without needing an external host or NMS.
JUNIPER-IPSEC-FLOW-MON-MIB (jnxIpSecFlowMonMIB)
This MIB exposes information about both phases of the IPsec opera-
tion. The MIB is populated with information about ADVPN shortcut
SAs as they are created. Similarly, when a shortcut tunnel is deleted,
data disappears from the MIB.
Phase 1
Number of IKE tunnels (phase 1 SAs)
Details of phase 1 SAs (local and remote peer IP addresses, SA
status, encryption, and hashing algorithms, etc.)
Phase 1 SA status (packets and octets in/out)
Phase 2
Number of IPsec tunnels (phase 2 SAs)
Details of phase 2 SAs (local/remote IP addresses, proxy IDs, key-
ing method)
Phase 2 SA status (encrypted and decrypted packets and octets in/
out, anti-replay drops, authentication failures, encryption
failures, etc.)
$ snmpwalk -v2c -c <community> <ipaddress> jnxIpSecFlowMonMIB
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalGwAddr.ipv4.”10.16.0.1”.5021960 = STRING: “10.16.2.1”
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalGwAddrType.ipv4.”10.16.0.1”.5021960 = INTEGER: ipv4(1)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonState.ipv4.”10.16.0.1”.5021960 = INTEGER: up(1)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonInitiatorCookie.
ipv4.”10.16.0.1”.5021960 = STRING: 9284c8b24baab87e
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonResponderCookie.
ipv4.”10.16.0.1”.5021960 = STRING: 8c18d24c99abfe1a
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalRole.ipv4.”10.16.0.1”.5021960 = INTEGER: initiator(1)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalIdType.ipv4.”10.16.0.1”.5021960 = INTEGER: idDn(3)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalIdValue.
ipv4.”10.16.0.1”.5021960 = STRING: C=AU, DC=sec0001, ST=ACT, L=Canberra, CN=srx550-01.sec0001.lab.
jnprcbr.local
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLocalCertName.ipv4.”10.16.0.1”.5021960 = STRING: srx550-01_0001.
cert
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonRemoteIdType.ipv4.”10.16.0.1”.5021960 = INTEGER: idDn(3)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonRemoteIdValue.
ipv4.”10.16.0.1”.5021960 = STRING: C=AU, DC=sec0001, ST=ACT, L=Canberra, CN=srx650-01.sec0001.lab.
jnprcbr.local
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonEncryptAlgo.ipv4.”10.16.0.1”.5021960 = INTEGER: espAes256(6)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonAuthMethod.ipv4.”10.16.0.1”.5021960 = INTEGER: 0
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonLifeTime.ipv4.”10.16.0.1”.5021960 = INTEGER: 28459 seconds
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonActiveTime.ipv4.”10.16.0.1”.5021960 = INTEGER: 34100
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonInOctets.ipv4.”10.16.0.1”.5021960 = Counter64: 1795 Octets
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonInPkts.ipv4.”10.16.0.1”.5021960 = Counter32: 3 Packets
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonOutOctets.ipv4.”10.16.0.1”.5021960 = Counter64: 1802 Octets
Chapter 6: Management and Day-to-Day Operations 55
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonOutPkts.ipv4.”10.16.0.1”.5021960 = Counter32: 3 Packets
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonXAuthUserId.ipv4.”10.16.0.1”.5021960 = STRING: not available
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIkeTunMonDPDDownCount.ipv4.”10.16.0.1”.5021960 = Counter32: 0 Packets
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonProtocol.ipv4.”10.16.0.1”.67108866.1 = INTEGER: esp(2)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonInSpi.ipv4.”10.16.0.1”.67108866.1 = Gauge32: 2279630321
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonOutSpi.ipv4.”10.16.0.1”.67108866.1 = Gauge32: 65043527
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonType.ipv4.”10.16.0.1”.67108866.1 = INTEGER: dynamic(2)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonEncapMode.ipv4.”10.16.0.1”.67108866.1 = INTEGER: tunnel(1)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonLifeSize.ipv4.”10.16.0.1”.67108866.1 = INTEGER: 0
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonLifeTime.ipv4.”10.16.0.1”.67108866.1 = INTEGER: 3600
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonActiveTime.ipv4.”10.16.0.1”.67108866.1 = INTEGER: 34100
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIPsecSaMonLifeTimeThreshold.ipv4.”10.16.0.1”.67108866.1 = INTEGER: 2965
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonEncryptAlgo.ipv4.”10.16.0.1”.67108866.1 = INTEGER: espNull(3)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonAuthAlgo.ipv4.”10.16.0.1”.67108866.1 = INTEGER: unknown(0)
JUNIPER-IPSEC-FLOW-MON-MIB::jnxIpSecSaMonState.ipv4.”10.16.0.1”.67108866.1 = INTEGER: active(1)
The output above might look a bit daunting, but once you know what
you’re looking at, deciding which objects are operationally useful will
be easy.
Take a look at the output again. You’ll notice that about halfway
through the output, the objects change from having a jnxIkeTunMon
prefix, to jnxIpSecSaMon – this is the separation of phase 1 and phase 2
information.
The numbers “5021960” and “67108866” are the phase 1 and phase
2 SA index numbers, respectively. These values are ephemeral and
correspond to the index numbers you see in the show security [ ike |
ipsec ] security-associations command output.
JUNIPER-JS-IPSEC-VPN-MIB (jnxJsIpSecVpnMib)
This MIB provides IPsec-related configuration information. Informa-
tion extracted from this MIB could be used to augment information
gathered from another MIB or from another source altogether.
Tunnel policy name (only applies to policy-based VPNs – not
applicable to ADVPN)
Tunnel type (policy-based or route-based – ADVPN tunnels are
always route-based)
Tunnel monitoring configuration state (VPN Monitor enabled or
disabled)
Tunnel monitoring state (VPN Monitor detects up, down, or
VPN Monitor disabled)
56 Day One: ADVPN Design and Implementation
$ snmpwalk -v2c -c <community> <ipaddress> jnxJsIpSecVpnMib
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunPolicyName.ipv4.”10.16.0.1”.131073 = STRING:
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunPolicyName.ipv4.”10.16.0.1”.67108865 = STRING:
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunPolicyName.ipv4.”10.16.0.1”.67108866 = STRING:
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecVpnTunType.ipv4.”10.16.0.1”.131073 = INTEGER: routeBased(2)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecVpnTunType.ipv4.”10.16.0.1”.67108865 = INTEGER: routeBased(2)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecVpnTunType.ipv4.”10.16.0.1”.67108866 = INTEGER: routeBased(2)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunCfgMonState.ipv4.”10.16.0.1”.131073 = INTEGER: disable(1)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunCfgMonState.ipv4.”10.16.0.1”.67108865 = INTEGER: disable(1)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunCfgMonState.ipv4.”10.16.0.1”.67108866 = INTEGER: disable(1)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunState.ipv4.”10.16.0.1”.131073 = INTEGER: vpnMonitoringDisabled(3)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunState.
ipv4.”10.16.0.1”.67108865 = INTEGER: vpnMonitoringDisabled(3)
JUNIPER-JS-IPSEC-VPN-MIB::jnxJsIpSecTunState.
ipv4.”10.16.0.1”.67108866 = INTEGER: vpnMonitoringDisabled(3)
JUNIPER-SRX5000-SPU-MONITORING-MIB
(jnxJsSPUMonitoringMIB)
TIP Don’t let the MIB’s name fool you – this MIB is supported by all
SRX-series devices, not just the SRX5K.
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringSPUIndex.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCPUUsage.0 = Gauge32: 0 percent
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringMemoryUsage.0 = Gauge32: 75 percent
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCurrentFlowSession.0 = Gauge32: 29
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringMaxFlowSession.0 = Gauge32: 409600
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCurrentCPSession.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringMaxCPSession.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringNodeIndex.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringNodeDescr.0 = STRING: single
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringFlowSessIPv4.0 = Gauge32: 29
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringFlowSessIPv6.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCPSessIPv4.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCPSessIPv6.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringCurrentTotalSession.0 = Gauge32: 29
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringMaxTotalSession.0 = Gauge32: 409600
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsClusterMonitoringNodeIndex.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsClusterMonitoringNodeDescr.0 = STRING: single
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeCurrentTotalSession.0 = Gauge32: 29
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeMaxTotalSession.0 = Gauge32: 409600
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeSessionCreationPerSecond.0 = Counter64: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeSessCreationPerSecIPv4.0 = Counter64: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeSessCreationPerSecIPv6.0 = Counter64: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeCurrentTotalSessIPv4.0 = Gauge32: 29
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeCurrentTotalSessIPv6.0 = Gauge32: 0
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringTotalSessIPv4.0 = Gauge32: 29
JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsSPUMonitoringTotalSessIPv6.0 = Gauge32: 0
SNMP Traps
There isn’t much choice in the way of IPsec-specific SNMP traps in
Junos. In practice, what’s done for IPsec VPNs is to monitor for traps
from protocols surrounding IPsec. Some examples include:
OSPF neighbor state changes (from OSPF-TRAP-MIB)
BFD session state changes (from BFD-STD-MIB)
Secure tunnel (st0) interface state changes (from IF-MIB)
One of the potential problems to solve, if you’re reliant on SNMP traps
to monitor your network, is how to differentiate between events from
the above sources that are real incidents to investigate, and events that
are simply triggered by ADVPN doing what it does best – dynamically
bringing up and tearing down tunnels.
Thankfully, modern SNMP trap managers allow events to be ignored
completely, or perhaps just downgraded in severity, based on variables
embedded within the trap itself. This applies to the OSPF and BFD
traps you might see. Dust off your favorite packet analysis utility and
see if you can spot something that’s different in the embedded variables
for a trap relating to a to a control SA going down, versus a shortcut
tunnel going down.
58 Day One: ADVPN Design and Implementation
variable jnxJsSPUMonitoringCurrentFlowSession.0;
sample-type absolute-value;
startup-alarm rising-alarm;
rising-threshold 18432;
falling-threshold 12288;
rising-event-index 500;
falling-event-index 500;
}
event 500 {
type log-and-trap;
community ADVPN;
}
}
}
MIB::alarmSampleType.100)
RMON-MIB::alarmEntry.alarmIndex: 100
RMON-MIB::alarmSampleType: absoluteValue (1)
RMON-MIB::alarmValue.100 (1.3.6.1.2.1.16.3.1.1.5.100): 95
Object Name: 1.3.6.1.2.1.16.3.1.1.5.100 (RMON-MIB::alarmValue.100)
RMON-MIB::alarmEntry.alarmIndex: 100
RMON-MIB::alarmValue: 95
RMON-MIB::alarmRisingThreshold.100 (1.3.6.1.2.1.16.3.1.1.7.100): 50
Object Name: 1.3.6.1.2.1.16.3.1.1.7.100 (RMON-
MIB::alarmRisingThreshold.100)
RMON-MIB::alarmEntry.alarmIndex: 100
RMON-MIB::alarmRisingThreshold: 50
SNMPv2-MIB::snmpTrapEnterprise.0 (1.3.6.1.6.3.1.1.4.3.0):
1.3.6.1.4.1.2636.1.1.1.2.36 (JUNIPER-CHASSIS-DEFINES-MIB::jnxProductNameSRX210)
Object Name: 1.3.6.1.6.3.1.1.4.3.0 (SNMPv2-MIB::snmpTrapEnterprise.0)
Scalar Instance Index: 0
SNMPv2-MIB::snmpTrapEnterprise: 1.3.6.1.4.1.2636.1.1.1.2.36 (JUNIPER-
CHASSIS-DEFINES-MIB::jnxProductNameSRX210)
Summary
SNMP is still a very popular protocol for managing network devices. In
this chapter, you’ve seen how SNMP can be used to pull operational
VPN information from SRX-series devices, and how SNMP traps and
RMON alarms can be used to push event information into an existing
SNMP-based network management platform.
In the next chapter, you’ll take a look at some newer and more flexible
methods for managing ADVPN using automation techniques built into
Junos.
Chapter 7
service. There are two steps – the first to generate an event, and the
second a policy to react to the event that has been generated. The
configuration required to achieve this is:
event-options {
generate-event {
1AM time-of-day “01:00:00 +0000”;
}
policy clearadvpn {
events 1AM;
then {
execute-commands {
commands {
“clear security ike sa sa-type shortcut”;
“clear security ipsec sa sa-type shortcut”;
}
}
}
}
}
MORE? There are a number of books in the Day One library to get you up to
speed with SLAX programming at http://www.juniper.net/dayone.
Chapter 7: Using Junos Automation to Help Manage ADVPN Environments 63
NOTE Script writing practice often follows the long taught computer science
principle of code reuse, that is, find another script that does something
similar in nature to what is required and modify that code to achieve the
result required. Scripts that have been made publicly available can be
found here:
https://techwiki.juniper.net/Automation_Scripting/Junos_Automa-
tion_Library
https://github.com/Juniper/junoscriptorium/tree/master/library/
juniper
One of the more useful examples of using SLAX scripting is to build your
own MIB – that is, to expose via SNMP information contained on the
SRX not covered by an existing standard or Juniper specific MIB. In
almost all circumstances, if the information is available via the CLI, a
SLAX script can be used to extract this information and place it in a
private MIB. Junos has a facility under the Juniper enterprise OID tree
called the Utility MIB, where values can be set either by the CLI or a
SLAX script.
Okay, back to ADVPN. Now that the network is more dynamic than
ever, how can the usage of ADVPN be measured? Built into Junos is the
jnxIpSecFlowMonMIB MIB under the Junos enterprise MIB tree. This gives
the ongoing statistics for the IPsec security association, such as encrypted
bytes, in and out, and encrypted packets in and out. Note that the IP
addresses that are used in the MIB are the external peer IP addresses.
With a good IP addressing and naming scheme, it should be possible to
infer the routing instance, the local and remote IP addresses of the
protected tunnel. That may not be possible, but the information should
be able to be derived from the SRX. If so, it should also be possible to
polled via SNMP.
Let’s execute the show security ipsec next-hop-tunnels command:
root@vSRXB1> show security ipsec next-hop-tunnels
Next-hop gateway interface IPsec VPN name Flag IKE-ID
XAUTH username
10.1.1.1 st0.0 instance-GT-ADVPN-
spoke1-67108865_67108870 Auto C=AU, ST=ACT, O=Juniper, OU=juniper-vpn, CN=vSRXHQ.
juniper.net Not-Available
10.1.1.2 st0.0 instance-GT-ADVPN-
spoke1bu-67108868_67108869 Auto C=AU, ST=ACT, O=Juniper, OU=JuniperCA, CN=vSRXHQBU.
juniper.net Not-Available
11.1.1.1 st0.1 instance-GT-ADVPN-spoke1-
vr1-67108866_67108872 Auto C=AU, ST=ACT, O=Juniper, OU=VR1, CN=vSRXHQ-VR1.juniper.
net Not-Available
11.1.1.2 st0.1 instance-GT-ADVPN-spoke1-vr1-
bu-67108867_67108871 Auto C=AU, ST=ACT, O=Juniper, OU=VR1, CN=vSRXHQBU-VR1.juniper.
net Not-Available
64 Day One: ADVPN Design and Implementation
You can see in the bolded output that the first entry is the next-hop
address. Importantly, this is the protected IP address. The second entry
is the local interface. It is important you know which interface is being
used as that will become the key to what routing instance is being used.
Inspecting the IPsec VPN name, the name is made up from the underlying
VPN name as well as the IPsec security association’s identifiers from both
ends of the security association. Using SLAX, the next-hop address, local
st0 interface, and stripping out the security association from the IPsec
VPN name is relatively simple. Using the security association index as a
MIB key means you can relate this information to the jnxIpSecFlowMon-
MIB MIB. That is, stats from that MIB now have the remote protected IP
address as well as the outbound local interface.
The final piece of the puzzle is to relate the local st0 interface to a routing
instance so you can make the distinction between IPsec security associa-
tions belonging to different routing instances. Let’s try the show inter-
faces routing-instance all terse command:
show interfaces routing-instance all terse
root@vSRXB1> show interfaces routing-instance all terse
Interface Admin Link Proto Local Instance
...
st0.0 up up inet 10.1.1.11/24 default
st0.1 up up inet 11.1.1.11/24 vr1
The first entry is the local interface and the last entry is the routing
instance name. Using the interface as a key, this entry can be directly
related to the previous show command. In summary, the information is
available from the SRX, it just needs to be extracted and put into the
Utility MIB so that it can be polled via SNMP.
By convention, Juniper Utility MIBs should have their OIDs pre-pended
by a script identifier so they are unique to that script, allowing for
multiple uses of the MIB without having collisions on OIDs. In this case,
the script identifier chosen is “23876” (ADVPN). The layout of the
information that is to be populated is as follows:
jnxUtilStringValue.23287.0 = script tracker to delete old items
jnxUtilStringValue.23287.1.<IPsec SA number> .1 = local tunnel name (string)
.2 = next hop address (string)
jnxUtilStringValue.23287.2.<interface name> .1 = routing instance name (string)
The script that that does all the work is on this book’s landing page at
http://www.juniper.net/dayone.
NOTE If you’re in your lab and you want to experiment a little, Junos Space can
manage scripts.
The script needs to find its way to /var/op/script/db. Once the script is
there, Junos needs to be configured so it knows of its existence:
Chapter 7: Using Junos Automation to Help Manage ADVPN Environments 65
Once in Junos configuration mode the script can be run at any time:
root@vSRXB1> op advpnmib
The script has found four IPsec security associations active, with their
respective tunnel index numbers being 67108869, 67108870,
67108871, and 67108872. For each security association, the remote
protected tunnel interface and local outbound interface is provided.
Now, for the second part of the tree, where again 50.51.56.55.54 is our
script identifier ADVPN, but this time 50 (numeric 2) is the interface
part of the MIB:
root@vSRXB1> show snmp mib walk jnxUtilStringValue.50.51.56.55.54.50 ascii
jnxUtilStringValue.”238762st0.0” = default
jnxUtilStringValue.”238762st0.1” = vr1
The script has found two st0 interfaces, with their respective names
being st0.0 and st0.1, and for each interface, the routing instance they
belong to, is listed.
short, say 1-2 minutes, the ability to capture the requisite information
before the tunnel is torn down will be marginal. For suggester nodes
that are likely to have a very large number of IPsec security associa-
tions, the script should run less frequently. Given IPsec tunnels to
suggester nodes should be long-lived, this should not pose too many
difficulties with having lost data.
Using the work from the first example, the SRX is going to generate an
event every five minutes (300 seconds). Unlike the first example where
a command was used as the action, in this case the action is to call the
script that updates the Utility MIB. The configuration is as follows:
root@vSRXB1> show configuration event-options
generate-event {
5Min time-interval 300;
}
policy advpnmib {
events 5Min;
then {
event-script advpnmib.slax;
}
}
Summary
Junos automation should be used to help manage the ADVPN network
implementation. The goal for any automation should be to get a
machine to do something that you don’t want to do. Automation can
be as simple as executing certain actions based on events that occur in
the ADVPN enabled network or as sophisticated as scripting to extract
detailed information for further analysis.
Now we’ve covered the day-to-day management of an ADVPN
environment and how to automate it, the next chapter will concentrate
on troubleshooting an ADVPN environment.
Chapter 8
Troubleshooting ADVPN
Structured IPsec and PKI related system logs are prefixed with KMD_
and PKID_ respectively.
Junos provides a very flexible framework for managing system log
messages. Whether you’re logging to the terminal, local files, an
external syslog host, or a combination thereof, Junos provides you
with a lot of control of what gets logged, and where.
68 Day One:ADVPN Design and Implementation
This example simply captures any log messages containing the string
“KMD_SHORTCUT” (NB: the match is not case sensitive), regardless
of the facility or severity at which it was logged, into the local file /
var/log/advpn-log.
Here are some helpful hints that should allow you to fine-tune your
syslog configuration:
When you’re testing or piloting ADVPN, consider logging more
events (for example, any facility, any severity) so that you can
determine what’s operationally useful, and what’s not. This
allows you to white-list events at the source rather than over-
whelming your logging system. It’s also useful to observe rela-
tionships between events (for example, between BFD and OSPF).
If you’re not sure what facility and/or severity a specific event is
being logged at, you have two options:
Use the online syslog reference built into Junos:
admin@srx550-01> help syslog RPD_OSPF_NBRDOWN
Name: RPD_OSPF_NBRDOWN
Message: OSPF neighbor <neighbor-address> (realm <realm-name> <interface-name>
area <area-id>i) state changed from <old-state> to <new-state> due to <event-name>
(event
reason: <reason>)
Help: OSPF neighbor adjacency was terminated
Description: An OSPF adjacency with the indicated neighboring router was terminated.
The local router no longer exchanges routing information with, or directs traffic to,
the
neighboring router.
Type: Event: This message reports an event, not an error
Severity: notice
Facility: LOG_DAEMON
Action: For more information, see KB19074.
Without “explicit-priority”:
rpd[1460]: RPD_OSPF_NBRUP: OSPF neighbor 172.24.114.2 (realm ospf-v2 st0.10 area 0.0.0.0)
state changed from Init to ExStart due to 2WayRcvd (event reason: neighbor detected this
router)
With “explicit-priority”:
rpd[1460]: %DAEMON-6-RPD_OSPF_NBRUP: OSPF neighbor 172.24.114.2 (realm ospf-v2 st0.10
area 0.0.0.0) state changed from Init to ExStart due to 2WayRcvd (event reason: neighbor
detected this router)
In the second output, the facility is “daemon” and the severity is “6”,
which is considered “informational.” See RFC 5424 (section 6.2.1) for
more details on syslog facilities and severities.
New Messages
This section describes the new system log messages introduced as part of
the ADVPN feature.
KMD_SHORTCUT_SUGGESTION_SENT
This is logged when a suggester sends a shortcut request to an initiator
partner or a responder partner.
The following fields are included in the message:
Shortcut identifier
70 Day One:ADVPN Design and Implementation
KMD_SHORTCUT_SUGGESTION_RECEIVED
This message will be logged when a partner receives a shortcut sugges-
tion. The response, i.e. whether the shortcut suggested is accepted or
declined, will also be logged in the same message.
The following fields are included in the message:
Control/Static P1 SA ID
Suggester IP address
Local Partner IP address
Peer Partner IP address
Shortcut identifier
Initiator IKE ID
Responder IKE ID
Initiator Traffic-Selector
Responder Traffic-Selector
Shortcut Lifetime
Shortcut negotiation role
Shortcut Response (accept/decline)
Chapter 8: Troubleshooting ADVPN 71
Example:
Dec 7 18:52:38 vsrxvpn30 kmd[1144]: SHORTCUT_SUGGESTION_RECEIVED: P1 SA id: 2369718,
Local shortcut partner address: 17.0.1.7, Suggester address: 23.0.0.250, Remote
shortcut partner address: 23.0.0.111 Shortcut initiator ike-id: DC=juniper, CN=vsrx30,
L=Sunnyvale, ST=CA, C=US Shortcut responder ike-id: DC=juniper, CN=vsrx263-cert1,
L=Sunnyvale, ST=CA, C=US Local traffic-selector id: ipv4(0.0.0.0-255.255.255.255)
Remote traffic-selector id: ipv4(0.0.0.0-255.255.255.255), Shortcut identifier:
4286578695, Shortcut lifetime: 0, Shortcut negotiation role: Initiator, Shortcut
response: Shortcut ACK
KMD_SHORTCUT_SUGGESTION_RESPONSE_RECEIVED
This message is logged when a response to a shortcut suggestion is
received from initiator and responder partners.
The following fields are included in the message:
Shortcut identifier
Partner IP address from which the response is received
Partner role from which the response is received
Initiator Partner information (IP address, IKE-ID, role)
Responder Partner information (IP address, IKE-ID, Role)
Traffic selectors proposed in suggestion
P1 SA index on which the response is received
Response code indicated in the response; one of:
SHORTCUT_ACK,
SHORTCUT_OK,
SHORTCUT_DELETE,
SHORTCUT_PARTNER_UNREACHABLE,
SHORTCUT_TEMPORARILY_DISABLED,
SHORTCUT_NEGOTIATION_FAILED,
SHORTCUT_SPD_UNMATCHED,
SHORTCUT_PAD_UNMATCHED
Examples:
Sep 18 23:34:04 vsrxvpn75 kmd[2732]: SHORTCUT_SUGGESTION_RESPONSE_RECEIVED from
responder partner: 31.1.1.2, for shortcut identifier: 0xff800007; between partner
12.1.1.202 ike-id: C=US, DC=juniper, ST=CA, L=Sunnyvale, O=Juniper, OU=engineering,
CN=vsrxvpn80; role: Initiator; and partner 31.1.1.2 ike-id: C=US, DC=juniper, ST=CA,
L=Sunnyvale, O=Juniper, OU=engineering, CN=vsrxvpn79; role: Responder; traffic
selectors: ipv4(0.0.0.0-255.255.255.255); P1 SA index: 2686136; shortcut response:
SHORTCUT_ACK
KMD_SHORTCUT_SUGGESTION_SUCCESS
KMD_SHORTCUT_TUNNEL_DELETED
When a partner has deleted a shortcut tunnel, a message will be logged.
The following fields are included in the message:
Shortcut Tunnel ID
Partner_1 IP address
Partner_2 IP address
Chapter 8: Troubleshooting ADVPN 73
Shortcut Identifier
Initiator IKE ID
Responder IKE ID
Initiator Traffic-Selector
Responder Traffic-Selector
Shortcut Lifetime
Shortcut negotiation role
Reason for deletion
Example:
Dec 7 19:35:28 vsrxvpn30 kmd[1144]: SHORTCUT_TUNNEL_DELETED: tunnel_id: 268173334,
Local partner address: 17.0.1.7, Remote partner address: 23.0.0.111, Shortcut
identifier: 4286578697, Shortcut lifetime: Infinite, Shortcut negotiation role:
Initiator, Initiator ike id: der_asn1_dn(any:0,[0..89]=DC=juniper, CN=vsrx30,
L=Sunnyvale, ST=CA, C=US), Responder ike id: der_asn1_dn(any:0,[0..96]=DC=juniper,
CN=vsrx263-cert1, L=Sunnyvale, ST=CA, C=US), Initiator traffic-selector: ipv4_
subnet(any:0,[0..7]=0.0.0.0/0), Responder traffic-selector: ipv4_
subnet(any:0,[0..7]=0.0.0.0/0), Reason: Idle-time reached
Updated Messages
KMD_VPN_UP_ALARM_USER
The existing KMD_VPN_UP_ALARM_USER message, which is logged
when a security association comes up, has been extended to include a
field indicating the type of security association. In the case of a dynamic
SA between ADVPN Partners, the value is “Shortcut.”
The following fields have been added to the message:
SA Type - Control/Static or Shortcut
Example:
Dec 7 19:32:30 vsrxvpn30 kmd[1144]: KMD_VPN_UP_ALARM_USER: VPN instance-GT-ADVPN-zth_
spoke_vpn-268173331_268173332 from 23.0.0.111 is up. Local-ip: 17.0.1.7, gateway name:
zth_spoke_gw, vpn name: GT-ADVPN-zth_spoke_vpn-268173331, tunnel-id: 268173332, local
tunnel-if: st0.0, remote tunnel-ip: 2.1.1.111, Local IKE-ID: DC=juniper, CN=vsrx30,
L=Sunnyvale, ST=CA, C=US, Remote IKE-ID: DC=juniper, CN=vsrx263-cert1, L=Sunnyvale,
ST=CA, C=US, XAUTH username: Not-Applicable, VR id: 0, Traffic-selector: , Traffic-
selector local ID: ipv4_subnet(any:0,[0..7]=0.0.0.0/0), Traffic-selector remote ID:
ipv4_subnet(any:0,[0..7]=0.0.0.0/0), SA Type: Shortcut
74 Day One:ADVPN Design and Implementation
KMD_VPN_DOWN_ALARM_USER
When a shortcut tunnel goes down (i.e. when phase 2 SA is deleted),
then Junos will use the existing message KMD_VPN_DOWN_
ALARM_USER.
The following fields have been added to the message:
SA Type - Control/Static or Shortcut
Example:
Dec 7 19:35:28 vsrxvpn30 kmd[1144]: KMD_VPN_DOWN_ALARM_USER: VPN instance-GT-ADVPN-
zth_spoke_vpn-268173333_268173334 from 23.0.0.111 is down. Local-ip: 17.0.1.7,
gateway name: zth_spoke_gw, vpn name: GT-ADVPN-zth_spoke_vpn-268173333, tunnel-id:
268173334, local tunnel-if: st0.0, remote tunnel-ip: 2.1.1.111, Local IKE-ID:
DC=juniper, CN=vsrx30, L=Sunnyvale, ST=CA, C=US, Remote IKE-ID: DC=juniper,
CN=vsrx263-cert1, L=Sunnyvale, ST=CA, C=US, XAUTH username: Not-Applicable, VR id: 0,
Traffic-selector: , Traffic-selector local ID: ipv4_subnet(any:0,[0..7]=0.0.0.0/0),
Traffic-selector remote ID: ipv4_subnet(any:0,[0..7]=0.0.0.0/0), SA Type: Shortcut,
Reason: Idle-time reached
PKI Messages
All PKI related messages are logged with the PKID_ prefix. Junos
includes over 50 such messages (see “help syslog | match PKID_”), so
we won’t cover them all individually here.
If you’d like to configure a local log file that contains only PKI-related
messages, try this syslog file configuration:
admin@srx650-01> show configuration system syslog | find pki
file pki-log {
daemon any;
match PKID_;
explicit-priority;
}
Summary
You’ve just seen how the logging framework built into Junos can be
used to monitor ADVPN effectively. A number of new log messages
have been introduced as part of the ADVPN feature, and some existing
messages have been extended to include ADVPN-related details.
System logs can be used during testing and development, as well as in
business-as-usual operations.
In the next section, we’ll take a look at the way the Junos operational
mode CLI has been extended to include ADVPN commands that are
useful for troubleshooting purposes.
Troubleshooting ADVPN
As you’re already familiar with IPsec concepts, extending your existing
troubleshooting knowledge to cover ADVPN will take no time at all.
Some CLI commands have been extended to include ADVPN-specific
output and in some cases, additional parameters/arguments have been
added to existing commands to focus the output on ADVPN opera-
tion.
CLI Changes
Troubleshooting PKI
ADVPN’s requirement for PKI in conjunction with IPsec can seem
daunting at first, and there’s no doubt it does introduce a degree of
complexity that you don’t get with the pre-shared keys you’ve come to
know and love.
Without question, the use of PKI can greatly widen the scope of your
troubleshooting if something’s not working. But even once you do get
device certificates signed and issued with the right attribute values and
so on, things can still go wrong.
Take the example where your network might be ticking along just fine,
then without warning, your IPsec SAs go down and take your tunnels
with them. The most likely explanation for this is that you’ve config-
ured Certificate Revocation List (CRL) checking but something
external to the SRX has changed and the CRL Distribution Point
(CDP) can no longer be accessed to refresh the locally cached CRL.
This is not a sign of buggy software; it’s a self-preservation mechanism
and a security compliance requirement. The behavior of the SRX is
determined through standards such as RFC 5280 (“Internet X.509
Public Key Infrastructure Certificate and Certificate Revocation List
(CRL) Profile”).
Chapter 8: Troubleshooting ADVPN 77
These trace outputs are clearly not as easy to digest as regular syslog
messages – the messages are intended for the Juniper software engi-
neers that wrote the code in the first place – but they do reveal a great
deal about what’s going on under the covers.
Architectural Blueprints
Expanding upon the first idea, if you’re using virtual routing instances
with multiple parallel sets of secure tunnel interfaces, you could assign
a routing instance ID to each instance and use it in the st0 unit number-
ing as a prefix. This would result in spoke SRX secure tunnel interfaces
that connect to the hub in routing instance 1 being configured as
st0.1128, and for routing instance 2 it would be st0.2128.
For ADVPN, given the multipoint nature of the secure tunnels,
consider assigning each ADVPN instance a numeric ID. For ADVPN
instance 1, you would number the st0 interfaces on the suggesters and
partners as st0.1000, and for ADVPN instance 2 you would configure
st0.2000.
With that much space to play with, you can embed a lot of operation-
ally useful information in tunnel interface numbering. Just don’t get
carried away – keep it simple, and make sure you’re not creating too
much work for yourself.
Configuration Annotation
Junos allows you to put a comment against most elements of the
configuration using the annotate command. This can be very useful for
“in-config” documentation.
Have you ever deployed a firewall filter that does something non-
obvious? Don’t be “that” colleague; insert an annotation that explains
the “five Ws”:
1. Who? (Bob did it)
2. What? (Firewall filter to stop Application Z from reaching the
Internet)
3. Where? (On all branch SRX gateways in the APAC region)
4. Why? (Application Z traffic from APAC should not reach the
Internet per the company’s security policy)
5. When? (On the 1st of April, under change ref. CHG12345)
The possibilities are endless!
When naming objects, use the case that allows you to differentiate
between Junos configuration statements and the named object(s).
Perhaps ALLUPPERCASE works for you, or maybe you prefer the
readability of thingsNamedUsingCamelCase, or maybe you’d just like
to insert an organization-specific prefix, like the company’s acronym,
into the names of everything you’ve named.
Whichever method you choose, document your decision somewhere,
and apply it consistently. The benefits of consistent naming become
invaluable during significant changes. Coupled with Junos CLI func-
tionality like “replace pattern,” it becomes very easy to make changes
across the entire configuration without accidentally leaving something
out and causing an unplanned outage.
Key Takeaways
This is the simplest form of ADVPN – it’s easy to deploy and there
aren’t many decisions that need to be made. It’s great for networks of
all sizes, from a small business with a handful of sites, to a large
retailer with up to 512 locations.
Here are some key takeaways for you to remember:
Secure tunnel interfaces (st0.*) are assigned IP addresses from a
single IP subnet and each node in the ADVPN, regardless of its
Chapter 9: Architectural Blueprints 83
Suggester Configuration
Here are some general notes about the configuration that follows:
It uses apply-groups to enable GRES and ADVPN, and to
standardize the way OSPF and BFD are configured on secure
tunnel interfaces.
It uses virtual routing instances to separate WAN/carrier routing
information from your organization’s routing information.
It uses a default security policy of permit-all. This is probably
not desirable for many environments but in this lab, it’s okay.
It does not include any LAN-facing interface definitions.
groups {
GROUP-GRES-CFG {
routing-instances {
<*> {
routing-options {
graceful-restart;
}
}
}
}
GROUP-ADVPN-CFG {
security {
ike {
gateway <*> {
advpn {
partner {
84 Day One: ADVPN Design and Implementation
disable;
}
}
}
}
}
}
GROUP-OSPF-TUNNEL-CFG {
routing-instances {
<*> {
protocols {
ospf {
area <*> {
interface <st0.*> {
interface-type p2mp;
demand-circuit;
dynamic-neighbors;
bfd-liveness-detection {
minimum-interval 1000;
multiplier 3;
}
}
}
}
}
}
}
}
}
system {
host-name Hub-1;
domain-name lab.jnprcbr.local;
time-zone EST-10EDT-11,M10.1.0/2,M4.1.0/3;
default-address-selection;
root-authentication {
encrypted-password "<REMOVED>"; ## SECRET-DATA
}
name-server {
172.27.160.221;
}
services {
ssh {
protocol-version v2;
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
Chapter 9: Architectural Blueprints 85
file traffic-log {
any any;
match RT_FLOW_SESSION;
explicit-priority;
}
file ospf-log {
any any;
match "OSPF|BFD";
explicit-priority;
}
file vpn-log {
any any;
match "KMD|SHORTCUT";
explicit-priority;
}
file pki-log {
daemon any;
match PKID;
explicit-priority;
}
}
ntp {
boot-server 172.27.160.1;
server 172.27.160.1;
}
}
security {
pki {
ca-profile ca01-root {
ca-identity lab-CA01;
revocation-check {
use-crl;
crl {
url "http://ca01.lab.jnprcbr.local/CertEnroll/lab-CA01.crl";
}
}
}
}
ike {
apply-groups GROUP-ADVPN-CFG;
policy ADVPN-IKEPOL-SUITEB-VR0001 {
mode main;
certificate {
local-certificate srx650-01_0001;
}
proposal-set suiteb-gcm-256;
}
gateway ADVPN-IKEGW-SPOKES-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
dynamic {
distinguished-name {
wildcard DC=sec0001;
}
ike-user-type group-ike-id;
}
local-identity distinguished-name;
external-interface ge-0/0/0.0;
86 Day One: ADVPN Design and Implementation
version v2-only;
}
}
ipsec {
policy ADVPN-IPSECPOL-SUITEB-SHARED {
proposal-set suiteb-gcm-256;
}
vpn ADVPN-VPN-SPOKES-VR0001 {
bind-interface st0.1001;
ike {
gateway ADVPN-IKEGW-SPOKES-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
}
}
}
policies {
default-policy {
permit-all;
}
}
zones {
security-zone WAN {
interfaces {
ge-0/0/0.0 {
host-inbound-traffic {
system-services {
ike;
}
protocols {
bgp;
}
}
}
}
}
security-zone VR0001-zone {
interfaces {
st0.1001 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.0.2/24;
}
Chapter 9: Architectural Blueprints 87
}
}
st0 {
unit 1001 {
multipoint;
family inet {
address 10.127.101.1/24;
}
}
}
}
routing-options {
graceful-restart;
}
policy-options {
policy-statement CE_PE_BGP_EXPORT {
term EXPORT_IKE_PEER_PREFIXES {
from interface [ ge-0/0/0.0 ];
then accept;
}
}
}
routing-instances {
apply-groups [ GROUP-GRES-CFG GROUP-OSPF-TUNNEL-CFG ];
VR0001 {
instance-type virtual-router;
interface st0.1001;
protocols {
ospf {
area 0.0.0.0 {
interface st0.1001 {
metric 101;
}
}
}
}
}
WAN {
instance-type virtual-router;
interface ge-0/0/0.0;
routing-options {
autonomous-system 65000;
}
protocols {
bgp {
log-updown;
group CE_PE_BGP {
export CE_PE_BGP_EXPORT;
peer-as 64512;
neighbor 10.0.0.1;
}
}
}
}
}
88 Day One: ADVPN Design and Implementation
Key Takeaways
This suggester blueprint is the most commonly deployed design for
organizations requiring high availability. In terms of scaling, because
the number of supported tunnels varies between platforms, this design
scales identically to the design in the Single Suggester blueprint – any-
where from 2 to 512 partner nodes are supported. Here are the key
takeaways:
Because there are multiple tunnel interfaces defined on the
partner nodes, routing protocol behavior should be tuned to
assure deterministic behavior in the event of an outage (planned
or unplanned).
Suggester Configurations
dynamic-neighbors;
}
}
}
}
}
}
}
}
system {
host-name Hub-1;
domain-name lab.jnprcbr.local;
time-zone EST-10EDT-11,M10.1.0/2,M4.1.0/3;
default-address-selection;
root-authentication {
encrypted-password "<REMOVED>"; ## SECRET-DATA
}
name-server {
172.27.160.221;
}
services {
ssh {
protocol-version v2;
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
file traffic-log {
any any;
match RT_FLOW_SESSION;
explicit-priority;
}
file ospf-log {
any any;
match "OSPF|BFD";
explicit-priority;
}
file vpn-log {
any any;
match "KMD|SHORTCUT";
explicit-priority;
}
file pki-log {
Chapter 9: Architectural Blueprints 91
daemon any;
match PKID;
explicit-priority;
}
}
ntp {
boot-server 172.27.160.1;
server 172.27.160.1;
}
}
security {
pki {
ca-profile ca01-root {
ca-identity lab-CA01;
revocation-check {
use-crl;
crl {
url "http://ca01.lab.jnprcbr.local/CertEnroll/lab-CA01.crl";
}
}
}
}
ike {
apply-groups GROUP-ADVPN-CFG;
policy ADVPN-IKEPOL-SUITEB-VR0001 {
mode main;
certificate {
local-certificate srx650-01_0001;
}
proposal-set suiteb-gcm-256;
}
gateway ADVPN-IKEGW-SPOKES-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
dynamic {
distinguished-name {
wildcard DC=sec0001;
}
ike-user-type group-ike-id;
}
local-identity distinguished-name;
external-interface ge-0/0/0.0;
version v2-only;
}
}
ipsec {
policy ADVPN-IPSECPOL-SUITEB-SHARED {
proposal-set suiteb-gcm-256;
}
vpn ADVPN-VPN-SPOKES-VR0001 {
bind-interface st0.1001;
ike {
gateway ADVPN-IKEGW-SPOKES-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
92 Day One: ADVPN Design and Implementation
}
}
}
policies {
default-policy {
permit-all;
}
}
zones {
security-zone WAN {
interfaces {
ge-0/0/0.0 {
host-inbound-traffic {
system-services {
ike;
}
protocols {
bgp;
}
}
}
}
}
security-zone VR0001-zone {
interfaces {
st0.1001 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.0.2/24;
}
}
}
st0 {
unit 1001 {
multipoint;
family inet {
address 10.127.101.1/24;
}
Chapter 9: Architectural Blueprints 93
}
}
}
routing-options {
graceful-restart;
}
policy-options {
policy-statement CE_PE_BGP_EXPORT {
term EXPORT_IKE_PEER_PREFIXES {
from interface ge-0/0/0.0;
then accept;
}
}
}
routing-instances {
apply-groups [ GROUP-GRES-CFG GROUP-OSPF-TUNNEL-CFG ];
VR0001 {
instance-type virtual-router;
interface st0.1001;
protocols {
ospf {
area 0.0.0.0 {
interface st0.1001 {
metric 101;
}
}
}
}
}
WAN {
instance-type virtual-router;
interface ge-0/0/0.0;
routing-options {
autonomous-system 65000;
}
protocols {
bgp {
log-updown;
group CE_PE_BGP {
export CE_PE_BGP_EXPORT;
peer-as 64512;
neighbor 10.0.0.1;
}
}
}
}
}
94 Day One: ADVPN Design and Implementation
172.27.160.221;
}
services {
ssh {
protocol-version v2;
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
file traffic-log {
any any;
match RT_FLOW_SESSION;
explicit-priority;
}
file ospf-log {
any any;
match "OSPF|BFD";
explicit-priority;
}
file vpn-log {
any any;
match "KMD|SHORTCUT";
explicit-priority;
}
file pki-log {
daemon any;
match PKID;
explicit-priority;
}
}
ntp {
boot-server 172.27.160.1;
server 172.27.160.1;
}
}
security {
pki {
ca-profile ca01-root {
ca-identity lab-CA01;
revocation-check {
use-crl;
crl {
url "http://ca01.lab.jnprcbr.local/CertEnroll/lab-CA01.crl";
}
}
}
96 Day One: ADVPN Design and Implementation
}
ike {
apply-groups GROUP-ADVPN-CFG;
policy ADVPN-IKEPOL-SUITEB-VR0001 {
mode main;
certificate {
local-certificate srx650-02_0001;
}
proposal-set suiteb-gcm-256;
}
gateway ADVPN-IKEGW-SPOKES-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
dynamic {
distinguished-name {
wildcard DC=sec0001;
}
ike-user-type group-ike-id;
}
local-identity distinguished-name;
external-interface ge-0/0/0.0;
version v2-only;
}
}
ipsec {
policy ADVPN-IPSECPOL-SUITEB-SHARED {
proposal-set suiteb-gcm-256;
}
vpn ADVPN-VPN-SPOKES-VR0001 {
bind-interface st0.1001;
ike {
gateway ADVPN-IKEGW-SPOKES-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
}
}
}
policies {
default-policy {
permit-all;
}
}
zones {
security-zone WAN {
interfaces {
ge-0/0/0.0 {
host-inbound-traffic {
system-services {
ike;
}
protocols {
bgp;
}
}
}
}
}
security-zone VR0001-zone {
Chapter 9: Architectural Blueprints 97
interfaces {
st0.1001 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.1.2/24;
}
}
}
st0 {
unit 1001 {
multipoint;
family inet {
address 10.127.102.2/24;
}
}
}
}
routing-options {
graceful-restart;
}
policy-options {
policy-statement CE_PE_BGP_EXPORT {
term EXPORT_IKE_PEER_PREFIXES {
from interface ge-0/0/0.0;
then accept;
}
}
}
routing-instances {
apply-groups [ GROUP-GRES-CFG GROUP-OSPF-TUNNEL-CFG ];
VR0001 {
instance-type virtual-router;
interface st0.1001;
protocols {
ospf {
area 0.0.0.0 {
interface st0.1001 {
metric 102;
}
}
}
98 Day One: ADVPN Design and Implementation
}
}
WAN {
instance-type virtual-router;
interface ge-0/0/0.0;
routing-options {
autonomous-system 65001;
}
protocols {
bgp {
log-updown;
group CE_PE_BGP {
export CE_PE_BGP_EXPORT;
peer-as 64512;
neighbor 10.0.1.1;
}
}
}
}
}
Key Takeaways
In most cases, deploying a second partner SRX implies that there
are multiple suggester SRX gateways deployed, either in a single
ADVPN cloud or multiple ADVPN clouds.
Deploying a second partner SRX at your remote branch sites
provides increased availability during planned and unplanned
outages.
The branch LAN facing interfaces of the partner SRX gateways
can be configured routed interfaces, or in a common L2 segment
with VRRP.
Branch LAN-to-WAN traffic flows can be controlled using
routing protocol metrics, or if using VRRP, via VRRP priority
and route tracking.
WAN-to-Branch LAN traffic flows can be controlled using
routing protocol metrics.
100 Day One: ADVPN Design and Implementation
dynamic-neighbors;
}
}
}
}
}
}
}
}
system {
host-name Spoke-1;
domain-name lab.jnprcbr.local;
time-zone EST-10EDT-11,M10.1.0/2,M4.1.0/3;
default-address-selection;
root-authentication {
encrypted-password "<REMOVED>"; ## SECRET-DATA
}
name-server {
172.27.160.221;
}
services {
ssh {
protocol-version v2;
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
file traffic-log {
any any;
match RT_FLOW_SESSION;
explicit-priority;
}
file ospf-log {
any any;
match "OSPF|BFD";
explicit-priority;
}
file vpn-log {
any any;
match "KMD|SHORTCUT";
explicit-priority;
}
file pki-log {
daemon any;
match PKID;
explicit-priority;
102 Day One: ADVPN Design and Implementation
}
}
ntp {
boot-server 172.27.160.1;
server 172.27.160.1;
}
}
security {
pki {
ca-profile ca01-root {
ca-identity lab-CA01;
revocation-check {
use-crl;
crl {
url "http://ca01.lab.jnprcbr.local/CertEnroll/lab-CA01.crl";
}
}
}
}
ike {
apply-groups GROUP-ADVPN-CFG;
policy ADVPN-IKEPOL-SUITEB-VR0001 {
mode main;
certificate {
local-certificate srx550-01_0001;
}
proposal-set suiteb-gcm-256;
}
gateway ADVPN-IKEGW-HUB1-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
address 10.0.0.2;
local-identity distinguished-name;
remote-identity distinguished-name container CN=srx650-01.sec0001.lab.
jnprcbr.local;
external-interface ge-0/0/0.0;
version v2-only;
}
gateway ADVPN-IKEGW-HUB2-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
address 10.0.1.2;
local-identity distinguished-name;
remote-identity distinguished-name container CN=srx650-02.sec0001.lab.
jnprcbr.local;
external-interface ge-0/0/0.0;
version v2-only;
}
}
ipsec {
policy ADVPN-IPSECPOL-SUITEB-SHARED {
proposal-set suiteb-gcm-256;
}
vpn ADVPN-VPN-HUB1-VR0001 {
bind-interface st0.1001;
ike {
gateway ADVPN-IKEGW-HUB1-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
Chapter 9: Architectural Blueprints 103
}
establish-tunnels immediately;
}
vpn ADVPN-VPN-HUB2-VR0001 {
bind-interface st0.1002;
ike {
gateway ADVPN-IKEGW-HUB2-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
}
establish-tunnels immediately;
}
}
policies {
default-policy {
permit-all;
}
}
zones {
security-zone WAN {
interfaces {
ge-0/0/0.0 {
host-inbound-traffic {
system-services {
ike;
}
protocols {
bgp;
}
}
}
}
}
security-zone VR0001-zone {
interfaces {
st0.1001 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
st0.1002 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
ge-0/0/1.0 {
host-inbound-traffic {
104 Day One: ADVPN Design and Implementation
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.2.2/24;
}
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 10.255.100.3/24 {
vrrp-group 1 {
virtual-address 10.255.100.254;
priority 110;
accept-data;
}
}
}
}
}
st0 {
unit 1001 {
multipoint;
family inet {
address 10.127.101.3/24;
}
}
unit 1002 {
multipoint;
family inet {
address 10.127.102.3/24;
}
}
}
}
routing-options {
graceful-restart;
}
policy-options {
policy-statement CE_PE_BGP_EXPORT {
term EXPORT_IKE_PEER_PREFIXES {
from interface ge-0/0/0.0;
then accept;
Chapter 9: Architectural Blueprints 105
}
}
}
routing-instances {
apply-groups [ GROUP-GRES-CFG GROUP-OSPF-TUNNEL-CFG ];
VR0001 {
instance-type virtual-router;
interface ge-0/0/1.0;
interface st0.1001;
interface st0.1002;
protocols {
ospf {
area 0.0.0.0 {
interface st0.1001 {
metric 101;
}
interface st0.1002 {
metric 102;
}
interface ge-0/0/1.0 {
passive;
}
}
}
}
}
WAN {
instance-type virtual-router;
interface ge-0/0/0.0;
routing-options {
autonomous-system 65002;
}
protocols {
bgp {
log-updown;
group CE_PE_BGP {
export CE_PE_BGP_EXPORT;
peer-as 64512;
neighbor 10.0.2.1;
}
}
}
}
}
106 Day One: ADVPN Design and Implementation
172.27.160.221;
}
services {
ssh {
protocol-version v2;
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
file traffic-log {
any any;
match RT_FLOW_SESSION;
explicit-priority;
}
file ospf-log {
any any;
match "OSPF|BFD";
explicit-priority;
}
file vpn-log {
any any;
match "KMD|SHORTCUT";
explicit-priority;
}
file pki-log {
daemon any;
match PKID;
explicit-priority;
}
}
ntp {
boot-server 172.27.160.1;
server 172.27.160.1;
}
}
security {
pki {
ca-profile ca01-root {
ca-identity lab-CA01;
revocation-check {
use-crl;
crl {
url "http://ca01.lab.jnprcbr.local/CertEnroll/lab-CA01.crl";
}
}
}
108 Day One: ADVPN Design and Implementation
}
ike {
apply-groups GROUP-ADVPN-CFG;
policy ADVPN-IKEPOL-SUITEB-VR0001 {
mode main;
certificate {
local-certificate srx550-02_0001;
}
proposal-set suiteb-gcm-256;
}
gateway ADVPN-IKEGW-HUB1-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
address 10.0.0.2;
local-identity distinguished-name;
remote-identity distinguished-name container CN=srx650-01.sec0001.lab.
jnprcbr.local;
external-interface ge-0/0/0.0;
version v2-only;
}
gateway ADVPN-IKEGW-HUB2-VR0001 {
ike-policy ADVPN-IKEPOL-SUITEB-VR0001;
address 10.0.1.2;
local-identity distinguished-name;
remote-identity distinguished-name container CN=srx650-02.sec0001.lab.
jnprcbr.local;
external-interface ge-0/0/0.0;
version v2-only;
}
}
ipsec {
policy ADVPN-IPSECPOL-SUITEB-SHARED {
proposal-set suiteb-gcm-256;
}
vpn ADVPN-VPN-HUB1-VR0001 {
bind-interface st0.1001;
ike {
gateway ADVPN-IKEGW-HUB1-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
}
establish-tunnels immediately;
}
vpn ADVPN-VPN-HUB2-VR0001 {
bind-interface st0.1002;
ike {
gateway ADVPN-IKEGW-HUB2-VR0001;
ipsec-policy ADVPN-IPSECPOL-SUITEB-SHARED;
}
establish-tunnels immediately;
}
}
policies {
default-policy {
permit-all;
}
}
zones {
Chapter 9: Architectural Blueprints 109
security-zone WAN {
interfaces {
ge-0/0/0.0 {
host-inbound-traffic {
system-services {
ike;
}
protocols {
bgp;
}
}
}
}
}
security-zone VR0001-zone {
interfaces {
st0.1001 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
st0.1002 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
ge-0/0/1.0 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.3.2/24;
110 Day One: ADVPN Design and Implementation
}
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 10.255.100.4/24 {
vrrp-group 1 {
virtual-address 10.255.100.254;
accept-data;
}
}
}
}
}
st0 {
unit 1001 {
multipoint;
family inet {
address 10.127.101.4/24;
}
}
unit 1002 {
multipoint;
family inet {
address 10.127.102.4/24;
}
}
}
}
routing-options {
graceful-restart;
}
policy-options {
policy-statement CE_PE_BGP_EXPORT {
term EXPORT_IKE_PEER_PREFIXES {
from interface ge-0/0/0.0;
then accept;
}
}
}
routing-instances {
apply-groups [ GROUP-GRES-CFG GROUP-OSPF-TUNNEL-CFG ];
VR0001 {
instance-type virtual-router;
interface ge-0/0/1.0;
interface st0.1001;
interface st0.1002;
protocols {
ospf {
area 0.0.0.0 {
interface st0.1001 {
metric 101;
}
interface st0.1002 {
metric 102;
}
Chapter 9: Architectural Blueprints 111
interface ge-0/0/1.0 {
passive;
metric 1000;
}
}
}
}
}
WAN {
instance-type virtual-router;
interface ge-0/0/0.0;
routing-options {
autonomous-system 65003;
}
protocols {
bgp {
log-updown;
group CE_PE_BGP {
export CE_PE_BGP_EXPORT;
peer-as 64512;
neighbor 10.0.3.1;
}
}
}
}
}
The use cases for virtualized routing are wide and varied – the tech-
nique might be used for the age-old requirement to separate the com-
pany’s marketing and engineering business units, or it could be used for
something a bit more realistic, for example, where you need to separate
routing information (and therefore traffic flows) carried within a guest
access/BYOD network, from the main corporate network.
Junos has supported IPsec in combination with virtual routing since the
10.0 release; it’s a proven technology in numerous networks around the
world. Once you’ve wrapped your head around the concept of one
physical router being carved up into multiple virtual routers, coupling it
with ADVPN is pretty straightforward.
Here are a few key points to consider when coupling IPsec (with or
without ADVPN) with virtual routing:
One or more secure tunnel (st0.x) logical interfaces are created
and assigned to each routing instance; a single interface (for
example, st0.10) can’t be assigned into more than one routing-
instance.
IKE configurations, such as policies, can be shared between
routing instances but in some cases, your company’s IT security
policy may mandate separation (for example, the use of different
local X.509 certificates for authentication). That’s fine – it’s
supported, too!
Sharing IKE policies between IKE gateways covering multiple
routing instances requires unique external-interface values, or
the use of the local-address statement.
A single SRX security zone can’t have interfaces assigned from
multiple routing instances. For example, you can’t have a single
“trust” security zone with ge-0/0/0.0 from routing instance A,
and ge-0/0/1.0 from routing instance B, as members. The easiest
way to think about this is that each routing instance needs its very
own set of security zones.
Finally, careful consideration needs to be given to where (there-
fore, within which routing instance) your network management
systems are placed. Best practice is to keep management routes in
the default/master table, inet.0. The implication here is that
control plane protocols such as NTP, RADIUS, syslog, and SNMP
should be able to communicate with peers by routing inside
inet.0.
That’s it. A four-minute review of virtualized routing instances, and
remember that the Juniper documentation suite is a good source of
information: http://www.juniper.net/documentation.
Appendices
Installation Goals
And here’s what to expect when completing this chapter in your lab:
You’ve installed ADCS roles onto the “ca01” domain member
server
You’ve configured the CA to be an Enterprise Root CA
You are able to submit certificate requests and download issued
certificates via the ADCS web interface
You are able to perform certificate revocation status checking
from the SRX via the ADCS web interface
Choose Select a server from the server pool (it should default to the
local system) and click Next:
116 Day One: ADVPN Design and Implementation
Click Add Features on the dialog box that pops up, then click Next:
Appendices 117
Accept the defaults. Click Next to arrive at the ADCS section of the
wizard:
Once you’ve selected the desired role services, click Next. Click your
way through any additional dialog boxes that ask you to select depen-
dent role services, such as the Web Server (IIS):
Appendices 119
Once you arrive at the Confirmation page, review your selections and
once satisfied, click Install:
Enter the user credentials used to configure role services, or accept the
default (the currently logged-on user) and click Next:
On the next screen make sure that Certification Authority and Certifi-
cation Authority Web Enrollment role services are checked then click
Next:
This is our first, and only, CA in our lab, so Root CA is the appropriate
selection here. Click Next:
Accept the default: Generate a new private key. Click Next:
OK, now you’re going to diverge from the defaults to ensure that your
CA exits this wizard configured in a Suite B compliant manner.
Drop the cryptographic provider drop-down, choose ECDSA_
P384#Microsoft Software Key Storage Provider. Set the Key length to
384 and choose SHA384 as the hashing algorithm.
Click Next:
122 Day One: ADVPN Design and Implementation
Choose a name for your CA. In our lab, we’re going to call it “lab-
CA01.” As you type in the name, the distinguished name (DN) preview
of your CA will change. You may have a preference for the way the DN
is built – for example, you may want to include additional detail such
as the locality, state, or company name. Once you’ve named your CA
and you’re happy with the DN, click Next:
Choose the validity period for the CA’s self-signed certificate. Five
years is enough for our lab but your security policy may require
something else. Click Next:
Appendices 123
Navigate to the Extensions tab. Find the CRL location that begins with
“http://” and click it once. Ensure that Include in CRLs. Clients use
this to find Delta CRL locations and Include in the CDP extension of
issued certificates options are checked.
In the book’s lab, we also unchecked all boxes in the ldap:// CRL
location. By default, the file:// location options are not checked.
It’s important to note that the HTTP URL defined here is embedded in
the certificates issued by the CA.
In this book’s lab, using the default HTTP variables as follows:
http://<ServerDNSName>/CertEnroll/<CaName><CRLNameSuffix><
DeltaCRLAllowed>.crl
The resultant URL used in the CDP becomes: http://ca01.lab.jnprcbr.
local/CertEnroll/lab-CA01.crl
Scroll down until you find the IPsec (Offline request) template. High-
light it, and then click OK:
admin@srx550-01>
Let’s step through this. First, you’re dropping out of the Junos CLI into
a shell prompt. Next, you’re using the “cat” (concatenate) tool to
redirect what you’re about to paste into a file named ca.txt. Then,
you’re pasting in the contents of the Base64-encoded CA certificate.
After the line containing the string -----END CERTIFICATE-----, type
Control-D (^D) to finish the process. Type exit to return to the Junos
CLI.
You should now have a file named “ca.txt” in your home directory on
the SRX. Let’s confirm it:
admin@srx550-01> file show ca.txt
-----BEGIN CERTIFICATE-----
MIICazCCAfGgAwIBAgIQE3Ryv2zi6Z9BwW5yLzK4EzAKBggqhkjOPQQDAzBcMQsw
CQYDVQQGEwJBVTEMMAoGA1UECBMDQUNUMREwDwYDVQQHEwhDYW5iZXJyYTEZMBcG
A1UEChMQSnVuaXBlciBOZXR3b3JrczERMA8GA1UEAxMIbGFiLUNBMDEwHhcNMTUw
MTIyMDUyMTQ4WhcNMjAwMTIyMDUzMTM0WjBcMQswCQYDVQQGEwJBVTEMMAoGA1UE
CBMDQUNUMREwDwYDVQQHEwhDYW5iZXJyYTEZMBcGA1UEChMQSnVuaXBlciBOZXR3
b3JrczERMA8GA1UEAxMIbGFiLUNBMDEwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQq
0xaGCwhIwnwjHXXQzmjfVE8f/x5VmQHWpQbFUKtf0xOr4kbeRhqCUDgEBpxri8cz
q+RDtOMSf4cGWWN+WiJRS/yvVPgKz5mp/Gknwxb7t1QkjITnSUEgfDLstCywg1Gj
eDB2MAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTLcO58
AudRR9Mx2vCOjXrsd8G9NTASBgkrBgEEAYI3FQEEBQIDAgACMCMGCSsGAQQBgjcV
AgQWBBTSi1+P17mnRXcyivXExfpGGzjhRTAKBggqhkjOPQQDAwNoADBlAjBGTGtD
kGanQJQNsv3JF0fnnkldGyZGL4/rIBAOaVvBaxi6Bh0xAKLqg5EjK5Obt9ECMQDv
O8bEXWpNlrORNUdXDnXzu6HIXhm0n22OoAm14V3wSBsdeiiM2PQgJa9H3GzH/l4=
-----END CERTIFICATE-----
128 Day One: ADVPN Design and Implementation
Okay, great!
Now, you need to apply some PKI configuration in Junos. At this point
all you need to do is to define a CA profile that can be used to associate
with the certificate:
admin@srx550-01> configure
Entering configuration mode
[edit]
admin@srx550-01# set security pki ca-profile lab-root ca-identity lab-CA01
[edit]
admin@srx550-01# commit and-quit
If you’ve configured syslog to look for PKI events, when you run this
command, you should see a PKI syslog message similar to the follow-
ing:
Feb 27 11:09:18 srx550-01 pkid[1452]: %DAEMON-5-PKID_PV_KEYPAIR_GEN: A 384 bit ECDSA
key-Pair has been generated for srx550-01_0003
Generated certificate request
-----BEGIN CERTIFICATE REQUEST-----
MIIBqDCCASwCAQAwdDEXMBUGCgmSJomT8ixkARkWB3NlYzAwMDMxKzApBgNVBAMT
Appendices 129
InNyeDU1MC0wMS5zZWMwMDAzbGFiLmpucHJjYnIubG9jYWwxETAPBgNVBAcTCENh
bmJlcnJhMQwwCgYDVQQIEwNBQ1QxCzAJBgNVBAYTAkFVMHYwEAYHKoZIzj0CAQYF
K4EEACIDYgAElKvwWTffQ235Rre5Aj/yF0Uyht8K7amjTRAxJSeKsx5pde9hemHc
VbLHC7dBGBBiMURouI0CLRZyAHIGLa19m20IdR3G31B6zHTUAOduZHyqkeSa4CPS
blvHSiznWD17oDkwNwYJKoZIhvcNAQkOMSowKDAmBgNVHREEHzAdghtzcng1NTAt
MDEubGFiLmpucHJjYnIubG9jYWwwDAYIKoZIzj0EAwMFAANoADBlAjBraKeGjlui
PFoTlyGqumEd5K24BzIeIiP3ZfmtGJ/rD6ChUyMSznVtitwPhgZbp54CMQC1BDfV
A3/a97opaVDQv+4w7a+m63HasXttwF0gP721Mb/ii213v8EldHmXDZNNY1w=
-----END CERTIFICATE REQUEST-----
Fingerprint:
00:95:5b:b7:89:da:46:2b:99:1b:cd:68:eb:72:f7:7a:99:c5:8b:9d (sha1)
fe:b3:0d:9c:f3:3c:11:53:83:51:94:2b:bf:25:02:4e (md5)
If you’ve configured syslog to look for PKI events, when you run this
command, you should see a PKI syslog message similar to the follow-
ing:
Feb 27 11:21:52 srx550-01 pkid[1452]: %DAEMON-5-PKID_PV_CERT_LOAD: Certificate
srx550-01_0003 has been successfully loaded
During the writing of this book some of our labs were completely
isolated; in one instance, the entire lab was provisioned on a laptop
with resources only sufficient to run the Junos vSRX images. A
work-around was found, and it turned out to be so useful during our
testing that we decided to document it in this book. It should be
stressed, however, that this should only be used in a lab environment,
as important CA functions such as certificate revocation are not by
definition available for an offline CA. In addition there is some manual
cut and paste work, which is probably fine for a lab network, but in a
production environment, certificate enrollment is a far superior
solution.
The workaround consists of having OpenSSL instances running on a
Linux host (the chosen version of Linux is Ubuntu 14.04).
If you are new to public key infrastructure (PKI), going through these
Appendices will give you insights into how the mechanics of PKI really
work because due to this Appendice’s manual nature the steps take
place at the most basic level. Note that these steps can typically be
abstracted and hidden by the CA provider’s service offerings.
You need to edit the openssl.cnf file, using your favorite Linux editor,
and add the following stanza to the configuration file:
Dir = ./
This tells OpenSSL to work from the current directory to read the CA
configuration files and where to place the generated certificates.
The other configuration item requiring adjustment is how the SRX
generates certificates that are to be signed. By default, modern versions
of OpenSSL are expecting distinguished names to be in utf8only text
format. However the SRX generates its certificates in printablestring
text format. This becomes an issue when the CA tries to sign a certifi-
cate – by default it will try and match on stateorProvinceName and
organizationName. To work around this issue, modify the policy
match stanza of the configuration file and change the stateorProvince-
Appendices 131
[ policy_match ]
countryName = match
stateOrProvinceName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
The subdirectories names certs and newcerts are derived from the
openssl.cnf file. If you have changed the openssl.cnf file for those
entries, the directories need to match. When creating SRX certificates
to be signed, not only do you need a subject, you also need a domain
name, email address, or IP address, which becomes the subject alterna-
tive name in the X509 certificate. In this tutorial, the email name was
chosen. Create a new file called subalt.txt and create the subject
alternative name:
subjectAltName=email:[email protected]
Now, once the CA’s certificate is on the SRX, you need to associate that
certificate with the profile just created. In a lab context, the file was
stored in root’s home directory so the file goes in /root/cacert.pem:
request security pki ca-certificate load ca-profile SuiteB filename /root/cacert.pem
Once again as the generation of the certificates are for a SuiteB imple-
mentation you need to specify the type as an elliptic curve, and because
you want to use the Juniper SuiteB 256 proposal set, you must have a
size of 384.
Once again, as you are generating certificates for Juniper’s SuiteB 256
proposal set as currently implemented, the hash for the certificate must
be SHA384-based as signified by the –md parameter. The extfile
parameter is the file that was created during the setup of the OpenSSL
CA.
In the directory certs (one level below the CA’s base directory) will be
the signed certificate that needs to go back to the SRX. Once again,
take a copy of this file (as you did before) and get it to the SRX. The
file will have a .pem extension.
ike-policy ikepol-advpn;
dynamic {
distinguished-name {
wildcard ST=ACT,O=Juniper;
}
ike-user-type group-ike-id;
}
local-identity distinguished-name;
external-interface ge-0/0/0.0;
advpn {
partner {
disable;
}
}
version v2-only;
}
}
To verify the certificates on the SRX, use the show security pki
ca-certification ca-profile SuiteB detail command:
Certificate identifier: SuiteB
Certificate version: 3
Serial number: c50d29afe6c65a10
Issuer:
Organization: Juniper, Organizational unit: Net, Country: AU, State: ACT,
Locality: Canberra, Common name: UbuntuCA
Subject:
Organization: Juniper, Organizational unit: Net, Country: AU, State: ACT,
Locality: Canberra, Common name: UbuntuCA
Subject string:
C=AU, ST=ACT, L=Canberra, O=Juniper, OU=Net, CN=UbuntuCA, emailAddress=mbarrett@
juniper.net
Validity:
Not before: 12- 2-2014 05:57 UTC
Not after: 11-29-2024 05:57 UTC
Public key algorithm: ecdsaEncryption(384 bits)
04:27:63:65:64:72:ee:c0:69:61:f9:a6:93:53:6d:a9:35:b7:60:31
85:94:df:45:35:1c:c1:7c:b3:84:ca:61:d2:c2:5e:e7:0c:75:62:ea
78:75:df:51:43:5a:e3:a1:d4:81:70:82:bb:b6:5d:3a:76:38:5d:d0
a2:da:f9:5a:16:e9:bc:9e:d8:ad:86:d4:88:03:84:c5:de:be:a1:5c
22:0f:21:b7:3c:58:f4:be:02:77:24:8d:e4:9b:4d:cd:25
Signature algorithm: ecdsa-with-SHA384
Fingerprint:
3e:82:62:34:77:33:b2:5a:30:00:50:3c:a9:9d:9e:6f:89:a6:d6:f1 (sha1)
00:d5:a8:56:05:f6:80:cb:26:b7:e4:1e:9e:ef:a2:55 (md5)
Make sure the public key algorithm and signature algorithm are
suitable for the ciphers you’ll use with a show security pki local-
certificate certificate-id SRX550-01 detail command:
Certificate identifier: srx550-1
Certificate version: 3
Serial number: 00001001
136 Day One: ADVPN Design and Implementation
Issuer:
Organization: Juniper, Organizational unit: Net, Country: AU, State: ACT,
Locality: Canberra, Common name: UbuntuCA
Subject:
Organization: Juniper, Organizational unit: Base, Country: AU, State: ACT,
Common name: srx550-01.juniper.net
Subject string:
C=AU, ST=ACT, O=Juniper, OU=Base, CN=srx550-01.juniper.net
Alternate subject: [email protected], fqdn empty, ip empty
Validity:
Not before: 12- 2-2014 06:39 UTC
Not after: 12- 2-2015 06:39 UTC
Public key algorithm: ecdsaEncryption(384 bits)
04:fc:97:41:31:a8:6d:65:9a:65:82:34:f0:e7:69:1f:d9:27:c8:f3
c6:9e:cb:8e:a1:df:c8:13:a9:1e:6c:8d:35:63:b8:94:5a:8d:55:20
32:ee:f7:56:45:62:ae:24:54:a5:a0:0c:6a:8f:39:fd:bf:5a:92:b8
46:c9:13:76:16:18:4c:b9:34:2c:a1:6c:0a:37:eb:71:1b:cf:4e:97
a5:42:08:15:1c:2b:25:44:2e:04:41:88:57:3c:eb:bf:14
Signature algorithm: ecdsa-with-SHA384
Fingerprint:
8c:1d:34:17:f1:1b:86:f2:03:0e:e8:7e:49:bb:30:15:ac:bd:e2:c9 (sha1)
6c:19:01:d5:9b:1f:56:01:7d:97:8c:b4:0b:c6:c8:d4 (md5)
Auto-re-enrollment:
Status: Disabled
Next trigger time: Timer not started
Now make sure the public key algorithm and signature algorithm are
suitable for the ciphers you’ll use. In addition, make sure the subject
string is appropriate for what you’ll be matching on for your dynamic
neighbors. Let’s see what it looks like now when associations are
created with the show sececurity ike security-associations com-
mand:
Index State Initiator cookie Responder cookie Mode Remote Address
8096092 UP 632272c2d5b27286 41dd14abcb525543 IKEv2 192.168.66.1
The certificates on both sides of the exchange are okay with established
IKE sessions. Let’s look at this association in detail using the show
security ike security-associations index <number> detail com-
mand:
IKE peer 192.168.66.11, Index 8096092, Gateway Name: hub-gw
Auto Discovery VPN:
Type: Static, Local Capability: Suggester, Peer Capability: Partner
Suggester Shortcut Suggestions Statistics:
Suggestions sent : 0
Suggestions accepted: 0
Suggestions declined: 0
Role: Responder, State: UP
Initiator cookie: d4f3308d89b2973b, Responder cookie: d60cbace459377ad
Exchange type: IKEv2, Authentication method: ECDSA-384-signatures
Local: 192.168.66.1:500, Remote: 192.168.66.11:500
Lifetime: Expires in 27181 seconds
Appendices 137
Peer ike-id: C=AU, ST=ACT, O=Juniper, OU=Base, CN=srx550-02.juniper.net
Xauth user-name: not available
Xauth assigned IP: 0.0.0.0
Algorithms:
Authentication : hmac-sha384-192
Encryption : aes256-cbc
Pseudo random function: hmac-sha384
Diffie-Hellman group : DH-group-20
Traffic statistics:
Input bytes : 1362
Output bytes : 1323
Input packets: 2
Output packets: 2
IPsec security associations: 2 created, 0 deleted
Phase 2 negotiations in progress: 1
Negotiation type: Quick mode, Role: Responder, Message ID: 0
Local: 192.168.66.1:500, Remote: 192.168.66.11:500
Local identity: C=AU, ST=ACT, O=Juniper, OU=Base, CN=srx550-01.juniper.net
Remote identity: C=AU, ST=ACT, O=Juniper, OU=Base, CN=srx550-02.juniper.net
Flags: IKE SA is created
You can see the algorithms that are being used and the peer IKE
identification. Now that IKE is established, IPsec associations follow
with the show security ipsec associations command:
Total active tunnels: 1
ID Algorithm SPI Life:sec/kb Mon lsys Port Gateway
<67108870 ESP:aes-gcm-256/None d7d2b271 3132/ unlim - root 500 192.168.66.1
>67108870 ESP:aes-gcm-256/None 6a57b9c3 3132/ unlim - root 500 192.168.66.1
Summary
Okay lab rats, it’s your turn to take this and run with it. Have fun with
ADVPN.