Write a bat script for Static Routing-Nanjing

Source: Internet
Author: User
Nothing special.

@ Echo offrem route print // view if interface del % windir % \ system32 \ addstatrn. batcd/d % windir % \ system32echo route delete 0.0.0.0> addstatrn. batecho route delete 172.16.0.0> addstatrn. batecho route add-p 172.16.0.0 mask 255.255.0.0 172.16.180.246 if 16> addstatrn. batecho route delete 192.192.0.0> addstatrn. batecho route add-p 192.192.0.0 mask route 255.0.0 192.168.5.33 if 14> addstatrn. bat
Rem local connection echo netsh int ip set address name = \ "local connection \" source = dhcp> addstatrn. batecho netsh interface ip set address \ "local connection \" static 192.168.5.33 255.255.255.0 192.168.5.254 20> addstatrn. bat

Rem wireless echo netsh interface ip set address name = \ "wireless \" source = dhcp> addstatrn. batecho netsh interface ip set dns name = \ "wireless \" source = dhcp> addStatic. batecho netsh interface ip set address \ "wireless \" static 172.16.180.246 255.255.255.0 172.16.180.254 5> addstatrn. batrem echo netsh interface ip add address \ "wireless \" 192.168.186.202 255.255.255.0 192.168.186.1 10> addstatrn. batecho netsh interface ip set dns name = \ "wireless \" static addr = 218.2.135.1 register = PRIMARY> addstatrn. batrem echo netsh interface ip add dns name = \ "wireless \" addr = 192.168.186.1 index = 2> addstatrn. bat
Echo exit> addstatrn. bat
Netsh wlan start hostednetworkrunas/user: administrator \ "cmd.exe cmd/k addstatkr. bat \" exit
Rem # modify TCPip hops

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.