Wednesday, December 31, 2008

NAT Load Balancing

As an added feature of NAT it can be used to load balance a ‘serverfarm’. The router performing the natting can round robin connection requests to the real servers.

A virtual server address is required. The natting router takes tcp requests received on this address, and the specified ports, and passes them on in a rotary fashion to the servers.

This can be achieved with the following configuration on R2…..

interface FastEthernet0/0
ip address
ip nat outside
interface FastEthernet1/0
ip address
ip nat inside

ip nat pool REALS prefix-length 24 type rotary
ip nat inside destination list VIPACCESS pool REALS
ip access-list extended VIPACCESS
permit tcp any host eq telnet
Now when telnetting to from R1, R2 redirects the request to one of the 3 real server addresses
Router_1#telnet ... Open
On R2 i examine the nat translation table
Router_2#s ip nat trans
Pro Inside global Inside local Outside local Outside globaltcp


No comments: