I have a Linux server running CentOS 6.4 that is used as an iSCSI target. The server is multi-homed with two NICs, both on the same subnet. iSCSI multipathing takes care of the load-balancing/failover, so all I need is for each NIC to operate independently. How do I configure this system to avoid all the weird routing and ARP issues that always come along with a multi-homed setup, such as traffic being returned on a different interface from the source, or one interface accepting traffic sent to the IP of the other. The bonding solution is not an option, as it has issues with the iSCSI connection.
The important stuff:
- eth0: IP 10.1.1.242 / SN 255.255.252.0 / GW 10.1.1.254
- eth1: IP 10.1.1.243 / SN 255.255.252.0 / GW 10.1.1.254
Best Answer
I realized I never followed up to this question. Using some excellent internet resources here and here, I came up with the following configuration. Hopefully this helps someone out.
Assume you have two interface,
eth0
andeth1
, with IP addresses of 10.1.1.242 and 10.1.1.243. This is all on a /22 network with a default gateway of 10.1.1.254.First create two routing tables, one for each NIC:
Next, add routes for each interface to the appropriate tables:
Finally, add rules to determine which table is used:
This should keep traffic from crossing NICs internally, allowing you to preserve redundancy or use each NIC for different functionality.