I'm trying to setup multiple virtual interfaces with VLAN's on a single NIC. I'm running Debian Squeeze.
Currently this is my /etc/netowrk/interfaces
auto eth0.10
iface eth0.10 inet dhcp
This gives me a working connection, however I'm not sure how to configure several like these on a single NIC so I can use multiple external IP's.
I have tried aliasing the VLAN's like so:
iface eth0.10:1
But that was not successful and it said failed to bring up interface.
And suggestions would be greatly appreciated :)
If you are really talking about VLANs (802.1q), then this is for your
network/interfaces
:Your
eth0
can be configured just like a normal interface which is then the untagged (aka native) VLAN.I think it should be possible to use
inet dhcp
instead ofinet static
and omit the address and netmask parameters.Oh, and the
vlan
package has to be installed!Having sub-interfaces to add addition addresses to a single device really isn't something that is required, or reccommended any longer. If you want multiple addresses it is much better to simply add the address to the current interface.
If you are somehow expecting a sub-interface to allow you to use DHCP to get multiple addresses, then I have to tell you, that simply is not going to be possible.
DHCP is keyed on the MAC address of the network device. Adding another psedo interface in the software of the client isn't going to change the MAC address the server sees.