Created
June 5, 2012 04:44
-
-
Save DBarney/2872704 to your computer and use it in GitHub Desktop.
ipvsadm setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%% | |
%% SETUP | |
%%%% | |
%%%% | |
%% baker | |
%%%% | |
sudo -i | |
ifconfig eth1 192.168.0.2 up | |
ifconfig tunl0 0.0.0.0 up | |
%% Turn off arping for the bakers. (maybe only partially?) | |
echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore | |
echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce | |
echo 0 > /proc/sys/net/ipv4/conf/tunl0/rp_filter | |
%% allow bakers to forward packets | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
%% add the ip | |
ip addr add 192.168.10.100/32 dev tunl0 | |
%%%% | |
%% gateway | |
%%%% | |
sudo -i | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
ifconfig eth1 192.168.0.1 up | |
ifconfig eth0:0 192.168.10.100 netmask 255.255.255.255 broadcast 192.168.10.100 up | |
ipvsadm -A -t 192.168.10.100:80 -s rr | |
ipvsadm -a -t 192.168.10.100:80 -r 192.168.0.2 -i | |
%% add in a route | |
route add -host 192.168.10.100 dev eth0:0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment