Virtual IP » History » Version 2

Version 1 (Martin Willi, 02.07.2007 16:10) → Version 2/24 (Martin Willi, 02.07.2007 16:12)

= Virtual IP support =

IKEv1 and IKEv2 both know the concept of ''virtual IPs''. This means that the initiator (or even the responder) requests an additional IP address from the peer to use as inner IPsec tunnel address.

In IKEv1, virtual IPs are exchanged using the ''mode config'' extension. IKEv2 has full support for virtual IPs in the core standard using ''configuration payloads''.

== IKEv1 ==

== IKEv2 ==
strongSwan currently implements one scenario with configuration payload, where an IP address is assigned to the initiator. The opposite is possible by the protocol, but is a uncommon setup and therefore not supported.

=== initiator configuration ===
The client needs an additional parameter called the ''leftsourceip''.

''%config'' means to request an address from the responder and is an alias for the IKEv1 specific ''%modecfg''. But you may specify an address explicitly by setting:
This will include '''' into the configuration payload request. However, the responder may return an other address, or may not return one at all.

The client can't request other attributes, but it may process the DNS attributes. Received DNS servers are written to the beginning of ''/etc/resolv.conf'', or an other file specified with the ''--with-resolve-conf'' configure directive.

You should not include the ''leftsubnet'' option, as the subnet may not match your received virtual IP. Without the ''leftsubnet'' option, the subnet is narrowed to your assigned virtual IP automatically.

=== responder configuration ===
The responder configuration uses the ''rightsourceip'' option:
This will serve the IP '''' to the client, even if the initiator requested another address. Additionally, the responder may define:
to To let the client choose an address. This is not recommended if you do not trust the client completely.

Serving client with addresses from form a pool or another backend is currently missing. Serving DNS or other configuration attributes is not supported.