Using Vyatta with minimega


minimega includes commands to configure a Vyatta router for use in your experiment. This document explains some common use cases; see the vyatta API documentation for more information.

Test environment

For the purposes of this document, we are assuming you wish to set up a router between an internal network ( and an external network ( Your router will have an external IP of and an internal IP of

Your router will provide DHCP services to the internal network and directs internal nodes to use as their DNS server.

Preparing the Vyatta config

To specify the configuration of our Vyatta VM, we use the vyatta commands. Once we have specified our desired setup, the vyatta write command writes it out as a floppy disk image, which we then pass to QEMU

Configuring Vyatta

# Specify your interface IPs
vyatta interfaces

# Enable OSPF
vyatta ospf

# Enable internal DHCP, with as your DNS server.
vyatta dhcp add

# Set up IPv6 too
vyatta interfaces6 2001:5:5:5::5/64 2001:192:168:0::1/64

# Enable router advertisement for IPv6
vyatta rad 2001:5:5:5::0/64 2001:192:168:0::0/64

# Enable OSPF3 for IPv6 interfaces
vyatta ospf3 eth0 eth1

# Write out the configuration as a floppy disk
vyatta write router.img

Configuring the VM

You'll need the Vyatta ISO file somewhere accessible; it is not included with minimega.

# Use the Vyatta ISO
vm config cdrom vyatta.iso
# Two network interfaces
vm config net 100 200

# Tell QEMU to use that image as a floppy drive
vm config qemu-append -fda /tmp/minimega/files/router.img

# Launch your VM
vm launch kvm router noblock
vm start router

The Vyatta VM should boot and start routing traffic for you. You should be able to ssh to the router if necessary by adding a host tap to one of the VLANs used.


The minimega authors

13 Aug 2015