Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Issues related to configuring your network
Post Reply
grasshopper
Posts: 5
Joined: 2019/02/06 00:04:33

Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by grasshopper » 2019/02/06 00:36:28

Hi

I have the problem only when I tried to ping "192.168.104.1". Base on the tcpdump, it is ping from eth1.32 IP Addr but using the eth0 MAC Addr. I add the static route to "192.168.104.1" through eth1.32. However, it works fine when I ping to "169.254.3.2" and it is using the Eth1.32 MAC Addr and IP Addr.

Any idea why is that?

(log from centos)

Code: Select all

[centos]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.3.17.105  netmask 255.255.254.0  broadcast 10.3.17.255
        inet6 fe80::50cf:97ff:fe8c:83ab  prefixlen 64  scopeid 0x20<link>
        ether 52:cf:97:8c:83:ab  txqueuelen 1000  (Ethernet)
        RX packets 27802749  bytes 6928045740 (6.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14425788  bytes 119155090362 (110.9 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::acd1:20ff:fe96:fd52  prefixlen 64  scopeid 0x20<link>
        ether ae:d1:20:96:fd:52  txqueuelen 1000  (Ethernet)
        RX packets 241490  bytes 66585249 (63.5 MiB)
        RX errors 0  dropped 16  overruns 0  frame 0
        TX packets 244273  bytes 42754856 (40.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1.2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.62.150  netmask 255.255.224.0  broadcast 169.254.63.255
        inet6 fe80::acd1:20ff:fe96:fd52  prefixlen 64  scopeid 0x20<link>
        ether ae:d1:20:96:fd:52  txqueuelen 1000  (Ethernet)
        RX packets 104445  bytes 32361049 (30.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 119696  bytes 21247468 (20.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1.32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.3.151  netmask 255.255.255.0  broadcast 169.254.3.255
        inet6 fe80::acd1:20ff:fe96:fd52  prefixlen 64  scopeid 0x20<link>
        ether ae:d1:20:96:fd:52  txqueuelen 1000  (Ethernet)
        RX packets 1267  bytes 72605 (70.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12251  bytes 2600970 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 11182120  bytes 114812759381 (106.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11182120  bytes 114812759381 (106.9 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[centos]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.3.16.1       0.0.0.0         UG    0      0        0 eth0
10.3.16.0       0.0.0.0         255.255.254.0   U     0      0        0 eth0
169.254.3.0     0.0.0.0         255.255.255.0   U     401    0        0 eth1.32
169.254.32.0    0.0.0.0         255.255.224.0   U     400    0        0 eth1.2
192.168.104.1   169.254.3.2     255.255.255.255 UGH   401    0        0 eth1.32
[centos]$ traceroute 169.254.3.2
traceroute to 169.254.3.2 (169.254.3.2), 30 hops max, 60 byte packets
 1  169.254.3.2 (169.254.3.2)  0.715 ms  0.812 ms  0.839 ms
[centos]$ traceroute 192.168.104.1
traceroute to 192.168.104.1 (192.168.104.1), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

Thx,

grasshopper
Posts: 5
Joined: 2019/02/06 00:04:33

Re: Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by grasshopper » 2019/02/07 17:50:14

I include the additional wireshark easier for people to understand what's the issue from wireshark point of view.

"eth1-32_mac_ip_matched":
from this wireshark, you can see the ip addr and mac addr are coming from eth1.32. I did ping to 169.254.3.2 which is in the same subnet of eth1.32

"eth1-32_mac_eth0_ip":
from this wireshark, the weird thing is the packet still go out of eth1.32 interface (mac addr is eth1.32), however, it is using the eth0 ip addr. I ping to 192.168.104.1 which suppose to use the static route that I specified to go through eth1.32. The packet did go out from this interface, but using the eht0 ip addr.
Attachments
eth1-32_mac_eth0_ip.PNG
eth1-32_mac_eth0_ip.PNG (57.16 KiB) Viewed 1906 times

grasshopper
Posts: 5
Joined: 2019/02/06 00:04:33

Re: Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by grasshopper » 2019/02/07 17:51:57

here is the 2nd attachment.
Attachments
eth1-32_mac_ip_matched.PNG
eth1-32_mac_ip_matched.PNG (54.8 KiB) Viewed 1906 times

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by hunter86_bg » 2019/02/09 15:05:52

Can you provide output of :

Code: Select all

ip addr show
Are you sure that the ping from eth0 is not constantly happening?Can you make a trace without running ping yourself?

grasshopper
Posts: 5
Joined: 2019/02/06 00:04:33

Re: Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by grasshopper » 2019/02/09 23:02:28

Thank you "hunter86_bg" look into this issue.

I run the following tcpdump command to confirm that there is no ping going through eth0.

Code: Select all

tcpdump -nni eth0 icmp
Here is the output that you request.

Code: Select all

[root@centos network-scripts]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:cf:97:8c:83:ab brd ff:ff:ff:ff:ff:ff
    inet 10.3.17.105/23 brd 10.3.17.255 scope global dynamic eth0
       valid_lft 28077sec preferred_lft 28077sec
    inet6 fe80::50cf:97ff:fe8c:83ab/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether ae:d1:20:96:fd:52 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::b0e7:15bd:ace0:b82a/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
46: eth1.2@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether ae:d1:20:96:fd:52 brd ff:ff:ff:ff:ff:ff
    inet 169.254.62.150/19 brd 169.254.63.255 scope link noprefixroute eth1.2
       valid_lft forever preferred_lft forever
    inet6 fe80::acd1:20ff:fe96:fd52/64 scope link 
       valid_lft forever preferred_lft forever
47: eth1.32@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether ae:d1:20:96:fd:52 brd ff:ff:ff:ff:ff:ff
    inet 169.254.3.151/24 brd 169.254.3.255 scope link noprefixroute eth1.32
       valid_lft forever preferred_lft forever
    inet6 fe80::acd1:20ff:fe96:fd52/64 scope link 
       valid_lft forever preferred_lft forever

grasshopper
Posts: 5
Joined: 2019/02/06 00:04:33

Re: Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by grasshopper » 2019/02/12 18:10:14

Finally, I got the suggestion from my coworker with the following command. It seems not make sense why we need to specify the "src" since it is already defined the dev with eth1.32. The routing table looks exactly the same as before. As long as it works, I'm happy :D

Code: Select all

192.168.104.1/32 via 169.254.3.2 dev eth1.32 src 169.254.3.151

Romario Picari
Posts: 4
Joined: 2018/09/10 09:10:49

Re: Ping traffic goes out with eth1.32 IP Addr, but with eth0 MAC Addr

Post by Romario Picari » 2019/02/21 08:29:03

I had the same problem as you, and searching around in forums mos of answers were to make a fresh installation which in most cases did work for some people.
In my case i blocked all outgoing traffic because i use server only localy.

Post Reply