This article discusses a way to simulate multiple network interface cards on
a computer by using a managed switch and subinterfaces in Linux. This article
is in part a continuation of the article about connecting to a switch by trunk
port.
Configuring the Switch
In drawing from the previous article, I will use a trunk port to connect from
the switch to the computer, and then configure all the other ports to initially
be in VLAN 2.
I then assign different ports to different VLANs. Each one of these ports can then
act as a virtual interface on the computer.
Configuring the Computer
I can then configure the computer with subinterfaces for each VLAN specified in
the switch. Since each VLAN is only associated with one port, that port can
be treated like an extended network interface from the computer.