Networking

TCP Load Balancing Using Destination NAT

We will use ip nat inside destination command to split up the load from what looks one global destination , to several...

· >
TCP Load Balancing Using Destination NAT

We will use ip nat inside destination command to split up the load from what looks one global destination , to several inside hosts. This is similar like server load balancing, at least without all the health checks.
Below is our topology:

Using only two links just to show the flexibility of this configuration.

TCP Load Balancing Using Destination NAT

We have static default routes from R1, R2, and R3 pointing to R4.

Below is the R4 configuration:

interface FastEthernet0/0
ip address 192.168.0.4 255.255.255.0
ip nat inside
ip virtual-reassembly
!
interface Serial1/0
ip address 192.168.45.4 255.255.255.0
ip verify unicast reverse-path
ip nat outside
ip virtual-reassembly
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.46.4 255.255.255.0
ip verify unicast reverse-path
ip nat outside
ip virtual-reassembly
!
ip route 0.0.0.0 0.0.0.0 192.168.45.5
ip route 0.0.0.0 0.0.0.0 192.168.46.6
!
ip nat pool POOL 192.168.0.1 192.168.0.3 prefix-length 24 type rotary
ip nat inside destination list 10 pool POOL
!
access-list 10 permit 192.168.45.10
access-list 10 permit 192.168.46.10

Verifying from R7:

R7#telnet 192.168.45.10 
Trying 192.168.45.10 ... Open

R1>
R1>exit

[Connection to 192.168.45.10 closed by foreign host]
R7#telnet 192.168.45.10
Trying 192.168.45.10 ... Open

R2>exit

[Connection to 192.168.45.10 closed by foreign host]
R7#telnet 192.168.45.10
Trying 192.168.45.10 ... Open

R3>exit

[Connection to 192.168.45.10 closed by foreign host]
R7#telnet 192.168.46.10
Trying 192.168.46.10 ... Open

R1>exit

[Connection to 192.168.46.10 closed by foreign host]
R7#telnet 192.168.46.10
Trying 192.168.46.10 ... Open

R2>exit

[Connection to 192.168.46.10 closed by foreign host]
R7#

NAT table on R4:

R4#sho ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp 192.168.45.10:23   192.168.0.1:23     200.0.0.7:51519    200.0.0.7:51519
tcp 192.168.46.10:23   192.168.0.1:23     200.0.0.7:64139    200.0.0.7:64139
tcp 192.168.46.10:23   192.168.0.2:23     200.0.0.7:11691    200.0.0.7:11691
tcp 192.168.45.10:23   192.168.0.2:23     200.0.0.7:62913    200.0.0.7:62913
tcp 192.168.45.10:23   192.168.0.3:23     200.0.0.7:17295    200.0.0.7:17295

Thanks for reading blog ……….

Recommended Links:

close

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Read our privacy policy for more info.

Leave a Reply