1. `# apt-get install vde2 iptables dnsmasq`
-2. Add an "iface block" to to `/etc/network/interfaces`:
-
- iface vmnet inet static
- pre-up ip tuntap add vmnet mode tap 2>/dev/null || true
- address 10.10.10.100/24
- up vde_switch -tap vmnet -daemon -sock /run/vde.ctl -mod 777
- MASQ POSTROUTING -s 10.10.10.0/24 -j MASQUERADE
- up iptables -t nat -A $IF_MASQ
- down iptables -t nat -D $IF_MASQ
- down pkill -f 'vde_switch -tap vmnet
- DHCP 10.10.10.2,10.10.10.99,3600
- up dnsmasq -i vmnet -I lo -h -F $IF_DHCP
- down pkill -f "dnsmasq -i vmnet"
+2. Add an "iface block" to `/etc/network/interfaces`:
+
+ iface vmnet inet static
+ pre-up ip tuntap add vmnet mode tap 2>/dev/null || true
+ address 10.10.10.100/24
+ MASQ POSTROUTING -s 10.10.10.0/24 -j MASQUERADE
+ DHCP 10.10.10.2,10.10.10.99,3600
+ up iptables -t nat -A $IF_MASQ
+ up vde_switch -tap vmnet -daemon -sock /run/vde.ctl -mod 777
+ up dnsmasq -i vmnet -I lo -h -F $IF_DHCP
+ down pkill -f "dnsmasq -i vmnet" || true
+ down pkill -f 'vde_switch -tap vmnet || true
+ down iptables -t nat -D $IF_MASQ || true
3. `# ifup vmnet`
-By that setup, the qemu emulator will connect to the network, and use
-the host as NAT router for Internet access. Note that `dnsmasq` might
-need other/more configuration to work well in your setup.
+By that setup, the qemu emulators will connect to the network, get
+their IP served by `dnsmasq` and use the host as NAT router for
+Internet access.
+
+Note that `dnsmasq` might need other/more configuration to work well
+in your setup.