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 1320366 - ifup-aliases does not send gratuitous ARPs when adding addresses
Summary: ifup-aliases does not send gratuitous ARPs when adding addresses
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.7
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: Jan Ščotka
Clayton Spicer
URL:
Whiteboard:
Depends On:
Blocks: 1269194 1356056 1367554 1398680
TreeView+ depends on / blocked
 
Reported: 2016-03-23 02:52 UTC by Michael Chapman
Modified: 2019-12-16 05:33 UTC (History)
4 users (show)

Fixed In Version: initscripts-9.03.55-1
Doc Type: Release Note
Doc Text:
The *ifup-aliases* script now sends gratuitous ARP updates when adding new IP addresses When moving one or more IP aliases from one server to another, associated IP addresses may be unreachable for some time, depending on the Address Resolution Protocol (ARP) time-out value that is configured in the upstream router. This bug has been addressed in the _initscripts_ package, and *ifup-aliases* now updates other systems on the network significantly faster in this situation.
Clone Of:
: 1367554 1398680 (view as bug list)
Environment:
Last Closed: 2017-03-21 11:53:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0786 0 normal SHIPPED_LIVE initscripts bug fix update 2017-03-21 12:49:53 UTC

Description Michael Chapman 2016-03-23 02:52:53 UTC
Description of problem:

ifup-aliases does not send gratuitous ARP updates when adding addresses. When moving one or more aliases from one server to another, those IPs may not be reachable for some time (depending on the ARP timeout on the upstream router).

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

Seen in:
- initscripts-8.45.42-1.el5_8.1 (RHEL 5) and
- initscripts-9.03.46-1.el6 (RHEL 6)

Steps to Reproduce:

1. On two hosts, configure an interface with a primary IP and an additional secondary IP. Use the same IPs on both machines -- we'll be bringing them up on only one machine at a time:

$ cat /etc/sysconfig/network-scripts/eth1
DEVICE=eth1
IPADDR=192.0.2.1
NETMASK=255.255.255.0
$ cat /etc/sysconfig/network-scripts/eth1:1
DEVICE=eth1:1
IPADDR=192.0.2.2
NETMASK=255.255.255.0

2. On host A, bring the interfaces up:

# ifup eth1
Determining if ip address 192.0.2.1 is already in use for device eth2...
Determining if ip address 192.0.2.2 is already in use for device eth2...

3. On host A, take the interfaces down:

# ifdown eth1

4. On host B, bring the interfaces up:

# ifup eth1
Determining if ip address 192.0.2.1 is already in use for device eth2...
Determining if ip address 192.0.2.2 is already in use for device eth2...

5. From a host *outside of that subnet*, attempt to ping the primary and secondary IPs:

$ fping 192.0.2.{1..2}
192.0.2.1 is alive
192.0.2.2 is unreachable

Note that the primary IP was gratuitously ARPed (in ifup-eth), but the secondary IP was *not*, so the ARP entry on the router is incorrect. Only once that entry has expired or forced out with a manual gratuitous ARP is the secondary IP reachable.

Comment 1 Michael Chapman 2016-03-23 02:54:32 UTC
> Determining if ip address 192.0.2.1 is already in use for device eth2...
> Determining if ip address 192.0.2.2 is already in use for device eth2...

Obviously that should say "eth1" there. Missed that when copy-pasting the messages.

Comment 3 Lukáš Nykrýn 2016-03-23 09:46:57 UTC
Can you try this totally untested patch from top of my head:

diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index c47d6ef..a014d3f 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -272,6 +272,13 @@ function new_interface ()
 
                /sbin/ip addr add ${IPADDR}/${PREFIX} brd ${BROADCAST} dev ${parent_device} label ${DEVICE}
 
+               # update ARP cache of neighboring computers
+               if [ "${REALDEVICE}" != "lo" ]; then
+                   /sbin/arping -q -A -c 1 -I ${parent_device} ${IPADDR}
+                   ( sleep 2;
+                   /sbin/arping -q -U -c 1 -I ${parent_device} ${IPADDR} ) > /dev/null 2>&1 < /dev/null &
+               fi
+
                if [ "$NO_ALIASROUTING" != yes ]; then
 
                        GATEWAYDEV=$network_GATEWAYDEV;

Comment 4 Michael Chapman 2016-03-23 23:20:48 UTC
(In reply to Lukáš Nykrýn from comment #3)
> Can you try this totally untested patch from top of my head:

Just tested it. It works well.

Comment 5 Terry Bowling 2016-08-02 14:16:56 UTC
Customer is reporting that this also affects RHEL 7.2.  
Request to clone this for RHEL 7.

Comment 7 David Kaspar // Dee'Kej 2016-10-30 16:35:50 UTC
Pull-request submitted:
https://github.com/fedora-sysv/initscripts/pull/24

However, I think that sleeping for 2 seconds is too much. Was there any specific reason why 2 seconds were chosen?

Comment 15 errata-xmlrpc 2017-03-21 11:53:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0786.html


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