Multiple VLANs on Single NIC

Discussion in 'Cisco' started by yash, Jan 19, 2006.

  1. yash

    yash Guest

    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 (default gateway: and second IP adderss is (default gateway: Than i am tring to Ping
    both the addresses. IP is pinging but the aliase IP 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, Jan 19, 2006
    1. Advertisements

  2. yash

    helpdesk Guest


    rather than 802.1Q trunking, you could configure the port on the switch
    as a routed port, and then assign a secondary address for the second
    subnet. The configuration of the switchport would look like this:

    interface FastEthernet0/1
    no switchport
    ip address
    ip address secondary

    This way, both IP addresses configured on your LINUX machine could
    communicate with each other.

    We've got answers !
    helpdesk, Jan 19, 2006
    1. Advertisements

  3. sure it will fail - you need to be able to "read" and understand tagged
    frames on your NIC.
    So if you have set the encapsulation to dot1q on your trunkport of the
    switch, then the NIC driver must be able to understand this.
    otherwise the native VLAN will work, as packets are not tagged on native

    Martin Bilgrav
    Martin Bilgrav, Jan 19, 2006
  4. yash

    Kevin Widner Guest

  5. yash

    yash Guest


    Thanks for your input. But what you have suggested is might be not what
    I asked. My Linux machine wants to have two IP address, of two
    different subnet (i.e. two different VLANs). So that, it can talk to
    two different VLAN (i.e. Linux machines residing on that).
    Also I am having two Cisco switch for this test setup. Cisco 2950 is
    having all the VLANs and Inter VLAN routing is through Cisco 3750

    I hope know you are in better position to solve my problem.

    yash, Jan 23, 2006
  6. yash

    yash Guest

    Hi Martin,

    Thanks for replying.
    Would you like to tell me how it can be done? My one Linux machine is
    having Dlink's DGE-550T gigabit Ethernet card and other one is having
    Realtek's RTL-8169. Both are 802.1q capable. But I don't know how
    to use 802.1q capability or modify its driver (if necessary).
    yash, Jan 23, 2006
  7. Look at


    M.C. van den Bovenkamp, Jan 23, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.