Closed hezhiye closed 1 year ago
ip route add default dev eth0 table local 我已经配置好路由了,不知道为啥192.168.20.100 和 192.168.20.110有啥差别。 其中192.168.20.100是host上另外一个网口ip,192.168.20.110是与host上192.168.20.100网口直连的另外一个设备ip
加了arp -s 192.168.20.110 02:00:00:00:12:03 就可以了
Hi: 你好,我在一个虚拟化环境中VM向外面ping 192.168.20.110, nettrace -p icmp -d 192.168.20.110 --detail --diag-keep --date 显示如下
** ffff954b4171cf00,ffff954a8cbc4200 [2023-6-25 10:07:46.645584] [ffff954b4171cf00][nf_hook_slow ][cpu:6 ][ ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645687] [ffff954b4171cf00][ipt_do_table ][cpu:6 ][ ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645707] [ffff954b4171cf00][ipt_do_table ][cpu:6 ][ ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645725] [ffff954b4171cf00][ipt_do_table ][cpu:6 ][ ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645742] [ffff954b4171cf00][ipt_do_table ][cpu:6 ][ ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645762] [ffff954b4171cf00][ip_output ][cpu:6 ][ ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645776] [ffff954b4171cf00][nf_hook_slow ][cpu:6 ][eth0 ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645789] [ffff954b4171cf00][ipt_do_table ][cpu:6 ][eth0 ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645809] [ffff954b4171cf00][ip_finish_output ][cpu:6 ][eth0 ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.645844] [ffff954b4171cf00][ip_finish_output2 ][cpu:6 ][eth0 ][pid:6142 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.668106] [ffff954b4171cf00][skb_clone ][cpu:4 ][eth0 ][pid:0 ][swapper/4 ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:46.668396] [ffff954a8cbc4200][consume_skb ][cpu:4 ][eth0 ][pid:0 ][swapper/4 ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:48.716097] [ffff954b4171cf00][fib_validate_source ][cpu:4 ][eth0 ][pid:0 ][swapper/4 ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17 [2023-6-25 10:07:48.716264] [ffff954b4171cf00][kfree_skb ][cpu:4 ][eth0 ][pid:0 ][swapper/4 ] ICMP: 198.18.34.15 -> 192.168.20.110 ping request, seq: 262, id: 17
我能够正常ping 192.168.20.100, 但是如上ping 192.168.20.110不行, ping请求在fib_validate_source被丢弃了吗?但是我查了所有的rp_filter都是0了,包括eth0 all default。 如下是ping 192.168.20.100的情况 [2023-6-25 10:13:28.364405] [ffff954b5650ec00][nf_hook_slow ][cpu:4 ][ ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364422] [ffff954b5650ec00][ipt_do_table ][cpu:4 ][ ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364429] [ffff954b5650ec00][ipt_do_table ][cpu:4 ][ ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364434] [ffff954b5650ec00][ipt_do_table ][cpu:4 ][ ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364441] [ffff954b5650ec00][ipt_do_table ][cpu:4 ][ ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364447] [ffff954b5650ec00][ip_output ][cpu:4 ][ ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364451] [ffff954b5650ec00][nf_hook_slow ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364455] [ffff954b5650ec00][ipt_do_table ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364463] [ffff954b5650ec00][ip_finish_output ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364478] [ffff954b5650ec00][ip_finish_output2 ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364488] [ffff954b5650ec00][__dev_queue_xmit ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364498] [ffff954b5650ec00][sch_direct_xmit ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364508] [ffff954b5650ec00][dev_hard_start_xmit ][cpu:4 ][eth0 ][pid:6207 ][ping ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18 [2023-6-25 10:13:28.364664] [ffff954b5650ec00][consume_skb ][cpu:7 ][eth0 ][pid:0 ][swapper/7 ] ICMP: 198.18.34.15 -> 192.168.20.100 ping request, seq: 10, id: 18