12

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
  • 217

5 Answers5

12
  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
  • 236
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.

4

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
  • 1,125
3

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

SgtOJ
  • 7,397
Roger M
  • 346
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
  • 20,746