Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accept_ra doesn't work #122

Open
nirgal opened this issue Sep 5, 2019 · 6 comments
Open

accept_ra doesn't work #122

nirgal opened this issue Sep 5, 2019 · 6 comments

Comments

@nirgal
Copy link

nirgal commented Sep 5, 2019

Here's a fragment on my interfaces file:

auto eno1
iface eno1 inet static
        address 62.210.131.173/24
        gateway 62.210.131.1
        dns-nameservers 62.210.16.6 62.210.16.7

iface eno1 inet6 static
        address 2001:bc8:254d:300::1/56
        accept_ra 2

accept_ra is not processed.

This can be worked around by using up sysctl -w net.ipv6.conf.$IFACE.accept_ra=2.

accept_ra works fine with regular ifupdown.

Looking at the source code, I noticed that accept_ra is part of the DHCP plugin. However, here, I am using static IP address with dynamic gateway. This is required by my provider. Maybe the code need to be moved elsewhere?

@roopa-prabhu
Copy link
Contributor

roopa-prabhu commented Sep 5, 2019 via email

@nirgal
Copy link
Author

nirgal commented Sep 5, 2019

On Thursday, 5 September 2019 16:40:54 CEST Julien Fortin wrote:

What command did you run? ifreload -a won't process non-auto interfaces.
Can you please try ifup eno1 -d and give us the output?

I rebooted:
The ipv6 address was properly setup, but I got no ipv6 default gateway.

Also
sysctl net.ipv6.conf.eno1.accept_ra
returned:
net.ipv6.conf.eno1.accept_ra = 1

See my work around above. It works after reboot. I have ivp6 connectivity with the work around.

If I revert to my original version, I get

root@hostname:~$ ifup eno1 -d
debug: args = Namespace(CLASS=None, all=False, debug=True, excludepats=None, force=False, iflist=['eno1'], interfacesfile=None, interfacesfileformat='native', noact=False, noaddons=False, nocache=False, perfmode=False, printdependency=None, quiet=False, skipupperifaces=False, syntaxcheck=False, syslog=False, type=None, verbose=False, withdepends=False)
debug: creating ifupdown object ..
debug: {'ifreload_down_changed': '0', 'multiple_vlan_aware_bridge_support': '0', 'ifaceobj_squash': '0', 'no_repeats': {'bridge-vlan-aware': 'yes'}, 'ifquery_check_error_str': 'fail', 'delay_admin_state_change': '0', 'addon_syntax_check': '0', 'ifquery_check_unknown_str': '', 'addr_config_squash': '0', 'adjust_logical_dev_mtu': '1', 'default_interfaces_configfile': '/etc/network/interfaces', 'template_lookuppath': '/etc/network/ifupdown2/templates', 'link_master_slave': '0', 'template_enable': '1', 'ifquery_ifacename_expand_range': '0', 'template_engine': 'mako', 'addon_scripts_support': '1', 'ifquery_check_success_str': 'pass', 'addon_python_modules_support': '1', 'disable_cli_interfacesfile': '0'}
info: loading builtin modules from /usr/share/ifupdown2/addons
debug: vlan: using reserved vlan range (0, 0)
debug: bridge: using reserved vlan range (0, 0)
info: executing /bin/pidof mstpd
info: executing /sbin/ip rule show
info: executing /sbin/ip -6 rule show
info: module ethtool not loaded (module init failed: no /sbin/ethtool found)

info: module ethtool not loaded (module init failed: no /sbin/ethtool found)

info: looking for user scripts under /etc/network
info: loading scripts under /etc/network/if-pre-up.d ...
info: loading scripts under /etc/network/if-up.d ...
info: loading scripts under /etc/network/if-post-up.d ...
info: loading scripts under /etc/network/if-pre-down.d ...
info: loading scripts under /etc/network/if-down.d ...
info: loading scripts under /etc/network/if-post-down.d ...
info: processing interfaces file /etc/network/interfaces
debug: processing sourced line ..'source /etc/network/interfaces.d/*'
debug: virbr0: evaluating port expr '['none']'
debug: scheduling '['pre-up', 'up', 'post-up']' for ['eno1']
debug: dependency graph {
	lo : []
	eno1 : []
	none : []
}
info: eno1: running ops ...
debug: eno1: pre-up : running module link
debug: eno1: pre-up : running module tunnel
debug: eno1: pre-up : running module bond
debug: eno1: pre-up : running module batman_adv
debug: eno1: pre-up : running module vlan
debug: eno1: pre-up : running module vxlan
debug: eno1: pre-up : running module usercmds
debug: eno1: pre-up : running module bridge
debug: eno1: pre-up : running module bridgevlan
debug: eno1: pre-up : running module mstpctl
debug: eno1: pre-up : running module vrf
info: executing ip -o -d link show dev eno1
debug: _cache_get(['eno1', 'master']) : ['master']
info: eno1: netlink: ip link set dev eno1 up
debug: TXed  RTM_NEWLINK, pid 5055, seq 1, 40 bytes
debug: RXed  NLMSG_ERROR, pid 5055, seq 1, 36 bytes code NLE_SUCCESS...this is an ACK
debug: eno1: up : running module dhcp
debug: eno1: up : running module address
info: executing ip -o addr show dev eno1
debug: eno1: up : running module addressvirtual
debug: eno1: up : running module usercmds
debug: eno1: up : running script /etc/network/if-up.d/mountnfs
info: executing /etc/network/if-up.d/mountnfs
debug: eno1: up : running script /etc/network/if-up.d/upstart
info: executing /etc/network/if-up.d/upstart
debug: eno1: up : running script /etc/network/if-up.d/000resolvconf
info: executing /etc/network/if-up.d/000resolvconf
debug: eno1: up : running script /etc/network/if-up.d/openvpn
info: executing /etc/network/if-up.d/openvpn
debug: eno1: up : running script /etc/network/if-up.d/openssh-server
info: executing /etc/network/if-up.d/openssh-server
debug: eno1: post-up : running module usercmds
debug: eno1: statemanager sync state pre-up
debug: saving state ..

I am using Debian oldstable (ifupdown2 is pretty old there : 1.0~git20170314-1)

But please run grep -R accept_ra in ifupdown2 project (master version). You'll see it only appears in ifupdown2/addons/dhcp.py, while I am using a static ipv6 address. So I'm pretty sure the bug is still there.

@julienfortin
Copy link
Contributor

Hi @nirgal

I realized my mistake just after sending my comment and removed it right away but I guess you got the email notification before!
You are correct, for this use case accept-ra needs to be moved out of the dhcp addon.

We will update this ticket with more info. For now it's best to use the workaround that you mentioned.

@aderumier
Copy link
Contributor

@julienfortin

Hi, any news about this ?

I think that "accept_ra" && "autoconf" are still missing vs classic ifupdown1.

I can send a patch if needed, but I'm not sure if it's possible to do it with netlink directly (IFLA_INET6_CONF), instead using sysctl ?

@aderumier
Copy link
Contributor

@julienfortin

any news about this ? I have some free time on coming weeks to work on it if needed.

@julienfortin
Copy link
Contributor

hey @aderumier feel free to write a patch for this if you have some free cycles, that would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants