3

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

2
  • I will try it some hours
    – Leos313
    Aug 14, 2019 at 13:54
  • The ethernet does not use dhcp but a static address assigned by me only to communicate with the embedded system
    – Leos313
    Aug 14, 2019 at 14:25

3 Answers 3

4

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:

enter image description here

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.

enter image description here

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

8
  • +1 because it solve the problem when using ubuntu 18.04. With XUbuntu 16.04 this option does not exist. Any suggestion?
    – Leos313
    Aug 14, 2019 at 15:51
  • 2
    I have just found it and works. And I do not use dhcp. I will write another answer with the solution on my OS! This was a great help!! thank you!
    – Leos313
    Aug 14, 2019 at 15:59
  • @Leos313 I am glad I could point you to the right direction and you found the setting in XUbuntu 16.04. Please write your own answer and accept it as the correct one. This will help others.
    – user68186
    Aug 14, 2019 at 16:18
  • For some reason the "Apply" button grey's out once I check that box at the bottom. Any idea how to actually apply this change?
    – Peter
    Mar 12, 2021 at 17:52
  • @Peter Is IPv4 method set to automatic?
    – user68186
    Mar 12, 2021 at 18:49
1

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)

enter image description here

Choose > Edit connection... and select the connection you want to edit (in my case the Wire Connection 1):

enter image description here

From the window that will be open, select the tab IPv4:

enter image description here

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:

enter image description here

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

0

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):

  1. open Edit connection...
  2. create (or open the existing) Wire connection
  3. in the IPv4 Settings tab, select Method: Shared to other computers. This is the main difference with the other solutions for this answer:

enter image description here

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 under eth0 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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .