[lvs-users] LVS on localhost

Joseph Mack NA3T jmack at wm7d.net
Wed Mar 23 22:02:57 GMT 2011


On Wed, 23 Mar 2011, Tim Vaillancourt wrote:

> Setup LVS. 127.0.0.1:9000 mapping to realservers 127.0.0.2 and 127.0.0.3, no 
> change in port:
>
> "
> thor:~# ipvsadm -A -t 127.0.0.1:9000 -s rr
> thor:~# ipvsadm -a -t 127.0.0.1:9000 -r 127.0.0.2 -m
> thor:~# ipvsadm -a -t 127.0.0.1:9000 -r 127.0.0.3 -m
> "

Hi Tim,

For LocalNode the syntax (off the top of my head) would be 
something like

ipvsadm -A -t $VIP -s rr
ipvsadm -a -t $VIP -r 127.0.0.1
ipvsadm -a -t $VIP -r 127.0.0.2
ipvsadm -a -t $VIP -r 127.0.0.3

where $VIP is the externally advertised IP.

In your ipvsadm table (above), by the time a packet is at 
127.0.0.1, it has already been delivered and beyond where 
ipvs can mess with it.

Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!




More information about the lvs-users mailing list