2

I have Ubuntu 16.04 (machine 1) and Windows 10 (machine2). I have connected the ubuntu to the wifi with IP 192.168.0.110 and I can browse internet easily.

I have to do remote C++ development on ubuntu from windows using Visual studio. I have connected the Ethernet cable between ubuntu and windows. On both the side I have set the static IP i.e. ubuntu has 192.168.0.150 and windows has 192.168.0.149. I can ping windows from ubuntu and vice versa. But when I try to browse internet on Ubuntu, its not working. If I disconnect wired connection from ubuntu, I can browse the internet fine. I don't know what I have done wrong here due to which I am not able to connect to internet on Ubuntu.

Can anyone please suggest any idea. Thanks

S Andrew
  • 484
  • Is this a cross cable connection between the two systems or a connection to the same network (router) as the Wifi? – FedKad Oct 15 '19 at 06:23
  • I didnt get you but looks like its connection to same network. Do I need to modify the IP to some other range like 192.168.1.xx instead of 192.168.0.xx.? – S Andrew Oct 15 '19 at 06:29

2 Answers2

1

Likely a problem of routing. When you connect the Ethernet, Network manager assumes that it also connects to the Internet and since it has a higher priority (or smaller "metrics"), or is just assumed faster, it routes all the traffic through it.

Possible fixes:

  • Use the connection manager to declare the Ethernet connection to have a lower priority (which may mean a higher number)
  • Reset the default routing after connecting the Ethernet: ip route .... You maye have to set a specific routing for the Windows machine.
  • Don't use Ethernet on Ubuntu. Just connect the Windows system to the same LAN (Wifi or Ethernet to the router) and use its LAN address on the Ubuntu side.
xenoid
  • 5,504
0

After setting the wired connection settings: In the IP4 menu Select shared to other computers https://www.tecmint.com/share-internet-in-linux/