Can I choose WiFi over Ethernet LAN?

9

3

Possible Duplicate:
Automatically prefer Ethernet over WLAN

I sit in an office environment with LAN, the LAN cable is always plugged into my machine, so by default all traffic is routed via the wired network. Traffic on the network is limited to specific sites only.

On the other hand we have a WiFi router in the office for developers, so as soon as you want to access anything that is blocked, you simply enable your WiFi and disconnect your LAN cable.

I would like to avoid getting under the table and unplug my LAN cable every time I switch on the WiFi.

Can I set up my WiFi to take priority, for example, if I leave my LAN cable plugged in, and switch on my WiFi, all traffic is now routed via WiFi instead of wired network?

I know there is a priority setting on network device properties, but it doesn't seem to take effect, the wired connection always takes preference.

stoic

Posted 2012-06-13T11:26:31.227

Reputation: 177

Question was closed 2012-06-13T16:04:13.187

6What os/platform ? – rkosegi – 2012-06-13T11:51:05.403

Answers

11

  1. Click the Start Button
  2. Right Click "Network" and then left Click Properties
  3. From the "Network And Sharing Center" window click "Change Adapter Settings"
  4. On the "Network Connections" window, press the ALT + F key on your keyboard to being up the menu bar
  5. Click the "Advanced" menu and then "Advanced Settings"
  6. In the "Advanced Settings" window you will see the "Adapters and Bindings" tab and under "Connections" you will see the order they are in, you can use the arrows to the side to move the connection priority up and down.

Justin

Posted 2012-06-13T11:26:31.227

Reputation: 126

thanx... this works. – stoic – 2012-06-14T11:55:18.973

4

You can deal with this by fiddling with your routing table. You don't say what OS you're running - but on Linux you could do:

# Dump kernel routing table:
route -n
# Delete the default gateway which uses your ethernet cable:
route del default gw 1.2.3.4

now you'll likely be left with just the default route for the wireless connection (assuming it got one), but all traffic to your LAN will still be sent over your wired connection.

There's probably better ways of doing this using network-manager (or whatever you have), which will make it persistent - but the goal remains the same, you want to remove the default route from your wired connection and leave just that of the wireless.

Orlando Richards

Posted 2012-06-13T11:26:31.227

Reputation:

shivams answer to How do I set the priority of network connections in Ubuntu? is good for novices: check configuration with route -n as above, then install and use the ifmetric command line tool to change the priorities. Google – WillC – 2017-12-31T02:34:30.450

Instead of changing the default route, I'd rather add host or net routes that go thru the wlan. Another approach instead of the wlan is the use of httptunnel. – ott-- – 2012-06-13T12:13:31.100

3

You can simply disable the wired connection in the Device Manager. This will automatically let the wireless do the job. Enable when finished.

Roger M

Posted 2012-06-13T11:26:31.227

Reputation: 306

1The thing is sometimes you want the wired connection to be up and running because it is connected to another device but not to the internet. This post is old but the problem still exists in windows 10. – lowtech – 2016-10-11T14:34:50.603

I'm aware that I have not provided a "complete" solution, just a workaround. There are several different things that can create to auto-selection problem, including bad setup in GPO for business computers. – Roger M – 2016-10-12T07:55:29.313

3

You can prioritize network connections by doing the following.

  1. Open up Network and Sharing center
  2. Click on Change adapter settings
  3. Hit ALT
  4. Go to the advanced menu
    enter image description here

  5. Now you can order your network connections. The more higher your network adapter is, the more Windows will prioritize it.
    LAN order

This image is from Windows XP but should look more or less the same in Windows 7.

Devator

Posted 2012-06-13T11:26:31.227

Reputation: 962

0

By default on most OSes, traffic traversing a wireless interface has a higher route cost than traffic traversing a wired interface. This makes traffic "prefer" the wired interface.

You can modify this behaviour fairly easily, but you don't mention which OS you use, so no one can give you specific directions.

MDMarra

Posted 2012-06-13T11:26:31.227

Reputation: 19 580