Very practical original tool: easyip

Source: Internet
Author: User
Tags netconf
[Nature] Batch Processing Program
[PURPOSE] facilitates switching between multiple IP addresses
[Applicable] A little bit of BAT, like small and command line, usually need to switch IP
[Author] lile
[Homepage] not available yet. Haha, come here for updates (if you need updates)
[Document] There is no need to use tools to quickly switch IP addresses
[Tip] advanced users can modify the content accordingly, which simplifies a lot of content. The command line supports parameters, so I am used to "ip BJ" ip 0 "instead of selecting the menu after entering.

The source code is as follows (save it as easyip. BAT)

: Last updated 20070405, xbeta released, author lile
@ echo off
title easyip v1.3
::::: :::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::
:: easyip v1.3
:: author: lile
:::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::

:::::::: ::::::::::::::::::::::::::
@ REM menu content settings: ========================================================== ======================
 Set menu1 = oil server (COSL)
 Set menu2 = Head Office 1004
 Set menu3 = Western company
 Set menu4 = sun)
 Set menu5 = standby
 Set menu6 = standby
 
@ REM sets the proxy server address to be used ================================ ================
 Set proxyservervalue = 10.68.200.233: 8080
@ REM no need to use the address of the proxy server. Note: ", <local>" indicates the address that is not needed to be activated and must be retained.
 Set proxyoverridevalue = "10. *, <local>"

@ REM here, set the information of the 1st IP addresses ==================================== ==============================
 Set myip1 = 10.56.100.143
 Set mygateway1 = 10.56.100.254
 Set mymask1 = 255.255.255.0
 Set dns11 = 10.68.100.211
 Set dns21 = 10.68.100.212

@ REM here, set the information of the 2nd IP addresses ==================================== ==============================
 Set myip2 = 10.68.68.85
 Set mygateway2 = 10.68.68.254
 Set mymask2 = 255.255.255.0
 Set dns12 = 10.68.100.211
 Set dns22 = 10.68.100.212

@ REM here, set the information of the 3rd IP addresses ==================================== ==============================
 Set myip3 = 10.170.97.72
 Set mygateway3 = 10.170.97.254
 Set mymask3 = 255.255.255.0
 Set dns13 = 85.20.116.56
 Set dns23 = 85.20.112.146

@ REM here, set the information of the 4th IP addresses ==================================== ==============================
 Set myip4 = 192.168.0.199
 Set mygateway4 = 192.168.0.125
 Set mymask4 = 255.255.255.0
 Set dns14 = 211.147.6.3
 Set dns24 = 202.98.96.68

@ REM set the information of the 5th IP addresses here ============================== ===============================< br> set myip5 =
set mygateway5 =
set mymask5 =
set dns15 =
set dns25 =

@ in REM, set the information of the 6th IP addresses ======================================== =========================< br> set myip6 =
set mygateway6 =
set mymask6 =
set dns16 =
set dns26 =

@ REM set the name of the network connection to be changed ======================== =========================< br>:: If exist "% allusersprofile %" \ Desktop \ set netconf = "Local Area Connection"
:: If exist "% allusersprofile %" \ Desktop \ set netconf = "Local Connection"
set netconf = "local"

@ Rem set the IP address to be tested =========================================== ===================< br> set testip = "10.68.68.254"
: :::::::::::::::::::::::::::::::::::::::: ::: :::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::

 If "% 1%" = "1" Goto ip_1
 If "% 1%" = "BJ" Goto ip_2
 If "% 1%" = "3" Goto IP_3
 If "% 1%" = "4" Goto ip_4
 If "% 1%" = "5" Goto ip_5
 If "% 1%" = "6" Goto ip_6
 If "% 1%" = "H" Goto ip_h_nomenu
 If "% 1%" = "H" Goto ip_h_nomenu
 If "% 1%" = "S" Goto ip_s
 If "% 1%" = "S" Goto ip_s
 If & quot; % 1% & quot; = & quot; P & quot; goto ip_p & quot;
 If & quot; % 1% & quot; = & quot; P & quot; goto ip_p & quot;
 If "% 1%" = "N" Goto ip_n
 If "% 1%" = "N" Goto ip_n
 If "% 1%" = "T" Goto ip_t_nomenu
 If "% 1%" = "T" Goto ip_t_nomenu
 If "% 1%" = "0" Goto ip_0

Goto menu

@ REM ===================================================== ==========================================================
: Menu
Echo.
Echo.
Echo Easyip v1.3
Echo.
Echo ========================================
Echo 1: % Menu1 %
Echo 2: % Menu2 %
Echo 3: % Menu3 %
Echo 4: % Menu4 %
Echo 5: % Menu5 %
Echo 6: % Menu6 %
Echo ----------------------------
Echo P: Use ie Proxy Server
Echo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.