Ethernet LAN Multiple VLANs on Single NIC

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Multiple VLANs on Single NIC yash 01-19-06
Posted by yash on January 19, 2006, 8:06 am
Please log in for more thread options


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.


Posted by Arnold Nipper on January 19, 2006, 8:25 am
Please log in for more thread options


On 19.01.2006 14:06 yash wrote

> 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.
>

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
--
Arnold Nipper, AN45

Posted by yash on January 23, 2006, 3:57 am
Please log in for more thread options


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


Posted by Arnold Nipper on January 23, 2006, 4:46 am
Please log in for more thread options


On 23.01.2006 09:57 yash wrote

> 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.
>

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



Arnold
--
Arnold Nipper, AN45

Posted by Robert Redelmeier on January 23, 2006, 9:28 am
Please log in for more thread options


> 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.

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

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

-- Robert




Similar ThreadsPosted
Multiple VLANs on Single NIC January 19, 2006, 8:06 am
multiple vlans at a single port June 23, 2008, 1:13 am
Multiple PHYs to a single MAC April 11, 2007, 10:30 am
multiple DSL lines for single infrastructure March 17, 2005, 12:19 am
Security of multiple VLANs and WiFi March 3, 2005, 5:53 pm
Ethernet over single UTP April 19, 2005, 4:32 pm
1000BaseSX and Single Mode Fibre April 8, 2005, 12:15 pm
Ordered 5 single board computer ref. design, all are same MAC addr, what to do? February 14, 2006, 11:24 pm
Complete hangup of network caused by single device September 8, 2006, 5:01 am
802.3ad and multiple mac addresses June 4, 2007, 2:25 pm
Why multiple filtering databases in 802.1q? December 16, 2004, 3:23 pm
Multiple T1 transmissions on Cat5E August 8, 2005, 9:45 am
Systems can be 1-3 kms apart; 1 or multiple LANs? April 2, 2007, 7:16 am
multiple MACs on a port April 27, 2007, 7:53 am
multiple connections between 2 switches October 30, 2007, 5:45 am