Score:0

Ubuntu on my nvidia TK1 cant ping outside local net using windows machine as gateway

ph flag

First message here, thanks for helping. I have an Nvidia TK1 with 14.04.1 LTS (GNU/Linux 3.10.40-ga7da876 armv7l) running, and I connected it with a crossover cable to a laptop running windows 10. I set up the nic cards on both computers correctly, the windows machine nic having 192.168.1.2 and the ubuntu machine having 192.168.1.1. The 2 machines can ping each other, and the ubuntu machine can ping the windows machine's wireless NIC card (gateway) which has address 192.168.43.251, but it can't ping anything else, including the windows machine's gateway of 192.168.43.1. The windows machine's routing table looks like this: IPv4 Route Table

===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     192.168.43.1   192.168.43.251     55
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      192.168.1.0    255.255.255.0         On-link       192.168.1.2    291
      192.168.1.2  255.255.255.255         On-link       192.168.1.2    291
    192.168.1.255  255.255.255.255         On-link       192.168.1.2    291
     192.168.43.0    255.255.255.0         On-link    192.168.43.251    311
   192.168.43.251  255.255.255.255         On-link    192.168.43.251    311
   192.168.43.255  255.255.255.255         On-link    192.168.43.251    311
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link       192.168.1.2    291
        224.0.0.0        240.0.0.0         On-link    192.168.43.251    311
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link       192.168.1.2    291
  255.255.255.255  255.255.255.255         On-link    192.168.43.251    311
===========================================================================

and the ubuntu machine's looks like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.2     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
ubuntu@tegra-ubuntu:~$

Anyone got any ideas how to fix it? I tried many times with the route add command, but most of the time I couldn't even successfully add a siingle route. It was very frustrating. If anyone has an idea how to solve this and allow my ubuntu machine to share the windows machine's internet connection, it'd be greatly appreciated. Ivan

Joseph avatar
gb flag
You can attempt to troubleshoot from both ends to your outside address that you want to reach from both your Ubuntu and from your Windows. Suppose the outside address you want to reach is www.google.com, on Ubuntu, issue traceroute www.google.com and on Windows, issue tracert www.google.com observe the two and identify which gateways your traffic from your Ubuntu is going thru and which one is missing out from comparing the same result from your Windows so that you can add the missing gateway in your routing table or routers.
waltinator avatar
it flag
Ubuntu 14.04 has passed itself End-of-life date, and is no longer supported on AskUbuntu.
Score:1
br flag

I suppose it is either routing problem or NAT problem or both.

Your packet routing settings from Linux machine to Windows looks good. But you not mentioned third device in your description, an Internet Gateway with IP 192.168.43.1. It is a small internet router probably. The router does not know the 192.168.1.0/24 network you use for communication between Linux and Windows. It cannot send packets to Linux machine address 192.198.1.1 because the network 192.168.1.0/24 is not in its routing table.

Step 1:

Open router management, go to networking/routing section and add item for Linux machine network:

192.168.1.0  mask 255.255.255.0 via 192.168.43.251

I cannot describe it more exactly because I do not know your router type.

Step 2:

Enable IP routing on your Windows machine. Administrator action is needed. By default it is not enabled!!!

Step 3 (optional, in case internet connection is still not available):

Check NAT setting of router. Some more advanced routers have setting concerning NATed networks. Administrator can select which of networks will be translated ans which not.

Diagnosis:

  • Use Wireshark on Windows machine (2 instances, on both interfaces) and check the communication passing through Windows machine in role Windows router.
  • Check log in your internet router.
Ivan Starr avatar
ph flag
Mr. Netbat, thanks for responding. The 192.168.43.251 is the ip of my cellphone's hotspot, which is in effect my router. The computer that routes to the Linux box is a windows machine, so it uses the windows route command/router. I tried many times to use that damn command without success. 43.1 is apparently the isp's gateway. the route you suggest should be thru 192.168.1.2, I believe. And I have no idea how to look at the NAT setup of the machine, how do you do that on a windows 10 machine? Do you know?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.