netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yao zhao <yao.development@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Leonardo Uzcudun <uzcudunl@yahoo.it>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: VLAN 1 - Native
Date: Wed, 1 Feb 2012 11:25:31 -0500	[thread overview]
Message-ID: <CADDf=MRDa6C47ToCnR3_cTkfJR8VL9UAScwzwGVUDn3O4nL6fA@mail.gmail.com> (raw)
In-Reply-To: <1328108723.2595.33.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

On Wed, Feb 1, 2012 at 10:05 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mercredi 01 février 2012 à 09:57 -0500, yao zhao a écrit :
>> On Wed, Feb 1, 2012 at 9:50 AM, yao zhao <yao.development@gmail.com> wrote:
>> >
>> >
>> > On Wed, Feb 1, 2012 at 8:04 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> >>
>> >> Le mercredi 01 février 2012 à 11:24 +0000, Leonardo Uzcudun a écrit :
>> >> > ________________________________
>> >> > Da: Leonardo Uzcudun <uzcudunl@yahoo.it>
>> >> > A: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
>> >> > Inviato: Mercoledì 1 Febbraio 2012 12:22
>> >> > Oggetto: VLAN 1 - Native
>> >> >
>> >> > Hello:
>> >> >
>> >> > I'm connecting my Linux computer (debian 2.6.32-5) to a switch to
>> >> > implement vlans.
>> >> >
>> >> > All is working fine except for the VLAN 1. Of sure you are aware of
>> >> > this situation and i would like to knoe if there is any parameter or
>> >> > setting that i should set in the vlan (linux side, not switch)
>> >> > configuration. Here's my configuration:
>> >> > ip addr add 0.0.0.0 dev eth0
>> >> > ip link set eth0 up
>> >> > ip link add link eth0 name eth0.1 type vlan id 1
>> >> > ip link add link eth0 name eth0.101 type vlan id 101
>> >> > ip addr add 0.0.0.0 dev eth0.1
>> >> > ip addr add 0.0.0.0 dev eth0.101
>> >> > ip link set eth0.101 up
>> >> > ip link set eth0.1 up
>> >> > brctl addbr br_vlan_1
>> >> > brctl addbr br_vlan_101
>> >> > brctl addif br_vlan_1 eth0.1
>> >> > brctl addif br_vlan_101 eth0.101
>> >> > ip addr add 0.0.0.0 dev br_vlan_1
>> >> > ip
>> >> > addr add 0.0.0.0 dev br_vlan_101
>> >> > ip link set br_vlan_1 up
>> >> > ip link set br_vlan_101 up
>> >> >
>> >> > Traffic on vlan 101 is working fine. Traffic on VLAN 1 is not working
>> >> > cause the packets are going out from eth0 like tagged. How could i set
>> >> > the VID 1 as untagged?
>> >>
>> >> What do you mean by "sending packets for VID 1, untagged " ?
>> >>
>>  on switch like Cisco: vlan 1 is the native vlan or default vlan so it is
>>  untagged. untagged means packet has no vlan header.
>>
>> >>
>> >> What is the difference between vlan 101 and vlan 1 ?
>>
>>  No other difference. Just because it is vlan 1  which is special in
>>  switches(of course it can be changed on switch side but he doesn't want to)
>
> VID=1 is not the "known" native vlan at all, this is a vendor (stupid ?)
> extension.
>
That is true. But in IEEE standard it also said you can specify
whether a vlan can be untagged or tagged on egress.

> There is no ID reserved to untagged traffic in the 802.1Q specs, since
> by definition, if traffic is untagged, there is _no_ VLAN tag in the
> frame.
>
> Untagged traffic on linux is on eth0 itself (ingress or egress), not on
> eth0.xxx
>
If you want linux to do as a switch too, then you can have to make up
something that what ERic said, use physical interface as the vlan 1,
as it is untagged. When vlan 1 is not native vlan you have to change
back to eth0.1. and change that new native vlan to physical interface.

yao
>
>
>

  parent reply	other threads:[~2012-02-01 16:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1328095366.10975.YahooMailNeo@web29004.mail.ird.yahoo.com>
2012-02-01 11:24 ` VLAN 1 - Native Leonardo Uzcudun
2012-02-01 13:04   ` Eric Dumazet
     [not found]     ` <CADDf=MQ8EYEtOO2e5NJLrW0DKDz5xCBEBwuY6rxNu4Cybq=kKQ@mail.gmail.com>
2012-02-01 14:57       ` yao zhao
2012-02-01 15:05         ` Eric Dumazet
2012-02-01 15:14           ` Leonardo Uzcudun
2012-02-01 15:23             ` Eric Dumazet
2012-02-01 16:25           ` yao zhao [this message]
2012-02-01 16:44             ` Leonardo Uzcudun
2012-02-01 17:21               ` Eric Dumazet
2012-02-01 17:25               ` yao zhao
2012-02-01 18:14                 ` Ben Hutchings
2012-02-01 20:52                   ` yao zhao
2012-02-01 21:01                     ` Eric Dumazet
2012-02-01 22:01                       ` Leonardo Uzcudun
2012-02-01 19:26               ` Michal Soltys
2012-02-02  9:09                 ` Leonardo Uzcudun
2012-02-02  9:12                   ` Eric Dumazet
2012-02-02 12:17                     ` Michal Soltys
2012-02-02 16:33                       ` Jesse Gross
2012-02-02 12:10           ` Benny Amorsen
2012-02-02 12:53             ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADDf=MRDa6C47ToCnR3_cTkfJR8VL9UAScwzwGVUDn3O4nL6fA@mail.gmail.com' \
    --to=yao.development@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=uzcudunl@yahoo.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).