9

A few days ago my ethernet connection was not working on Ubuntu 20.04 on my computer. I was using two routers: the main one was / is in the living room and connected to the second router which was / is in bridge mode and the second router was connected to my computer. Thanks to @heynnema, I found out the cause of the problem was the second router. When I connected the main router directly to my computer, the ethernet worked.

Yesterday, my father and I connected the second router to another PC at home. (The main router and my computer is still directly connected together but the other PC is connected to the second one and the second router is connected to the main one.) But then the ethernet on my computer started not working again. It only works when the second router isn't connected altogether. I want the second router to work because I can't connect to WiFi in my bedroom without it because the WiFi range of the main one is too small. What should I do? I have no problem with the connection on Windows 10.

Edit: sudo lshw -c network output: https://i.sstatic.net/HMLAd.jpg

Edit 2: I installed Linux Bash Shell on Windows 10 and wrote sudo lshw -c network again. Here is the output: https://i.sstatic.net/Ly509.jpg And the output of ip a: https://i.sstatic.net/T8zNw.jpg

3 Answers3

8

Router/cabling problem

modem--> main router--> secondary bridged router--> PC

Your ethernet link speed is only 100Mbs. It's capable of 1Gbs. Check that you're using cat 5e or cat 6 cables. Check that your routers support 1G LAN ports.

After moving the cat 5e cable from the computer directly to your main router, from the secondary bridged router, ethernet now works. Check your configuration of the secondary router.

Netplan

Change your /etc/netplan/01-network-manager-all.yaml file to look like this:

network:
  version: 2
  renderer: NetworkManager

sudo netplan generate

sudo netplan apply

reboot

Then use the NetworkManager applet to connect to the "Wired Connection".

Milan
  • 196
heynnema
  • 73,649
1

Try this:

Go to Settings-Network. With the Ethernet wire plugged in, on the Wired section, toggle the switch on.

Click on the little gear next to the switch and make sure that "Connect Automatically" is toggled on. You can find it on the Details tab.

Diatrix
  • 36
1

I had the same exact issue as you did and this what I did to fix my problem.

Setup: First off, let me explain my setup. I have two routers, (Netgear R6400 and Netgear WNDR4000). My main router is the R6400 and my secondary router (WNDR4000) is setup as access point. My laptop running Ubuntu 20.04 is connected via ethernet to the secondary router (WNDR4000).

As you mentioned, your machine isn't able to connect to the internet when connected via ethernet to your secondary router, but when connected by ethernet to your main router, it works. I have this same exact issue with my setup. However, if I connect my windows laptop via ethernet to my secondary router, there are no problems.

What I found out is that its probably due to the DHCP in the router not being able to setup a ip address for your ubuntu machine. For some reason, ubuntu and my old router does not play along very well with my setup.

Fix: You will have to setup a static ip address on your ubuntu laptop. Its pretty simple. Just go to Settings > Network and under "Wired", click the settings icon. Select IPv4 and choose the "manual" option. Then fill in your static ip address. If you don't know what to put in for static ip address, then jump to the bottom paragraph. Don't forget to enter values for the routes field. Here are the values I used below (Yours will most likely be different):

Addresses: Address: 192.168.1.33 Netmask: 255.255.255.0 Gateway: 192.168.1.1

DNS: 192.168.1.25 (Your dns will be different)

Routes: Address: 192.168.1.1 Netmask: 0.0.0.0 Gateway: 192.168.1.1

After that, its not required, but I recommend going into your MAIN router settings and adding your static ip address into the address reservations to prevent it from possibly changing or taking the ip address you're using.

Static IP: For determining a static IP address, this can be done a number of ways. What I found worked for me was to first connect via wifi to my router and then going to the router settings (192.168.1.1) and grabbing the ip address of the laptop. Then you can disconnect from wifi and start entering the ip address into your ubuntu machine.