惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - CoolBug

准备做培训,欢迎大家来讨论 上海蜗牛招聘.NET程序员 博客园2007-10-27上海聚会 上海招聘.NET(C#)程序员 激情哪里去了II 上海蜗牛信息科技招聘.NET开发工程师 招人 SQL Server不存在或访问被拒绝 Windows里的一个bug 安装acdsee 3.1后出错 .net软件开发工程师简历 coolbug个人简历 Visual Studio 2005的应用问题,谁有解决方法 将数据库的存储过程及其参数导出来的方法 VS出错问题集锦 <<妮子>> 一些感动的日子 周末游山 相亲,再次相亲 周末--------粉红色的回忆 今夜微风轻送,把我的心吹动...
轻松配置自己的网络IP,网关,及DNS
CoolBug · 2006-04-28 · via 博客园 - CoolBug

久学培训网--国内最大的培训平台!
免费发布课程,需求,查找课程,讲师,机构
培训课程:电脑,英语,日语,企业管理,职业,法语,软件,驾驶,口语,物流,厨师,网络,网络,美容,才艺,会计,股票,舞蹈
...

最近调到上海电信这边来做一个项目,由于电信的网段IP和家中的不一致,所以每天早晨来电信先打开网上邻居,再一个一个地把IP修改。如果记不住,还要去问别人或者打开自己文本记录的电信IP段,网关,DNS...晚上回到家中,又重复同样的事情,于是我便想有没有更方便的方法,用一个批处理解决呢?经过我的摸索,找到了方法,不敢独享,拿出来...
在桌面上新建一个txt文件,写入内容如下:

netsh interface ip reset "lan"
netsh 
interface ip add address "lan" 192.168.1.3 255.255.255.0
netsh 
interface ip add address "lan" gateway=192.168.1.1 gwmetric=1
netsh 
interface ip set dns "lan" static 202.96.209.6 primary

然后取名为:家中网络,并保存成"bat"格式。双击即可运行,此时用IPConfig命令,或者打开网上邻居的本地连接,发现相关属性已经被改过来了。
注释:
第一行,表示先将自己的本地连接名为lan的连接,所有设置都置空。
"lan" 表示本地连接的名称(可以是中文,如"本地连接1")。
第二行的格式是  添加一个IP地址 和子网掩码
netsh interface ip add address 本地连接名称 IP 子网掩码
第三行
netsh interface ip add address "lan" gateway=192.168.1.1 gwmetric=1 增加网关,和本地机到网关的跳数
gwmetric可以用 tracert 网关IP 命令得到 有几跳,便写几跳,一般在局域网里只有1跳,故gwmetric=1
第四行 设置第一DNS
然后再用同样的方法,建一个上海电信.bat的批处理程序。

阿里云优惠券领取地址:https://partner.aliyun.com/shop/35783975 ,需要更多优惠请联系QQ和微信:891115,热线:400-968-4968