Friday, September 27, 2013

Run Local network (LAN) and Wifi/Internet connection together on a laptop at the same time

We know that make an application or coding a program will keep us to connected every time to the internet, because we often need Google. If we are using a laptop, usually there are two connection available, LAN to connect to local network and WIFI to connect to the internet. If you don't know how to keep your two connections alive together, i'm sure you will very busy to plug and unplug your LAN cable or switch on and switch off your WIFI. So let's do the little tricks below to solve this :
  1. Open your command prompt as Administrator (on Win 7/8) by right click the its shortcut and select "Run As Administrator"
  2. We will use the WIFI as default route and LAN as static route. Before to do this we need to remove the two default route created by system, because this is why we couldn't connected to the internet or to the LAN network at the same time.
  3. Run this command to delete the DEFAUT route : route DELETE 0.0.0.0
  4. Add route to your LAN network As example your LAN default gateway is 192.168.100.1 and your server farm/segment is 192.168.10.0 subnet mask 255.255.255.0 so the command is: route ADD 192.168.10.0 MASK 255.255.255.0 192.168.100.1
  5. Add route to your WIFI/Internet network We will set the WIFI as the default gateway. As example your internet ip gateway is 192.20.20.1 so the command is: route ADD 0.0.0.0 MASK 0.0.0.0 192.20.20.1
  6. This's it, now you can connect to your LAN and Internet at the same time. Good luck!.

0 Comments: