Created on
‎07-16-2024
02:11 AM
Edited on
‎07-16-2024
02:11 AM
By
Jean-Philippe_P
Description | This article describes a solution for using two SIM cards with two different APNs from two different wireless carriers. Refer to the note in the following document Active SIM card switching. |
Scope | FortiGate-40F-3G4G (FG-40F-3G4G), FortiGateRugged-60F-3G4G Ruggedized (FGR-60F-3G4G), FortiGateRugged-70F-3G4G Ruggedized (FGR-70F-3G4G). |
Solution |
The solution is to reconfigure the LTE modem using the exceptional flexibility that the automation stitches offer, forcing the modem to use the corresponding APN each time the switching mechanism is triggered.
For this solution, let's use the state of the link monitor as a trigger mechanism for SIM switching, by configuring the option by-link-monitor under config sim-switch.
SIM 1 will be configured with APN: net. SIM 2 will be configured with APN: live.vodafone.com.
The initial configuration of the LTE modem is:
config system lte-modem set apn "net" set sim1-pin 0000 config sim-switch set by-sim-state disable set by-connection-state disable set by-link-monitor enable set by-data-plan disable set link-monitor SIM1 end end
For the link monitoring, there are two options:
Moving forward, choose the option with two IP destinations because it is slightly more complex and can be applied in more cases, such as private APN, a combination of private APN with public APN, etc. In this case, it is very important not to set the source interface under link-monitor and, if the default route is not through WWAN, to route the two IPs statically through WWAN. The configuration of the link monitor is as follows:
config system link-monitor edit "SIM1" set server "10.1.100.22" next edit "SIM2" set status disable set server "10.2.100.22" next end
The configuration for the automation stitches is:
config system automation-trigger edit "SIM1-TO-SIM2" set event-type event-log set logid 46520 config fields edit 1 set name "msg" set value "*SIM card slot changed to 2*" next end next end
Do the same configuration to switch from SIM2 to SIM1:
config system automation-trigger edit "SIM2-TO-SIM1" set event-type event-log set logid 46520 config fields edit 1 set name "msg" set value "*SIM card slot changed to 1*" next end next end
Troubleshooting:
diagnose sys lte-modem data-session-info
diagnose sys lte-modem sim-info
After it is triggered the SIM switching.
diagnose sys lte-modem data-session-info
diagnose sys lte-modem sim-info |