Atualmente eu tenho 64 endereços IP e estou tentando fazer 64 públicos voltados para vms cada com seu próprio ip dedicado.
Estou um pouco confuso ao editar o /etc/network/interfaces
como eu faria isso. Eu sei que com ubuntu 16.04 +
você tem que fazer uma ponte.
Atualmente, meu ifconfig
é o seguinte
$ 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)
E me foi atribuído o seguinte bloco ip
Ip block 38.124.224.65/26
Subnet: 255.255.255.192
Gateway: 38.124.224.65
Então, ao fazer uma ponte chamada diga br0
minha atual /etc/network/interfaces
mostra
# 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
Eu simplesmente adicionaria ao final deste arquivo
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
Não tenho certeza se tenho que adicionar em cada ip estático ou se posso definir um bloco e ele automaticamente atribuirá automaticamente uma estática a cada um dos kvms?