Preface:
========

Happy new year to all. :-) Had a chance to revisit this and have an update.

Pardon the length, but I figured being thorough would be more likely to be
of use to you, the maintainer, and anyone else who might stumble onto this
bug report.

Thanks,
Michael


Part 1: 
=======
Neither squeeze nor wheezy will bring up a vlan alias dev/iface such
as this if it exists like that and nothing else references it. 

auto eth0.4094
iface eth0.4094 inet manual

HOWEVER, where they differ is that squeeze will bring this interface up if 
another dev/iface refers to it. In my original post this is seen as the 
existance of the br0.4094 dev/iface results in the eth0.4094 device coming up.  

In wheezy, I've changed the interface to appear like this, and the device
comes up, and if given an IP, is actually operating on the intended VLAN.

auto eth0.4094
iface eth0.4094 inet manual
        vlan_raw_device eth0
        up ifconfig $IFACE 0.0.0.0 up
        down ifconfig $IFACE down

I consider this a bug as the behavior is changed and it silently breaks 
existing configs, however the workaround is simple enough. Ideally the
behavior from squeeze could be brought forward, but perhaps another option
is to warn if a manual iface has no up / down statements? Such warnings
could also be surpressed by a flag in /etc/defaults/networking.


Part 2: 
=======
In squeeze, br0.XXX devices are treated as their own entities. It seems like
in wheezy they are treated as aliases of the root device.

With the fix of Part 1 applied on squeeze, after boot, I have the same 5
devices in ifconfig I saw on squeeze, however, br0.4094 never receives
any packets.  TX packets increases, RX packets never does. 

brctl and vlan info look the same as they did in the initial post.

I really appreciate that the new ifupdown has the VERBOSE=yes option now,
and saw this:  (full output below, appendix 1)

run-parts: executing /etc/network/if-up.d/upstart
if test -d /sys/class/net/br0 -a ! -d /sys/class/net/br0.4094 ;     
 then ip link set up dev br0;   
          ip link add link br0 name br0.4094 type vlan id 4094;     
fi

WORKAROUND:
Since the above tests were looking for the base device and creating an alias,
I decided to try a separate br device, br1.  This worked: brctl lists two
bridges, vlan config indicates just a single device doing tagging, and
br1 interface is seeing both RX and TX traffic (assigning an IP on br1 works.)
(Appendix  2 lists the output of the ifupdown process.)

root@wheezy:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.001cc45d53d6       no              eth0
br1             8000.001cc45d53d6       no              eth0.4094
root@wheezy:~# cat /proc/net/vlan/config 
VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.4094      | 4094  | eth0
root@wheezy:~# ifconfig br1
br1       Link encap:Ethernet  HWaddr 00:1c:c4:5d:53:d6  
          inet6 addr: fe80::21c:c4ff:fe5d:53d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4042 (3.9 KiB)  TX bytes:1580 (1.5 KiB)

However, I again feel that the squeeze behavior was appropriate. We've built 
our configs such that generally speaking eth$x corresponds to br$x. So, if 
you want VLAN 100 on the primary NIC, br0.100, secondary NIC, br1.100. 
With this workaround, you'd have to do tricks like VLAN 100 is br10 for first
NIC and br100 for second NIC.


Other Notes:
============

I did notice there are some issues with the down process. For example,
when br1 goes down, it's also removing VLAN eth0.4094 though technically
eth0.4094 should be responsible for its own VLAN config.





Appendix 1: ifupdown verbose output (using br0.4094)
===================================

Configuring interface br0=br0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
run-parts: executing /etc/network/if-pre-up.d/ifenslave
run-parts: executing /etc/network/if-pre-up.d/vlan

ip addr add 10.205.16.8/255.255.248.0 broadcast 10.205.23.255     dev br0 label 
br0
ip link set dev br0   up
 ip route add default via 10.205.16.1  dev br0 

run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/ifenslave
run-parts: executing /etc/network/if-up.d/ip
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart

if test -d /sys/class/net/br0 -a ! -d /sys/class/net/br0.4094 ;     
 then ip link set up dev br0;   
          ip link add link br0 name br0.4094 type vlan id 4094;     
fi

Configuring interface br0.4094=br0.4094 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #4094 to IF -:eth0:-  error: File exists
can't add eth0.4094 to bridge br0.4094: Operation not supported
set forward delay failed: Operation not supported
set stp status failed: Operation not supported

run-parts: executing /etc/network/if-pre-up.d/ifenslave
run-parts: executing /etc/network/if-pre-up.d/vlan
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/ifenslave
run-parts: executing /etc/network/if-up.d/ip
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart
done.



Appendix 2: ifupdown verbose output (using br0.4094)
===================================

Configuring interface br0=br0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
run-parts: executing /etc/network/if-pre-up.d/ifenslave
run-parts: executing /etc/network/if-pre-up.d/vlan

ip addr add 10.205.16.8/255.255.248.0 broadcast 10.205.23.255     dev br0 label 
br0
ip link set dev br0   up
 ip route add default via 10.205.16.1  dev br0 

run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/ifenslave
run-parts: executing /etc/network/if-up.d/ip
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart

Configuring interface br1=br1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #4094 to IF -:eth0:-  error: File exists
run-parts: executing /etc/network/if-pre-up.d/ifenslave
run-parts: executing /etc/network/if-pre-up.d/vlan
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/ifenslave
run-parts: executing /etc/network/if-up.d/ip
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to