[pve-devel] new bridge code doesn't work with redhat kernel
Alexandre DERUMIER
aderumier at odiso.com
Wed Feb 6 09:47:38 CET 2013
Hi,
I'm testing the new bridge code, and it doesn't work for me !
setup: bridge vmbr1, on top of bond0
guest vm (id 115) have an interface in vlan95
host kernel 2.6.32-18-pve
But it's working fine with 3.7 kernel
Also I notice than we update the pve-common code, the old tagged network interface remain in bridge,
I don't known if it's can do network loop. (bond0.95 and vmbr1.95 in same bridge in my example)
old
--------------
#brctl show
vmbr1 8000.001aa03c98c5 no bond0
vmbr1v95 8000.001aa03c98c5 no bond0.95
tap115i0
update to last pve-common, restart the vm
-------------------------------------------
#qm stop 115
#qm start 115
#brctl show
vmbr1 8000.001aa03c98c5 no bond0
vmbr1v95 8000.001aa03c98c5 no bond0.95 -->old bond0.95 always attached (don't known if it can cause network loop ?)
tap115i0
vmbr1.95
(I have also restart the server to have a clean bridge, doesn't work too)
----- Mail original -----
De: "Stefan Priebe" <s.priebe at profihost.ag>
À: "Dietmar Maurer" <dietmar at proxmox.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Lundi 28 Janvier 2013 17:45:27
Objet: Re: [pve-devel] [PATCH] pve-common: PVE/Network: rework of activate_bridge_vlan
Thanks!
Am 28.01.2013 12:00, schrieb Dietmar Maurer:
> applied, thanks!
>
>> -----Original Message-----
>> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
>> bounces at pve.proxmox.com] On Behalf Of Stefan Priebe
>> Sent: Freitag, 25. Jänner 2013 22:16
>> To: pve-devel at pve.proxmox.com
>> Subject: [pve-devel] [PATCH] pve-common: PVE/Network: rework of
>> activate_bridge_vlan
>>
>> - use ip command instead of old vconfig
>> - activate gvrp by default (it doesn't harm if the switch does not support it or
>> it is disabled)
>> - use bridge instead of raw ethernet device as vlan bridge
>>
>> Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
>> ---
>> data/PVE/Network.pm | 22 ++++------------------
>> 1 file changed, 4 insertions(+), 18 deletions(-)
>>
>> diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm index
>> 2c356eb..71045fe 100644
>> --- a/data/PVE/Network.pm
>> +++ b/data/PVE/Network.pm
>> @@ -72,28 +72,14 @@ sub activate_bridge_vlan {
>> die "got strange vlan tag '$tag_param'\n" if $tag < 1 || $tag > 4094;
>>
>> my $bridgevlan = "${bridge}v$tag";
>> -
>> - my $dir = "/sys/class/net/$bridge/brif";
>> -
>> - #check if we have an only one ethX or bondX interface in the bridge
>> -
>> - my $iface;
>> - PVE::Tools::dir_glob_foreach($dir, '((eth|bond)\d+)', sub {
>> - my ($slave) = @_;
>> -
>> - die "more then one physical interfaces on bridge '$bridge'\n" if
>> $iface;
>> - $iface = $slave;
>> -
>> - });
>> -
>> - die "no physical interface on bridge '$bridge'\n" if !$iface;
>> -
>> + my $iface = $bridge;
>> my $ifacevlan = "${iface}.$tag";
>> + my $vlanflags = "reorder_hdr on gvrp on";
>>
>> # create vlan on $iface is not already exist
>> if (! -d "/sys/class/net/$ifacevlan") {
>> - system("/sbin/vconfig add $iface $tag") == 0 ||
>> - die "can't add vlan tag $tag to interface $iface\n";
>> + system("/sbin/ip link add link $iface name $ifacevlan type vlan id $tag
>> $vlanflags") == 0 ||
>> + die "can't add vlan tag $tag to interface $iface\n";
>> }
>>
>> # be sure to have the $ifacevlan up
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel at pve.proxmox.com
>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list