Subject: Re: Xen & VLANs
To: Sebastian <maillist@endfertig.de>
From: Marcin Michal Jessa <lists@yazzy.org>
List: port-xen
Date: 05/02/2007 23:29:08
--Apple-Mail-1-118169387
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On May 2, 2007, at 10:30 AM, Sebastian wrote:

> Hi,
>
> ich want to bridge different VLANs to some virtual DomUs. I wired the
> Dom0 with a VLAN Trunk and I can create VLAN interfaces in the Dom0.
>
> But I can't add these VLAN interfaces to the bridges connected to the
> DomUs. I get a "brconfig: add vlan100: Invalid argument" error. I  
> seems
> not possible to add VLAN interfaces to bridges.
>
> Has anybody a hint how to solve this problem?

Works fine here:
# brconfig -a
bridge0: flags=41<UP,RUNNING>
         Configuration:
                 priority 32768 hellotime 2 fwddelay 15 maxage 20
                 ipfilter disabled flags 0x0
         Interfaces:
                 xvif18.0 flags=3<LEARNING,DISCOVER>
                         port 11 priority 128
                 xvif3.0 flags=3<LEARNING,DISCOVER>
                         port 10 priority 128
                 xvif2.0 flags=3<LEARNING,DISCOVER>
                         port 9 priority 128
                 vlan0 flags=3<LEARNING,DISCOVER>
                         port 5 priority 128

/etc/rc.conf has defined:
auto_ifconfig=NO                                # config all avail.  
interfaces
net_interfaces="re0 wm0 vlan0 bridge0 carp0"    # used only if above  
is NO

And
/etc/ifconfig.bridge0 :

create
!brconfig $int add vlan0
up


Then I define my interfaces in the configs of DOMUs like that:
vif = [ 'mac=aa:00:00:00:01:f0, bridge=bridge0' ]



Marcin Michal Jessa
http://www.wifibsd.org/
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115), 
10);'


--Apple-Mail-1-118169387
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><BR><DIV><DIV>On May 2, 2007, at =
10:30 AM, Sebastian wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Hi,</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">ich want to bridge different =
VLANs to some virtual DomUs. I wired the</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Dom0 =
with a VLAN Trunk and I can create VLAN interfaces in the =
Dom0.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">But I can't add these VLAN interfaces to the bridges =
connected to the</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">DomUs. I get a "brconfig: add =
vlan100: Invalid argument" error. I seems</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">not =
possible to add VLAN interfaces to bridges.</DIV><DIV style=3D"margin-top:=
 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Has anybody a =
hint how to solve this problem?</DIV></BLOCKQUOTE><BR>Works fine =
here:</DIV><DIV># brconfig -a</DIV><DIV>bridge0: =
flags=3D41&lt;UP,RUNNING&gt;</DIV><DIV>=A0 =A0 =A0 =A0 =
Configuration:</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 priority 32768 =
hellotime 2 fwddelay 15 maxage 20</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 ipfilter disabled flags 0x0</DIV><DIV>=A0 =A0 =A0 =A0 =
Interfaces:</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xvif18.0 =
flags=3D3&lt;LEARNING,DISCOVER&gt;</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 port 11 priority 128</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 xvif3.0 flags=3D3&lt;LEARNING,DISCOVER&gt;</DIV><DIV>=A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 port 10 priority 128</DIV><DIV>=A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 xvif2.0 =
flags=3D3&lt;LEARNING,DISCOVER&gt;</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 port 9 priority 128</DIV><DIV>=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 vlan0 flags=3D3&lt;LEARNING,DISCOVER&gt;</DIV><DIV>=A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 port 5 priority =
128</DIV><DIV><BLOCKQUOTE type=3D"cite"></BLOCKQUOTE></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>/etc/rc.conf has =
defined:</DIV><DIV>auto_ifconfig=3DNO=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 # config all avail. =
interfaces</DIV><DIV>net_interfaces=3D"re0 wm0 vlan0 bridge0 carp0"=A0 =A0=
 # used only if above is NO</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>And=A0</DIV><DIV>/etc/ifconfi=
g.bridge0 :=A0</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>create</DIV><DIV>!brconfig =
$int add vlan0</DIV><DIV>up</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV>Then I define my interfaces in =
the configs of DOMUs like that:<DIV>vif =3D [ 'mac=3Daa:00:00:00:01:f0, =
bridge=3Dbridge0' ]<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BR><DIV> <SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Marcin Michal =
Jessa</DIV><DIV><A =
href=3D"http://www.wifibsd.org">http://www.wifibsd.org</A>/</DIV>perl -e =
'print $i=3Dpack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'<BR =
class=3D"Apple-interchange-newline"></SPAN></SPAN></SPAN> =
</DIV><BR></DIV></DIV></BODY></HTML>=

--Apple-Mail-1-118169387--