Junioer Logo Juniper vQFX10000 Virtual Device makes it easy to explore a high-performance data center switch. Although the virtual version has limited performance, it emulates the same features of the physical switch for the control plane, or both its control and data planes.

I will cover converting the Juniper supplied .vmdk disks to the raw format so these can be run under KVM. We will also look at setting up network bridges under Fedora. Finally I have included virt-install scripts to install the Routing & Packet Forwarding Engines.

Intro

The last week I have been running vQFX10000 on KVM to get through some lab exercises. At the moment vQFX10000 is shipped as a Vagrant install with VMWare vmdk disks to be installed on VirtualBox. None of these products I run or have any interest in running, let alone combobulate all three together. Here are a quick few notes on getting it up and running under KVM.

Convert VMDK Disks to Raw Images

Use the qemu-img program to convert the vmdk disk images to a raw format. These will later be mounted as an ide drive.

qemu-img convert -f vmdk /path/to/vqfx10k-re-15.1X53-D60.vmdk  -O raw /path/to/vqfx10k-re-15.1X53-D60.raw
qemu-img convert -f vmdk /path/to/vqfx10k-pfe-20160609-2.vmdk  -O raw /path/to/qfx2/vqfx10k-pfe-20160609-2.raw

Setup internal RE-PFE Bridge

This will be the bridge that is configured on the second interface of each RE & PFE vm. Quicksmart!

brctl addbr qfx-int
ifconfig qfx-int up

Create another bridge for your first dataplane interface xe-0/0/0.

brctl addbr dataplane
ifconfig dataplane up

Note: Dataplane interfaces are installed on the Route Engine vm (not the Packet Forward Engine vm). Also dataplane interfaces will be configured starting at the fourth interface slot. The third interface slot is saved for an unused management interface.

Install Routing Engine

The only tricky thing about this install is the networking interfaces. I have openvswitch running which I connect all my lab equipment to a mgmt vlan as you can see from the install below. You will need to change this according to your own situation. The other interface cards are configured as bridges, which we just created.

virt-install \
    --name re-hostname \
    --memory 1024 \
    --vcpus=1 \
    --import \
    --disk /path/to/vqfx10k-re-15.1X53-D60.raw,bus=ide,format=raw \
    --network network=openvswitch-net,portgroup=mgmt,model=e1000 \
    --network bridge=qfx-int,model=e1000 \
    --network network=openvswitch-net,portgroup=mgmt,model=e1000 \
    --network bridge=dataplane,model=e1000 \
    --graphics none

After this has installed, you can start the virtual machine with; virsh start re-hostname.

Login with username root and password Juniper.

Install Packet Forward Engine

The install on the PFE is a little more simple as there are only two interface cards to be concerned with and we have covered these already.

virt-install \
    --name pfe-hostname \
    --memory 2048 \
    --vcpus=1 \
    --import \
    --disk /path/to/vqfx10k-pfe-20160609-2.raw,bus=ide,format=raw \
    --network network=openvswitch-net,portgroup=mgmt,model=e1000 \
    --network bridge=qfx-int,model=e1000 \
    --graphics none

 

Note: There is one big gotcha with the installation, as it starts. There will be no console output after the grub menu. So, when you see the grub menu, press e for “edit” and insert into the kernel line console=ttyS0 to continue. At this stage there is no reason to log into the PFE via console as it will become available via ssh once the management interface grabs an ip number from dhcp.

Login with username root and password no.

Conclusion

So when they have both had time to settle, you can check out various commands to verify connectivity. Pretty neat huh!

{master:0}
root@vqfx-re> show chassis pic fpc-slot 0 pic-slot 0 
FPC slot 0, PIC slot 0 information:
  Type                             48x 10G-SFP+
  State                            Online    
  PIC version                  2.9

  Uptime			 35 seconds

PIC port information:
                         Fiber                    Xcvr vendor       Wave-    Xcvr
  Port Cable type        type  Xcvr vendor        part number       length   Firmware
  0    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  1    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  2    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  3    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  4    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  5    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  6    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  7    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  8    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  9    10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  10   10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0   
  11   10GBASE SR        MM    SumitomoElectric   SPP5101SR-J3      850 nm   0.0 

Footnote

This was an older post ( late 2016/early 2017 ) from my networkfoo github page, where I used to mess about with Juniper equipment. I have added it here just to keep everything all in one place and also that, someone may find it interesting.