It is currently Mon Sep 25, 2017 11:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: RTNETLINK answers: Operation not permitted
PostPosted: Thu Apr 03, 2014 10:46 pm 

Joined: Thu Apr 03, 2014 10:37 pm
Posts: 2
I am able to create static l2tpv3 tunnels using the following command:

ip l2tp add tunnel tunnel_id 90 peer_tunnel_id 1 udp_sport 5016 udp_dport 5017 encap udp local 172.16.0.1 remote 172.16.0.10


And it will work. But sometimes, when connectivity to the remote site goes up and down a few times, after stable connectivity is restored the tunnel will stop passing traffic.

Then I attempt to delete the tunnel using:

ip l2tp del tunnel tunnel_id 90

And the session and tunnel are deleted as verified by:

ip l2tp show tunnel
and
ip l2tp show session

Also the l2tpethx interface is also gone.

However, when I attempt to recreate the tunnel, using the exact same command as I initially did, this is the result:

# ip l2tp add tunnel tunnel_id 90 peer_tunnel_id 1 udp_sport 5016 udp_dport 5017 encap udp local 172.16.0.1 remote 172.16.0.10
RTNETLINK answers: Operation not permitted

Changing the tunnel id will not have any effect. However, if I change the port numbers or the remote IP address, I am able to create the tunnel.

What is lingering after I delete a tunnel that is preventing me from creating it again? How can I get rid of whatever is lingering?

Or even better, why does the tunnel stop passing traffic in the first place?


Top
 Profile  
 
 Post subject: Re: RTNETLINK answers: Operation not permitted
PostPosted: Fri Apr 04, 2014 8:05 am 
Site Admin

Joined: Sun Jul 27, 2008 1:39 pm
Posts: 122
ccook wrote:
I am able to create static l2tpv3 tunnels using the following command:

ip l2tp add tunnel tunnel_id 90 peer_tunnel_id 1 udp_sport 5016 udp_dport 5017 encap udp local 172.16.0.1 remote 172.16.0.10


And it will work. But sometimes, when connectivity to the remote site goes up and down a few times, after stable connectivity is restored the tunnel will stop passing traffic.

Then I attempt to delete the tunnel using:

ip l2tp del tunnel tunnel_id 90

And the session and tunnel are deleted as verified by:

ip l2tp show tunnel
and
ip l2tp show session

Also the l2tpethx interface is also gone.

However, when I attempt to recreate the tunnel, using the exact same command as I initially did, this is the result:

# ip l2tp add tunnel tunnel_id 90 peer_tunnel_id 1 udp_sport 5016 udp_dport 5017 encap udp local 172.16.0.1 remote 172.16.0.10
RTNETLINK answers: Operation not permitted

Changing the tunnel id will not have any effect. However, if I change the port numbers or the remote IP address, I am able to create the tunnel.

What is lingering after I delete a tunnel that is preventing me from creating it again? How can I get rid of whatever is lingering?

Or even better, why does the tunnel stop passing traffic in the first place?

This isn't really an OpenL2TP question - OpenL2TP does not support L2TPv3. But I'll do my best to answer.

What commands do you use to create and delete sessions? My guess is one or more sessions still exists in the original tunnel.

You can show kernel state using debugfs.

# modprobe l2tp_debugfs
# mount -t debugfs debugfs /path/to/debugfs/mountpoint (might not be needed if debugfs is already mounted)
# cat /path/to/debugfs/mountpoint/l2tp/tunnels

If the kernel has state about tunnels or sessions, it will be displayed by the above command.


Top
 Profile  
 
 Post subject: Re: RTNETLINK answers: Operation not permitted
PostPosted: Fri Apr 04, 2014 10:11 am 

Joined: Thu Apr 03, 2014 10:37 pm
Posts: 2
The kernel docs on l2tpv3 support indicated that it was created and maintained by openl2tp.org? If you can point me to whomever does maintain it, I would very much appreciate it.

I checked with l2tp debugfs, however there does not seem to be any record of the tunnel or session that rtnetlink believes is conflicting with the one I tried to recreate.

I am deleting sessions by:

ip l2tp del session session_id 90

Thanks for the help.


Top
 Profile  
 
 Post subject: Re: RTNETLINK answers: Operation not permitted
PostPosted: Fri May 30, 2014 6:05 pm 
Site Admin

Joined: Sun Jul 27, 2008 1:39 pm
Posts: 122
ccook wrote:
The kernel docs on l2tpv3 support indicated that it was created and maintained by openl2tp.org? If you can point me to whomever does maintain it, I would very much appreciate it.

I checked with l2tp debugfs, however there does not seem to be any record of the tunnel or session that rtnetlink believes is conflicting with the one I tried to recreate.

I am deleting sessions by:

ip l2tp del session session_id 90

Yes, we develop and maintain the L2TP kernel code. But OpenL2TP itself doesn't use the L2TPv3 support. Anyway, I'll try to answer.

When deleting sessions, you need to specify the tunnel_id in which the session was created. But if debugfs doesn't show the session, was the session successfully created?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group