Multiple VLANs on Single NIC

Jan 19, 2006 4 Replies

Hi,



I am using Cisco 3570 Ethernet switch and Linex machine Red Hat



3.4.2-6.fc3. My switch is having VLAN and routing feature.It supports
802.1Q. I have a situation where Linux PC participates in two VLANs,but its having only one NIC and cable connecting to switch. How does it possible in Linux. Can one NIC have more than VLANs? I am having differnet IP ranges (subnets).

What i have tried is like this: I assigned trunking to the switch port which is connneced to Linux PC. Than i have assigned two Different IP adderss(differnet subnets) on NIC with the help of Device aliase feature. First IP adderss is



192.168.100.5 (default gateway: 192.158.100.1) and second IP adderss is
192.168.101.6 (default gateway: 192.158.101.1). Than i am tring to Ping both the addresses. IP 192.168.100.5 is pinging but the aliase IP
192.168.101.6 is not pinging. With this my exprimet to assign two IP address to one NIC failed

I would appriciate any input on this and feel lucky if it comes soon as i need this information very urgently.



Best Regards. Yash.



On 19.01.2006 14:06 yash wrote

you also have to enable vlan on your Linux box. /etc/network/interfaces could look like

auto eth0 iface eth0 inet static address 0.0.0.0

auto vlan100 iface vlan100 inet static vlan-raw-device eth0 address 192.168.100.5 netmask 255.255.255.0 network 192.168.100.0 broadcast 192.168.100.255

auto vlan101 iface vlan101 inet static vlan-raw-device eth0 address 192.168.101.6 netmask 255.255.255.0 network 192.168.101.0 broadcast 192.168.101.255

Best regards, Arnold

Hi Arnold,

Thanks for attention.

But what you suggested doesn't seem to work on my Linux box. My Linux box does'nt has /etc/network/interfaces. And I didn't get any mean to apply what you told. Can you tell me, how to do what you asked or suggest any other way? I am using PCQLinux 2005 (WhiteHope) Kernel2.6.10-1.741_FC3 on an i686.

Regards Yash

On 23.01.2006 09:57 yash wrote

I'm not familiar with PCQLinux 2005. Please look for vlan in the documentation or ask your supplier/community.

Arnold

yash wrote in part:

See if your distro has info under /usr/doc/vlan*

`vconfig` is the usual pgm, and it should show under `ifconfig`.

-- Robert

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required