VLAN without an alias?

Felipe Alfaro Solana felipe.alfaro at gmail.com
Mon Sep 18 08:00:28 UTC 2006


> Does anyone know how to assign a vlan to a physical NIC, without using a
> virtual/aliased network interface?

I'm not sure if I understand you.

AFAIK, I use vconfig to configure all the VLAN IDs the NIC should
listen to. The traffic that gets to the physical NIC depends on the
configuration of both the NIC and the switch. For example, if the
switch is configured in trunking/VLAN mode, your physical NIC will
receive either of the following traffic:

- Untagged traffic. Traffic in the switch's native VLAN will remain
untagged. Most switches default to VLAN 1 being the native VLAN, so
any traffic in VLAN 1 is usually sent untagged.

- Tagged traffic. Usually you will use 802.1q tagging since it's
supported by nearly all vendors. If the traffic does not belong to the
native VLAN, it will get tagged and sent to your physical NIC.

If you only intend to process untagged/native VLAN traffic, you don't
need to do anything. Simply listen to eth0 and the kernel will discard
any tagged frames (note that, however, the kernel discards tagged
frames but you can still see them using tcpdump or any tap tool).

If you intend to process tagged VLAN traffic, you use vconfig to
configure subinterfaces of the physical interface. Each of this
subinterfaces receive traffic tagged with a specific VLAN ID.

So, I don't know how to assign/process traffic for a specific VLAN
without using subinterfaces (that is, using vconfig). Why do you want
to assign VLAN traffic to a physical interface instead of using
subinterfaces?




More information about the ubuntu-users mailing list