Skip to main content
matteocostanzo
Explorer
April 5, 2024
Question

load balancer - first alive. not works.

  • April 5, 2024
  • 1 reply
  • 3801 views

Hi everyone

I'm trying to configure a virtual server with load balancer that searches for the first live IP.

I have M2M SIMs behind a VPN, each of which can take 2 random static IPs.
based on the restart of the SIM itself.

I wanted to disguise this inconvenience with a virtual server.

but if I use first alive mode it doesn't work.

I don't understand what I'm doing wrong.

 

edit "SIM-1"
set uuid fb8bxxxxxxxxxxxxxxxxxxx1016f70e
set type server-load-balance
set extip 172.33.0.1
set extintf "any"
set server-type ip
set ldb-method first-alive
config realservers
edit 1
set ip 10.176.154.3
next
edit 2
set ip 10.168.152.68
next
end

1 reply

ozkanaltas
Valued Contributor III
April 5, 2024

Hello @matteocostanzo ,

 

You said it doesn't work, can you give more information about what doesn't work? 

 

Also, did you configure a health check for your real server? If you don't, the virtual server can't detect which real server running or not.

 

If you want to get more information about Virtual Server, you can review this document.

 

https://docs.fortinet.com/document/fortigate/7.4.3/administration-guide/713497/virtual-server-load-balance

 

matteocostanzo
Explorer
April 5, 2024

for example at this moment the SIM has taken the second IP.

If I ping the virtual server it doesn't work.

if instead I ping the two real ones the right one responds.

I put the Health check monitoring ping


Esecuzione di Ping 172.33.0.1 con 32 byte di dati:
Richiesta scaduta.
Richiesta scaduta.
Richiesta scaduta.
Richiesta scaduta.
Richiesta scaduta.

Esecuzione di Ping 10.176.154.3 con 32 byte di dati:
Richiesta scaduta.
Richiesta scaduta.
Richiesta scaduta.
Richiesta scaduta.

Esecuzione di Ping 10.168.152.68 con 32 byte di dati:
Risposta da 10.168.152.68: byte=32 durata=184ms TTL=60
Risposta da 10.168.152.68: byte=32 durata=139ms TTL=60
Risposta da 10.168.152.68: byte=32 durata=157ms TTL=60
Risposta da 10.168.152.68: byte=32 durata=109ms TTL=60
Risposta da 10.168.152.68: byte=32 durata=119ms TTL=60
Risposta da 10.168.152.68: byte=32 durata=159ms TTL=60

edit "SIM-1"
set uuid fb8bxxxxxxxxxxxxxxxx6f70e
set type server-load-balance
set extip 172.33.0.1
set extintf "any"
set server-type ip
set monitor "Ping-10-2-3"
set ldb-method first-alive
config realservers
edit 1
set ip 10.176.154.3
next
edit 2
set ip 10.168.152.68
next
end
next

ozkanaltas
Valued Contributor III
April 5, 2024

Hello @matteocostanzo ,

 

Can you share these command outputs with us? 

 

diagnose debug enable diagnose firewall vip realserver list diagnose firewall vip realserver healthcheck stats show

 

Maybe the problem is related to source IP. Can you configure the source IP to your monitor? 

 

config firewall ldb-monitor     edit "Ping-10-2-3"         set src-ip x.x.x.x     next end