LINUX.ORG.RU

История изменений

Исправление Qwentor, (текущая версия) :

Поменял на br0 как ты сказал только секцию eth0

Интернета в контейнере нет. Интерфейс eth0 в нем почему-то только ipv6
Конфиги:
/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug br0
iface br0 inet static
	address 80.87.*.*
	netmask 255.255.254.0
	network 80.87.*.*
	broadcast 80.87.*.255
	gateway 80.87.*.1
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 188.120.*.*
	dns-search deb

auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
	address 83.220.*.*

auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
	address 83.220.*.*

auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
	address 77.246.*.*


config контейнера
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node

# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.hwaddr = 00:FF:AA:00:00:01



ifconfig хоста
root@web:~# ifconfig
br0       Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:80.87.*.*  Bcast:80.87.*.255  Mask:255.255.254.0
          inet6 addr: fe80::5054:ff:fe22:8689/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:346084 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16064147 (15.3 MiB)  TX bytes:277682 (271.1 KiB)

eth0      Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39948757 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132631 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2403814388 (2.2 GiB)  TX bytes:22318804 (21.2 MiB)

eth0:1    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:83.*.168.*  Bcast:83.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:83.220.*.*  Bcast:83.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:3    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:77.246.*.*  Bcast:77.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

veth6NUTNP Link encap:Ethernet  HWaddr fe:50:6f:a6:ac:1d  
          inet6 addr: fe80::fc50:6fff:fea6:ac1d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:249490 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12860 (12.5 KiB)  TX bytes:14969556 (14.2 MiB)


ifconfig контейнера
root@node:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:ff:aa:00:00:01  
          inet6 addr: fe80::2ff:aaff:fe00:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54692 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3281652 (3.2 MB)  TX bytes:4906 (4.9 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:16436  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Как быть?

Исправление Qwentor, :

Поменял на br0 как ты сказал только секцию eth0

Интернета в контейнере нет. Интерфейс eth0 в нем почему-то только ipv6
Конфиги:
/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug br0
iface br0 inet static
	address 80.87.*.*
	netmask 255.255.254.0
	network 80.87.*.*
	broadcast 80.87.*.255
	gateway 80.87.*.1
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 188.120.*.*
	dns-search deb

auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
	address 83.220.*.*

auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
	address 83.220.*.*

auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
	address 77.246.*.*


config контейнера
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node

# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.hwaddr = 00:FF:AA:00:00:01



ifconfig хоста
root@web:~# ifconfig
br0       Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:80.87.*.*  Bcast:80.87.*.255  Mask:255.255.254.0
          inet6 addr: fe80::5054:ff:fe22:8689/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:346084 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16064147 (15.3 MiB)  TX bytes:277682 (271.1 KiB)

eth0      Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39948757 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132631 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2403814388 (2.2 GiB)  TX bytes:22318804 (21.2 MiB)

eth0:1    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:83.*.168.*  Bcast:83.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:83.220.*.*  Bcast:83.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:3    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:77.246.*.*  Bcast:77.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

veth6NUTNP Link encap:Ethernet  HWaddr fe:50:6f:a6:ac:1d  
          inet6 addr: fe80::fc50:6fff:fea6:ac1d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:249490 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12860 (12.5 KiB)  TX bytes:14969556 (14.2 MiB)


ifconfig контейнера
root@node:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:ff:aa:00:00:01  
          inet6 addr: fe80::2ff:aaff:fe00:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54692 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3281652 (3.2 MB)  TX bytes:4906 (4.9 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:16436  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Исходная версия Qwentor, :

Поменял на br0 как ты сказал только секцию eth0

Интернета в контейнере нет. Интерфейс eth0 в нем почему-то только ipv6/
Конфиги:
/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug br0
iface br0 inet static
	address 80.87.*.*
	netmask 255.255.254.0
	network 80.87.*.*
	broadcast 80.87.*.255
	gateway 80.87.*.1
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 188.120.*.*
	dns-search deb

auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
	address 83.220.*.*

auto eth0:2
allow-hotplug eth0:2
iface eth0:2 inet static
	address 83.220.*.*

auto eth0:3
allow-hotplug eth0:3
iface eth0:3 inet static
	address 77.246.*.*


config контейнера
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = /var/lib/lxc/node/rootfs
lxc.utsname = node

# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.hwaddr = 00:FF:AA:00:00:01



ifconfig хоста
root@web:~# ifconfig
br0       Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:80.87.*.*  Bcast:80.87.*.255  Mask:255.255.254.0
          inet6 addr: fe80::5054:ff:fe22:8689/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:346084 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16064147 (15.3 MiB)  TX bytes:277682 (271.1 KiB)

eth0      Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39948757 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132631 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2403814388 (2.2 GiB)  TX bytes:22318804 (21.2 MiB)

eth0:1    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:83.*.168.*  Bcast:83.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:83.220.*.*  Bcast:83.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:3    Link encap:Ethernet  HWaddr 52:54:00:22:86:89  
          inet addr:77.246.*.*  Bcast:77.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

veth6NUTNP Link encap:Ethernet  HWaddr fe:50:6f:a6:ac:1d  
          inet6 addr: fe80::fc50:6fff:fea6:ac1d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:249490 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12860 (12.5 KiB)  TX bytes:14969556 (14.2 MiB)


ifconfig контейнера
root@node:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:ff:aa:00:00:01  
          inet6 addr: fe80::2ff:aaff:fe00:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54692 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3281652 (3.2 MB)  TX bytes:4906 (4.9 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:16436  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)