Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2012 13:30:36 +0330
From:      h bagade <bagadeh@gmail.com>
To:        Peter Jeremy <peterjeremy@acm.org>
Cc:        freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: problem with vlan interfaces tagging/untagging in a simulated switch box
Message-ID:  <CAKWOZ6Vog_uxEn8ea4Jm=RS_R0PHZ0Y9jndsFdn8OfHC5gPCNg@mail.gmail.com>
In-Reply-To: <20120305084359.GA56606@server.vk2pj.dyndns.org>
References:  <CAKWOZ6VH5Jv9kd-QuCM3oiukwTUajMAOvmGeg1uofNa4A3UXjA@mail.gmail.com> <20120305084359.GA56606@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on layer 2 switch, ports doesn't have ip addresses and traffic comming
from a vlan port is tagged and pass through trunk port. this means
that in our freebsd box which plays the role of switch, no interfaces
should have ip addresses.

In your topology the em0 which plays the role of trunk port has ip
address and also vlan interfaces under its support. if we assume that
em0 is the trunk port of our switch, and em1 the port assigned to vlan
2, which doesn't have any ip address too; then all traffic comes from
em1 should be labled vlan 2 tag and send out the em0. I want to
achieve this.
besides if anoth

On 3/5/12, Peter Jeremy <peterjeremy@acm.org> wrote:
> On 2012-Mar-04 10:01:07 +0330, h bagade <bagadeh@gmail.com> wrote:
>>I have problems with vlan interfaces on freebsd. I want to make my
>>system like a switch with vlan ports and also a trunk port in
>>conjuction with other switches. I thought that vlan interfaces would
>>help me tagging traffic when traffic is going out the trunk port(or
>>when it receives on vlan ports).
>>The problem, I've encountered is that vlan interafaces on freebsd do
>>tagging/untagging when the traffic is sourced/destined from/to them
>>which in this case they should be assigned IP addresses. In other
>>words they won't tag the traffic passing through their parent
>>interface which I need to.
>
> I am doing this with no problems so I suspect you are doing something
> wrong.  As an example, the following creates a IEEE802.1Q trunk on
> em0 with 192.168.1.0/24 untagged and the remaining subnett tagged:
>
> ifconfig em0 inet 192.168.1.123/24
> ifconfig vlan10 inet 192.168.10.123/24 vlandev em0 vlan 10
> ifconfig vlan11 inet 192.168.11.123/24 vlandev em0 vlan 11
> ifconfig vlan12 inet 192.168.12.123/24 vlandev em0 vlan 12
> ifconfig vlan13 inet 192.168.13.123/24 vlandev em0 vlan 13
>
> Can you post the rc.conf etc entries that you are using and a
> description of what you are trying to achieve.
>
> --
> Peter Jeremy
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKWOZ6Vog_uxEn8ea4Jm=RS_R0PHZ0Y9jndsFdn8OfHC5gPCNg>