I know it is possible to assign multiple IP addresses to the same NIC as long as they are on the same sub-net (e.g. server A can be assigned both and

However, is it possible to assign multiple IP addresses that are a different sub-net to the same NIC? The server will be connected to a switch with multiple VLANs configured on it, e.g. and I want the server to be both and

The reason I want to do this is that we currently have an internal network on and we want to add additional private network for management needs: e.g. putting Dell DRAC devices on this network. I want to know if it is possible to do this without adding more cables and more switch ports.

  • You should specify your OS – Kyle Brandt Sep 3 '09 at 18:17
  • We have a mixed set of CentOS 5 and Windows 2003 servers. – sagi Sep 3 '09 at 18:38
  • DRAC and normal network connection will be two different OS (computers in fact) using the same cable. You can configure one subnet on the main OS and one (different) on the DRAC. It is however not a good idea to have DRAC on an unrestricted network. – eckes Feb 16 '15 at 21:25

Sure, you simply have to enable vlan tagging on the switch and the network adapter and setup both sides with all the vlans you want the computer to see.

The details about how to configure vlan trunking vary depending on what OS, and what you have to do for a specific nic or switch.

Keep in mind that this may be a bit of a security issue. Suppose this is connected to two networks which have some firewalling between them. The computer that spans these two networks becomes an alternate pathway. If an attacker can compromise the system, then they can use the system jumping point to get to the inside hosts.


I am not sure if you are doing this, but don't confuse subnets with VLANs. They are different OSI Layers, Network (IP) and Data Link (Ethernet) respectively. If you are at all unclear about this, I recommend reading the answers to this question and this question.

Having two different subnets on the same NIC doesn't have to correlate with having to VLANs on the same NIC. Adding a second subnet to NIC in Linux is fine, you just do something like:

ifconfig eth0:1 netmask

This will add a secondary IP to eth0.

For the VLANs with Linux, Linux Journal has nice a article on it.


Yes, you can put different subnets on the same nic, without even going into the VLAN territory. VLANs are a whole different beast and if all you need is to address different subnets, there is no reason to complicate things. Ethernet (Layer 1+2) is perfectly capable of handling multiple IP subnets (Layer 3) running on it. Magic of OSI.


Sure you can, if you're using a linux distro, you can use the vlan package ( apt-get install vlan ) under debian/ubuntu .


Yes, you can put different subnets on the same nic in Windows also. I had to do it as a temporary workaround in some hardware failure cases.

  • That's really not the same thing as vLANs. – Chris S Oct 4 '11 at 13:31
  • I know and nowhere that's said or implied. This answers the "is it possible to assign multiple IP addresses that are a different sub-net to the same NIC?" question for windows, though. – camilohe Oct 29 '15 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.