Have you ever tried to diagnose a VLAN related issue on a VIO server and tried to find out if a particulare VLAN tag is being seen by the VIO servers SEA adapter?
This little piece of code will be most helpful to you!!
Bring the SEA adapter up so you can see the packets it is bridging:
ifconfig en4 up
Using tcpdump and this magic piece of perl:
tcpdump -nX -i en4 vlan and ether dst 01:00:0c:cc:cc:cd | perl -ne '$t=time();$st||=$t;if (/0x0000:?\s+.(...)/) { $h=hex($1);if (!$d{$h}) {$d{$h}=1;printf STDERR "%5d VLANs: %s\n",($t-$st),join(",",sort {$a<=>$b} keys %d);}}'
You will get some output like this, which are all the VLANs you SEA adapter is bridging:
1 VLANs: 140,142,210,224,227,315,318,319,321,324
When finished, bring the SEA adapter to a detached state.
ifconfig en4 detach
