LXD. Configure failover ip correctly on container
Budget: €8 – €30 EUR
So this is how i was trying
I have an additional IP address with a MAC address
> 91.xx.xx.xx - 02:xx:xx:xx:xx:xx
Next, I created a bridge with the primary IP
```
# Include files from /etc/network/interfaces.d:
# source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet manual
auto br0
iface br0 inet static
bridge_ports eno1
address 162.xx.xx.xx
gateway 162.xx.xx.xx
netmask 255.xx.xx.xx
dns-nameservers 8.8.8.8 1.1.1.1
hwaddress ether d0:xx:xx:xx:xx:xx
bridge_stp off
bridge_waitport 0
bridge_fd 0
```
Afterwards, I tried to create a container and assign additional ones there. IP so that it can be accessed externally.
I had many attempts, I tried both routed, bridged, macvlan. These are the commands I tried
```
lxc config device add test eth1 nic nictype=routed parent=br0 ipv4.address=91.xx.xx.xx
lxc config device add test eth1 nic nictype=macvlan parent=br0 hwaddr=02:xx:xx:xx:xx:xx
lxc config device add test eth1 nic nictype=bridged parent=br0 ipv4.address=91.xx.xx.xx
```
But nothing worked, the maximum result was the IP responding to the ping from the hos.
So where is my config error? How to correctly assign an IP for the container so that I can join the container not only from under the host?
I have tried also without bridge network, but still got the same issue.
I have an additional IP address with a MAC address
> 91.xx.xx.xx - 02:xx:xx:xx:xx:xx
Next, I created a bridge with the primary IP
```
# Include files from /etc/network/interfaces.d:
# source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet manual
auto br0
iface br0 inet static
bridge_ports eno1
address 162.xx.xx.xx
gateway 162.xx.xx.xx
netmask 255.xx.xx.xx
dns-nameservers 8.8.8.8 1.1.1.1
hwaddress ether d0:xx:xx:xx:xx:xx
bridge_stp off
bridge_waitport 0
bridge_fd 0
```
Afterwards, I tried to create a container and assign additional ones there. IP so that it can be accessed externally.
I had many attempts, I tried both routed, bridged, macvlan. These are the commands I tried
```
lxc config device add test eth1 nic nictype=routed parent=br0 ipv4.address=91.xx.xx.xx
lxc config device add test eth1 nic nictype=macvlan parent=br0 hwaddr=02:xx:xx:xx:xx:xx
lxc config device add test eth1 nic nictype=bridged parent=br0 ipv4.address=91.xx.xx.xx
```
But nothing worked, the maximum result was the IP responding to the ping from the hos.
So where is my config error? How to correctly assign an IP for the container so that I can join the container not only from under the host?
I have tried also without bridge network, but still got the same issue.