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?


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.


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

# /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


@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
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.

hi @alanz can you help?

Hi, suppose you can get two ip and gw,
wifi: gw:
eth0: gw:

route del default gw // make sure all the defalt gw has been deleted
route add default gw

“route del default gw” gives the following

Ive managed to achieve internet and LAN at the same time but ONLY if i disconnect the LAN first to allow the wifi to access the internet then plug the ethernet back in. If i reboot, then I have to do this again so this is still not acceptable.

I have changed the IP subnet of the ethernet to avoid confusion with the wifi one so now these are my settings that are displayed in nmtui.

etho: manual config with no default gateway set
wlan: gateway (I have tried setting DNS to and also tried it without.

I have been struggling with this for 2 months now! I just need a static IP LAN and wifi internet to work at the same time which should not be too much to ask.

2 months later. The answer is you need to tick “Never use this network as the default route” for the static LAN. I cant help but think this might cause issues down the line if multicast data starts to get used…ie all the multicast messages will go out the WIFI rather than the static LAN. But for now, it appears my WIFI + LAN issue is resolved.


You need to add the gw you want to delete.

 route del default gw  

Then let as your default gw.

 route add default gw  

I’m not familar with this GUI tools. But looks like it’s something the same as route.