WiFi Internet Disconnects When Using LAN

I have a JetsonNX and a custom baseboard. The wifi internet works until I plug in a Ethernet for LAN.

I wish to use my ethernet (fixed IP or DHCP allocated) AND keep using the wifi internet.

I presume this is a config issue on ubuntu somewhere?

@alex15

Wifi and Ethernet are different network devices, Mostly there will be only one used for internet connection, if you plugin a ethernet, ethernet has the highest prority to transfer your data. So there may still some issue with your wifi devices.

My I know which wifi module are you experience with?

I am using an Intel AX200NGW.

Yes I want the internet to remain available via WiFi, and the ethernet to be used for offline LAN stuff.

For AX200NGW, you can get the right backport driver here: kernel/git/iwlwifi/backport-iwlwifi.git - Backport tree for iwlwifi

hi @alanz, the internet already works via the wifi interface when no LAN cable is connected. However, when I plug in a LAN (which does NOT have internet), I lose the WiFi-provided internet. When I remove the LAN cable, the WiFi internet becomes available again.

The behaviour I need is to be able to set a static IP for the ethernet port, but internet via WiFi.

@alex15

You can update the default route config to internet via WIFI.
Followed are the scritpt for your reference.

#!/bin/sh  
# /home/trevor/cpplive/WifiGateway.sh  
wifi=`iwconfig | head -1 | awk '{print $1}'`  
echo "Wifi interface: $wifi"  
gw=`ip addr show $wifi | head -3 | tail -1 | awk '{print $2}'`  
echo "Wifi IP: "$gw  
gw=`echo $gw | awk -F. '{printf("%s.%s.%s.1",$1,$2,$3)}'`  
echo "Wifi gateway: "$gw  
echo "Set the Wifi gateway as the default gw now"  
route delete default  
route add default gw $gw  
echo "Set the Wifi gateway as the default gw end"  

@alanz sorry should this be typed in the terminal window?

I typed the below but it said it wasn’t found

!/bin/sh
/home/trevor/cpplive/WifiGateway.sh

@alanz can you help me implement your script please. Many thanks in advance

Pls follow the guide here ip route add network command for Linux explained.

You just need to set your WIFI gw as default so that all the network acess will route the wifi.

@alanz I followed the instructions above
image
But seem like still no internet.
Am I doing something wrong?

Hi @alanz

can you provide any further assistance? This issue is really causing operational issues in our setup.

We just want to have a fixed ethernet, AND wifi providing internet. Please see below for the settings I have for the wifi and for the ethernet connection. Manh attempted to implement what you said but we still have no internet when ethernet is connected.
wifi|627x500