Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am on an intranet that is not connected to the internet and a wifi router with connection to the Internet. When am connected to the router, I can browse the Internet but cannot browse my LAN with my Ethernet cable connected.

How can I browse the Internet via my wifi router and at the same browse my local lan web app via my connected Ethernet cable?

share|improve this question
How do you access "LAN applications"? Could you give us an example of the web address you are using to access them? Could you confirm that when you say "it tries to connect to the internet" you mean that when you try to access a LAN application it somehow tries to look for this application on the internet? How did you configure the network on your computer (both wireless and ethernet)? – Huygens Mar 3 '13 at 21:07
@Huygens I use the following address for my LAN web based apps: or And it tries to go to the internet. Both connections are DHCP. – omadegbo Mar 4 '13 at 0:33
What is nslookup returning for IP on the Wireless and what is it returning on the ethernet LAN? In addition, what is the subnet of your DHCP Wireless LAN and what is the sunet of your DHCP ethernet LAN? Finally, what is the routing table when you are connected to the ethernet LAN (route -n)? – Huygens Mar 4 '13 at 8:37
For what i understand, the wireless and wired are 2 different connections, there should be no problem for your system to resolve local names through your lan interface. Can you provide us some info on your ip addresses / subnet mask? Run the following command on your console and give us the results: ifconfig or ip add Post the results. – jmsaraiva Mar 4 '13 at 14:35
you have to choose one or the other, they both do the same function, Ethernet overrides wifi. – Sean Jul 24 '13 at 3:37

You sure can. You didn't specify it, but I'm assuming you get the IP address automatically (via DHCP) both on wireless and wired connection.

Wired Ethernet is faster than wireless, so if there are two ways to get somewhere, wired will takes precedence over Wi-Fi by default. With that said, when you connect to both links, both DHCP servers by default will advertise themselves as the default gateway for all of the traffic.

So now your computer thinks it has two ways to connect to the Internet, and since wired is preferred it'll send traffic for the Internet via Ethernet. If that's the case, you would see two gateways for default networks in your routing table, route -n, one with your wireless router as a gateway and one for the wired.

But the Metric for the Ethernet gateway would be lower than wireless, so your PC will send the packets there. Now that your Ethernet router gets them, it doesn't know what to do with them, so it just drops them. The order where you connected first shouldn't matter.

As far as fixing (this assumes the DHCP case), the correct way would be to tell the LAN router to stop advertising itself as the default gateway. You need to log in to the router and look through settings. If you have no control over the router, you can remove it from your end with:

route del default gw eth.router.ip.address
share|improve this answer

I still do not have enough information for giving you an answer in which I am 100% confident, but here are a few hypothesis.

  • When connected on the cabled LAN, you are on a different subnet than when using the Wireless LAN. The routing between these 2 LAN is not configured, and thus when requesting an IP range that is not in the current active LAN, the packet are sent to the "default" interface, usually the gateway/router.
  • You have both Wireless and wired connection active, but the wired one is activated after the wireless and whatever network management tool you are using is just replacing the route table entries with the last activated connection. Thus, when you activate the wired connection, the previous routing table is "cancelled/removed". You may need to adjust the routing manually in your network management tool.
share|improve this answer

protected by Community Aug 27 '14 at 14:19

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.