I currently have 64 ip addresses I'm trying to make 64 public facing kvms vms each with their own dedicated ip.
I'm a bit confused in editing the /etc/network/interfaces
how I would go about doing this. I know with ubuntu 16.04 +
you have to make a bridge.
Currently my ifconfig
is as follows
$ ifconfig -a
eno1 Link encap:Ethernet HWaddr 24:6e:96:05:ae:b0
inet addr:38.124.224.67 Bcast:38.124.224.127 Mask:255.255.255.192
inet6 addr: fe80::266e:96ff:fe05:aeb0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:80805370 errors:0 dropped:0 overruns:0 frame:0
TX packets:8423241 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8071366410 (8.0 GB) TX bytes:1468297158 (1.4 GB)
eno2 Link encap:Ethernet HWaddr 24:6e:96:05:ae:b2
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eno3 Link encap:Ethernet HWaddr 24:6e:96:05:ae:b4
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:dae80000-daefffff
eno4 Link encap:Ethernet HWaddr 24:6e:96:05:ae:b5
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:daf00000-daf7ffff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:222 errors:0 dropped:0 overruns:0 frame:0
TX packets:222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:21049 (21.0 KB) TX bytes:21049 (21.0 KB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:e8:92:ec
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17562 errors:0 dropped:0 overruns:0 frame:0
TX packets:12619 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2628722 (2.6 MB) TX bytes:2405500 (2.4 MB)
virbr0-nic Link encap:Ethernet HWaddr 52:54:00:e8:92:ec
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
vnet0 Link encap:Ethernet HWaddr fe:54:00:f8:af:b5
inet6 addr: fe80::fc54:ff:fef8:afb5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17467 errors:0 dropped:0 overruns:0 frame:0
TX packets:4431751 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2865065 (2.8 MB) TX bytes:232190543 (232.1 MB)
vnet1 Link encap:Ethernet HWaddr fe:54:00:91:95:55
inet6 addr: fe80::fc54:ff:fe91:9555/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:95 errors:0 dropped:0 overruns:0 frame:0
TX packets:70414 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9525 (9.5 KB) TX bytes:3686541 (3.6 MB)
And I was assigned the following ip block
Ip block 38.124.224.65/26
Subnet: 255.255.255.192
Gateway: 38.124.224.65
So when making a bridge called say br0
my currenty /etc/network/interfaces
shows
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eno1
iface eno1 inet static
address 38.124.224.67
netmask 255.255.255.192
network 38.124.224.64
broadcast 38.124.224.127
gateway 38.124.224.65
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 4.2.2.2
Would I simply add to the bottom of this file
auto br0
iface br0 inet static
address 38.124.224.65/26
netmask 255.255.255.192
broadcast 38.x.x.x
dns-nameservers 8.8.8.8
bridge_ports eno1
bridge_stp off
bridge_fd 0
bridge_maxwait 0
I'm just unsure if I have to add in each static ip or if I can set a block and it will automatically automatically assign a static to each of the kvms?
interfaces
file, you wouldn't set a block there. You would then set each VM's static address within their owninterfaces
file. – Doug Smythies May 01 '18 at 23:12interfaces
file? – nadermx May 02 '18 at 18:49