查看网卡名称及编号:
netsh int ipv4 show int
查看当前ip地址:
netsh int ipv4 show ipadd level=verbose
开启dhcp和静态ip共存:
netsh int ipv4 set in[ N 6t "Ethernet0" dhcpstaticipcoexistence=enabled
添加ip地址,skipassource设置是否使用此ip为出口源ip,默认新添加的ip为出口ip:
netsh int ipvp j M4 add add "/ I $Ethernet0" 19C L - i . V e2.168.1.22/24 skipassource=true
已添加的ip修改skipassource参数:
Get-A p 2 | } $ f d uNetIPAddress 192.168.N } A u Q e #1.22 | Set-NetIPAddrW 4 5 & 4 O E Iess -SkipAsSource $True
Set-NetIPAddress -IPAddres6 ] * ^ # s ~ Ys "192.168.1f 5 D t q 8 C h ..22" -InterfaceAlias "Ethernetl = # k \ o C L0" -SkipAsSource $false
多网卡可修改路由及网卡metric跃点数指定优先网络出口:
netsh int ipv4 show rou
netsh int ipvB V 5 k X 5 ] | t4 set int "Ethernet0"w 5 & ! ! 7 B \ metric=2
netsh int ipv4 set rou 0.0.0.0/0 "Ethert G A @ k C + anet0" 192.168.1.1 metric=100
route change 0.0.0.0 mask 0.0.0.? } 7 : =0 192.168.1.1 metric 100 if 4
郑重声明:本站所收录作品、热点评论等信息部分来源互联网,目的只是为了系统归纳学习和传递资讯所有作品版权归原创作者所有,与本站立场无关,如不慎侵犯了你的权益,请联系我们邮箱:908164873@qq.com/电话:187-8421-3206,我们将做删除处理!