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

Posted by Annan on Server Fault See other posts from Server Fault or by Annan
Published on 2011-07-01T11:29:09Z Indexed on 2011/07/01 16:23 UTC
Read the original article Hit count: 310

Filed under:
|
|

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.

© Server Fault or respective owner

Related posts about linux

Related posts about configuration