Add basic files
[snf-network] / interfaces
1 # IP-less inteface, used to route public IPv4
2 # for Synnefo VMs
3 auto eth0.101
4 iface eth0.101 inet manual
5     ip-routing-table rt_public
6     ip-routes 62.217.123.128/27
7     ip-gateway 62.217.123.129
8     ip-forwarding 1
9     ip-proxy-arp 1
10     arp-ip 62.217.123.158
11
12 #auto eth0.100
13 iface eth0.100 inet manual
14   up ip link set eth0.100 up
15
16 #auto br100
17 iface br100 inet static
18   # needed for being the rooter for the VMs
19   address 192.168.100.1
20   netmask 255.255.255.240
21   bridge_ports eth0.100
22   # needed by nfdhcpd to make DHCP responses
23   up ip route add 192.168.100.0/28 dev br100 table rt_net100
24   up ip route add default via 192.168.100.1 dev br100 table rt_net100
25   # needed for the VMs to connect to the world
26   up iptables -t nat -A POSTROUTING -s 192.168.100.0/28 \! -d 192.168.100.0/28 -j MASQUERADE
27   down iptables -t nat -D POSTROUTING -s 192.168.100.0/28 \! -d 192.168.100.0/28 -j MASQUERADE
28   bridge_stp off
29   bridge_fd 2
30
31 #auto br100:1
32 iface br100:1 inet static
33   # needed for being the rooter for the VMs
34   address 192.168.101.1
35   netmask 255.255.255.240
36   up ip route add 192.168.101.0/28 dev br100 table rt_net101
37   up ip route add default via 192.168.101.1 dev br100 table rt_net101
38   # needed for the VMs to connect to the world
39   up iptables -t nat -A POSTROUTING -s 192.168.101.0/28 \! -d 192.168.101.0/28 -j MASQUERADE
40   down iptables -t nat -D POSTROUTING -s 192.168.101.0/28 \! -d 192.168.101.0/28 -j MASQUERADE
41