Juniper Networks

vJunos-switch Deployment Guide for KVM

Published: 2023-04-25

About This Guide

This guide details the installation of the virtual Junos-switch (vJunos-switch). The vJunos-switch is a virtualized version of the Junos-based EX switching platform, operating within a Kernel-based Virtual Machine (KVM) environment. It is built upon Juniper Networks' vMX Virtual Router (vMX) nested architecture. This document also covers basic vJunos-switch configuration and management procedures. For advanced software configuration, consult the Junos OS documentation.

Related Documentation: Junos OS for EX Series Documentation

Chapter 1: Understand vJunos-switch

This chapter provides an overview of vJunos-switch, its architecture, key features, benefits, limitations, and use cases.

vJunos-switch Overview

The vJunos-switch is a virtual Juniper switch running Junos OS on an x86 server. It can be managed like a physical switch and is suitable for lab environments. It is based on the EX9214 platform, supporting a single Routing Engine and Flexible PIC Concentrator (FPC). The vJunos-switch offers up to 100 Mbps aggregated bandwidth across all interfaces without requiring a bandwidth license. It serves as a tool for testing network configurations and protocols.

Key Features Supported

Benefits and Uses

Limitations

vJunos-switch Architecture

The vJunos-switch is a single, nested VM solution where the virtual forwarding plane (VFP) and Packet Forwarding Engine (PFE) reside in the outer VM. When started, the VFP launches a nested VM running the Junos Virtual Control Plane (VCP) image, utilizing the KVM hypervisor. The architecture is layered: vJunos-switch at the top, KVM hypervisor and related system software in the middle, and the x86 server at the bottom.

The vJunos-switch can support up to 100 Mbps throughput using 4 cores and 5GB of memory. Additional cores and memory are allocated to the VCP. The 4 cores and 5GB memory are sufficient for lab use cases.

Figure 1: vJunos-switch Architecture depicts a diagram showing the Linux Host, vJunos-Switch with VFP VM and VCP VM, KVM, and the x86 server components.

Chapter 2: Hardware and Software Requirements vJunos-switch on KVM

Minimum Hardware and Software Requirements

This section outlines the hardware and software requirements for running a vJunos-switch instance.

Table 1: Minimum Hardware Requirements for vJunos-switch
Description Value
Sample system configuration For lab simulation and low performance (less than 100 Mbps) use cases, any Intel x86 processor with VT-x capability. Intel Ivy Bridge processors or later. Example: Intel Xeon E5-2667 v2 @ 3.30 GHz, 25 MB cache.
Number of cores A minimum of four cores are required. Three cores are allocated to the VFP, and one core to the VCP. Additional cores are provided to the VCP.
Memory A minimum of 5GB memory is required. Approximately 3GB is allocated to VFP and 2GB to VCP. If more than 6GB total memory is provided, VFP memory is capped at 4GB, with additional memory allocated to VCP.
Other requirements
  • Intel VT-x capability.
  • Hyperthreading (recommended).
  • AES-NI.
Table 2: Software Requirements for Ubuntu
Description Value
Operating system
  • Ubuntu 22.04 LTS
  • Ubuntu 20.04 LTS
  • Ubuntu 18.04 LTS
  • Debian 11 Bullseye

NOTE: Only English localization is supported.

Virtualization QEMU-KVM. The default version for each Ubuntu or Debian version is sufficient.
Required packages
  • qemu-kvm virt-manager
  • libvirt-daemon-system
  • virtinst libvirt-clients bridge-utils

NOTE: Use the apt-get install pkg-name or sudo apt-get install <pkg-name> commands to install a package.

Supported Deployment Environments QEMU-KVM using libvirt. EVE-NG bare metal deployment is also supported. Note: vJunos-switch is not supported on EVE-NG or other deployments that launch vJunos from within a VM due to deeply nested virtualization constraints.
vJunos-switch Images Images can be accessed from the lab download area of juniper.net at: Test Drive Juniper

Chapter 3: Install and Deploy vJunos-switch on KVM

Install vJunos-switch on KVM

This topic explains how to install vJunos-switch in the KVM environment.

Prepare the Linux Host Servers to Install vJunos-switch

This section applies to both Ubuntu and Debian host servers.

  1. Install the standard package versions for your Ubuntu or Debian host server to ensure minimum hardware and software requirements are met.
  2. Verify that Intel VT-x technology is enabled by running the lscpu command. Check the 'Virtualization' field in the output. If VT-x is not enabled, consult your server documentation for BIOS settings.

Deploy and Manage vJunos-switch on KVM

This topic covers deploying and managing the vJunos-switch instance after installation.

NOTE: Download the sample XML file and vJunos-switch image from the Juniper website.

Set Up the vJunos-switch Deployment on the Host Server

This topic describes setting up the vJunos-switch deployment on the host server.

NOTE: This topic highlights selected sections of the XML file used for deploying vJunos-switch via libvirt. The complete XML file (vjunos.xml) is available for download with the VM image and associated documentation.

Ensure packages from the Minimum Software Requirements section are installed. Refer to "Minimum Hardware and Software Requirements" on page 8.

  1. Create a Linux bridge for each Gigabit Ethernet interface of the vJunos-switch you plan to use. Example: ip link add ge-000 type bridge and ip link add ge-001 type bridge for ge/0/0/0 and ge/0/0/1.
  2. Bring up each Linux Bridge. Example: ip link set ge-000 up.
  3. Make a live disk copy of the provided QCOW2 vJunos image. Example: cp vjunos-switch-23.1R1.8.qcow2 vjunos-sw1-live.qcow2. Create a distinct copy for each vJunos deployment to avoid modifying the original image. The live image must be writable by the deploying user (typically root).
  4. Specify the number of cores for vJunos by modifying the CPU stanza in the XML file. The minimum is 4 cores, sufficient for lab use cases.
  5. Increase memory if needed by modifying the memory stanza. The default memory is sufficient for most applications.
  6. Specify the name and location of your vJunos-switch image by modifying the XML file. Example: <source file="/root/vjunos-sw1-live.qcow2"/>. Each vJunos VM requires a uniquely named QCOW2 image.
  7. Create the disk image using the script: ./make-config.sh <juniper.conf> <config.qcow2>. This connects a second disk with configuration to the VM. The XML file references this configuration drive.
  8. NOTE: If initial configuration is not preferred, remove the configuration drive stanza from the XML file.
  9. Set up the management Ethernet port using the provided XML interface stanza for connecting to the VCP 'fxp0'. A routable IP address is required for fxp0, configured via DHCP or CLI. The 'eth0' in the stanza refers to the host server's external connectivity interface.
  10. Enable SSH to the VCP management port: set system services ssh root-login allow command.
  11. Create a Linux bridge for each port specified in the XML file. Example stanzas for ge-000 and ge-001 are provided. The convention ge-Oxy maps to Junos ge/0/0/0 and ge/0/0/1 interfaces.
  12. Provide a unique serial console port number for each vJunos-switch. Example: <source host="127.0.0.1" mode="bind" service="8610"/>.
  13. The smbios stanza indicates that it is a vJunos-switch and should not be modified.
  14. Create the vJunos-sw1 VM using the virsh create vjunos-sw1.xml command. The 'sw1' suffix indicates the first VM; subsequent VMs can be named 'sw2', 'sw3', etc.
  15. Check /etc/libvirt/qemu.conf and uncomment relevant XML lines for user and group settings if commented out.
  16. Restart libvirtd: systemctl restart libvirtd.
  17. Safely shut down the vJunos-switch VM using virsh shutdown vjunos-sw1. This sends a graceful shutdown signal.

NOTE: Do not use the “virsh destroy” command as it can corrupt the vJunos-switch VM disk. If a VM stops booting after using “virsh destroy”, create a live QCOW2 disk copy from the original QCOW2 image.

Verify the vJunos-switch VM

This section describes how to verify if the vJunos-switch is running.

  1. Verify if the vJunos-switch is up and running using virsh list. The command displays the VM name and state (running, idle, paused, shutdown, crashed, or dying).
  2. Connect to the serial console of the VCP using telnet localhost <portnum>, where <portnum> is specified in the XML configuration file.
  3. Disable auto image upgrade by setting the root password and committing the change: set system root-authentication plain-text-password, then delete chassis auto-image-upgrade.
  4. Verify that the ge interfaces specified in the vJunos-switch XML file are up and available using the show interfaces terse command. For example, if ge-000 and ge-001 are specified, their corresponding interfaces ge/0/0/0 and ge/0/0/1 should be in the 'up' state.
  5. Verify that a vnet interface is configured under each corresponding "ge" bridge using the brctl show <bridge_name> command. Example: brctl show ge-000.

Chapter 4: Configure vJunos-switch on KVM

Connect to vJunos-switch

Connect to vJunos-switch by telnetting to the serial console number specified in the XML file. Refer to "Deploy and Manage vJunos-switch on KVM" on page 11 for details.

You can also SSH to the Junos-switch VCP.

Configure Active Ports

Specify the number of active ports for vJunos-switch to match the number of NICs added to the VFP VM. The default is 10 ports, but you can set it to any value between 1 and 96. Use the command: set chassis fpc 0 pic 0 number-of-ports 96.

Interface Naming

vJunos-switch supports only Gigabit Ethernet (ge) interfaces. Attempting to change interface names to 10-Gigabit Ethernet (xe) or 100-Gigabit Ethernet (et) will still result in them being displayed as "ge" in configuration and interface commands.

Configure the Media MTU

Configure the media maximum transmission unit (MTU) in the range of 256 to 9192. Values outside this range are rejected. Configure the MTU using the statement at the [edit interface interface-name] hierarchy level. Example: set interface ge-0/0/0 mtu 9192. The maximum supported MTU value is 9192 bytes.

Troubleshoot

Troubleshoot vJunos-switch

This topic provides information for verifying vJunos-switch configuration and troubleshooting issues.

Verify That the VM is Running

Verify if the vJunos-switch is running after installation using the virsh list command.

You can stop and start VMs using virsh shutdown and virsh start commands respectively.

Verify CPU Information

Use the lscpu command on the host server to display CPU information, including the total number of CPUs, cores per socket, and CPU sockets.

View Log Files

View system logs using the show log command on the vJunos-switch instance. For example, to view chassis daemon logs, run show log chassisd.

Collect Core Dumps

Use the show system core-dumps command to view collected core files. These can be transferred to an external server for analysis via the fxp0 management interface.


File Info : application/pdf, 30 Pages, 253.44KB

PDF preview unavailable. Download the PDF instead.

vjunos-switch-deployment-guide-for-kvm

References

AH XSL Formatter V6.6 MR1 for Windows (x64) : 6.6.2.35616 (2018/10/15 18:42JST) Antenna House PDF Output Library 6.6.1317 (Windows (x64))

Related Documents

Preview vJunos-switch Deployment Guide for KVM | Juniper Networks
This guide provides comprehensive instructions for installing, deploying, and managing the vJunos-switch on KVM environments. Learn about hardware and software requirements, configuration steps, and troubleshooting tips for Juniper's virtual switching platform.
Preview Juniper EX2300 Quick Start Guide: Installation and Basic Configuration
Quickly install and configure Juniper Networks EX2300 Ethernet switches with this essential guide. Covers rack mounting, power-up, and basic CLI setup for models like EX2300-24T, EX2300-48P. Includes links to Juniper resources for advanced deployment and learning.
Preview vSRX Deployment Guide for Private and Public Cloud Platforms
This Juniper Networks vSRX Deployment Guide offers comprehensive instructions for deploying and managing the vSRX virtual firewall across diverse private and public cloud platforms. It covers KVM, VMware ESXi, AWS, Microsoft Azure, Google Cloud Platform, Nutanix, IBM Cloud, and Oracle Cloud Infrastructure, detailing installation, configuration, and management procedures for enhanced network security.
Preview Juniper EX4300 Ethernet Switches: Datasheet
Comprehensive datasheet for Juniper EX4300 series Ethernet switches, detailing features, specifications, Virtual Chassis technology, and management options for enterprise campus and data center networks.
Preview Juniper Networks QFX5220-32CD Quick Start Guide: Installation and Configuration
A comprehensive quick start guide for the Juniper Networks QFX5220-32CD switch, detailing installation, grounding, power connection, and initial network configuration steps. Suitable for data center deployments.
Preview Junos OS Overview: A Comprehensive Guide to Juniper Networks' Operating System
Explore the Junos OS, Juniper Networks' powerful operating system for high-performance networking. This guide covers software overview, security, configuration, and monitoring, providing essential information for network professionals.
Preview Juniper EX2300-C Quick Start Guide
A concise guide to installing, powering on, and performing initial configuration for the Juniper Networks EX2300-C Ethernet switch using the CLI.
Preview cJunosEvolved Deployment Guide for Docker
A comprehensive guide to installing, deploying, configuring, and troubleshooting Juniper Networks' cJunosEvolved on Docker. Learn about its architecture, hardware and software requirements, and key features for lab use.