FC4 multihomed routing setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a multihomed server and I want to set up routing tables to
make sure the right interface is always used (or load balancing is
done if there's no reason to prefer one).

With the change from FC 3 to FC 4, I'm not sure where the best place to
do the following is (running it out of rc.local doesn't seem to work).
Any suggestions?

	# table 1 has rules for XXX.YYY.131.3 (eth0)
	ip route add XXX.YYY.131.0/24 dev eth0 src XXX.YYY.131.3 table 1
	ip route add default via XXX.YYY.131.254 table 1
	ip route add 127.0.0.0/8 dev lo table 1

	# table 2 has rules for XXX.YYY.151.3 (eth1)
	ip route add XXX.YYY.151.0/24 dev eth1 src XXX.YYY.151.3 table 2
	ip route add default via XXX.YYY.151.254 table 2
	ip route add 127.0.0.0/8 dev lo table 2

	# now use these rules
	ip rule add from XXX.YYY.131.3 table 1
	ip rule add from XXX.YYY.151.3 table 2

	# for default routes, do load balancing
	ip route replace default scope global \
		nexthop via XXX.YYY.131.254 dev eth0 weight 1 \
		nexthop via XXX.YYY.151.254 dev eth1 weight 1

Danny.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux