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
For the purposes of this document, we are assuming you wish to set up a router between an internal network (192.168.0.0/24) and an external network (18.104.22.168/24). Your router will have an external IP of 22.214.171.124 and an internal IP of 192.168.0.1.
Your router will provide DHCP services to the internal network and directs internal nodes to use 126.96.36.199 as their DNS server.
To specify the configuration of our Vyatta VM, we use the
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
# Specify your interface IPs vyatta interfaces 188.8.131.52/24 192.168.0.1/24 # Enable OSPF vyatta ospf 184.108.40.206/24 192.168.0.1/24 # Enable internal DHCP, with 220.127.116.11 as your DNS server. vyatta dhcp add 192.168.0.0/24 192.168.0.1 192.168.0.2 192.168.0.250 18.104.22.168 # 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
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.