Estou tentando criar uma rede de ponte para que meus contêineres LXD possam se comunicar com minha LAN.
Até agora, consegui obter o endereço IP da LAN para o contêiner, mas ele não se comunica com a LAN e a LAN não se comunica com ele.
O cenário é:
NIC enp0s3 = external access to manage Ubuntu(HOST)
NIC enp0s8 = physical interface for bridge
Interface br0 = bridge for LXD
arquivo / etc / network / interfaces:
auto enp0s3
iface enp0s3 inet static
address 192.168.0.107
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8
auto enp0s8
iface enp0s8 inet manual
auto br0
iface br0 inet manual
bridge_ports enp0s8
bridge_stp off
bridge_fd 0
bridge_maxwait 0
ifconfig:
br0 Link encap:Ethernet HWaddr 08:00:27:1a:fe:df
inet6 addr: 2804:2140:1018:12c8:a00:27ff:fe1a:fedf/64 Scope:Global
inet6 addr: fe80::a00:27ff:fe1a:fedf/64 Scope:Link
inet6 addr: 2804:2140:1018:12c8:9c52:6063:a075:e36b/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:672 errors:0 dropped:0 overruns:0 frame:0
TX packets:291 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:470101 (470.1 KB) TX bytes:31614 (31.6 KB)
enp0s3 Link encap:Ethernet HWaddr 08:00:27:e7:45:c5
inet addr:192.168.0.107 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fee7:45c5/64 Scope:Link
inet6 addr: 2804:2140:1018:12c8:a00:27ff:fee7:45c5/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:721 errors:0 dropped:0 overruns:0 frame:0
TX packets:364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:302809 (302.8 KB) TX bytes:36979 (36.9 KB)
enp0s8 Link encap:Ethernet HWaddr 08:00:27:1a:fe:df
inet6 addr: fe80::a00:27ff:fe1a:fedf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:852 errors:0 dropped:0 overruns:0 frame:0
TX packets:339 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:515423 (515.4 KB) TX bytes:34740 (34.7 KB)
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:80 errors:0 dropped:0 overruns:0 frame:0
TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:5920 (5.9 KB) TX bytes:5920 (5.9 KB)
veth11T3WJ Link encap:Ethernet HWaddr fe:e7:09:12:05:73
inet6 addr: fe80::fce7:9ff:fe12:573/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1812 (1.8 KB) TX bytes:30303 (30.3 KB)
Contêiner com IP
root@ubuntu:/etc/network# lxc list
+---------+---------+----------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------+---------+----------------------+------+------------+-----------+
| CentOS7 | RUNNING | 192.168.0.110 (eth0) | | PERSISTENT | 0 |
+---------+---------+----------------------+------+------------+-----------+
Eu segui as etapas deste tópico:
Como configurar contêineres LXD que se comunicam pela LAN | Estouro de pilha
Alguém pode me dar uma luz sobre isso?