vvoice2:~# vzctl set 111 --netif_add eth1,,,,vmbr1 --save
Container does not have configured veth: eth1, skipped
Configure veth devices: veth111.1
Saved parameters for CT 111
root@steakhouse:~# ifconfig
eth0 ---Removed for forum ----
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:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2440 (2.4 KB) TX bytes:2440 (2.4 KB)
root@steakhouse:~# sudo ifconfig eth1 10.10.30.201/24 up
root@steakhouse:~# ifconfig
eth0 ---Removed for forum ----
eth1 Link encap:Ethernet HWaddr 00:18:51:72:27:5a
inet addr:10.10.30.201 Bcast:10.10.30.255 Mask:255.255.255.0
inet6 addr: fe80::218:51ff:fe72:275a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2440 (2.4 KB) TX bytes:2440 (2.4 KB)
root@steakhouse:~# ping 10.10.30.10
PING 10.10.30.10 (10.10.30.10) 56(84) bytes of data.
^C
--- 10.10.30.10 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
root@steakhouse:~# ping 10.10.30.13
PING 10.10.30.13 (10.10.30.13) 56(84) bytes of data.
^C
--- 10.10.30.13 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
root@steakhouse:~# arp -a
? (10.10.30.10) at <incomplete> on eth1
? (10.10.30.13) at <incomplete> on eth1
root@steakhouse:~#
This does not seem to work till after vzctl restart 111. Am I missing sometihng.
AFAIK hotplug only work with venet, but not with veth
root@smallhosting:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
brctl addbr br0
auto br0
iface br0 inet static
bridge_ports eth1
address 89.42.231.180
broadcast 89.42.231.255
netmask 255.255.255.0
gateway 89.42.231.1
VE_ROOT="/storage/vz/root/$VEID"
VE_PRIVATE="/storage/vz/private/$VEID"
OSTEMPLATE="debian-6.0-i386-minimal"
ORIGIN_SAMPLE="basic"
HOSTNAME="test.smallhosting.ro"
NAMESERVER="193.231.169.2"
SEARCHDOMAIN="smallhosting.ro"
VETH_IP_ADDRESS="89.42.231.113"
NETIF="ifname=eth1.113,mac=00:02:04:06:08:02,host_ifname=veth113.0,host_mac=00:19:99:c4:66:87"
brctl addbr br0
auto br0
iface br0 inet static
bridge_ports eth1
address 89.42.231.180
broadcast 89.42.231.255
netmask 255.255.255.0
gateway 89.42.231.1
auto eth1.113
iface eth1.113 inet static
address 89.42.231.113
netmask 255.255.255.0
#gateway 192.168.110.254
#network 192.168.110.0
broadcast 89.42.231.255
vlan_raw_device eth1
auto eth1.124
iface eth1.124 inet static
address 89.42.231.124
netmask 255.255.255.0
#gateway 192.168.110.254
#network 192.168.110.0
broadcast 89.42.231.255
vlan_raw_device eth1
VE_ROOT="/storage/vz/root/$VEID"
VE_PRIVATE="/storage/vz/private/$VEID"
OSTEMPLATE="debian-6.0-i386-minimal"
ORIGIN_SAMPLE="basic"
HOSTNAME="test.smallhosting.ro"
NAMESERVER="193.231.169.2"
SEARCHDOMAIN="smallhosting.ro"
VETH_IP_ADDRESS="89.42.231.113/24;89.42.231.124/24"
#BRIDGEDEV="br0"
NETIF="ifname=eth1.113,mac=00:02:04:06:08:02,host_ifname=veth113.0,host_mac=00:19:99:c4:66:87;ifname=eth1.124,mac=00:02:04:06:08:04,host_ifname=veth113.1,host_mac=00:19:99:c4:66:87"
root@smallhosting:~# /etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...Removed VLAN -:eth1.113:-
Waiting for br0 to get ready (MAXWAIT is 32 seconds).
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 113 to IF -:eth1:-
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 124 to IF -:eth1:-
done.
root@smallhosting:~# ifconfig
br0 Link encap:Ethernet HWaddr 00:19:99:c4:66:87
inet addr:89.42.231.180 Bcast:89.42.231.255 Mask:255.255.255.0
inet6 addr: fe80::219:99ff:fec4:6687/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2325 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:184371 (180.0 KiB) TX bytes:5912 (5.7 KiB)
eth1 Link encap:Ethernet HWaddr 00:19:99:c4:66:87
inet6 addr: fe80::219:99ff:fec4:6687/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:121742 errors:0 dropped:0 overruns:0 frame:0
TX packets:4798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11519797 (10.9 MiB) TX bytes:518455 (506.3 KiB)
Interrupt:18 Memory:fe600000-fe620000
eth1.113 Link encap:Ethernet HWaddr 00:19:99:c4:66:87
inet addr:89.42.231.113 Bcast:89.42.231.255 Mask:255.255.255.0
inet6 addr: fe80::219:99ff:fec4:6687/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
eth1.124 Link encap:Ethernet HWaddr 00:19:99:c4:66:87
inet addr:89.42.231.124 Bcast:89.42.231.255 Mask:255.255.255.0
inet6 addr: fe80::219:99ff:fec4:6687/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
root@smallhosting:~# vzctl start 113
Restarting container
Starting container ...
Container is mounted
Setting CPU units: 1000
Set hostname: test.smallhosting.ro
File resolv.conf was modified
Configure veth devices: veth113.0 veth113.1
ifname=
host_ifname=
Initializing interface veth113.0 for VE113.
Adding interface veth113.0 to the bridge br0.
Adding an IP 89.42.231.113/24 to the eth1.113 for VE113.
Adding a route from VE0 to VE113.
RTNETLINK answers: File exists
ifname=
host_ifname=
Initializing interface veth113.1 for VE113.
SIOCSIFADDR: No such device
veth113.1: ERROR while getting interface flags: No such device
Adding interface veth113.1 to the bridge br0.
interface veth113.1 does not exist!
Cannot find device "eth1.124"
Adding an IP 89.42.231.124/24 to the eth1.124 for VE113.
Cannot find device "eth1.124"
Adding a route from VE0 to VE113.
ifname=
host_ifname=
Initializing interface veth113.0 for VE113.
Adding interface veth113.0 to the bridge br0.
device veth113.0 is already a member of a bridge; can't enslave it to bridge br0.
Adding an IP 89.42.231.113/24 to the eth1.113 for VE113.
RTNETLINK answers: File exists
Adding a route from VE0 to VE113.
RTNETLINK answers: File exists
ifname=
host_ifname=
Initializing interface veth113.1 for VE113.
Adding interface veth113.1 to the bridge br0.
Adding an IP 89.42.231.124/24 to the eth1.124 for VE113.
Adding a route from VE0 to VE113.
RTNETLINK answers: File exists
Container start in progress...
eth1.113 Link encap:Ethernet HWaddr 00:02:04:06:08:02
inet addr:89.42.231.113 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::202:4ff:fe06:802/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1393 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:103134 (100.7 KiB) TX bytes:600 (600.0 B)
eth1.124 Link encap:Ethernet HWaddr 00:02:04:06:08:04
inet addr:89.42.231.124 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::202:4ff:fe06:804/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1386 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:102147 (99.7 KiB) TX bytes:600 (600.0 B)
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)
root@test:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
89.42.231.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth1.113
89.42.231.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.113
89.42.231.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.124
0.0.0.0 89.42.231.1 0.0.0.0 UG 0 0 0 eth1.113
root@test:/# ping 89.42.231.1
PING 89.42.231.1 (89.42.231.1) 56(84) bytes of data.
--- 89.42.231.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
root@test:/# ping 89.42.231.1
PING 89.42.231.1 (89.42.231.1) 56(84) bytes of data.
--- 89.42.231.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms
89.42.231.124 0.0.0.0 255.255.255.255 UH 0 0 0 br0
89.42.231.113 0.0.0.0 255.255.255.255 UH 0 0 0 br0
89.42.231.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
89.42.231.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.113
89.42.231.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.124
0.0.0.0 89.42.231.1 0.0.0.0 UG 0 0 0 br0
root@smallhosting:~# ping 89.42.231.113
PING 89.42.231.113 (89.42.231.113) 56(84) bytes of data.
64 bytes from 89.42.231.113: icmp_req=1 ttl=64 time=0.020 ms
64 bytes from 89.42.231.113: icmp_req=2 ttl=64 time=0.033 ms
64 bytes from 89.42.231.113: icmp_req=3 ttl=64 time=0.028 ms
^C
--- 89.42.231.113 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.020/0.027/0.033/0.005 ms
root@smallhosting:~# ping 89.42.231.124
PING 89.42.231.124 (89.42.231.124) 56(84) bytes of data.
64 bytes from 89.42.231.124: icmp_req=1 ttl=64 time=0.020 ms
64 bytes from 89.42.231.124: icmp_req=2 ttl=64 time=0.025 ms
64 bytes from 89.42.231.124: icmp_req=3 ttl=64 time=0.024 ms
^C
--- 89.42.231.124 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.020/0.023/0.025/0.002 ms
We use essential cookies to make this site work, and optional cookies to enhance your experience.