赞
踩
window查看ip:ipconfig
window查看路由:route print
window添加路由:route add 10.5.0.0 mask 255.255.0.0 -p 10.87.22.254
window删除路由:route delete 10.5.0.0 mask 255.255.0.0 -p 10.87.22.254
window路由追踪:tracert 10.5.5.1
window查看dns服务器:nslookup
window刷新dns:
输入:ipconfig /flushdns 释放DNS缓存;
输入:netsh winsock reset 重置Winsock目录;
mac查看ip信息:ipconfig
mac查看路由:netstat -nr
mac添加路由:route add -net 10.5.0.0/16 10.87.22.254
mac删除路由:route delete -net 10.5.0.0/16 10.87.22.254
mac查看dns:cat /etc/resolv.conf
mac刷新dns缓存:
sudo killall -HUP mDNSResponder
echo macOS DNS Cache Reset
- (mac添加永久路由要用下面的方式:
-
- ```
- $ networksetup -listallnetworkservices #查看网口设备
- $ networksetup -setadditionalroutes "Ethernet" 10.188.12.0 255.255.255.0 192.168.8.254
- 10.73.82.0 255.255.225.0 192.168.8.254 #添加路由,会覆盖,所以需要添加多条路由的话,一次性添加,这里添加了2条路由
- $ networksetup -setadditionalroutes Ethernet #清空路由
- $ networksetup -getadditionalroutes Ethernet #查看路由
- ```
-
- )
linux查看ip:ifconfig 或者ip a
linux路由追踪:traceroute 10.5.5.1
linux添加路由 route add -net 10.5.0.0/16 gw 10.87.22.254
linux查看dns:cat /etc/resolv.conf
linux刷新dns:linux本身没有dns缓存服务,如果有开启相关dns服务,grep dns服务后重启即可;
nmcli命令配置IP
假设DNS是200.200.10.199
|
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。