You are not logged in.

#1 2015-09-22 14:27:44

FillFeile
Member
Registered: 2013-08-07
Posts: 21

ip token set doesn't work - IPv6

Hi Guys,

i was trying to set a static token to my net0 network interface in order to produce a easy to remeber IPv6 adress.

If I try to execute the following command:

sudo ip token set ::10/64 dev net0

only this error pops up:

RTNETLINK answers: Invalid argument

Any ideas on this?

Thanks in advance,

FillFeile

Last edited by FillFeile (2015-09-23 07:43:25)

Offline

#2 2015-09-26 18:06:56

FillFeile
Member
Registered: 2013-08-07
Posts: 21

Re: ip token set doesn't work - IPv6

No ideas?

Offline

#3 2015-09-28 15:40:47

branch
Member
Registered: 2014-03-16
Posts: 209

Re: ip token set doesn't work - IPv6

The command you posted works for me when the target device is a real NIC. However, if the target device is a dummy interface created by 'ip link add', the command fails with 'Invalid Argument'.

Offline

#4 2015-09-30 16:52:51

FillFeile
Member
Registered: 2013-08-07
Posts: 21

Re: ip token set doesn't work - IPv6

Strange, cause the NIC is a real device:

lspci output -> Ethernet controller: JMicron Technology Corp. JMC260 PCI Express Fast Ethernet Controller (rev 05)

Offline

#5 2016-03-31 07:05:03

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: ip token set doesn't work - IPv6

Did you ever get a solution to this?

Offline

#6 2016-03-31 15:43:02

FillFeile
Member
Registered: 2013-08-07
Posts: 21

Re: ip token set doesn't work - IPv6

Sadly never..

Offline

#7 2016-04-03 19:02:10

smpolymen
Member
Registered: 2010-03-21
Posts: 12

Re: ip token set doesn't work - IPv6

That's weird. I get the same error with a real NIC, although I can set the Token using systemd-netwrokd just fine... I am also noticing some weird things with (i guess) iproute2 parsing IPv6 suffixes (it calls them prefixes which is weird). You might want to file a bug, although upstreams newest version is 4.5.0 I think, so you may want to try that as well:

[me@pc iproute2-4.4.0]$ sudo ip token set '::10/64' dev eno1
RTNETLINK answers: Invalid argument

[me@pc iproute2-4.4.0]$ sudo ip token set '::1:10/64' dev eno1
RTNETLINK answers: Invalid argument

[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:10/64' dev eno1
RTNETLINK answers: Invalid argument

[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:10/64' dev eno1
RTNETLINK answers: Invalid argument

[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:0:10/64' dev eno1
RTNETLINK answers: Invalid argument

[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:0:0:10/64' dev eno1
RTNETLINK answers: Invalid argument

[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:0:0:0:10/64' dev eno1
RTNETLINK answers: Invalid argument

#Valid suffix
[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:0:0:0:0:10/64' dev eno1
Error: inet6 prefix is expected rather than "::1:0:0:0:0:0:0:10/64".

#Valid suffix
[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:0:0:0:0:10/48' dev eno1
Error: inet6 prefix is expected rather than "::1:0:0:0:0:0:0:10/48".

#Not really valid suffix, although I might understand forbidding >64 (it technically shouldn't) or ignoring bits above the boundary (I can go either way on this)
[me@pc iproute2-4.4.0]$ sudo ip token set '::1:0:0:0:0:0:10/96' dev eno1
RTNETLINK answers: Invalid argument

Offline

#8 2017-09-14 11:32:15

moatze
Member
Registered: 2017-09-14
Posts: 1

Re: ip token set doesn't work - IPv6

Having the same problem trying to set a token for a wwan0 interface.

Have you found any solution so far?

Offline

#9 2019-09-14 01:16:21

mari-aria
Member
Registered: 2019-04-06
Posts: 4

Re: ip token set doesn't work - IPv6

I found out that when net.ipv6.conf.all.forwarding = 1, then ip token refuses to work.

Running following:

sysctl -w net.ipv6.conf.all.forwarding = 0
ip token set ...
sysctl -w net.ipv6.conf.all.forwarding = 1

made the trick, at least in the one specific case.

I've still not understood every and all cases that prevents ip token from work. My best chances to make it success have been to set it as early as possible on an untouched interface. Still, when I making a working config or script it turns out being very fragile and may stop working with some system change. I have decided to not use it in a production environment due to the uncertainity of reliably setting the token. Sadly, because the idea is very nice.

Last edited by mari-aria (2019-09-14 01:22:40)

Offline

#10 2019-09-14 05:08:45

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: ip token set doesn't work - IPv6

I discovered that you need to have the `autoconf` and `accept_ra` sysctl's enabled, which makes sense in hindsight.

Offline

Board footer

Powered by FluxBB