[VLAN] How do I apply a VLAN id to all packets in a certain interface?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thanks for the response.

I'll try to explain my situation a bit better.

I have a LinkSys wireless router running linux (BusyBox v1.1.0) and there is
an option where I can create multiple wireless ssids.
Each wireless ssid comes up as a separate interface. eg wl0.1 wl0.2 etc.  I
had a look in /proc/net/vlan/ but the wireless interfaces weren't vlans.

I want to be able to tag all packets in interface wl0.2 with say VLAN id 18,
so that we the packets from the wireless router get sent to my other router
which controls the internet I can do firewall rules based on the vlan.

What I'm trying to achive is to have 2 wireless networks running, but one of
the wireless networks is not allowed to access the internal network only the
internet.  So I figured if I could place a VLAN id on the wireless ssid that
I don't want to access the internal network I create an ip tables rule to
prevent packets from the particular wireless interface from access the
internal network.

So on the wireless router can I do this?
vconfig wl0.2 18

and on the other router (eth1 is connected to the wireless router)
vconfig eth1 18

And then create iptables rules on the other router by using eth1.18interface?

Will the packets coming in on the wl0.2 interface be automatically tagged
with vlan id 18?  Or is vlan ids set only by hardware?  Or some other
method?

I hope that made sense.

Thanks,

-Joel

On 8/2/06, Peter Stuge <stuge-vlan@xxxxxxx> wrote:
>
> On Tue, Aug 01, 2006 at 01:59:31PM +1000, Joel Pearson wrote:
> > Is it possible to apply a certain VLAN id to all packets in a
> > certain interface?
> >
> > Does vconfig apply VLAN ids to packets?  Or does it just filter
> > packets that already have been tagged with a vlan id into the
> > various vlan interfaces?
>
> vconfig is used to tell the kernel VLAN driver to create, drop or
> configure VLAN interfaces.
>
> VLAN interfaces are always "children" of another (often physical or
> bridge) interface. E.g. eth0.4 is a VLAN interface for VLAN 4 on
> eth0.
>
> Packets coming in on eth0.4 is VLAN 4 traffic coming in on eth0, but
> with the tag stripped.
>
> Packets going out on eth0.4 will be tagged with VLAN 4 and then sent
> out on eth0.
>
>
> //Peter
> _______________________________________________
> Vlan mailing list
> Vlan@xxxxxxxxxxxxxxx
> http://www.candelatech.com/mailman/listinfo/vlan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns2.lanforge.com/pipermail/vlan/attachments/20060801/8d32b353/attachment.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux