RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1746575 - unable to ignore default router from router advertisement
Summary: unable to ignore default router from router advertisement
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Macku
QA Contact: Daniel Rusek
URL:
Whiteboard:
Depends On:
Blocks: RHEV_IPv6
TreeView+ depends on / blocked
 
Reported: 2019-08-28 19:50 UTC by Dominik Holler
Modified: 2020-03-12 09:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-12 09:08:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
terminal log of reproducer (11.71 KB, text/plain)
2019-08-28 19:50 UTC, Dominik Holler
no flags Details
rc.debug terminal log (193.27 KB, text/plain)
2019-09-12 13:25 UTC, Dominik Holler
no flags Details

Description Dominik Holler 2019-08-28 19:50:18 UTC
Created attachment 1609112 [details]
terminal log of reproducer

Description of problem: If the router sends the default router via a router advertisement, it is used as default gateway, even if it should be ignored.


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Ensure that the lines
IPV6INIT=no
NM_CONTROLLED=no
IPV6_AUTOCONF=no
are in the related ifcfgfile

2. reboot
3.

Actual results:
# ip -6 r  | grep ra
default via fe80::5054:ff:fe3b:9e8f dev eth0 proto ra metric 1024 expires 1388sec hoplimit 64 pref medium



Expected results:
# ip -6 r  | grep ra
 no output



Additional info:

Comment 2 Dominik Holler 2019-09-02 10:21:41 UTC
Even if a gateway is set manually, gateway from ra is still there:
[root@ra_test ~]# cat  /etc/sysconfig/network-scripts/ifcfg-eth0 
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="yes"
PEERDNS="yes"
IPV6INIT="yes"
PERSISTENT_DHCLIENT="1"
IPV6ADDR=fde4:e66c:9a7c:dd91::a9/64
IPV6_DEFAULTGW=fde4:e66c:9a7c:dd91::1
IPV6_AUTOCONF=no
NM_CONTROLLED=no
[root@ra_test ~]# ip -6 r
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fde4:e66c:9a7c:dd91::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fde4:e66c:9a7c:dd91::1 dev eth0 metric 1 pref medium
default via fe80::5054:ff:fe3b:9e8f dev eth0 proto ra metric 1024 expires 1788sec hoplimit 64 pref medium

Comment 3 Jan Macku 2019-09-12 08:26:11 UTC
I tried to reproduce this issue, but I wasn't able to get same results as you.

But I think that problem would be in that initscripts are changing kernel default value for router advertisement after kernel already read this value.

Can you please run your reproducer with "rc.debug" enabled on kernel cmd while rebooting. And please send me output from 

# journalctl -b -u network

Thank you.


Also I was thinking about two workarounds.

1. You can turn off router advertisement by adding option "IPV6_AUTOCONF=no" into "/etc/sysconfig/network". But be aware that this will turn off ra for all devices by default.

2. Or you can add option "net.ipv6.conf.<device_name>.accept_ra = 0" into "/etc/sysctl.conf". This will affect default values only for specific device.

Would you mind to test one of those workarounds and let me know?
Thank you.

Comment 4 Dominik Holler 2019-09-12 13:25:56 UTC
Created attachment 1614521 [details]
rc.debug terminal log

(In reply to Jan Macku from comment #3)
> I tried to reproduce this issue, but I wasn't able to get same results as
> you.
> 

I just use the official RHEL7 image attached to a libvirt network.
The config if this libvirt network is in the output.

> But I think that problem would be in that initscripts are changing kernel
> default value for router advertisement after kernel already read this value.
> 
> Can you please run your reproducer with "rc.debug" enabled on kernel cmd
> while rebooting. And please send me output from 
> 
> # journalctl -b -u network
> 
> Thank you.
> 

Please find the output in the attachment.

> 
> Also I was thinking about two workarounds.
> 
> 1. You can turn off router advertisement by adding option "IPV6_AUTOCONF=no"
> into "/etc/sysconfig/network". But be aware that this will turn off ra for
> all devices by default.
> 

Should IPV6_AUTOCONF in /etc/sysconfig/network-scripts/ifcfg-eth0 overwrite this?

> 2. Or you can add option "net.ipv6.conf.<device_name>.accept_ra = 0" into
> "/etc/sysctl.conf". This will affect default values only for specific device.
> 

This seems to be a workaround to configure on interface level.

> Would you mind to test one of those workarounds and let me know?

Thanks for your ideas.

> Thank you.

Comment 5 Jan Macku 2019-09-12 14:06:13 UTC
(In reply to Dominik Holler from comment #4)
> Created attachment 1614521 [details]
> rc.debug terminal log
> 
> (In reply to Jan Macku from comment #3)
> > I tried to reproduce this issue, but I wasn't able to get same results as
> > you.
> > 
> 
> I just use the official RHEL7 image attached to a libvirt network.
> The config if this libvirt network is in the output.
> 
> > But I think that problem would be in that initscripts are changing kernel
> > default value for router advertisement after kernel already read this value.
> > 
> > Can you please run your reproducer with "rc.debug" enabled on kernel cmd
> > while rebooting. And please send me output from 
> > 
> > # journalctl -b -u network
> > 
> > Thank you.
> > 
> 
> Please find the output in the attachment.

Thank you, I'll have a look.
 
> > 
> > Also I was thinking about two workarounds.
> > 
> > 1. You can turn off router advertisement by adding option "IPV6_AUTOCONF=no"
> > into "/etc/sysconfig/network". But be aware that this will turn off ra for
> > all devices by default.
> > 
> 
> Should IPV6_AUTOCONF in /etc/sysconfig/network-scripts/ifcfg-eth0 overwrite
> this?

Yes. The first are applied values from /etc/sysconfig/network then from /etc/sysctl.conf and as last from /etc/sysconfig/network-scripts/ifcfg-*.
The problem is that if you set IPV6_AUTOCONF=no in /etc/sysconfig/network and try to overwrite it in some of the /etc/sysconfig/network-scripts/ifcfg-* to yes, it will set a kernel value to 1 (yes). That's correct. But kernel probably won't set router advertisement for that device. So I would suggest to use /etc/sysctl.conf instead in such a case.

> > 2. Or you can add option "net.ipv6.conf.<device_name>.accept_ra = 0" into
> > "/etc/sysctl.conf". This will affect default values only for specific device.
> > 
> 
> This seems to be a workaround to configure on interface level.
> 
> > Would you mind to test one of those workarounds and let me know?
> 
> Thanks for your ideas.
> 
> > Thank you.

Comment 6 Jan Macku 2020-03-12 08:44:11 UTC
Hi Dominik,
does workaround works for you?

I'm thinking about closing this bug as WOTNFIX. To fix this issue would require to rewrite quite big chunk of code. This would cause regression, so I don't really want to do it if it's not necessary.

Cheers
Jan

Comment 7 Dominik Holler 2020-03-12 08:53:03 UTC
(In reply to Jan Macku from comment #6)
> Hi Dominik,
> does workaround works for you?
> 

No, but I tried only once.

> I'm thinking about closing this bug as WOTNFIX. To fix this issue would
> require to rewrite quite big chunk of code. This would cause regression, so
> I don't really want to do it if it's not necessary.
> 

From my point of view, WONTFIX would be fine. Even it is working for most cases, dynamic IPv6 is not officially supported on RHV.
I am more afraid of regressions on RHEL 7 than this bug itself.

> Cheers
> Jan

Comment 8 Jan Macku 2020-03-12 09:08:20 UTC
I'm closing this bug as WONTFIX for reasons mentioned above.

Please feel free to reopen it, in case of any problems related to the bug.


Note You need to log in before you can comment on or make changes to this bug.