1

I'm trying to setup L2TPv3 tunnel between 2 servers - CentOS 7 and Ubuntu 16

On CentOS 7 end I have the following:

ip l2tp add tunnel tunnel_id 6000 peer_tunnel_id 5000 encap udp local LOCAL_IP remote REMOTE_IP udp_sport 5002 udp_dport 6002
ip l2tp add session tunnel_id 6000 session_id 1000 peer_session_id 2000
ip link set l2tpeth0 up mtu 1488
ip addr add 10.0.3.2 peer 10.0.3.1 dev l2tpeth0

On Ubuntu 16 I have the following

ip l2tp add tunnel tunnel_id 3000 peer_tunnel_id 4000 encap udp local LOCAL_IP remote REMOTE_IP udp_sport 5001 udp_dport 6001
ip l2tp add session tunnel_id 3000 session_id 2000 peer_session_id 1000
ip link set l2tpeth1 up mtu 1488
ip addr add 10.0.3.1 peer 10.0.3.2 dev l2tpeth1

The tunnel is setup successfully after that

root@srv1057:~# ip l2tp show tunnel
Tunnel 6000, encap UDP
  From LOCAL_IP to REMOTE_IP
  Peer tunnel 5000
  UDP source / dest ports: 5002/6002

root@srv1057:~# ip l2tp show session
Session 1000 in tunnel 6000
  Peer session 2000, tunnel 5000
  interface name: l2tpeth0
  offset 0, peer offset 0

[root@localhost ~]# ip l2tp show tunnel
Tunnel 5000, encap UDP
  From LOCAL_IP to REMOTE_IP
  Peer tunnel 6000
  UDP source / dest ports: 5002/6002


[root@localhost ~]# ip l2tp show session
Session 2000 in tunnel 5000
  Peer session 1000, tunnel 6000
  interface name: l2tpeth2
  offset 0, peer offset 0

One end private IP is 10.0.3.1 and another end is 10.0.3.2

Can't ping each other IP.

[root@localhost ~]# ping 10.0.3.2
PING 10.0.3.2 (10.0.3.2) 56(84) bytes of data.
From 10.0.3.1 icmp_seq=1 Destination Host Unreachable
From 10.0.3.1 icmp_seq=2 Destination Host Unreachable
From 10.0.3.1 icmp_seq=3 Destination Host Unreachable
From 10.0.3.1 icmp_seq=4 Destination Host Unreachable
^C
--- 10.0.3.2 ping statistics ---
6 packets transmitted, 0 received, +4 errors, 100% packet loss, time 5001ms
pipe 4

Network end(switch and routers) should be fine, as I can establish connectivity between in GRE tunnel on same private range without any issues, just L2TPv3 is messing.

Notes:

1) ip forwarding enabled in /etc/sysctl.conf in both servers

2) iptables / firewall / ufw disabled on all servers

Any insight on this would be appreciated!

Thanks

3
  • Shouldn't the addresses on the Ubuntu side be ip addr add 10.0.3.1 peer 10.0.3.2 dev l2tpeth1? May 21, 2017 at 15:36
  • Yes, it is ip addr add 10.0.3.1 peer 10.0.3.2 dev l2tpeth1
    – Economist
    May 21, 2017 at 15:47
  • Then please edit your question. May 21, 2017 at 16:02

1 Answer 1

-1

Ubuntu load automatic module l2tp_eth

only for CentOS 7

modprobe l2tp_eth

and both server add dev l2tpeth0, unless you have more than one l2tunnel

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .