Linux – How to make ssh/rsync/etc use a VLAN network interface

configurationlinuxvlan

A company I work for has a number of virtual servers with ElasticHosts. They are setup in such a way that eth1 is on a private VLAN connecting them to each other. This is so backups sent between servers are not charged at the same rate as external data transfer.

My understanding of how VLANs and network interfaces work is sketchy at best.

How can I make ssh, rsync, etc. transfer data through the VLAN?

My final solution:

I spent a while trying to figure this out,

For all servers involved, edit /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
HWADDR=YOUR_MAC_ADDR
IPADDR=192.168.0.100
NETMASK=255.255.255.0

Where HWADDR should already be set and the last octate of IPADDR should be different from each other.

Then run, on all servers

/etc/init.d/network restart

After this the IP addresses specified by IPADDR can be used directly as any other IP address.

Best Answer

Just use the IP's from the Private VLAN interfaces. There is nothing special to accomplish this.

Related Topic