Getting Started
Getting Started
Release
17.1
Modified: 2017-03-02
Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United
States and other countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other
trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify,
transfer, or otherwise revise this publication without notice.
The information in this document is current as of the date on the title page.
Juniper Networks hardware and software products are Year 2000 compliant. Junos OS has no known time-related limitations through the
year 2038. However, the NTP application is known to have some difficulty in the year 2036.
The Juniper Networks product that is the subject of this technical documentation consists of (or is intended for use with) Juniper Networks
software. Use of such software is subject to the terms and conditions of the End User License Agreement (EULA) posted at
http://www.juniper.net/support/eula.html. By downloading, installing or using such software, you agree to the terms and conditions of
that EULA.
Connecting to VMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Logging In to VCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Logging In to VFP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Managing vMX Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Adding a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Deleting a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Viewing the Chassis Serial ID for vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Chapter 4 Managing vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Managing vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Controlling vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Deploying vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Managing vMX Deployments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Specifying the Temporary File Directory . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Specifying the Environment File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Configuring Logging Options for vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Connecting to Console Port for the VMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Getting Help for the Script Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Binding virtio Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Setting Up the Device Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Creating Device Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Deleting Device Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Verifying Device Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Chapter 5 Configuring vMX Chassis-Level Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Configuring the Number of Active Ports on vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Naming the Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Configuring the Media MTU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Enabling Performance Mode or Lite Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Tuning Performance Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Chapter 6 Class of Service for vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
CoS on vMX Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
CoS Features and Limitations on vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Configuring Hierarchical CoS on vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Enabling Flexible Queuing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Mapping Forwarding Classes to Queues on vMX . . . . . . . . . . . . . . . . . . . . . . 64
Configuring Traffic Control Profiles for vMX . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Configuring Schedulers on vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Example: Configuring Hierarchical CoS on vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Packet Loss Priority and Drop Profiles on vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Managing Congestion Using Drop Profiles and Packet Loss Priorities on vMX . . . 70
Configuring Drop Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Configuring Schedulers with Drop Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Chapter 7 Troubleshooting vMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Viewing VFP Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Viewing VFP Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Troubleshooting VFP and VCP Connection Establishment . . . . . . . . . . . . . . . . . . 75
If the information in the latest release notes differs from the information in the
documentation, follow the product Release Notes.
Juniper Networks Books publishes books by Juniper Networks engineers and subject
matter experts. These books go beyond the technical documentation to explore the
nuances of network architecture, deployment, and administration. The current list can
be viewed at http://www.juniper.net/books.
Documentation Conventions
Caution Indicates a situation that might result in loss of data or hardware damage.
Laser warning Alerts you to the risk of personal injury from a laser.
Table 2 on page xii defines the text and syntax conventions used in this guide.
Bold text like this Represents text that you type. To enter configuration mode, type the
configure command:
user@host> configure
Fixed-width text like this Represents output that appears on the user@host> show chassis alarms
terminal screen.
No alarms currently active
Italic text like this Introduces or emphasizes important A policy term is a named structure
new terms. that defines match conditions and
Identifies guide names. actions.
Junos OS CLI User Guide
Identifies RFC and Internet draft titles.
RFC 1997, BGP Communities Attribute
Italic text like this Represents variables (options for which Configure the machines domain name:
you substitute a value) in commands or
configuration statements. [edit]
root@# set system domain-name
domain-name
Text like this Represents names of configuration To configure a stub area, include the
statements, commands, files, and stub statement at the [edit protocols
directories; configuration hierarchy levels; ospf area area-id] hierarchy level.
or labels on routing platform The console port is labeled CONSOLE.
components.
< > (angle brackets) Encloses optional keywords or variables. stub <default-metric metric>;
# (pound sign) Indicates a comment specified on the rsvp { # Required for dynamic MPLS only
same line as the configuration statement
to which it applies.
[ ] (square brackets) Encloses a variable for which you can community name members [
substitute one or more values. community-ids ]
GUI Conventions
Bold text like this Represents graphical user interface (GUI) In the Logical Interfaces box, select
items you click or select. All Interfaces.
To cancel the configuration, click
Cancel.
> (bold right angle bracket) Separates levels in a hierarchy of menu In the configuration editor hierarchy,
selections. select Protocols>Ospf.
Documentation Feedback
Online feedback rating systemOn any page of the Juniper Networks TechLibrary site
at http://www.juniper.net/techpubs/index.html, simply click the stars to rate the content,
and use the pop-up form to provide us with information about your experience.
Alternately, you can use the online feedback form at
http://www.juniper.net/techpubs/feedback/.
Technical product support is available through the Juniper Networks Technical Assistance
Center (JTAC). If you are a customer with an active J-Care or Partner Support Service
support contract, or are covered under warranty, and need post-sales technical support,
you can access our tools and resources online or open a case with JTAC.
JTAC hours of operationThe JTAC centers have resources available 24 hours a day,
7 days a week, 365 days a year.
Find solutions and answer questions using our Knowledge Base: http://kb.juniper.net/
To verify service entitlement by product serial number, use our Serial Number Entitlement
(SNE) Tool: https://tools.juniper.net/SerialNumberEntitlementSearch/
vMX Overview
vMX Overview
The vMX router is a virtual version of the MX Series 3D Universal Edge Router. Like the
MX Series router, the vMX router runs the Junos operating system (Junos OS) and supports
Junos OS packet handling and forwarding modeled after the Trio chipset. Configuration
and management of vMX routers are the same as for physical MX Series routers, allowing
you to add the vMX router to a network without having to update your operations support
systems (OSS).
For servers running the KVM hypervisor, you also run the Linux operating system and
applicable third-party software. vMX software components come in one software package
that you install by running an orchestration script included with the package. The
orchestration script uses a configuration file that you customize for your vMX deployment.
You can install multiple vMX instances on one server.
For servers running the ESXi hypervisor, you run the applicable third-party software.
You can use virtual devices to lower your capital expenditure and operating costs,
sometimes through automating network operations. Even without automation, use of
the vMX application on standard x86 servers enables you to:
You can deploy the vMX router to meet some specific network edge requirements, such
as:
Network simulation
Figure 1 on page 19 illustrates the architecture of a single vMX instance inside a server.
The physical layer of the server contains the physical NICs, CPUs, memory, and Ethernet
management port. The host contains applicable third-party software and the hypervisor.
The vMX instance contains two separate virtual machines (VMs), one for the virtual
forwarding plane (VFP) and one for the virtual control plane (VCP). The VFP VM runs
the virtual Trio forwarding plane software and the VCP VM runs Junos OS.
The hypervisor presents the physical NIC to the VFP VM as a virtual NIC. Each virtual NIC
maps to a vMX interface. Figure 2 on page 20 illustrates the mapping.
After the vMX instance is created, you use the Junos OS CLI to configure these vMX
interfaces in the VCP. The vMX router supports the following types of interface names:
NOTE: vMX interfaces configured with the Junos OS CLI and the underlying
physical NIC on the server are independent of each other in terms of interface
type (for example, ge-0/0/0 can get mapped to a 10-Gigabit NIC).
The VCP VM and VFP VM require Layer 2 connectivity to communicate with each other.
An internal bridge that is local to the server for each vMX instance enables this
communication.
The VCP VM and VFP VM also require Layer 2 connectivity to communicate with the
Ethernet management port on the server. You must specify virtual Ethernet interfaces
with unique IP addresses and MAC addresses for both the VFP and VCP to set up an
external bridge for a vMX instance. Ethernet management traffic for all vMX instances
enters the server through the Ethernet management port.
The way network traffic passes from the physical NIC to the virtual NIC depends on the
virtualization technique that you configure.
vMX can be configured to run in two modes depending on the use case:
Lite modeNeeds fewer resources in terms of CPU and memory to run at lower
bandwidth.
In a virtual environment, packet input and output capabilities play a significant role in the
performance of the packet processing functionality inside the virtual machine, specifically
the VFP VM. VFP supports two types of virtual network interfaces:
Choose the type based on how you want to use the vMX router. SeeTable 3 on page 21.
Host Requirements No requirements specific to this technique Physical NIC must support PCI passthrough
The x86 server architecture consists of multiple sockets and multiple cores within a
socket. Each socket also has memory that is used to store packets during I/O transfers
from the NIC to the host. To efficiently read packets from memory, guest applications
and associated peripherals (such as the NIC) should reside within a single socket. A
penalty is associated with spanning CPU sockets for memory accesses, which might
result in non-deterministic performance.
For vMX, we recommend that the vMX instance always runs within a single socket. CPU
pinning is a commonly used technique to ensure the virtual CPUs (vCPUs) associated
with a VM are pinned to a specific core so that the VM utilizes resources on a single socket.
The vMX orchestration script automatically performs CPU pinning.
Receive thread (RX): RX moves packets from the NIC to the VFP. It performs
preclassification to ensure host-bound packets receive priority.
Worker thread: The Worker performs lookup and tasks associated with packet
manipulation and processing. It is the equivalent of the lookup ASIC on the physical
MX Series router.
Transmit thread (TX): TX moves packets from the Worker to the physical NIC.
The RX and TX components are assigned to the same core (I/O core). If there are enough
cores available for the VFP, the QoS scheduler can be allocated separate cores. If there
are not enough cores available, the QoS scheduler shares the TX core.
CPU Affinity
CPU affinity ensures that the virtual CPUs of the VM are pinned to a specific physical
core, which improves the VM performance by using the CPU cache efficiently.
VCP1
VCP1
VFP3
Licensing
Licenses are required for using vMX features. When you order licenses, this information
is bound to a customer ID. If you did not order the licenses, contact your account team
or Juniper Networks Customer Care for assistance. When you order a license, you receive
instructions for generating license activation keys on the Juniper Networks License
Management System.
The vMX licenses are based on application packages and processing capacity.
Table 4 on page 23 describes the features available with application packages.
Layer 2 features include Layer 2 VPN, VPLS, EVPN, and Layer 2 Circuit
You can download the vMX software BASE application package with 1 Mbps bandwidth
and evaluate it without a license. To use additional features, you must order the
appropriate license. If you delete all valid licenses, you can only use the BASE application
package with 1 Mbps bandwidth.
If you upgrade from a BASE package license to an ADVANCE or PREMIUM package license
or if you downgrade from an ADVANCE or PREMIUM package license to a BASE package
license, you must restart the routing protocol process. If your configuration has logical
systems, you must restart the routing protocol process for all logical systems.
If you need to move your vMX installation to another host, you must remove vMX from
the current host before installing vMX and adding the license on the new host.
Setting Up vMX
Sample system configuration For lab simulation and low performance (less than 100 Mbps) use cases,
any x86 processor (Intel or AMD) with VT-d capability.
For all other use cases, Intel Ivy Bridge processors or later are required.
Example of Ivy Bridge processor: Intel Xeon E5-2667 v2 @ 3.30 GHz 25 MB
Cache
For single root I/O virtualization (SR-IOV) NIC type, use Intel 82599-based
PCI-Express cards (10 Gbps) and Ivy Bridge processors.
Number of cores For lab simulation use case applications (lite mode): Minimum of 4
To calculate the optimal number of vCPUs For low-bandwidth (virtio) or high-bandwidth (SR-IOV) applications
needed by VFP for performance mode: (performance mode): Minimum of 8
Memory For lab simulation use case applications (lite mode): Minimum of 5 GB
4 GB for VCP
12 GB for VFP
Hyperthreading (recommended)
AES-NI
Linux 3.13.0-32-generic
NOTE: Use the apt-get install pkg name command to install a package.
Table 7 on page 27 lists the software requirements for Red Hat Enterprise Linux.
NOTE: Use the yum install pkg name command to install a package.
To avoid any conflicts, install libvirt 1.2.19 instead of updating from libvirt 1.2.17.
NOTE: Use the yum install pkg name command to install a package.
config/vmx.conf Configuration file for defining vMX parameters. See Specifying vMX Configuration
File Parameters on page 41 for more information.
vmx.sh Main orchestration script. See Managing vMX on page 49 for more information
about command options.
NOTE: Only English locale is supported for using the vmx.sh script.
Installing vMX
1. Meet the minimum software and OS requirements described in Table 6 on page 26.
See Upgrading the Kernel on page 30 and Upgrading to libvirt 1.2.19 on page 31.
If you are using Intel XL710 PCI-Express family cards, make sure you update the drivers.
See Updating Drivers for the X710 NIC on page 32.
2. Enable Intel VT-d in BIOS. (We recommend that you verify the process with the vendor
because different systems have different methods to enable VT-d.)
NOTE: You must remove any previous installation with an external bridge
in /etc/network/interfaces and revert to using the original management
interface. Make sure that the ifconfig -a command does not show external
bridges before you proceed with the installation.
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"
7. For optimal performance, we recommend you configure the size of Huge Pages to be
1G on the host and make sure the NUMA node for the VFP has at least 16 1G Huge
Pages. To configure the size of Huge Pages, add the following line in /etc/default/grub:
GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G
hugepages=number-of-huge-pages"
To meet the minimum software and OS requirements, you might need to perform these
tasks:
NOTE: If you are using Ubuntu 14.04.1 LTS, which comes with
3.13.0-32-generic, you can skip this step. Ubuntu 14.04 comes with a lower
version of kernel (Linux 3.13.0-24-generic) than the recommended version
(Linux 3.13.0-32-generic).
To upgrade libvirt:
1. Make sure that you install all the packages listed in Table 6 on page 26.
4. Uncompress and untar the file using the tar xzvf libvirt-1.2.19.tar.gz command.
10. Make sure that the libvirtd daemon is running. (Use the service libvirt-bin start command
to start it again. If it does not start, use the /usr/sbin/libvirtd -d command.)
11. Verify that the versions of libvirtd and virsh are 1.2.19.
NOTE: If you cannot deploy vMX after upgrading libvirt, bring down the virbr0
bridge with the ifconfig virbr0 down command and delete the bridge with the
brctl delbr virbr0 command.
1. If you previously installed directly from source, download the old version of the libvirt
source. For example:
cd /tmp
wget http://libvirt.org/sources/libvirt-1.2.8.tar.gz
tar zxvf libvirt-1.2.8.tar.gz
cd libvirt-1.2.8
/bin/rm rf /usr/local/lib/libvirt*
ldconfig
1. Download the vMX software package as root and uncompress the package.
cd drivers/i40e-1.3.46/src
make install
For example, the following commands download and install Version 1.4.15:
cd /tmp
wget https://downloadmirror.intel.com/24693/eng/i40evf-1.4.15.tar.gz
tar zxvf i40evf-1.4.15.tar.gz
cd i40evf-1.4.15/src
make install
rmmod i40e
modprobe i40e
To prepare the host system running Red Hat Enterprise Linux for installing vMX:
1. Meet the minimum software and OS requirements described in Table 7 on page 27.
We recommend that you verify the process with the vendor because different systems
have different methods to access and change BIOS settings.
3. During the OS installation, select the Virtualization Host and Virtualization Platform
software collections.
If you did not select these software collections during the GUI installation, use the
following commands to install them:
4. Register your host using your Red Hat account credentials. Enable the appropriate
repositories.
yum upgrade
7. (Optional) If you are using SR-IOV, you must install these packages and enable SR-IOV
capability.
ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
9. Set up the path for the correct Python release and install the PyYAML library.
PATH=/opt/rh/python27/root/usr/bin:$PATH
export PATH
pip install netifaces pyyaml
10. If you have installed any Red Hat OpenStack libraries, you must change
script/templates/red_{vPFE, vRE}-ref.xml to use <type arch='x86_64'
machine='pc-0.13'>hvm</type> as the machine type.
If you cannot stop Network Manager, you can prevent resolv.conf from being
overwritten with the chattr +I /etc/resolv.conf command.
12. Ensure that the build directory is readable by the QEMU user.
As an alternative, you can configure QEMU to run as the root user by setting the
/etc/libvirt/qemu.conf file to user=root.
NOTE: When you install vMX with the sh vmx.sh -lv --install command, you
might see a kernel version mismatch warning. You can ignore this warning.
1. Meet the minimum software and OS requirements described in Table 8 on page 27.
We recommend that you verify the process with the vendor because different systems
have different methods to access and change BIOS settings.
3. During the OS installation, select the Virtualization Host and Virtualization Platform
software collections.
If you did not select these software collections during the GUI installation, use the
following commands to install them:
yum upgrade
7. (Optional) If you are using SR-IOV, you must install these packages and enable SR-IOV
capability.
ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
9. Set up the path for the correct Python release and install the PyYAML library.
PATH=/opt/rh/python27/root/usr/bin:$PATH
export PATH
pip install netifaces pyyaml
10. If you have installed any Red Hat OpenStack libraries, you must change
script/templates/red_{vPFE, vRE}-ref.xml to use <type arch='x86_64'
machine='pc-0.13'>hvm</type> as the machine type.
If you cannot stop Network Manager, you can prevent resolv.conf from being
overwritten with the chattr +I /etc/resolv.conf command.
12. Ensure that the build directory is readable by the QEMU user.
As an alternative, you can configure QEMU to run as the root user by setting the
/etc/libvirt/qemu.conf file to user=root.
export PATH=/opt/rh/python27/root/usr/bin:$PATH
NOTE: When you install vMX with the sh vmx.sh -lv --install command, you
might see a kernel version mismatch warning. You can ignore this warning.
Installing vMX is different for specific use cases. Table 10 on page 36 lists the sample
configuration requirements for some vMX use cases.
To install vMX for a particular use case, perform one of the following tasks:
To install vMX for the lab simulation (less than 100 Mbps) application use case:
1. Download the vMX software package as root and uncompress the package.
cd package-location
3. Edit the config/vmx.conf text file with a text editor to configure a single vMX instance.
Ensure the following parameter is set properly in the vMX configuration file:
device-type : virtio
4. Run the ./vmx.sh -lv --install script to deploy the vMX instance specified by the
config/vmx.conf startup configuration file and provide verbose-level logging to a file.
See Deploying vMX on page 44.
Here is a sample vMX startup configuration file using the virtio device type for lab
simulation:
---
#Configuration on the host side - management interface, VM images etc.
HOST:
identifier : vmx1 # Maximum 4 characters
host-management-interface : eth0
routing-engine-image : "/home/vmx/vmxlite/images/junos-vmx-x86-64.qcow2"
routing-engine-hdd : "/home/vmx/vmxlite/images/vmxhdd.img"
forwarding-engine-image : "/home/vmx/vmxlite/images/vFPC.img"
---
#External bridge configuration
BRIDGES:
- type : external
name : br-ext # Max 10 characters
---
#vRE VM parameters
CONTROL_PLANE:
vcpus : 1
memory-mb : 1024
console_port: 8601
interfaces :
- type : static
ipaddr : 10.102.144.94
macaddr : "0A:00:DD:C0:DE:0E"
---
#vPFE VM parameters
FORWARDING_PLANE:
memory-mb : 4096
vcpus : 3
console_port: 8602
device-type : virtio
interfaces :
- type : static
ipaddr : 10.102.144.98
macaddr : "0A:00:DD:C0:DE:10"
---
#Interfaces
JUNOS_DEVICES:
- interface : ge-0/0/0
mac-address : "02:06:0A:0E:FF:F0"
description : "ge-0/0/0 interface"
- interface : ge-0/0/1
mac-address : "02:06:0A:0E:FF:F1"
description : "ge-0/0/1 interface"
To install vMX for the low-bandwidth (up to 3 Gbps) application use case:
1. Download the vMX software package as root and uncompress the package.
cd package-location
3. Edit the config/vmx.conf text file with a text editor to configure a single vMX instance.
Ensure the following parameter is set properly in the vMX configuration file:
4. Run the ./vmx.sh -lv --install script to deploy the vMX instance specified by the
config/vmx.conf startup configuration file and provide verbose-level logging to a file.
See Deploying vMX on page 44.
Here is a sample vMX startup configuration file using the virtio device type for
low-bandwidth applications:
---
#Configuration on the host side - management interface, VM images etc.
HOST:
identifier : vmx1 # Maximum 4 characters
host-management-interface : eth0
routing-engine-image : "/home/vmx/vmx/images/junos-vmx-x86-64.qcow2"
routing-engine-hdd : "/home/vmx/vmx/images/vmxhdd.img"
forwarding-engine-image : "/home/vmx/vmx/images/vFPC.img"
---
#External bridge configuration
BRIDGES:
- type : external
name : br-ext # Max 10 characters
---
#vRE VM parameters
CONTROL_PLANE:
vcpus : 1
memory-mb : 4096
console_port: 8601
interfaces :
- type : static
ipaddr : 10.102.144.94
macaddr : "0A:00:DD:C0:DE:0E"
---
#vPFE VM parameters
FORWARDING_PLANE:
memory-mb : 12288
vcpus : 10
console_port: 8602
device-type : virtio
interfaces :
- type : static
ipaddr : 10.102.144.98
macaddr : "0A:00:DD:C0:DE:10"
---
#Interfaces
JUNOS_DEVICES:
- interface : ge-0/0/0
mac-address : "02:06:0A:0E:FF:F0"
description : "ge-0/0/0 interface"
- interface : ge-0/0/1
mac-address : "02:06:0A:0E:FF:F1"
description : "ge-0/0/1 interface"
To install vMX for the high-bandwidth (above 3 Gbps) application use case:
1. Download the vMX software package as root and uncompress the package.
cd package-location
3. Edit the config/vmx.conf text file with a text editor to configure a single vMX instance.
Ensure the following parameter is set properly in the vMX configuration file:
device-type: sriov
4. Run the ./vmx.sh -lv --install script to deploy the vMX instance specified by the
config/vmx.conf startup configuration file and provide verbose-level logging to a file.
See Deploying vMX on page 44.
Here is a sample vMX startup configuration file using the SR-IOV device type:
---
#Configuration on the host side - management interface, VM images etc.
HOST:
identifier : vmx1 # Maximum 4 characters
host-management-interface : eth0
routing-engine-image : "/home/vmx/images/junos-vmx-x86-64.qcow2"
routing-engine-hdd : "/home/vmx/images/vmxhdd.img"
forwarding-engine-image : "/home/vmx/images/vFPC.img"
---
#External bridge configuration
BRIDGES:
- type : external
name : br-ext # Max 10 characters
---
#VCP VM parameters
CONTROL_PLANE:
vcpus : 1
memory-mb : 4096
console_port: 8601
interfaces :
- type : static
ipaddr : 10.102.144.94
macaddr : "0A:00:DD:C0:DE:0E"
---
#VFP VM parameters
FORWARDING_PLANE:
memory-mb : 12288
vcpus : 10
console_port: 8602
device-type : sriov
interfaces :
- type : static
ipaddr : 10.102.144.98
macaddr : "0A:00:DD:C0:DE:10"
---
#Interfaces
JUNOS_DEVICES:
- interface : ge-0/0/0
port-speed-mbps : 10000
nic : eth1
mtu : 2000 # DO NOT EDIT
virtual-function : 0
mac-address : "02:06:0A:0E:FF:F0"
description : "ge-0/0/0 connects to eth1"
- interface : ge-0/0/1
port-speed-mbps : 10000
nic : eth2
mtu : 2000 # DO NOT EDIT
virtual-function : 0
mac-address : "02:06:0A:0E:FF:F1"
description : "ge-0/0/1 connects to eth2"
The parameters required to configure vMX are defined in the startup configuration file.
The configuration file is in YAML format. The default file is config/vmx.conf. You can save
your configuration file to a different name for different instances.
To configure the host, navigate to Host and specify the following parameters:
NOTE: Copy the image file from its default location to ensure that the
scripts do not try to use the same image file concurrently.
NOTE: Copy the image file from its default location to ensure that the
scripts do not try to use the same image file concurrently.
To configure the VCP VM, navigate to CONTROL_PLANE and specify the following
parameters:
console_listen(Optional) IP address for the interface from which the console can be
accessed; default is 127.0.0.1, which only allows access from within the host. To allow
access from any interfaces, specify 0.0.0.0.
ipaddrManagement IP address for the VCP VM (fxp0). Navigate to interfaces > type
(static) > ipaddr to modify this parameter.
You must make sure the console port is not being used by another vMX instance or
another server.
Based on your requirements, you might want to change the memory, number of vCPUs,
and the device type. See Table 10 on page 36 for some sample configuration
requirements.
To configure the VFP VM, navigate to FORWARDING_PLANE and specify the following
parameters:
console_listen(Optional) IP address for the interface from which the console can be
accessed; default is 127.0.0.1, which only allows access from within the host. To allow
access from any interfaces, specify 0.0.0.0.
ipaddrManagement IP address for the VFP VM (eth0). Navigate to interfaces > type
(static) > ipaddr to modify this parameter.
Configuring Interfaces
The JUNOS_DEVICES interface names correspond to the Linux physical NIC names on
the host. Bring up the Linux physical NIC ports that are defined in this section before
proceeding. For example, use the ifconfig eth9 up command to bring up the NIC ports on
the eth9 interface.
To configure interfaces for virtio device types, you must specify the interface and the
MAC address.
To configure interfaces for SR-IOV device types, you must specify the interface, the NIC,
and the MAC address.
To configure the routed interfaces, navigate to JUNOS_DEVICES and specify the following
parameters:
NOTE: The interface names that are defined in the vmx.conf file must be
contiguous starting from ge-0/0/0. The total number of interfaces
supported is 10, up to ge-0/0/9.
port-speed-mbps(SR-IOV only) Port speed for the physical NIC, default is 10000
Mbps.
NOTE: Depending on the version of udev, you can rename the classic Linux
standard ethXX names. See Predictable Network Interface Names for more
information.
To change the MTU configuration for virtio device types, modify the mtu parameter in
the device binding file (vmx-junosdev.conf).
Deploying vMX
Host NICs
NOTE: When br-ext is being created, access to the management port may
be frozen temporarily when it gets attached to the br-ext bridge.
Using the --install option also launches the VCP and VFP VMs.
We recommend you deploy the vMX by running the ./vmx.sh -lv --install script to provide
verbose-level logging to a file for the deployment of the vMX instance.
NOTE: Only English locale is supported for using the vmx.sh script on Ubuntu.
NOTE: If you cannot deploy vMX after upgrading libvirt, bring down the virbr0
bridge with the ifconfig virbr0 down command and delete the bridge with the
brctl delbr virbr0 command.
Connecting to VMs
Perform these tasks to connect to the virtual machines for first-time configuration, to
enable access by other means (like Telnet or SSH):
Logging In to VCP
You can access the serial console using the ./vmx.sh --console vcp vmx-id command,
where vmx-id is the vMX identifier specified in the startup configuration file, and log in
with the username root and no password.
To disconnect from the console, log out of the session and press Ctrl + ]. At the telnet>
prompt, type close and press Enter.
Logging In to VFP
You can access the serial console using the ./vmx.sh --console vfp vmx-id command,
where vmx-id is the vMX identifier specified in the startup configuration file, and log in
with the username root and password root.
You can connect to VFP using the SSH protocol. Use the IP address defined under
FORWARDING_PLANE in the vmx.conf file. For security reasons, you cannot connect to
VFP using the Telnet protocol.
To disconnect from the console, log out of the session and press Ctrl + ]. At the telnet>
prompt, type close and press Enter.
You must add a license to use vMX features. The licensed features are enforced based
on the license you purchased.
If you upgrade from a BASE package license to an ADVANCE or PREMIUM package license
or if you downgrade from an ADVANCE or PREMIUM package license to a BASE package
license, you must restart the routing protocol process (restart routing). If your configuration
has logical systems, you must restart the routing protocol process for all logical systems
(restart routing logical-system logical-system-name).
If you need to move your vMX installation to another host, you must remove vMX from
the current host before installing vMX and adding the license on the new host.
Adding a License
To add a license key to the vMX:
1. Copy the license activation key file to the VCP and add the license key by specifying
the filename.
Or, you can copy and paste the license activation key directly to add the license key.
For example:
user@vmx> request system license add terminal
E408408918 aeaqib qcsbja okbuqe rcmxnq vjocwf uxfsta
2. Verify that the license is installed. VMX-BANDWIDTH indicates the licensed bandwidth
(in Mbps) and VMX-SCALE indicates the application package. (VMX-SCALE 1 is the
BASE package, VMX-SCALE 2 is the ADVANCE package, and VMX-SCALE 3 is the
PREMIUM package.) This information is also listed as Features in the Licenses installed
section. For example, this output indicates that the 40G perpetual license for the
PREMIUM application package is installed.
Licenses installed:
License identifier: JUNOS640113
License version: 4
Software Serial Number: 1012620150123J
Customer ID: vMX-Juniper
Features:
vmx-bandwidth-40g - vmx-bandwidth-40g
permanent
vmx-feature-premium - vmx-feature-premium
permanent
3. Verify the configured bandwidth for PFE traffic matches the licensed bandwidth
(VMX-BANDWIDTH). The current and average bandwidth are also displayed.
Deleting a License
To delete a vMX license:
For example:
You can view the chassis serial ID by using the show chassis hardware command from
the CLI, or by using the sysctl hw.chassis.serialid command from shell.
Managing vMX
Managing vMX
NOTE: Only English locale is supported for using the vmx.sh script on Ubuntu.
After you install and deploy vMX, you can use the vmx.sh script with different options to
perform these tasks:
Controlling vMX
When you are controlling vMX with the vmx.sh script, you can perform these tasks:
Deploying vMX
--cfg fileUse the specified vMX startup configuration file. The default file is
config/vmx.conf.
NOTE: If you cannot deploy vMX after upgrading libvirt, bring down the virbr0
bridge with the ifconfig virbr0 down command and delete the bridge with the
brctl delbr virbr0 command.
This example deploys a new vMX instance specified by the my-vmx.cfg configuration file
and provides verbose-level logging to a file:
Use these options with the vmx.sh script to stop, start, restart, verify, and clean up an
existing vMX:
--cfg fileUse the specified vMX startup configuration file. The default file is
config/vmx.conf.
--cleanupStop vMX and clean up relevant information about the vMX instance. It also
tears down the Linux bridges and other dependencies. If you do not specify a startup
configuration file with the --cfg option, the default file is used.
--restartStop and start a running vMX. This option is useful for redeploying a vMX that
has parameter changes in the startup configuration file. If you do not specify a startup
configuration file with the --cfg option, the default file is used.
--startStart the vMX that was running and stopped. If you do not specify a startup
configuration file with the --cfg option, the default file is used.
--statusVerify the status of a deployed vMX. If you do not specify a startup configuration
file with the --cfg option, the default file is used.
--stopStop vMX without cleaning up build files so that the vMX can be started quickly
without setup performed by the --install option.
This example tears down an existing vMX instance specified by the my-vmx.cfg
configuration file:
To specify the directory used for temporary files, run the ./vmx.sh build directory script.
The default directory is build/vmx-id, where vmx-id is the vMX identifier specified in the
startup configuration file.
By default, copies of the VCP and VFP images are copied to this directory. We recommend
that you do not change the make-local-copy-of-images and make-local-copy-of-vmxhdd
parameters when specifying startup configuration file parameters for the host.
To specify the environment file (.env), run the ./vmx.sh env file script. The default file is
env/ubuntu_sriov.env.
-lEnable logging to a file in the specified build directory. The default directory is
build/vmx-id/logs, where vmx-id is the vMX identifier specified in the startup
configuration file. By default, logging is disabled.
This example deploys a new vMX instance specified by the my-vmx.cfg configuration file
and provides verbose-level logging to a file:
--console vcp [vmx-id]Connect to the console of the VCP for the specified vMX. The
vMX identifier is specified in the startup configuration file.
--console vfp [vmx-id]Connect to the console of the VFP for the specified vMX. The
vMX identifier is specified in the startup configuration file.
This example connects to the console of the VCP for the vMX instance specified by the
vmx1 identifier:
For configurations using virtio device types, you can bind multiple vMX instances together
on the same system if the host has enough CPU and memory to support the vMX
instances. You configure each vMX instance with a different startup configuration file.
The console ports of the VCP and the VFP are unique across all instances.
The external static IP address of the VCP and the VFP are unique across all instances.
The MAC addresses of the VCP and the VFP are unique across all instances, whenever
specified.
NOTE: All VMs share the same management domain. The physical
management interface (for example, eth0) is also part of this global external
bridge.
You can connect virtio NICs in the vMX to physical NICs or virtio NICs in another vMX by
binding these devices as shown in Figure 3 on page 52.
The device-binding file defines the endpoints of each link originating from the VFP of a
vMX. One endpoint must be a device using virtio NICs. The other endpoint can be a physical
NIC, a virtio NIC in another vMX instance, or a Linux bridge.
1. Edit the config/vmx-junosdev.conf file to set up the communication between the vMX
instances.
2. Modify the link_name to the name of the Linux bridge (as shown by the brctl show
command). The link name can be 15 characters long. It must be unique for each bridge.
If more than two interfaces (virtual or physical) are connected by a Linux bridge, then
the bridge name is derived from the dev_name of the common endpoint for the
connected devices.
3. Specify the mtu to change the MTU value for virtio device types from the default of
1500. The maximum value is 9500.
To change the MTU configuration for SR-IOV device types, modify the mtu parameter
in the startup configuration file (vmx.conf).
4. Specify the endpoints for vMX devices (junos_dev type) by customizing these
parameters:
vm-nameName of the vMX identifier specified in the startup configuration file for
that vMX instance.
5. Specify the endpoints for physical NICs (host_dev type) by customizing these
parameters:
6. Specify the endpoints for bridges (bridge_dev type) by customizing these parameters:
7. If you have multiple device-binding files, save them with different names.
- link_name : link_host
mtu : 1500
endpoint_1 :
- type : junos_dev
vm_name : vmx1
dev_name : ge-0/0/0
endpoint_2 :
- type : host_dev
dev_name : int2
- link_name : link_vmx_12
mtu : 1500
endpoint_1 :
- type : junos_dev
vm_name : vmx1
dev_name : ge-0/0/1
endpoint_2 :
- type : junos_dev
vm_name : vmx2
dev_name : ge-0/0/0
- link_name : bridge_vmx_123
endpoint_1 :
- type : junos_dev
vm_name : vmx1
dev_name : ge-0/0/2
endpoint_2 :
- type : bridge_dev
dev_name : bridge1
- link_name : bridge_vmx_123
endpoint_1 :
- type : junos_dev
vm_name : vmx2
dev_name : ge-0/0/1
endpoint_2 :
- type : bridge_dev
dev_name : bridge1
- link_name : bridge_vmx_123
endpoint_1 :
- type : junos_dev
vm_name : vmx3
dev_name : ge-0/0/0
endpoint_2 :
- type : bridge_dev
dev_name : bridge1
The link_host entry shows how to connect the ge-0/0/0 interface on vmx1 to the physical
NIC. The link_vmx_12 entry shows how to connect two interfaces on vmx1 and vmx2 to
each other. The bridge_vmx_123 entries show how to connect the interfaces on vmx1,
vmx2, and vmx3 with a bridge.
To bind devices with virtio NICs to other devices, define your devices in the vMX
device-binding file and run the ./vmx.sh --bind-dev -cfg device-binding-file script to create
the device binding. If you do not specify a file, the default file is config/vmx-junosdev.conf.
This example creates device bindings with the specified device-binding file:
To unbind devices, run the ./vmx.sh --unbind-dev -cfg device-binding-file script to delete
the device bindings created with the --bind-dev option. If you do not specify a file, the
default file is config/vmx-junosdev.conf.
This example deletes device bindings with the specified device-binding file:
To verify the status of device bindings created with the --bind-dev option, run the ./vmx.sh
--bind-check -cfg device-binding-file script. If you do not specify a file, the default file is
config/vmx-junosdev.conf.
This example verifies the status of the device bindings for the specified device-binding
file:
You can specify the number of active ports for vMX. The default number of ports is 10,
but you can specify any value in the range of 1 through 23. You can change this number
if you want to limit the number of Ethernet interfaces in the VCP VM to match the number
of NICs added to the VFP VM.
To specify the number of active ports, configure the number of ports at the [edit chassis
fpc 0 pic 0] hierarchy level.
[edit]
user@vmx# set chassis fpc 0 pic 0 number-of-ports
By default, the interfaces come up as ge interfaces with 1 Gbps bandwidth in the Junos
OS configuration. The default port speed values for the interface types are 1 Gbps (ge),
10 Gbps (xe), and 100 Gbps (et). If you do not enable schedulers, the speed is only for
display purposes and is not enforced. If you enable schedulers, the transmit rate of the
port is limited to the speed unless it is overridden by the shaping rate in the CoS
configuration.
To specify the interface types, configure the interface type at the [edit chassis fpc 0 pic
0] hierarchy level.
[edit]
user@vmx# set chassis fpc 0 pic 0 interface-type (ge | xe | et)
For vMX, you can configure the media MTU in the range 256 through 9500.
You configure the MTU by including the mtu statement at the [edit interface
interface-name] hierarchy level.
[edit]
user@vmx# set interface ge-0/0/0 mtu bytes
vMX can be configured to run in two modes depending on the use case.
Lite modeNeeds fewer resources in terms of CPU and memory to run at lower
bandwidth.
When you enable performance mode, make sure you have configured the
proper number of vCPUs and memory for your VMs based on your use case.
[edit]
user@vmx# set chassis fpc 0 performance-mode
If you are using paravirtualized network interfaces such as virtio (for KVM) or VMXNET3
(for VMware) for lab simulation use cases, you can disable performance mode by including
the lite-mode statement at the [edit chassis fpc 0] hierarchy level.
[edit]
user@vmx# set chassis fpc 0 lite-mode
To tune performance mode for unicast traffic, you can specify the number of Workers
dedicated to processing multicast and control traffic. You can specify any value in the
range of 0 through 15. The default of 0 specifies that all available Workers are used to
process all traffic.
The number of dedicated Workers specified in relation to the number of available Workers
results in the following behavior:
If the number of dedicated Workers is greater than or equal to the number of available
Workers, then all available Workers are used to process all traffic.
If the number of dedicated Workers is less than the number of available Workers, then
the first set of available Workers (equal to the specified number of dedicated Workers)
is used to process multicast and control traffic while the remaining available Workers
are used to process flow cache traffic.
To specify the number of dedicated Workers for processing multicast and control traffic,
configure the number of Workers at the [edit chassis fpc 0 performance-mode] hierarchy
level.
[edit]
user@vmx# set chassis fpc 0 performance-mode number-of-ucode-workers number-workers
vMX supports shaping at the traffic class level, not at the queue level. A traffic class is a
bundle of queues with fixed priority. The next level in the hierarchy is the VLAN (logical
interface), which is a bundle of traffic classes.
vMX has the following fixed priorities and queues for these traffic classes:
Queue 0
Queue 6
Queue 1
Queue 7
Queue 2
Queue 3
Queue 4
Queue 5
NOTE: Both Traffic Class 1 and Traffic Class 2 follow strict priority, so all
excess traffic is discarded as tail drops. However, Traffic Class 3 does not
follow strict priority, so the shaping rate is set to the shaping rate of the VLAN.
All queues in the same traffic class have equal priority, so the scheduler pulls
packets from each queue in the traffic class based on weighted round robin
(WRR) for the VLAN.
Schedulers support only the transmit-rate and excess-rate statements. Only weights
are supported at the queue level, so transmission rate and excess rate are used for
calculating queue weights.
If you only configure transmit rate, queue weights are calculated based on the
transmission rate.
If you only configure excess rate, queue weights are calculated based on the excess
rate.
If you configure both transmit rate and excess rate, queue weights are calculated
based on the excess rate.
If you configure the excess rate for one queue, the excess rate is expected for all the
queues to compute the weights. If the excess rate is not configured, the default
weight of 1 is used.
NOTE: To get the expected behavior, you must configure the excess rate
for all queues.
Traffic control profiles support only the shaping-rate and scheduler-map statements.
If a traffic control profile has a default scheduler map, you must configure the
guaranteed rate.
For high- and medium-priority traffic classes, the transmission rate is the shaping rate.
For low-priority queues, the shaping rate for the VLAN is used for the queue. As a result,
the low-priority queues can burst up to the configured shaping rate for the VLAN. The
transmission rate is used as the WRR weight when there is more than one queue
configured for a given priority.
All excess traffic from the traffic classes for high- and medium-priority queues are
discarded as tail drops.
For high- and medium-priority traffic classes, the transmission rate is the shaping rate.
If the transmission rate is not configured and the shaping rate is configured, then the
queue weight is calculated based upon the configured shaping rate.
If you configure the transmission rate for both queues of the same traffic class, the
shaping rate of the traffic class is the sum of the individual transmission rates of the
queues for that traffic class.
If no queues are configured, the shaping rate of the VLAN is applied to the traffic class
as the transmission rate.
If any of the queues in the traffic class is configured, the shaping rate of the VLAN is
set to the guaranteed rate of the configured queue. If a queue is not configured, the
guaranteed rate is set to zero by default.
If the sum of the rates of the individual queues in a traffic class exceeds the shaping
rate of the VLAN, the shaping rate of the VLAN is used as the shaping rate of the traffic
class.
To specify the shaping rate, include the shaping-rate statement at the [edit class-of-service
traffic-control-profiles profile-name] hierarchy level.
[edit]
user@vmx# set class-of-service traffic-control-profiles profile-name shaping-rate rate
To specify the scheduler map, include the scheduler-map statement at the [edit
class-of-service traffic-control-profiles profile-name] hierarchy level.
[edit]
user@vmx# set class-of-service traffic-control-profiles profile-name scheduler-map map-name
Schedulers support only the transmit-rate and excess-rate proportion statements for
vMX.
To specify the transmission rate, include the transmit-rate statement at the [edit
class-of-service schedulers scheduler-name] hierarchy level.
[edit]
user@vmx# set class-of-service schedulers scheduler-name transmit-rate rate
To specify the proportion of the excess bandwidth to share, include the excess-rate
proportion statement at the [edit class-of-service schedulers scheduler-name] hierarchy
level. The value is in the range of 0 through 1000.
[edit]
user@vmx# set class-of-service schedulers scheduler-name excess-rate proportion value
If you configure the excess rate for one queue, the excess rate is expected for all the
queues to compute the weights. If the excess rate is not configured, the default weight
of 1 is used.
NOTE: To get the expected behavior, you must configure the excess rate for
all queues.
For example, if you configure excess rate for the low-priority queues, configure
the same excess rate for the high- and medium-priority queues.
This example describes how to configure hierarchical CoS on vMX with eight queues.
Requirements on page 65
Overview on page 65
Configuration on page 65
Requirements
This example uses the following hardware and software components:
Overview
This example configures two-level hierarchical schedulers with specified transmission
rates.
Configuration
Configuring the Chassis on page 66
Applying Shaping and Scheduling to VLANs on page 66
[edit]
user@vmx# set chassis fpc 0 flexible-queuing-mode
[edit]
user@vmx# run request chassis fpc restart slot 0
[edit]
user@vmx# set class-of-service forwarding-classes class voice1 queue-num 0
user@vmx# set class-of-service forwarding-classes class video1 queue-num 1
user@vmx# set class-of-service forwarding-classes class data1 queue-num 2
user@vmx# set class-of-service forwarding-classes class data2 queue-num 3
user@vmx# set class-of-service forwarding-classes class data3 queue-num 4
user@vmx# set class-of-service forwarding-classes class data4 queue-num 5
user@vmx# set class-of-service forwarding-classes class voice2 queue-num 6
user@vmx# set class-of-service forwarding-classes class video2 queue-num 7
[edit]
user@vmx# set interfaces ge-0/0/0 hierarchical-scheduler
maximum-hierarchy-levels 2
user@vmx# set interfaces ge-0/0/0 vlan-tagging
user@vmx# set interfaces ge-0/0/0 unit 100 vlan-id 100
user@vmx# set interfaces ge-0/0/0 unit 100 family inet address 10.2.2.1/24
user@vmx# set interfaces ge-0/0/1 hierarchical-scheduler
maximum-hierarchy-levels 2
user@vmx# set interfaces ge-0/0/1 vlan-tagging
user@vmx# set interfaces ge-0/0/1 unit 100 vlan-id 100
user@vmx# set interfaces ge-0/0/1 unit 100 family inet address 10.1.1.1/24
[edit]
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class voice1 loss-priority low code-points 000
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class video1 loss-priority low code-points 001
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class data1 loss-priority low code-points 010
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class data2 loss-priority low code-points 011
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class data3 loss-priority low code-points 100
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class data4 loss-priority low code-points 101
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class voice2 loss-priority low code-points 110
user@vmx# set class-of-service classifiers inet-precedence vlan_tos
forwarding-class video2 loss-priority low code-points 111
[edit]
user@vmx# set class-of-service traffic-control-profiles ge_0_0_1_vlan_100_tcp
shaping-rate 50m
user@vmx# set class-of-service traffic-control-profiles ge_0_0_1_vlan_100_tcp
scheduler-map vlan_smap
[edit]
user@vmx# set class-of-service interfaces ge-0/0/1 unit 100
output-traffic-control-profile ge_0_0_1_vlan_100_tcp
user@vmx# set class-of-service interfaces ge-0/0/0 unit 100 classifiers
inet-precedence vlan_tos
[edit]
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class voice1
scheduler sched_voice1
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class video1
scheduler sched_video1
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class data1
scheduler sched_data1
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class data2
scheduler sched_data2
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class data3
scheduler sched_data3
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class data4
scheduler sched_data4
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class voice2
scheduler sched_voice2
user@vmx# set class-of-service scheduler-maps vlan_smap forwarding-class video2
scheduler sched_video2
[edit]
vMX handles packet priorities within a queue by assigning a threshold to each loss priority
within a queue and dropping new packets of that loss priority level when the queue depth
exceeds the threshold. When the queue becomes oversubscribed, packets of lower
priority are dropped to ensure that there is room in the queue for packets of higher priority.
low
medium-low
medium-high
high
vMX supports three thresholds so the medium-low and medium-high loss priority levels
are grouped together. vMX maps the packet loss priority to tricolor marking as follows:
low green
medium-low yellow
medium-high yellow
high red
vMX drop profiles define the threshold within a queue for a given loss priority as the fill
level value associated with the drop probability of 100 percent. If you do not specify a
drop probability of 100 percent in the drop profile, the threshold defaults to 100 percent.
All other fill level values are ignored. These drop profiles can be referenced by the
scheduler to evaluate packets with different loss priority settings.
You can set packet loss priority for packets using behavior aggregate (BA) classifiers,
firewall filters, or firewall policers.
Limitations
vMX has the following limitations for supporting drop profiles and packet loss priority:
If you do not apply drop profiles to the queue, then packets are tail dropped.
The show interface queue command does not display separate drop rates for the
medium-high PLP and medium-low PLP because they both map to yellow. All yellow
drop rates appear as medium-high drops.
Related Managing Congestion Using Drop Profiles and Packet Loss Priorities on vMX on page 70
Documentation
CoS on vMX Overview on page 61
Managing Congestion Using Drop Profiles and Packet Loss Priorities on vMX
When you are configuring CoS, you can manage congestion by configuring drop profiles
to specify the thresholds for packet loss priority. You reference the drop profiles in the
scheduler configuration to assign a drop profile to the loss priority setting.
To configure how packet loss priority is handled for queues, perform these tasks:
NOTE: The threshold for the loss priority assigned this drop profile is the
fill-level value associated with the drop-probability of 100. If you do not specify
a drop probability of 100 percent in the drop profile, the fill level defaults to
100 percent. All other fill levels are ignored.
To specify the drop profile, include the drop-profiles statement at the [edit
class-of-service] hierarchy level.
[edit]
user@vmx# set class-of-service drop-profiles profile-name
To specify the threshold for the loss priority, include the fill-level and drop-probability
statements at the [edit class-of-service drop-profiles profile-name] hierarchy level.
For example, the dpLow drop profile specifies a threshold of 100 percent, the dpMed drop
profile specifies a threshold of 75 percent, and the dpHigh drop profile specifies a threshold
of 50 percent.
[edit]
NOTE: If you do not apply drop profiles to the queue, then packets are tail
dropped.
To specify the drop profile map, include the drop-profile-map statement at the [edit
class-of-service schedulers scheduler-name] hierarchy level.
For example, the sched-be scheduler applies the dpLow drop profile to packets with low
loss priority for any protocol type, applies the dpMed drop profile to packets with
medium-high loss priority for any protocol type, and applies the dpHigh drop profile to
packets with high loss priority for any protocol type.
[edit class-of-service schedulers sched-be]
user@vmx# set drop-profile-map loss-priority low protocol any drop-profile dpLow
user@vmx# set drop-profile-map loss-priority medium-high protocol any drop-profile dpMed
user@vmx# set drop-profile-map loss-priority high protocol any drop-profile dpHigh
Troubleshooting vMX
You can view the VFP statistics from a Web browser. The displayed statistics are not
absolute counters; they are relative to the start of the HTTP session and start as all zero
counters.
The RPIO Stats and Hostif Stats sections provide statistics about the internal
communication between the VCP and the VFP. The RPIO session uses ports 3000 and
3001 and the HostIF session uses port 3002.
The Port Stats section provides statistics about the packets received from and transmitted
to the NIC interfaces.
There is a receive (rx) and transmit (tx) line for each port. Port 0 maps to the ge-0/0/0
interface, port 1 maps to the ge-0/0/1 interface, and so forth. rx0 displays statistics for
packets received from port 0 and tx1 displays statistics for packets transmitted to port
1.
The queue processes the packets. The columns provide this information about the
queues:
The Producer and Consumer columns display the source and destination that
generate packets for this queue. The values can be io, wk, tx, or host.
The Priority column displays the priority of the queue. The values can be Normal or
High (only for control packets).
The Free and Used columns display the queue occupancy. The queue has 1024
entries.
The Enqueues and Dequeues columns display the number of queue operations.
The Drops column indicates whether the queue is being drained fast enough.
1. By default, you cannot log in to the Web browser window without configuring the
username and password credentials and enabling HTTP access.
From the VFP console, configure the username and password by invoking the
/home/pfe/riot/vfp_util.sh -setpass command.
root@vfp-vmx1:/home/pfe/riot#
3. When prompted, enter pfe as the username and the password configured in Step 1.
5. After troubleshooting, you can disable HTTP access to improve security with this
command:
VFP crash files are automatically saved in the VCP /var/crash directory.
1. Log in to the VFP console by using the ./vmx.sh --console vfp vmx-id command, where
vmx-id is the vMX identifier specified in the startup configuration file.
2. Navigate to the appropriate directory to determine whether there are any files to view.
# cd /var/crash
# ls -l
-rwxr-xr-x 1 root root 864678 Jan 4 02:14 core.riot.1420366466.8271.gz
# gunzip core.riot.1420366466.8271.gz
# gdb /build/app core.riot.1420366466.8271
The VFP is configured for remote logging of the /var/log/messages directory. You can
configure the VCP syslog facility to record the VFP log messages:
If the VCP cannot connect to the VFP, the VFP syslog file does not display the RPIO and
HOSTIF messages.
Action Run the request chassis fpc slot 0 restart command from the VCP CLI. If an FPC is in
transition error message is displayed, then run restart chassis-control.
If these commands do not correct the problem, verify whether the VCP can ping the VFP
from the routing-instance __juniper_private1__. The three management interfaces (for the
host, VCP VM, and VFP VM) connected to the internal bridge should be able to reach
each other. For example:
root> ping 128.0.0.16 routing-instance __juniper_private1__
PING 128.0.0.16 (128.0.0.16): 56 data bytes
64 bytes from 128.0.0.16: icmp_seq=0 ttl=64 time=0.273 ms
64 bytes from 128.0.0.16: icmp_seq=1 ttl=64 time=0.606 ms
1. Use the brctl show command to verify the bridge configuration and connected
interfaces.
3. Verify that the VFP and the VCP VMs are up and the correct IP addresses are assigned.
If the problem persists, contact the Juniper Networks Technical Assistance Center (JTAC).
To verify that the VMs are running after vMX is installed, use the virsh list command. The
virsh list command displays the name and state of the VM. The state can be: running,
idle, paused, shutdown, crashed, or dying.
You can stop and start VMs with the following virsh commands.
On the host server, use the lscpu command to display CPU information. The output
displays such information as the total number of CPUs, the number of cores per socket,
and the number of CPU sockets. For example:
root@vmx-host:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 1
Core(s) per socket: 10
Socket(s): 4
NUMA node(s): 4
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Stepping: 7
CPU MHz: 3191.766
BogoMIPS: 6385.87
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 38400K
NUMA node0 CPU(s): 0,4,8,12,16,20,24,28,32,36
NUMA node1 CPU(s): 1,5,9,13,17,21,25,29,33,37
NUMA node2 CPU(s): 2,6,10,14,18,22,26,30,34,38
NUMA node3 CPU(s): 3,7,11,15,19,23,27,31,35,39
If you are having problems with the SR-IOV ports, make sure BIOS has the following
settings:
SR-IOV is enabled.
VT-d is enabled.
Hyperthreading is enabled.
We recommend that you verify the process with the vendor because different systems
have different methods to access and change BIOS settings.