Setting Up Ubuntu for Ethernet LAN While Preserving Wifi Internet Access

From RoboJackets Wiki
Jump to navigation Jump to search

In 2018, both RoboRacing and IGVC are adding features to their robot which work through the Ethernet hardware. By default, Ubuntu prioritizes the ethernet interface over wifi. In situations where an internet connection is still desired (e.g. SSH connection to robot, pulling from remote changes on git repo onto the robot), Ubuntu can be easily configured to use ethernet for local network connections only.

Procedure:

  1. Open the connections editor from the network drop-down ("Edit Connections...") or launch nm-connections-editor
  2. Select the wired connection (the local one, which we don't want to use for Internet access) and click "Edit"
  3. Under IPv4 settings, change Method to "Manual"
  4. Enter any static IP (e.g. 10.*.*.*), set Netmask to 255.255.255.0 (or 24), and leave Gateway blank
  5. Select "Routes..." and enable "Use the connection only for resources on its network"
  6. Save progress and restart your networking stack: "Enable Networking" or nmcli n off && nmcli n on

You should now be able to both access the Internet and ping devices on your Ethernet LAN.