Context:
- the Wifi connection works perfectly with the DHCP of the router. Only with this connection, I can navigate the web.
- the wire connection is necessary for me to be connected directly with an embedded system. In the middle, there is a Switch and the only thing I do is to set up the address IP of both (laptop and embedded system). The systems speak perfectly using ssh etc. No problem here.
- OS Xubuntu 16.04 on my laptop and a Linaro on the embedded (please note: the problem is the same for 18.04 and the solution proposed in the answer works properly).
Problem: When I am connected to the system with the ethernet connection, it is impossible for me to navigate on the web. I guess it is because the laptop tries to access using the ethernet connection. Of course, the ethernet connection goes only to the embedded system (no web from this side).
Question: Can I use the ethernet only for the system and the wifi to continue to navigate the web pages? How can I do that?
Please note: I would like to use both (1) the wifi to navigate and (2) the ethernet for the embedded system AT THE SAME TIME. Separately they work perfectly
I have a similar setup with an Ubuntu 18.04 LTS with both Ethernet and WiFi connection. The WiFi connects to the router and the Internet. The Ethernet cable connects to a Raspberry Pi.
For Ubuntu 16.04, this answer may be useful: Connecting PC and RaspberryPi using LAN cable
The instructions below are for Ubuntu 18.04
Go to System Setup menu > Network tab on the left margin > The cog icon for the Wired connection as shown below:
Go to the IPv4 tab of the Wired Connection and check the box Use this connection only for resources on its network as shown below.
That was all. I let the desktop assign the IP by DHCP and changed the Pi's setting to request a specific IP address from the desktop. It works for me.
If you manually assign IP addresses then do not specify any Gateway IP address in this setting. A Gateway is not needed in this setup and will confuse the kernel-level packet routing. Thanks Thomas Ward.
Hope this helps
Thanks to @user68186 I have found the solution on Xubuntu 16.04:
Double click on the network connection (in my case the little symbol of wireless on top-right)
Choose >
Edit connection...
and select the connection you want to edit (in my case the Wire Connection 1):From the window that will be open, select the tab IPv4:
Organize the network as you prefer (in my case no DHCP but a P2P connection with a little embedded system and a switch in the middle). Now press
Routes
on the bottom-right side and select the option Use this connection only for resource on this network:Press Ok and Save the setup.
The wifi for internet and the ethernet for the P2P are working perfectly at the same time. Thanks @user68186
Another wonderful solution (unfortunately not considered in the beginning) consists of creating an ethernet connection so that the internet access through the wifi is also shared with the embedded system. The solution is very easy to be implemented (and further details can be found surfing on the web, here for an example):
Nothing more should be done in the "server part" (i.e., the workstation). You will see that the computer creates its own network. Click on Connection Information to see it or, from the command line, type
ifconfig
and look the take note of the address, sub-mask, and the other parameters for the ethernet connection (for example undereth0
in my case).The embedded system (for example a raspberry PI connected with the eth cable) should use the just-create network, using the parameter that you have just observed.
CONCLUSION: that way, you will be able to access the system (using
ssh
or what you want) and, at the same time, have free access to the web (in case you need to download new packets or programs).