Answer the question
In order to leave comments, you need to log in
How to properly configure network in ubuntu with bridge and multiple ip?
Hello!
Let's say there are three white sp 115.162.91.174; 115.162.91.165; 115.162.91.167
One eth0 network card on the server
Raised LXC, manually created bridge, virtual network 10.0.2.x, nat registered, everything works.
When the server starts, the standard appears:
waiting for network configuration
waiting an additional 60 seconds for network configuration
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 115.162.91.174
netmask 255.255.255.240
gateway 115.162.91.161
network 115.162.91.160
broadcast 115.162.91.175
dns-nameservers 8.8.8.8 8.8.4.4
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto br0:1
iface br0:1 inet static
address 115.162.91.165
netmask 255.255.255.240
auto br0:2
iface br0:2 inet static
address 115.162.91.167
netmask 255.255.255.240
auto lxc-br-nat
iface lxc-br-nat inet static
address 10.0.2.1
netmask 255.255.255.0
gateway 10.0.2.1
network 10.0.2.0
broadcast 10.0.2.255
dns-nameservers 8.8.8.8 8.8.4.4
bridge_ports eth0
bridge_stp off
bridge_fd 0
Answer the question
In order to leave comments, you need to log in
Correct configuration:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 115.162.91.174
netmask 255.255.255.240
gateway 115.162.91.161
network 115.162.91.160
broadcast 115.162.91.175
dns-nameservers 8.8.8.8 8.8.4.4
auto eth0:1
iface eth0:1 inet static
address 115.162.91.165
netmask 255.255.255.240
auto eth0:2
iface eth0:2 inet static
address 115.162.91.167
netmask 255.255.255.240
auto lxc-br-nat
iface lxc-br-nat inet static
address 10.0.2.1
netmask 255.255.255.0
network 10.0.2.0
broadcast 10.0.2.255
dns-nameservers 8.8.8.8 8.8.4.4
pre-up brctl addbr lxc-br-nat
post-down brctl delbr lxc-br-nat
bridge_stp off
bridge_fd 0
And so:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
auto lxc-br-nat
iface lxc-br-nat inet static
address 10.0.2.1
netmask 255.255.255.0
auto br0
iface br0 inet static
address 115.162.91.174
netmask 255.255.255.240
gateway 115.162.91.161
dns-nameservers 8.8.8.8 8.8.4.4
bridge_ports eth0 lxc-br-nat
bridge_stp off
bridge_fd 0
auto br0:1
iface br0:1 inet static
address 115.162.91.165
netmask 255.255.255.240
auto br0:2
iface br0:2 inet static
address 115.162.91.167
netmask 255.255.255.240
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question