11 Star 1 Fork 24

src-openEuler / iputils

 / 详情

arping执定-c后,返回值为非0

已完成
缺陷
创建于  
2022-01-22 12:09

arping -I enp4s0 99.99.48.163 -c 3
输入图片说明

评论 (12)

DuanAiLing 创建了任务

Hi ailing_4515653, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Networking, and any of the maintainers: @luzhihao , @Randy.Wang , @seuzw , @Apricity

openeuler-ci-bot 添加了
 
sig/Networking
标签
DuanAiLing 修改了描述
DuanAiLing 修改了标题

@DuanAiLing
这是哪个分支的问题,环境信息是怎样的,iputils版本是怎样的

当前测试SP1、21.09、22.03均无问题

eaglegai 添加了
 
issue_needinfo
标签

22.03还是这样的

  • arping -c 3 -I enp4s0 99.99.33.130
    ARPING 99.99.33.130 from 99.99.63.222 enp4s0
    Unicast reply from 99.99.33.130 [52:54:00:F7:9F:E1] 1.523ms
    Unicast reply from 99.99.33.130 [52:54:00:4A:A3:6F] 1.564ms
    Unicast reply from 99.99.33.130 [52:54:00:4A:A3:6F] 0.982ms
    Unicast reply from 99.99.33.130 [52:54:00:4A:A3:6F] 0.823ms
    Sent 3 probes (1 broadcast(s))
    Received 4 response(s)

iputils-20210722-1.oe1.aarch64

@DuanAiLing 再次测试22.03,返回值还是没有问题,麻烦你像我一样提供如下信息
[root@openEuler ~]# cat /etc/openEuler-latest
openeulerversion=openEuler-22.03-LTS-Next
compiletime=2022-01-12-20-59-55
gccversion=10.3.1-20210914.5.oe1
kernelversion=5.10.0-38.0.0.20.oe1
openjdkversion=1.8.0.312.b07-11.oe1
[root@openEuler ~]# arping -c 3 -I enp3s0 9.82.x.x
ARPING 9.82.x.x from 9.82.x.x enp3s0
Unicast reply from 9.82.x.x [48:D5:39:6B:C0:A1] 2.969ms
Unicast reply from 9.82.x.x [48:D5:39:6B:C0:A1] 0.940ms
Unicast reply from 9.82.x.x [48:D5:39:6B:C0:A1] 0.851ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)
[root@openEuler ~]# echo $?
0
[root@openEuler ~]#
[root@openEuler ~]#

[root@openEuler ~]# arping -c 3 -I enp4s0 99.99.75.56
ARPING 99.99.75.56 from 99.99.7.28 enp4s0
Unicast reply from 99.99.75.56 [52:54:00:B6:DA:F5] 0.904ms
Unicast reply from 99.99.75.56 [52:54:00:02:22:39] 0.936ms
Unicast reply from 99.99.75.56 [52:54:00:02:22:39] 0.718ms
Unicast reply from 99.99.75.56 [52:54:00:02:22:39] 0.765ms
Sent 3 probes (1 broadcast(s))
Received 4 response(s)
[root@openEuler ~]# echo $?
1
[root@openEuler ~]# cat /etc/openEuler-latest
openeulerversion=openEuler-22.03-LTS-Next
compiletime=2022-01-12-20-59-55
gccversion=10.3.1-20210914.5.oe1
kernelversion=5.10.0-38.0.0.20.oe1
openjdkversion=1.8.0.312.b07-11.oe1
[root@openEuler ~]#

[root@openEuler ~]# arping -c 3 -I enp4s0 99.99.75.56
ARPING 99.99.75.56 from 99.99.7.28 enp4s0
Unicast reply from 99.99.75.56 [52:54:00:B6:DA:F5] 0.904ms
Unicast reply from 99.99.75.56 [52:54:00:02:22:39] 0.936ms
Unicast reply from 99.99.75.56 [52:54:00:02:22:39] 0.718ms
Unicast reply from 99.99.75.56 [52:54:00:02:22:39] 0.765ms
Sent 3 probes (1 broadcast(s))
Received 4 response(s)
[root@openEuler ~]# echo $?
1
[root@openEuler ~]# cat /etc/openEuler-latest
openeulerversion=openEuler-22.03-LTS-Next
compiletime=2022-01-12-20-59-55
gccversion=10.3.1-20210914.5.oe1
kernelversion=5.10.0-38.0.0.20.oe1
openjdkversion=1.8.0.312.b07-11.oe1
[root@openEuler ~]#

好的,了解了
看你的输出,应该是目的机器上有两个网卡或者有效IP(每个ip对应不同的mac地址)
麻烦执行下面的命令,提供一下这个内核参数的值:
cat /proc/sys/net/ipv4/conf/all/arp_ignore

ltx 里程碑设置为openEuler-22.03-LTS
ltx 任务类型任务 修改为缺陷

@DuanAiLing
将此内核参数设置为sysctl -w net.ipv4.conf.all.arp_ignore=1即可解决,非问题

net.ipv4.conf.all.arp_ignore=0时效果
[root@openEuler ~]# arping 99.99.33.130 -c 3
ARPING 99.99.33.130 from 99.99.48.163 br0
Unicast reply from 99.99.33.130 [52:54:00:B6:DA:F5] 0.692ms
Unicast reply from 99.99.33.130 [52:54:00:02:22:39] 0.725ms
Unicast reply from 99.99.33.130 [52:54:00:23:60:1A] 0.740ms
Unicast reply from 99.99.33.130 [52:54:00:23:60:1A] 0.651ms
Unicast reply from 99.99.33.130 [52:54:00:23:60:1A] 0.677ms
Sent 3 probes (1 broadcast(s))
Received 5 response(s)
net.ipv4.conf.all.arp_ignore=1时效果
[root@openEuler ~]# arping 99.99.33.130 -c 3
ARPING 99.99.33.130 from 99.99.48.163 br0
Unicast reply from 99.99.33.130 [52:54:00:02:22:39] 0.701ms
Unicast reply from 99.99.33.130 [52:54:00:02:22:39] 0.665ms
Unicast reply from 99.99.33.130 [52:54:00:02:22:39] 0.673ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)
[root@openEuler ~]#

备注:net.ipv4.conf.all.arp_ignore是1则返回就只有目的机器上的目的IP的mac地址;若是值为0,则会返回目的机器上所有有效网卡的mac地址

DuanAiLing 任务状态待办的 修改为已完成

@DuanAiLing
刚跟测试再次对齐,在不建立网桥的情况下,仅仅使用ip addr add 99.99.48.163/16 dev enp4s0的场景下,SP1的现象跟22.02的现象不一致
现在已经做过如下试验:
在SP1的环境上
arp_ignore=0:
使用高低版本的iputils进行arping,现象一致,为现象A,返回值为0
arp_ignor=1:
使用高低版本的iputils进行arping,现象一致,为现象A,返回值为0
在22.03环境上
arp_ignore=0:
使用高低版本的iputils进行arping,现象一致,为现象B,返回值为1
arp_ignor=1:
使用高低版本的iputils进行arping,现象一致,为现象A, 返回值为0
在22.01的环境上使用高低版本的iputils进行arping,现象一致
综上所述,在22.03上arp_ignor参数可生效,值修改前后会有不同反馈,但是SP1上arp_ignor参数未生效,由此可总结SP1跟22.03现象不一致的原因,不在iputils上,很有可能是内核相关
需要咨询内核相关同事
暂时将issue挂起

eaglegai 任务状态已完成 修改为已挂起

@DuanAiLing
再次调查,并跟测试对齐:

  1. 修改net.ipv4.conf.all.arp_ignore=1值在22.03上有效,可以达到预期
  2. 在net.ipv4.conf.all.arp_ignore=0的情况下,高低版本现象不一致,是因为rp_filter的值在高低版本不一致,低版本是0/1值,高版本是2(0不开启源地址校验、1开启严格的反向路径校验、2开启松散的反向路径校验)
  3. 至于rp_filter的值高低版本不一致,是因为systemd修改:#I4QJ3F:systemd-248版本后对系统默认的rp_filter参数进行了修改

总上所述,此问题跟iputils无关,本issue关闭

eaglegai 任务状态已挂起 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/iputils.git
git@gitee.com:src-openeuler/iputils.git
src-openeuler
iputils
iputils

搜索帮助