习惯了Linux下命令行配置网络的简洁,在windows系统下是不是感觉很别扭?下面分享几个方便的命令操作。
- 释放地址
ipconfig /release "Local Area Connection 1"
- 重新获取地址
ipconfig /renew "Local Area Connection 1"
- 配置IPv6单播地址
netsh interface ipv6 add/del address "Local Area Connection 1" 2001::1
- 配置IPv6任播地址
netsh interface ipv6 add address "Local Area Connection 1" 3ffe:320e:213:: anycast
netsh interface ipv6 del address "Local Area Connection 1" 3ffe:320e:1:213::
- 显示IPv6地址
netsh interface ipv6 show address
- 配置IPv6路由
netsh interface ipv6 add/del route 2001::/64 "Local Area Connection 2" 2001::2
- 显示IPv6路由
netsh interface ipv6 show route
- 禁用/启用网卡的IPv6
netsh interface ipv6 set interface "Local Area Connection 2" disable/enable
- 配置系统遵守EUI-64规则,生成符合eui-64的Link-local地址(重启后生效)
netsh interface ipv6 set privacy state=disabled store=active
netsh interface ipv6 set privacy state=disabled store=persistent
netsh interface ipv6 set global randomizeidentifiers=disabled store=active
netsh interface ipv6 set global randomizeidentifiers=disabled store=persistent
- 重启网卡(win7下生效,XP下有问题)
netsh interface set interface "本地连接 2" disabled
netsh interface set interface "本地连接 2" enabled
最后再送上一个链接,中文介绍,方便查阅。这个是微软的,也放这儿了。
作为一个有追求的并且充满探索欲望的程序猿,不妨在命令行下自己撸一撸。
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-07 22:44:01