I have 2 Ubuntu machines, connected via Ethernet cable, machine A at interface eth0 and machine B at eth6. I have configured IP on both machine.

ifconfig -a on machine A (showing for eth0 only):

eth0      Link encap:Ethernet  HWaddr 98:90:96:9b:83:f1  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::9a90:96ff:fe9b:83f1/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:372 errors:0 dropped:0 overruns:0 frame:0
          TX packets:280 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:101005 (101.0 KB)  TX bytes:30148 (30.1 KB)
          Interrupt:20 Memory:f7c00000-f7c20000

route -n on Machine A:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 eth3   U     0      0        0 eth0     U     1000   0        0 eth3 U     1      0        0 eth3

ifconfig -a on Machine B (Showing for eth6 only)

eth6      Link encap:Ethernet  HWaddr ec:08:6b:0b:85:72  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::ee08:6bff:fe0b:8572/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:90 (90.0 B)

route -n on machine B:

Kernel IP routing table Destination     Gateway         Genmask        Flags Metric Ref    Use Iface         UG    0      0        0 eth7   U     1      0        0 eth7       U     0      0        0 eth0   U     0      0        0 eth6     U     1000   0        0 eth0

When I ping from machine B, I get this:

PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable
From icmp_seq=3 Destination Host Unreachable
From icmp_seq=4 Destination Host Unreachable
From icmp_seq=5 Destination Host Unreachable
From icmp_seq=6 Destination Host Unreachable
From icmp_seq=7 Destination Host Unreachable
From icmp_seq=8 Destination Host Unreachable
From icmp_seq=9 Destination Host Unreachable
--- ping statistics ---
11 packets transmitted, 0 received, +9 errors, 100% packet loss, time 10054ms
pipe 3

Please let me know what I am doing wrong.

  • 1
    Why are you using for your internal network? You're squatting on Verizon's IP space, as well as Sprint's, Amazon EC2's, T-Mobile's, &c… The only reserved "private use" space in that region is actually with netmask That is of course, unless you meant (one zero). – user1686 Sep 19 '18 at 8:51
  • You should be using a crossover Ethernet cable. Are you? – harrymc Sep 19 '18 at 9:39
  • 3
    @harrymc: Should you? Crossover cables are generally a thing of the past now. – user1686 Sep 19 '18 at 10:00
  • 1
    The first thing that stands out are the overlapping routes on machine B (100.*.*.*/8 on eth0), on top of eth0 having a link-local address. You didn't say what's behind eth0 there, but remove this route, and see if the ping then works. Also use ip route get on B to test if routing is correct. And while you are at it, change the 100.*.*.* IP range to a proper private IP range, e.g. 10.*.*.*/8 and 10.0.2.*/24, as the other comment said. – dirkt Sep 19 '18 at 10:07
  • Investigating with ip route get is a good idea, but generally routes are longest-prefix-match so it would be very curious if that were the problem. (Indeed most computers have 2–3 overlapping routes anyway.) – user1686 Sep 19 '18 at 10:52

One reason for such a problem is that you are not using a crossover Ethernet cable or a crossover adapter.

Gigabit Ethernet crossover cable endsGigabit Ethernet crossover cable ends

8P8C modular crossover adapter8P8C modular crossover adapter

  • 3
    This seems unlikely given the nearly ubiquitous prevalence of auto-MDIX NICs. – I say Reinstate Monica Sep 19 '18 at 11:01
  • This was the issue, I had connected one end of the crossover cable it to a USB port via TP-LINK Ethernet Adapter, which didn't work. Thank you! – Ramzah Rehman Sep 19 '18 at 11:14
  • @RamzahRehman You already had a crossover cable, and it wasn't working? – Xen2050 Sep 19 '18 at 11:58
  • @Xen2050 Believe it or not, there are some media access controllers out there that technically implement MDI-X, but don't work correctly if there is a crossover cable involved. I've not seen one in quite a while, and I've never seen a Gigabit one, but a handful of older computers I've dealt with that had 100BaseT cards had the same issues. – Austin Hemmelgarn Sep 19 '18 at 18:37
  • 1
    @RamzahRehman But using a crossover cable together with a crossover adapter... that just turns it back into a regular (patch) cable – Xen2050 Sep 20 '18 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.