[clug] Debian: VLAN/802.11Q in /etc/network/interfaces?

Jeremy Kerr jk at ozlabs.org
Thu Aug 5 00:00:19 MDT 2010


Alex,

> But how do I specify a VLAN?
> 
> In the shell, I have to do stuff like:
> 
>   [root at here]# vconfig add eth0 123
>   [root at here]# ifconfig eth0.123 10.4.4.1 netmask 255.255.255.0
> 
> Is there a way I can specify this in /etc/ somewhere so the machine will come up with the same interfaces when it reboots?

>From the Debian Network Configuration wiki page[1]:

auto eth0.222
iface eth0.222 inet static
        address 10.10.10.1
        netmask 255.255.255.0
        network 10.10.10.0
        broadcast 10.10.10.255
        vlan_raw_device eth0

I *assume* you'll need to have only vlans on eth0; mixing your direct
interface with vlans on eth0 could get you into trouble.

Cheers,


Jeremy

[1]: http://wiki.debian.org/NetworkConfiguration



More information about the linux mailing list