Switch – Is it possible to connect a single NIC to two different VLANs

dracnicroutingswitchvlan

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 192.168.1.1 and 192.168.1.2).

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. 192.168.1.1/24 and 10.0.0.0/24. I want the server to be both 192.168.1.1 and 10.0.0.1.

The reason I want to do this is that we currently have an internal network on 192.168.1.0/24 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.

Best Answer

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.