Tunnel L2TPv3
U
SER
G
UIDE
259
set ipsec phase1 PHASE1 local-end ppp0
set ipsec phase1 PHASE1 encryption-algorithm aes
set ipsec phase1 PHASE1 hash-algorithm sha1
set ipsec phase1 PHASE1 dh-group 5
set ipsec phase1 PHASE1 authentication-method pre-shared-key
set ipsec phase1 PHASE1 lifetime 7200 sec
set ipsec phase1 PHASE1 exchange-mode aggressive
set ipsec phase1 PHASE1 my-identifier fqdn imola.tiesse.com
set ipsec phase1 PHASE1 nat-t off
set ipsec phase2 PHASE2 encryption-algorithm 3des
set ipsec phase2 PHASE2 authentication-algorithm hmac-md5
set ipsec phase2 PHASE2 pfs-group 5
set ipsec phase2 PHASE2 protocol 115
set ipsec phase2 PHASE2 mode tunnel
set ipsec phase2 PHASE2 security esp
set ipsec phase2 PHASE2 level unique
set ipsec phase2 PHASE2 local-subnet 2.2.2.2/32
set ipsec phase2 PHASE2 remote-subnet 1.1.1.1/32
set ipsec pre-shared-key 85.34.166.20 **********
set ipsec off
set l2tpv3 pseth0 tunnel-source 2.2.2.2
set l2tpv3 pseth0 tunnel-destination 1.1.1.1
set l2tpv3 pseth0 tunnel-address 100.100.100.254/24
set l2tpv3 pseth0 local-cookie 11
set l2tpv3 pseth0 remote-cookie 22
set l2tpv3 pseth0 local-id 11
set l2tpv3 pseth0 remote-id 22
set l2tpv3 pseth0 mtu 1360
set l2tpv3 pseth0 bridge-with eth1
set l2tpv3 pseth0 off
as you can see, at the initial state both the IPSec connection and the tunnel are off. When the mobile
connection turns on, thanks to the commands:
set trigger gprs up set ipsec on
set trigger gprs up set l2tpv3 pseth0 on
IPSec and the tunnel will be activate in sequence.
The command that determines that the L2TPv3 traffic is sent to the IPSec tunnel is:
set ipsec phase2 PHASE2 protocol 115