Sunday, 2 January 2011
Batch file to Switch Between WAN and Broad Band in WAN Offices
In WAN Offices often we are using Broad Band in so many circumstances. For Swinth between WAN and Broad band we have to change Default gateway, and DNS server's ip each time.Here is the simple solution to switch between WAN and Broad band.
Steps:
1.Before creating batch file.IP and Subnetmask of Broad band Modem must be in WAN IP Series. For this task please refer mannual.Click here to download mannual
2.Create a new notepad(.txt document)
3.Copy and paste the following script
@ECHO OFF
color 2
Echo * Now System IP Changes to WAN Settings*
Echo ** If ready to switch to WAN ** PRESS ENTER *** or else Ctrl+ C
pause
set vargw=10.102.154.193
set vardns1=164.100.3.1
set vardns2=164.100.17.3
ECHO Setting Gateway
netsh int ip set address name = "Local Area Connection" gateway = %vargw% gwmetric = 1
ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%
Echo **** Now You are in Wide Area Network ****
pause
4.Change set vargw=Router IP of WAN or Modem IP of Broadband
set vardns1=Primary DNS of WAN or Broadband
set vardns2=Secondary DNS of WAN or Broadband
5.Save the file.
6.Rename it as WAN.bat or Broadband.bat
7.Just double click to Switch between WAN and Broadband
Note:This batch file works in Computers which are having Single Network Adapter only.
Courtesy : http://doputtur.blogspot.com/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment