Juniper JunOS Network Configuration: BGP, VRF, MPLS & Firewall Filters

Every configuration error in JunOS can lead to network downtime and loss of management access. We configure Juniper JunOS for routers, switches, and firewalls, delivering turnkey projects from audit to implementation and ongoing support. Our team of experts ensures reliable network operation without missing deadlines.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1365
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Note: when your operational network runs on Juniper MX or QFX, every commit is a step toward stability—or toward an outage. Over 7 years, we’ve configured more than 50 Juniper routers, and the average downtime after a failed commit dropped from 30 minutes to 5 minutes thanks to commit confirmed. A misapplied firewall filter can block BGP peering; a forgotten commit confirmed timeout can leave you with no management access. Our goal is to give you tools and configurations that minimize risks, not create them. Order a turnkey setup—get a network with guaranteed fault tolerance. Get a consultation—we will assess your infrastructure and propose optimal solutions.

JunOS is the operating system for Juniper Networks, running on MX series routers, EX and QFX switches, and SRX firewalls. A key difference from Cisco IOS: the configuration is stored as a hierarchical tree, not a flat file. Changes are made to a candidate configuration and applied atomically via commit. If a commit breaks connectivity and you can’t reach the device, there is commit confirmed with a timeout: if you don’t confirm the commit within N minutes, the configuration rolls back. This mechanism reduces mean time to recovery (MTTR) by 80% compared to traditional approaches—in Cisco IOS, the equivalent process can take up to 30 minutes of TFTP-based configuration reload.

Why JunOS for mission-critical networks?

The main advantage is predictability. commit confirmed, rollback to up to 50 versions, the hierarchical model—these aren't just features, they are a way to avoid downtime. In our metrics, using commit confirmed reduces recovery time after a failed change by 80%. Compare with Cisco IOS, where rollback requires loading an old config via TFTP: JunOS does it in seconds, which is 10x faster.

Criteria JunOS Cisco IOS
Configuration model Hierarchical, candidate Flat, running-config
Rollback rollback 0-49 reload + tftp
Commit confirmed Yes No
Average MTTR on error 5 minutes 30+ minutes

Step 1: Basic configuration with commit confirmed

The change process works like this: configure interfaces via set interfaces..., apply with confirmation commit confirmed 5, verify connectivity, then finalise with commit. On error, roll back with rollback 0. This method guarantees you won’t lose access to the device due to a misconfiguration.

# Enter edit mode
edit
# Hierarchy: interfaces → ge-0/0/1 → unit 0 → family inet → address
set interfaces ge-0/0/1 description "Uplink to Core"
set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.2/30
# Apply with confirmation (5 minute timeout)
commit confirmed 5
# ... check reachability ...
commit # final confirmation
# Show differences from running config
show | compare

Another strong point: rollback N – roll back to any of the last 50 configurations. rollback 0 is the last committed one, rollback 1 is the previous.

How to set up BGP and VRF on Juniper in one week?

We use a standard GitOps approach: all configurations are stored in Git, applied via CI/CD over NETCONF. This lets you revert to any version and automatically checks syntax.

Routing Instances and VRF

JunOS uses routing instances for VRF (Virtual Routing and Forwarding)—isolation of routing tables. This is in demand for multi-tenant infrastructures or separating production/management planes. Example configuration:

set routing-instances PRODUCTION instance-type vrf
set routing-instances PRODUCTION route-distinguisher 65001:100
set routing-instances PRODUCTION vrf-target target:65001:100
set routing-instances PRODUCTION interface ge-0/0/2.0
set routing-instances PRODUCTION interface ge-0/0/3.0
set routing-instances MANAGEMENT instance-type vrf
set routing-instances MANAGEMENT route-distinguisher 65001:200
set routing-instances MANAGEMENT vrf-target target:65001:200
set routing-instances MANAGEMENT interface ge-0/0/10.0

Check the route table in a specific VRF: show route table PRODUCTION.inet.0.

Firewall Filters (ACL analog)

In JunOS, access lists are called firewall filters. They are applied to an interface in input or output direction. An important difference from Cisco ACL—implicit discard at the end, but the term behaviour in JunOS is more flexible: you can use then next term to continue processing instead of immediate action. Example of control plane protection on loopback:

set firewall family inet filter PROTECT-ROUTER term allow-bgp from protocol tcp
set firewall family inet filter PROTECT-ROUTER term allow-bgp from destination-port bgp
set firewall family inet filter PROTECT-ROUTER term allow-bgp from source-address 10.0.0.0/24
set firewall family inet filter PROTECT-ROUTER term allow-bgp then accept
set firewall family inet filter PROTECT-ROUTER term allow-ssh from protocol tcp
set firewall family inet filter PROTECT-ROUTER term allow-ssh from destination-port ssh
set firewall family inet filter PROTECT-ROUTER term allow-ssh from source-address 192.168.30.0/24
set firewall family inet filter PROTECT-ROUTER term allow-ssh then accept
set firewall family inet filter PROTECT-ROUTER term allow-icmp from protocol icmp
set firewall family inet filter PROTECT-ROUTER term allow-icmp then accept
set firewall family inet filter PROTECT-ROUTER term allow-established from tcp-established
set firewall family inet filter PROTECT-ROUTER term allow-established then accept
set firewall family inet filter PROTECT-ROUTER term reject-rest then reject
# Apply on loopback (control plane protection)
set interfaces lo0 unit 0 family inet filter input PROTECT-ROUTER

BGP configuration

JunOS is a native platform for BGP in carrier and enterprise-grade networks. Example of eBGP peering with policy for route filtering:

set protocols bgp group UPSTREAM type external
set protocols bgp group UPSTREAM peer-as 65000
set protocols bgp group UPSTREAM local-as 65001
set protocols bgp group UPSTREAM neighbor 203.0.113.1 description "ISP Upstream"
set protocols bgp group UPSTREAM export EXPORT-TO-ISP
set protocols bgp group UPSTREAM import IMPORT-FROM-ISP
# Policy: advertise only our prefix
set policy-options policy-statement EXPORT-TO-ISP term own-prefixes from route-filter 198.51.100.0/24 exact
set policy-options policy-statement EXPORT-TO-ISP term own-prefixes then accept
set policy-options policy-statement EXPORT-TO-ISP term reject-rest then reject
# Import policy: accept default route and reject private addresses
set policy-options policy-statement IMPORT-FROM-ISP term reject-private from route-filter 10.0.0.0/8 orlonger
set policy-options policy-statement IMPORT-FROM-ISP term reject-private then reject
set policy-options policy-statement IMPORT-FROM-ISP term accept-default from route-filter 0.0.0.0/0 exact
set policy-options policy-statement IMPORT-FROM-ISP term accept-default then accept
set policy-options policy-statement IMPORT-FROM-ISP term reject-rest then reject

Automation via NETCONF and Ansible

JunOS natively supports NETCONF (RFC 6241)—making it an excellent candidate for Infrastructure as Code. The Ansible collection junipernetworks.junos uses NETCONF to apply configurations. Automation reduces human error and speeds up changes by 3x. In one project, we cut a new configuration rollout from 4 hours to 40 minutes, saving the client up to 30% of the administration budget for a fleet of 10 routers.

---
# playbook-junos.yml
- name: Configure Juniper router
  hosts: junos_routers
  connection: netconf
  gather_facts: false
  tasks:
    - name: Set interface description
      junipernetworks.junos.junos_config:
        lines:
          - set interfaces ge-0/0/1 description "Link to Distribution"
        comment: "Update interface description via Ansible"
        confirm: 5
    - name: Commit confirmed
      junipernetworks.junos.junos_config:
        confirm_commit: true

What’s included in the work

  • Audit of current configuration and network architecture
  • Development of candidate configuration (VRF, BGP, filters, MPLS)
  • Setup of commit confirmed with rollback
  • Writing Ansible playbooks for automation
  • Testing in a staging environment
  • Documentation of all changes
  • Knowledge transfer to your team (1 day training)
  • 30 days of support after implementation

Timeline estimates

Scope Duration
Single MX/EX: basic config + firewall filters 2–3 days
BGP peering + routing policies + VRF 3–5 days
MPLS TE + L3VPN for carrier 1–2 weeks
Ansible automation for equipment fleet 3–5 days

We will assess your project in one day: contact us to discuss details. 7+ years of experience, more than 50 projects on Juniper, JNCIP-certified engineers—quality and transparency are guaranteed.

Note on MPLS

For carrier-grade tasks on MX platforms, MPLS is configured via RSVP or LDP. RSVP with traffic engineering allows explicit LSPs with bandwidth guarantees. An example of MPLS LSP configuration is available in our documentation—contact us for details.