Blogs

1 person recommends this.
Junos offers a broad range of automation capabilities, starting from a YANG based configuration and state information base , accessible via CLI, NETCONF and REST over gRPC based JET APIs directly into various Junos daemons. Some readers might even be familiar with custom YANG, allowing operators to extend the functionality in Junos in respect to configuration and operational commands and make them available via CLI, NETCONF and REST. An example can be found in my post about L2VPN Custom YANG . But the ability to customize and extend Junos doesn’t stop here. With the introduction of Junos telemetry streaming , one can turn any available state information ...
2 comments
Be the first person to recommend this.
Symptoms When working with EX / QFX switches it is often required to collect comprehensive interface status data. Not any single show command will provide all the details and merging the output of several commands is tedious and time consuming. On top of this, it can be tricky to find free ports on switches, because unconfigured ports are simply not shown in many commands and the only way to find out available ports is examining the chassis hardware components. Because I often need to collect such information from multiple switches, I developed a script for Pretty Good Termina l, and I would like to share you its usage in this article. It ...
0 comments
1 person recommends this.
The Challenge of Scripting Have you ever been faced with the challenge of querying or changing the configuration of several hundreds or even thousands of devices on your network? Have you ever considered using Python language to create a script that analyses the current configuration and makes changes accordingly? If the answer is yes to any of these questions, you may be interested in reading this article. I want to introduce you to the Pretty Good Terminal and its usage for large scale scripting deployment because I do believe it is an extremely powerful network automation tool, and all who face similar challenges might find it a good friend. Important ...
0 comments
2 people recommend this.
Being able to download and run Juniper vMX on KVM and ESXi has really helped me learning more about networking, telemetry and build automation solutions. But the software dependencies combined with manual editing and launch of shell scripts per vMX instance felt a bit outdated to me. Why can’t I just get a Docker Container with the vMX deployed using Docker, Docker Compose or Kubernetes? This would allow me to launch a fully virtualized topology with routers and endpoints with a single docker-compose command, try something out, redeploy with different Junos versions and even share the recipe with other users via public Git repo’s. Well, this ...
3 comments
6 people recommend this.
Network I mplementation and Test Automation (NITA) is Juniper’s extensible framework that deli ver s network automation solution s l ike automated lab testing and deployment . While automation yields several benefits from a business perspectiv e , t he focus of this article will be on NITA’s technical aspects, covering its use-cases and software architecture. Where does NITA come into play? NITA has been designed with several use cases in mind. The main offerings available with NITA are: Automated Lab Testing (ALT) : tests are executed on pre-production environments ...
0 comments

JUNOS Hashtags

Be the first person to recommend this.
Imagine that you can tag configuration elements in JUNOS with arbitrary strings and selectively display parts of the configuration based on a tag value. Much like you use hashtags in social media networks. The hashtag can represent a customer, a service, a temporary feature, or just about anything meanigful to you. Well, this is possible today, below is a sample output of running a display command that shows all configurations tagged with 'customer-a'. user@router> op hashtag.py hashtag customer-a ## Last commit: 2018-04-01 17:29:41 PDT by user interfaces { xe-1/2/0 { unit 0 { apply-macro ht { customer-a; ...
0 comments

Code-Free Automation

2 people recommend this.
When you hear the word “automation”, what do you visualize? Usually it will be some script, code or program that is executed to repeat the manual activity at machine speeds. There are other simpler ways automation manifests in. With Junos, you get some features that help you automate work flow, reduce configuration size and control when the configurations are active without writing a single line of code. Junos configuration groups is a feature that helps you reduce the size of device configuration, by grouping common configurations together and using inheritance to apply the configurations correctly. A simple visualization and overview of the Junos ...
0 comments
1 person recommends this.
Starting in Junos OS Release 16.1R3 one can request streaming telemetry data using the gRPC framework with vendor-neutral data models based on OpenConfig. Great, but what configuration is required and is there a simple client available to test and troubleshoot it? I recently faced this question myself and found some great resources, which I documented in this post. For an in-depth discusssion about the various streaming telemetry option from Juniper devices, read thru the 3 parts on Tech Mocha , starting with USING OPENNTI AS A COLLECTOR FOR STREAMING TELEMETRY FROM JUNIPER DEVICES: PART 1 . Ingredients Juniper vMX running Junos 17.3R1 Junos Openconfig ...
1 comment
2 people recommend this.
Automation revitalized the way we think about configuration management, and it is relevant to our entire customer base. So, let’s explore the wide variety of ways companies manage their configurations. We won’t cover everyone, because there is as much variety in how people use automation to manage their networks as there are networks. Our customer’s networks are not made with cookie cutters, rather they are original creations. And the ways they manage them are covered with the signatures of all the people who designed and operated them throughout the years. SHOW ME THE CONFIGURATION Should we have a lively debate on how we like to view our configurations? ...
0 comments
Be the first person to recommend this.
Async NETCONF RPC example with ncclient ncclient is a great Python library that facilitates client-side scripting and application development around the NETCONF protocol: https://github.com/ncclient/ncclient and used by the even more popular PyEz ( https://github.com/Juniper/py-junos-eznc ) Typically, one uses the provided functions in synchronous mode, where replies are awaited and the result returned. I was however in need of asynchronous mode, where operations return immediately, allowing me to do ‘other stuff’ and periodically check if a result came in and process it accordingly. In search of example code using async mode turned out to be harder ...
1 comment
1 person recommends this.
Junos Node Slicing Demo Videos Have you read about Node Slicing on the TechWiki , or in the press here or here ? We announced support for this cool feature in with 17.2 and the buzz from our customers has been great. Seeing is believing and since all of you cannot come visit Sunnyvale for a Proof of Concept, we will attempt to bring it you. But first, let me explain Junos Node Slicing (JNS) in a few sentences for those who do not want to read the links above. With JNS, we create a slice, also called a Guest Network Function or GNF, consisting of a forwarding place and a control plane. The forwarding plane may consist of one or more line cards ...
0 comments
Be the first person to recommend this.
Summary There are many ways to provision pseudowires over a MPLS network. Some require knowledge about both PE addresses, like FEC 129 ( https://tools.ietf.org/html/rfc4379 ). Others, like Kompella L2VPN ( https://tools.ietf.org/html/rfc6624 , assume pseudowires to belong to the same customer across a MPLS network and hence require a routing instance per customer per PE. What if a pseudowire must be established between customers? If the goal is to support millions of pseudwires across thousands of PE routers, the planning and provisioning can become overwhelming and scaling limitations, like number of routing instances per PE, become limiting factors. ...
3 comments
1 person recommends this.
Program Your Network with Junos OS Junos OS is the very first network operating system to be programmable from the start. We understand that our customers want an easy way to build, configure, and manage their networks. We understand that our customers would like to reduce the Total Cost of Ownership (TCO) of their networks and eliminate any human errors that have the potential of bringing down these networks. This is why we have always been on the journey to discover ways we can make our devices more programmable and automation friendly. In this journey of programmable Junos OS, we are taking the next big leap in the form of the Junos ...
0 comments
Be the first person to recommend this.
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language. In this JSON encoding, you can query configuration using format=”json” . Junos OS also supports loading the configuration in this JSON encoding. Examples of JSON encoding for various types of objects as per ...
0 comments
Be the first person to recommend this.
Python is now the preferred language for programming devices running Junos OS. Junos PyEZ provides the framework that enables users to remotely manage and automate devices running Junos OS. Python is now fully supported on devices running Junos OS including a rich set of Python modules. Python can be used for developing applications on Junos OS. Operation, event, commit and SNMP scripts can also now be written in Python. Junos PyEZ A Python library eases interaction with traditional NETCONF operations available on Junos OS. Junos PyEZ eases Python script development by providing an easy Python API to interface with the router. For configuration changes, ...
0 comments
1 person recommends this.
Can an ephemeral database coexist with a static (current) configuration database? Yes. The daemons are able to see a merged view of these databases and will not differentiate between the entries coming from them. Does an ephemeral database support all features of a static database? No. An ephemeral database does not support features such as groups and validations. Can there be multiple instances of an ephemeral database running at the same time? Yes. Junos OS supports a maximum of eight instances of an ephemeral database. Before using these instances, instance names must be configured in the existing static database. There exists one "default" ...
0 comments
Be the first person to recommend this.
Is JSON on Junos encoding based on any standard draft? JSON on Junos encoding follows these two IETF drafts: JSON Encoding of Data Modeled with YANG Defining and Using Metadata with YANG Click here for additional information on JSON. Can I query configuration data using JSON format ? Yes. For NETCONF and Junoscript, the get-configuration RPC is used to emit the configuration. The JSON format can be specified as an XML attribute in the XML tag of get-configuration . For example: <rpc> <get-configuration format="json"/> </rpc> For the CLI, the show configuration command is used to emit the configuration. A ...
0 comments
1 person recommends this.
Which version of Python is supported on Junos OS? Python 2.7.8. From which Junos OS version is Python automation supported? Junos OS Release 16.1R1 for MX Series and PTX Series devices Junos OS Release 16.2R2 for QFX Series devices What configuration needs to be enabled before running Python scripts on the box? [edit system scripts language python] needs to be enabled in the Junos OS configuration. What is Python on-box scripting and how does it differ from SLAX on-box scripting? Python on-box scripting is being implemented to provide an alternative to SLAX for operation, event, and commit scripts. SLAX will continue to ...
0 comments
Be the first person to recommend this.
JET What is JET ? Juniper Extension Toolkit (JET), an evolution of the Junos SDK, provides a modern programmatic interface that makes programming simple, flexible, and extensible. What frameworks does JET use? gRPC : JET uses interface definition language (IDL)-based frameworks provided by GRPC , which is licensed under a three-clause BSD. By default, gRPC uses protocol buffers based on the IDL used for serializing data. For a detailed overview, refer to the guide here . MQTT : MQTT[1] (formerly, Message Queue Telemetry Transport) is a publish-subscribe-based “light-weight” messaging protocol for use on top of the TCP/IP protocol. ...
0 comments
Be the first person to recommend this.
Check out these useful resources about YANG: Expert Advice: Custom YANG module in Junos Expert Advice: Start Your Journey with YANG Labs YANG Labs Additional Resources FAQ: YANG Labs YANG Labs Reference (RFC) #FAQ
0 comments