vlan without ip address

Juli Mallett jmallett at FreeBSD.org
Sat Dec 31 22:31:11 UTC 2011


On Sat, Dec 31, 2011 at 03:26, saeedeh motlagh
<saeedeh.motlagh at gmail.com> wrote:
> thank you guys for your answers but my problem is not solved yet:((
>
> the thing is, i wanna have something like this:
> a freebsd box which acts like switch (for example cisco 2960). i want to
> define vlanX on one interface (without any ip address) and it tags any
> passing packets through that interface as vlanX (any passing packet will
> have vlanX ID).

Did you see my previous message about VLAN interfaces in FreeBSD not
being like the VLANs one can define in a switch?  You do not need the
interface to add any tag to incoming packets, if that is what you are
saying.  Have you tried just bridging the interfaces without VLANs to
see if that does what you want?

You may also be adding the VLAN in the wrong place.  If you create an
interface em0.4, which is tagged VLAN 4 on em0, then any incoming
packet on em0 which has a VLAN tag of 4 will appear on em0.4.  If you
send any packets on em0.4, then they will be sent out em0 with a VLAN
tag of for VLAN 4 added.  Is that what you want?

It may be helpful for you to draw us a diagram.  Use specific
examples.  Show an incoming packet.  Does it have a VLAN tag?  If so,
what is the VLAN number?  What is the name of the physical interface
on which it arrives?  Do you want that VLAN tag to be removed?  Do you
want another VLAN tag to be added?  Do you want it bridged to another
interface?  If so, which interface?  When it comes out that other
interface, should it have a VLAN tag?  If so, with what VLAN number?

You've mentioned that you're using bridging, then you say you want
switching, then you give a specific example of a switch you want
FreeBSD to act like.  FreeBSD will not act like that switch.  You may
be able to accomplish the same thing, but the performance,
configuration and operation will be different.  If you want FreeBSD to
act exactly like a Cisco switch with a few lines in rc.conf, then you
should probably stop now, FreeBSD is the wrong tool for the job.

If, however, you can be very specific about what it is you want to do,
instead of just repeating the same things about switches and VLANs,
then we might be able to help you do it with FreeBSD.  We'd all very
much like to, but what you're trying to do is not clear.  Forget all
about what the VLAN interfaces are named, forget all about IP
addresses, and tell us what you want to do.

Thanks,
Juli.


More information about the freebsd-net mailing list