OpenVZ Forum


Home » General » Support » *SOLVED* bridged virtual ethernets netif_add, veth_add
*SOLVED* bridged virtual ethernets netif_add, veth_add [message #10925] Wed, 07 March 2007 14:26 Go to next message
pjspjs is currently offline  pjspjs
Messages: 2
Registered: March 2007
Junior Member
I can do something like:

vzctl set 101 --veth_add veth201.0,01:23:45:67:89:0A,eth2,01:23:45:67:89:0B --save

followed by brctl addbr br0
and then brctl addif br0 veth201.0

and this works,

but using the "preferred --netif_add", this creates a device which is not capable of joining a bridge.

any ideas, my concern is that --veth_add is "old style" and may disappear in the future?

[Updated on: Tue, 13 March 2007 07:46] by Moderator

Report message to a moderator

Re: bridged virtual ethernets netif_add, veth_add [message #10928 is a reply to message #10925] Wed, 07 March 2007 15:04 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Quote:

but using the "preferred --netif_add", this creates a device which is not capable of joining a bridge.

That is not right, "--netif_add" and "--veth_add" are equal from point of view of resulted veth device. Why you have decided that you are not able to join veth device to bridge?


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: bridged virtual ethernets netif_add, veth_add [message #10929 is a reply to message #10925] Wed, 07 March 2007 15:22 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

the syntax of --netif_add differs to --veth_add

--netif_add ifname[,mac,host_ifname,host_mac]

ifname is the ethernet device name in the VE,
mac is its MAC address,
host_ifname is the ethernet device name on the host (VE0)
host_mac is its MAC address

as example:

vzctl set 101 --veth_add veth201.0,01:23:45:67:89:0A,eth2,01:23:45:67:89:0B

is same like:

vzctl set 101 --netif_add eth2,01:23:45:67:89:0B,veth201.0,01:23:45:67:89:0A
Re: bridged virtual ethernets netif_add, veth_add [message #10935 is a reply to message #10925] Wed, 07 March 2007 21:44 Go to previous messageGo to next message
pjspjs is currently offline  pjspjs
Messages: 2
Registered: March 2007
Junior Member
Here is a commandline which illustrates my issues. I have no issue with the --veth_add form....

[root@lt1 htdocs]# brctl addbr br122
[root@lt1 htdocs]# vzctl set 1001 --netif_add eth0,02:23:01:22:10:01,veth122.1001,01:23:01:22:10:01 --save
Configure veth devices: veth122.1001
Saved parameters for VE 1001
[root@lt1 htdocs]# brctl addif br122 veth122.1001
can't add veth122.1001 to bridge br122: Invalid argument
[root@lt1 htdocs]# ifconfig -a
ath0 Link encap:Ethernet HWaddr 00:30:95:FE:21:F8
inet addr:192.168.1.6 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::230:95ff:fefe:21f8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2237 errors:0 dropped:0 overruns:0 frame:0
TX packets:712 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:770894 (752.8 KiB) TX bytes:145876 (142.4 KiB)

br122 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 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)

eth0 Link encap:Ethernet HWaddr 00:90:F5:38:0B:2C
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:21 Base address:0xc800

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:1543 errors:0 dropped:0 overruns:0 frame:0
TX packets:1543 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2778708 (2.6 MiB) TX bytes:2778708 (2.6 MiB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 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)

veth122.1001 Link encap:Ethernet HWaddr 01:23:01:22:10:01
inet6 addr: fe80::323:1ff:fe22:1001/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:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

wifi0 Link encap:UNSPEC HWaddr 00-30-95-FE-21-F8-C8-90-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22199 errors:0 dropped:0 overruns:0 frame:5518
TX packets:1421 errors:1 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:2322006 (2.2 MiB) TX bytes:200266 (195.5 KiB)
Interrupt:19 Memory:e0960000-e0970000

[root@lt1 htdocs]# brctl delif br122 veth122.1001
device veth122.1001 is not a slave of br122
[root@lt1 htdocs]# brctl show br122
bridge name bridge id STP enabled interfaces
br122 8000.000000000000 no
[root@lt1 htdocs]# brctl delbr br122
[root@lt1 htdocs]# vzctl set 1001 --netif_del eth0
Deleting veth devices: veth122.1001

Message from syslogd@lt1 at Wed Mar 7 21:29:17 2007 ...
lt1 kernel: unregister_netdevice: waiting for veth122.1001 to become free. Usage count = 2

Message from syslogd@lt1 at Wed Mar 7 21:29:58 2007 ...
lt1 last message repeated 4 times
Re: bridged virtual ethernets netif_add, veth_add [message #10937 is a reply to message #10935] Wed, 07 March 2007 23:02 Go to previous message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

> [root@lt1 htdocs]# brctl addbr br122
> [root@lt1 htdocs]# vzctl set 1001 --netif_add eth0,02:23:01:22:10:01,veth122.1001,01:23:01:22:10:01 --save

After rereading your last post, i catch it, you can't use a MAC ADDRESS with x1:xx:xx:xx:xx:xx (mac of veth122.1001).
Please read Andrey Mirkin post, why not at http://forum.openvz.org/index.php?t=tree&th=1132&mid =6391&&rev=&reveal=
Previous Topic: Package Group Installation.
Next Topic: *SOLVED* veth problem - unable to create
Goto Forum:
  


Current Time: Wed Aug 14 06:27:28 GMT 2024

Total time taken to generate the page: 0.02923 seconds