0

what happens is my laptop connects to the router via lan cable but I can't access internet. while on my other laptop I can.

Thought it was a lan cable issue, so replaced it. Still the same problem and as my other laptop connects to the same router via the same lan cable there has to some problem with my laptop.

So tried changing the router but keeping the lan cable same, and I can connect to the router and access Internet as well!

So somehow I can't access internet on my laptop connected to my router via lan cable! Anyway WiFi works just fine.

Using Ubuntu 15.04 right now.

output of lspci -knn | grep Eth -A2

01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 05)
Subsystem: Dell Device [1028:0597]
Kernel driver in use: r8169
4
  • Do you turn of wifi when try to connect by ethernet? And also please edit your question and add output of lspci -knn | grep Eth -A2 terminal command.
    – Pilot6
    Jul 4, 2015 at 9:04
  • So do you turn off wireless in Network Manager when you try to connect using Ethernet?
    – Pilot6
    Jul 4, 2015 at 9:19
  • Disabling the WiFi and connecting to Ethernet worked! what is the problem in my case?
    – equitharn
    Jul 4, 2015 at 9:52
  • That's not a problem. See my answer.
    – Pilot6
    Jul 4, 2015 at 9:55

2 Answers 2

1

You need to disable wireless network when you connect by Ethernet.

Any OS and Ubuntu has a routing table where rules are set up where to send packets in order to reach Internet or specific network segments.

If your wireless network is enabled, default route is set up to wireless interface and you can't get access to Internet.

General rule is that you can't use more than one network interface in a system without setting up routing.

5
  • but I've been using internet with lan cable plugged in and wireless network on. When the lan is removed System uses WiFi and when it's reconnected, it uses Ethernet. I've been facing this problem a few days now before that it was all fine
    – equitharn
    Jul 4, 2015 at 9:58
  • That must be because the default route is set up to wireless interface. One interface has a priority. It can be changed, but I do not remember how. Good practice is to disable unneeded interface. It is just a mouse click.
    – Pilot6
    Jul 4, 2015 at 10:01
  • decide which you want to use then dis- the other one
    – Skaperen
    Jul 4, 2015 at 10:24
  • @Skaperen for now I have, but I still need to get WiFi and Ethernet working together, so when I disconnect Ethernet WiFi is connected back again, and vice versa.
    – equitharn
    Jul 4, 2015 at 12:21
  • At first I thought it was a joke. :-) Worked like a charm. +1 for it. I just disabled wifi and everything is fine now. Thank you
    – Nabin
    Feb 17, 2016 at 2:07
0

From this answer:

1) Edit Connections
2) Edit Wired Connection 1 (or Eth0)
3) IPv4 Settings Tab
4) Routes...
5) Check the box "Use this connection only for resources on its network"
6) Success!

You must log in to answer this question.

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