Do I have an issue with my traceroute?

0

I am trying to set up a network as following :

=============================
DHCP fix addresses :
PC1 => 192.168.0.38
PC2 => 192.168.0.39

=============================
PC1:
eth0   inet addr:10.10.0.2     Bcast:10.255.255.255  Mask:255.0.0.0
wlan0  inet addr:192.168.0.38  Bcast:192.168.0.255   Mask:255.255.255.0

Destination     Gateway         Genmask         Flags Iface
0.0.0.0         192.168.0.254   0.0.0.0         UG    wlan0
10.0.0.0        0.0.0.0         255.0.0.0       U     eth0
172.17.0.0      0.0.0.0         255.255.0.0     U     docker0
192.168.0.0     0.0.0.0         255.255.255.0   U     wlan0
=============================
PC2:  
wlan1  inet addr:192.168.0.39  Bcast:192.168.0.255   Mask:255.255.255.0
eth0   inet addr:10.10.0.4     Bcast:10.255.255.255  Mask:255.0.0.0

Destination     Gateway         Genmask         Flags Iface
0.0.0.0         192.168.0.254   0.0.0.0         UG    wlan1
172.17.0.0      0.0.0.0         255.255.0.0     U     docker0
192.168.0.0     0.0.0.0         255.255.255.0   U     wlan1
=============================

So initially my two PCs are connected via wifi to internet through my internet's box dhcp (fix address). The bad thing about it is that for file transfert eveyrything goes through wifi. So I added a cable inbetween the computers, and would like to use this cable for any file transfert. The issue is that I can not even ping in between the computers !

From PC1 I get :

traceroute 10.10.0.4
traceroute to 10.10.0.4 (10.10.0.4), 30 hops max, 60 byte packets
 1  10.10.0.2 (10.10.0.2)  2997.858 ms !H  2997.800 ms !H  2997.778 ms !H

What does the '!H' means ? Is that an indication of error ?

And from PC2 I can not reach PC1 (as there is no route => how could I add a route ? )

traceroute 10.10.0.2
traceroute to 10.10.0.2 (10.10.0.2), 30 hops max, 60 byte packets
 1  192.168.0.254 (192.168.0.254)  64.193 ms  69.008 ms  71.722 ms
 2  * * *
 3  * * *
 4  * * *

EDIT:

On PC2 :

ethtool eth0
Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                         100baseT/Half 100baseT/Full 
                                         1000baseT/Half 1000baseT/Full 
    Link partner advertised pause frame use: Symmetric
    Link partner advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: on
Cannot get wake-on-lan settings: Operation not permitted
    Current message level: 0x000000ff (255)
                   drv probe link timer ifdown ifup rx_err tx_err
    Link detected: yes

EDIT :

ON PC2

$ dmesg | grep eth0
[    5.293971] tg3 0000:04:00.0 eth0: Tigon3 [partno(BCM95723) rev 5784100] (PCI Express) MAC address 3c:4a:92:b2:a2:1e
[    5.293974] tg3 0000:04:00.0 eth0: attached PHY is 5784 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
[    5.293976] tg3 0000:04:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
[    5.293978] tg3 0000:04:00.0 eth0: dma_rwctrl[76180000] dma_mask[64-bit]
[    9.124499] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.758438] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.758756] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   13.183081] tg3 0000:04:00.0 eth0: Link is up at 1000 Mbps, full duplex
[   13.183091] tg3 0000:04:00.0 eth0: Flow control is on for TX and on for RX
[   13.183104] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
networking
wireless-networking
routing
ping
asked on Super User Oct 29, 2015 by Romain Jouin • edited Oct 29, 2015 by Romain Jouin

1 Answer

0

Assuming the state of your network hasn't changed from your diagram above, PC2 does not have a route back to PC1. You need to add a route to PC2, but the command you tried in the comments:

route add -net 10.10.0.0/255.0.0.0 gw 10.10.0.4

isn't what you want. This command has a few errors:

  1. /255.0.0.0 is not the correct way to specify the netmask.
  2. gw 10.10.0.4 is telling PC2 to send it back to itself! Not what we want.
  3. 10.10.0.0 isn't the correct network ID. Should be 10.0.0.0.

The following is what we want:

route add -net 10.0.0.0 netmask 255.0.0.0 dev eth0

This tells PC2 to send those packets out your wired interface eth0.

Since PC1 already has a route to PC2 according to your diagram, this should do it.


On another note, even if you get the cable connection working, your file may still not transfer by cable instead of Wi-Fi. It will depend on how your program tries to reach the other side. If you specify the relevant IP address (10.10.0.x), then there shouldn't be problems, but if you specify by the machine hostname, name resolution will come into play and you cannot be sure the IP address used will always be 10.10.0.x rather than the Wi-Fi address 192.168.0.x. If that becomes an issue, you may want to look into editing your hosts file.

answered on Super User Oct 30, 2015 by Stanley Yu

User contributions licensed under CC BY-SA 3.0