0

I use the 2 ethernet interface on the my system board, eth0 / eth1(usb to ethernet) like the followings.

root@E3-RDP:~# ifconfig
eth0 Link encap:Ethernet HWaddr ae:a1:99:48:86:79
inet addr:10.10.0.171 Bcast:10.10.0.255 Mask:255.255.255.0
inet6 addr: fe80::aca1:99ff:fe48:8679/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:532 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36510 (36.5 KB) TX bytes:972 (972.0 B)
Interrupt:114

eth1 Link encap:Ethernet HWaddr 00:0e:c6:87:72:01
inet addr:10.10.0.176 Bcast:10.10.0.255 Mask:255.255.255.0
inet6 addr: fe80::20e:c6ff:fe87:7201/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:94 (94.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3336 (3.3 KB) TX bytes:3336 (3.3 KB)

When I check the system's mac address(eth0/eth1) on the pc, those address is the same like the following.

C:\Users\andy>arp -a IP MAC ADDR Type
10.10.0.1 90-9f-33-a8-20-14 dynamic
10.10.0.171 ae-a1-99-48-86-79 dynamic
10.10.0.176 ae-a1-99-48-86-79 dynamic
10.10.0.186 60-a4-4c-35-1a-dd dynamic

What should I check for this problem?

On my system the ping test(eth1) is failed.

root@E3-RDP:~# ping -I eth1 10.10.0.173
PING 10.10.0.173 (10.10.0.173) from 10.10.0.176 eth1: 56(84) bytes of data.
From 10.10.0.176 icmp_seq=1 Destination Host Unreachable
From 10.10.0.176 icmp_seq=2 Destination Host Unreachable
From 10.10.0.176 icmp_seq=3 Destination Host Unreachable
From 10.10.0.176 icmp_seq=4 Destination Host Unreachable
From 10.10.0.176 icmp_seq=5 Destination Host Unreachable
From 10.10.0.176 icmp_seq=6 Destination Host Unreachable
^C
--- 10.10.0.173 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6007ms
pipe 3

But the ping test by eth0 is ok.

root@E3-RDP:~# ping 10.10.0.173
PING 10.10.0.173 (10.10.0.173) 56(84) bytes of data.
64 bytes from 10.10.0.173: icmp_seq=1 ttl=128 time=2.40 ms
64 bytes from 10.10.0.173: icmp_seq=2 ttl=128 time=0.327 ms
64 bytes from 10.10.0.173: icmp_seq=3 ttl=128 time=0.459 ms
64 bytes from 10.10.0.173: icmp_seq=4 ttl=128 time=0.727 ms
64 bytes from 10.10.0.173: icmp_seq=5 ttl=128 time=0.403 ms
64 bytes from 10.10.0.173: icmp_seq=6 ttl=128 time=0.528 ms
^C
--- 10.10.0.173 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 0.327/0.808/2.406/0.725 m

I think that the misrecognized mac address causes the ping test error(eth1).

And I want to implement the TCP client with the eth1.

Thanks.

2 Answers2

0

eth1 is not actually "usable". Don't get confused seeing "UP" in the command output with the actual state of your interface. You should be seeing RUNNING, just like the one in eth0.

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

IMO, commands such as ip link show and ip addr show provide clearer statuses of your network interfaces.

Here is a pretty good explanation of what's happening:

IFF_RUNNING is supposed to reflect the operational status on a network interface, rather than its administrative one. To provide an example, an Ethernet interface may be brought UP by the administrator (e.g. ifconfig eth0 up), but it will not be considered operational (i.e. RUNNING as per RFC2863) if the cable is not plugged in.

Anyway, you need to recheck eth1 as it appears to be down. ip link show would be a good start, but most likely it is currently not up or you have a cabling issue, esp. that you seem to have a physical machine.

Lester
  • 597
  • 4
  • 16
0

Both interfaces are in the same subnet 10.10.0.0/24. If you will check the routing table with route -n you will see 2 entries for the same subnet with different interfaces to use. The interface eth0 would be before the eth1 in the list. So even if packets are sent to this host via eth1 IP address, the packets from this host go back to this subnet via interface eth0. This is the reason why you see in the arp table same MAC address for both IP addresses.

You can try to use static routes or IP tables to do this, I guess.

To check interface status is possible with ethtool command.

MaksaSila
  • 76
  • 3