Fortinet black logo

Handbook

Example Basic IP load balancing configuration

6.0.0
Copy Link
Copy Doc ID 4afb0436-a998-11e9-81a4-00505692583a:856023
Download PDF

Example Basic IP load balancing configuration

This example shows how to add a server load balancing virtual IP that load balances all traffic among 3 real servers. In the example the Internet is connected to port2 and the virtual IP address of the virtual server is 192.168.20.20. The load balancing method is weighted. The IP addresses of the real servers are 10.10.10.1, 10.10.10.2, and 10.10.10.3. The weights for the real servers are 1, 2, and 3. The default weight is 1 and does not have to be changed for the first real server.

config firewall vip

edit All_Load_Balance

set type server-load-balance

set server-type ip

set extintf port2

set extip 192.168.20.20

set ldb-method weighted

config realservers

edit 1

set ip 10.10.10.1

next

edit 2

set ip 10.10.10.2

set weight 2

next

edit 3

set ip 10.10.10.3

set weight 3

end

end

Example Basic IP load balancing configuration

This example shows how to add a server load balancing virtual IP that load balances all traffic among 3 real servers. In the example the Internet is connected to port2 and the virtual IP address of the virtual server is 192.168.20.20. The load balancing method is weighted. The IP addresses of the real servers are 10.10.10.1, 10.10.10.2, and 10.10.10.3. The weights for the real servers are 1, 2, and 3. The default weight is 1 and does not have to be changed for the first real server.

config firewall vip

edit All_Load_Balance

set type server-load-balance

set server-type ip

set extintf port2

set extip 192.168.20.20

set ldb-method weighted

config realservers

edit 1

set ip 10.10.10.1

next

edit 2

set ip 10.10.10.2

set weight 2

next

edit 3

set ip 10.10.10.3

set weight 3

end

end