Re: vlan

From: Rocco Lucia (rlucia@iscanet.com)
Date: 02/28/01


Date: Wed, 28 Feb 2001 03:04:41 +0100
To: jeff <shupilov@technobank.com.by>, security@FreeBSD.ORG
From: Rocco Lucia <rlucia@iscanet.com>

At 10:54 +0200 27-02-2001, jeff wrote:
>hi!
>
>i'm strongly needet to set up vlan on my freebsd-box
>but unfortunately i can't find any clear instruction how to do it
>there are a lot of hearing that it is already impossible
>
>so, can anybody help me?
>
>thanks,
>
>Dmitry
>

first you should add:

pseudo-device vlan ... see LINT

to your kernel configuration.

Then you can use ifconfig to set your virtual vlan interfaces
bound to the physical one/s.

Assume you have xl0 physical interface and you want to setup 2
vlans on it (VLAN ID 1, VLAN ID 2), you configure interfaces with:

ifconfig vlan0 inet 10.0.0.1 netmask 0xffffff00 vlan 2 vlandev xl0

and

ifconfig vlan1 inet 10.0.1.1 netmask 0xffffff00 vlan 3 vlandev xl0

And you'll be set. Just remember to set up your network switch
accordingly (e.g. allowing those vlan tags on the port).

As for the link0 flag the ifconfig(8) manpage talks about, you
should set it if your card supports vlan tags on its own, so
the physical interface driver will do the thing. I think just
Alteon ti(4) driver supports it.

Have a nice 801.1Q'ing :-)

-- 
Rocco Lucia - rlucia@iscanet.com      Iscanet Internet Services
http://elisa.utopianet.net/~rlucia    System and Network Admin
C6E6 AC9A 1361 FB38 B47A  2792 9FC4 C52F 7A68 4468
Free unices for a free world. Support *BSD.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message


Relevant Pages

  • Re: vlan
    ... >>i'm strongly needet to set up vlan on my freebsd-box ... >>but unfortunately i can't find any clear instruction how to do it ... > pseudo-device vlan ... ... > Then you can use ifconfig to set your virtual vlan interfaces ...
    (FreeBSD-Security)
  • vlan
    ... i'm strongly needet to set up vlan on my freebsd-box ... but unfortunately i can't find any clear instruction how to do it ...
    (FreeBSD-Security)
  • Re: altq on vlan
    ... physical interface, ... queue vlan0_foo ... But the patch simplify the cases where you need one queue per vlan. ...
    (freebsd-net)
  • Re: altq for vlans?
    ... > gather that since tun works, so should vlan. ... If the physical interface supports ALTQ it is *always* better ... If the physical interface does not support ALTQ it ... queue default bandwidth 75% cbq ...
    (freebsd-net)
  • Re: altq on vlan
    ... physical interface, ... queue vlan0_foo ... But the patch simplify the cases where you need one queue per vlan. ...
    (freebsd-net)