Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1351540

Summary: ping does not use device specified with -I parameter
Product: Red Hat Enterprise Linux 7 Reporter: Jan Tluka <jtluka>
Component: iputilsAssignee: Jan Synacek <jsynacek>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.3CC: jiji, jishi, lxin, rhack, rkhan
Target Milestone: rcKeywords: EasyFix, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: LNST
Fixed In Version: iputils-20160308-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 00:12:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Tluka 2016-06-30 09:44:09 UTC
Description of problem:

With update of iputils package between RHEL-7.2 and RHEL-7.3-20160628.n.0 even if I specify device with the -I parameter the device is not used for sending ICMP request.

Version-Release number of selected component (if applicable):
iputils-20160308-4.el7.x86_64

How reproducible:
Configure multiple vlans and ping address not belonging to VLAN through the  device belonging to the VLAN

Steps to Reproduce:

machine1:
ip link add link ens1f0 ens1f0.10_0 type vlan id 10
ip link add link ens1f0 ens1f0.20_0 type vlan id 20
ip link add link ens1f0 ens1f0.30_0 type vlan id 30
ip link set ens1f0 up
ip link set ens1f0 up
ip addr add 192.168.10.1/24 dev ens1f0.10_0
ip addr add fc00:0:0:10::1/64 dev ens1f0.10_0
ip link set ens1f0.10_0 up
ip link set ens1f0 up
ip addr add 192.168.20.1/24 dev ens1f0.20_0
ip addr add fc00:0:0:20::1/64 dev ens1f0.20_0
ip link set ens1f0.20_0 up
ip link set ens1f0 up
ip addr add 192.168.30.1/24 dev ens1f0.30_0
ip addr add fc00:0:0:30::1/64 dev ens1f0.30_0
ip link set ens1f0.30_0 up

machine2:
ip link add link ens2f1d1 ens2f1d1.10_0 type vlan id 10
ip link add link ens2f1d1 ens2f1d1.20_0 type vlan id 20
ip link add link ens2f1d1 ens2f1d1.30_0 type vlan id 30
ip link set ens2f1d1 up
ip link set ens2f1d1 up
ip addr add 192.168.10.2/24 dev ens2f1d1.10_0
ip addr add fc00:0:0:10::2/64 dev ens2f1d1.10_0
ip link set ens2f1d1.10_0 up
ip link set ens2f1d1 up
ip addr add 192.168.20.2/24 dev ens2f1d1.20_0
ip addr add fc00:0:0:20::2/64 dev ens2f1d1.20_0
ip link set ens2f1d1.20_0 up
ip link set ens2f1d1 up
ip addr add 192.168.30.2/24 dev ens2f1d1.30_0
ip addr add fc00:0:0:30::2/64 dev ens2f1d1.30_0
ip link set ens2f1d1.30_0 up


Actual results:

# ping 192.168.30.2 -c 1 -I ens1f0.20_0
PING 192.168.30.2 (192.168.30.2) from 192.168.20.1 ens1f0.20_0: 56(84) bytes of data.
64 bytes from 192.168.30.2: icmp_seq=1 ttl=64 time=0.374 ms

--- 192.168.30.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.374/0.374/0.374/0.000 ms

packet capture does not show anything on the device

# tcpdump -i ens1f0.20_0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens1f0.20_0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

Instead another device (belonging to IP subnet) is used:

# tcpdump -i ens1f0.30_0 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens1f0.30_0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:29:19.899676 IP 192.168.30.1 > 192.168.30.2: ICMP echo request, id 29228, seq 1, length 64
11:29:19.899864 IP 192.168.30.2 > 192.168.30.1: ICMP echo reply, id 29228, seq 1, length 64
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel


Expected results:

Device specified with -I parameter is used for sending ICMP. With previous version iputils-20121221-7.el7.x86_64.rpm the ping command does not succeed and that's what I'd expect.


Additional info:

Possibly regression from RHEL-7.2.

Additionaly the packet capture on NIC confirms that vlan tag of other device is used,

# tcpdump -i ens1f0 -n -e not stp
tcpdump: WARNING: ens1f0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens1f0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:38:57.836286 10:60:4b:93:ba:e0 > Broadcast, ethertype 802.1Q (0x8100), length 46: vlan 30, p 0, ethertype ARP, Request who-has 192.168.30.2 tell 192.168.30.1, length 28
11:38:57.836483 00:0f:53:21:b6:c1 > 10:60:4b:93:ba:e0, ethertype 802.1Q (0x8100), length 60: vlan 30, p 0, ethertype ARP, Reply 192.168.30.2 is-at 00:0f:53:21:b6:c1, length 42
11:38:57.836531 10:60:4b:93:ba:e0 > 00:0f:53:21:b6:c1, ethertype 802.1Q (0x8100), length 102: vlan 30, p 0, ethertype IPv4, 192.168.30.1 > 192.168.30.2: ICMP echo request, id 29683, seq 1, length 64
11:38:57.836764 00:0f:53:21:b6:c1 > 10:60:4b:93:ba:e0, ethertype 802.1Q (0x8100), length 102: vlan 30, p 0, ethertype IPv4, 192.168.30.2 > 192.168.30.1: ICMP echo reply, id 29683, seq 1, length 64

With old iputils I see correct vlan id,

11:41:28.427689 10:60:4b:93:ba:e0 > Broadcast, ethertype 802.1Q (0x8100), length 46: vlan 20, p 0, ethertype ARP, Request who-has 192.168.30.2 tell 192.168.20.1, length 28
11:41:28.427884 00:0f:53:21:b6:c1 > 10:60:4b:93:ba:e0, ethertype 802.1Q (0x8100), length 60: vlan 20, p 0, ethertype ARP, Reply 192.168.30.2 is-at 00:0f:53:21:b6:c1, length 42
11:41:28.427918 10:60:4b:93:ba:e0 > 00:0f:53:21:b6:c1, ethertype 802.1Q (0x8100), length 102: vlan 20, p 0, ethertype IPv4, 192.168.20.1 > 192.168.30.2: ICMP echo request, id 29967, seq 1, length 64
11:41:28.428085 00:0f:53:21:b6:c1 > 10:60:4b:93:ba:e0, ethertype 802.1Q (0x8100), length 102: vlan 20, p 0, ethertype IPv4, 192.168.30.2 > 192.168.20.1: ICMP echo reply, id 29967, seq 1, length 64

Comment 2 Jan Tluka 2016-06-30 10:05:44 UTC
Kernel version used: kernel-3.10.0-455.el7

Comment 3 Jan Synacek 2016-07-18 08:30:42 UTC
Upstream report: https://github.com/iputils/iputils/issues/55

Comment 7 Jan Synacek 2016-08-08 07:14:34 UTC
*** Bug 1364832 has been marked as a duplicate of this bug. ***

Comment 13 Jianlin Shi 2016-08-24 01:23:52 UTC
*** Bug 1364839 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2016-11-04 00:12:14 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/RHEA-2016-2185.html