The behavior is due to a combination of factors:
- "leftsourceip" is configured via a script, and it used when traffic generated by an ESG has to traverse an IPSEC VPN tunnel.
- The script selects the "leftsourceip" by the matching the "leftsubnet", configured within the IPSEC VPN, with the subnet configured on the vNic interfaces.
- Within the ESG, the vNics are all maintained in a list, which the "leftsourceip" script references in sequential order.
- The script will assign the IP address of the first interface it reaches in the list, that falls within the "leftsubnet" specified in the configuration of the IPSEC VPN tunnel.
- Currently, this list is not sorted in anyway and may exist in any random order, which may change between the publication of any two configuration changes.
- As such, with a "leftsubnet" configured that encompasses more than a single vNic, a published configuration change will initiate the "leftsourceip" script, which may in turn reach a different matching vNic than it had the time previous, causing a restart of all of the IPSEC VPNs configured with the first "leftsourceip".
For example:
Note: Please cite the following tunnel and ESG vNic configurations for the following example.
Tunnel "2.2.2.2" Configurations
conn 1.1.1.1_10.10.0.0/16-2.2.2.2_10.20.0.0/16
left=1.1.1.1
also=global
leftid=1.1.1.1
rightid=2.2.2.2
leftsubnet=10.10.0.0/16
right=2.2.2.2
rightsubnet=10.20.0.0/16
authby=secret
pfs=yes
phase2alg=aes256-sha1;modp1024
ike=aes256-sha1;modp1024!
# extensions for this conn
leftsourceip=10.10.1.1
ESG vNIC Configuration
vNic_1 Link encap:Ethernet HWaddr 00:50:56:X3:XX:F1
inet addr:10.10.1.1 Bcast:10.10.1.255 Mask:255.255.255.0
vNic_2 Link encap:Ethernet HWaddr 00:50:56:X3:7X:9X
inet addr:10.10.50.1 Bcast:10.10.50.255 Mask:255.255.255.0
As described above, the symptoms described are caused because the ESG is configured with more than 1 vNic that falls within the specified local subnet (leftsubnet) of an IPSEC VPN Tunnel. This is depicted in the example above.
- We can see that the local subnet specified is 10.10.0.0/16, and that the ESG has two vNics that fall within that subnet:
vNic_1 --> IP Address of 10.10.1.1/24
vNic_2 --> IP Address of 10.10.50.1/24
- With a "leftsubnet" of 10.10.0.0/16, the first time the "leftsourceip" script runs, it may reach vNic_1 in the list first, which falls under the 10.10.0.0/16 subnet with an IP address of 10.10.1.1/24. The script will then assign the "leftsourceip" an IP address of 10.10.1.1.
- Following any additional IPSEC VPN configuration changes, the "leftsourceip" will run again, and may reach vNic_2 in the list first, which also has an IP that falls under the scope of the 10.10.0.0/16 subnet, being 10.10.50.0/24. As such, all of the IPSEC VPNs that originally received the "leftsourceip" of 10.10.1.1 will be restarted.