Hello,
I have am335x evm based device with DUAL EMAC connected to 2 PHY micrel 8031 so I have two different ethernet ports.
At the moment device connected only one port eth1.
On device:
root@TC711-2-7C669D1974A8:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue
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
inet 10.9.32.1/16 scope global lo:1
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 7c:66:9d:19:74:a6 brd ff:ff:ff:ff:ff:ff
inet 10.24.2.2/23 brd 10.24.3.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 7c:66:9d:19:74:a8 brd ff:ff:ff:ff:ff:ff
inet 10.24.1.2/23 brd 10.24.1.255 scope global eth1:ServIntrf
valid_lft forever preferred_lft forever
root@TC711-2-7C669D1974A8:~# ip ro
10.24.0.0/23 dev eth1 src 10.24.1.2
10.24.2.0/23 dev eth0 src 10.24.2.2
On host:
root@tvz1:~# /sbin/ip ro
.
.
10.24.0.0/20 dev eth1 proto kernel scope link src 10.24.0.1
.
.
So two different network on device configured to one common network on host. Why I can ping both device ip from host. But only when eth1 intf connected.
root@tvz1:~# ping 10.24.1.2 -c 2
PING 10.24.1.2 (10.24.1.2) 56(84) bytes of data.
64 bytes from 10.24.1.2: icmp_seq=1 ttl=64 time=0.388 ms
64 bytes from 10.24.1.2: icmp_seq=2 ttl=64 time=0.324 ms
--- 10.24.1.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.324/0.356/0.388/0.032 ms
root@tvz1:~# ping 10.24.2.2 -c 2
PING 10.24.2.2 (10.24.2.2) 56(84) bytes of data.
64 bytes from 10.24.2.2: icmp_seq=1 ttl=64 time=3.89 ms
64 bytes from 10.24.2.2: icmp_seq=2 ttl=64 time=0.263 ms
--- 10.24.2.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1007ms
rtt min/avg/max/mdev = 0.263/2.079/3.895/1.816 ms
arp-table on host:
root@tvz1:~# /sbin/arp -n
Address HWtype HWaddress Flags Mask Iface
.
10.24.1.2 ether 7c:66:9d:19:74:a8 C eth1
.
10.24.2.2 ether 7c:66:9d:19:74:a8 C eth1
.
And both ip with only device eth1 mac. How can I prevent such behaviour ?