Total Pageviews

2017/07/05

[Windows] Utilize netsh Command to configure TCP/IP

Frequently used commands are the following:

Show IP configuration
netsh interface ip show config


Configures the interface named 區域連線 with the static IP address 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.254:
netsh interface ipv4 set address name="區域連線" source=static address=192.168.0.100 mask=255.255.255.0 gateway=192.168.0.254


Configuures primary and secondary DNS:
netsh interface ipv4 add dnsserver "區域連線" address=10.160.1.9 index=1
netsh interface ipv4 add dnsserver "區域連線" address=10.160.128.9 index=2


Configures static IP address to DHPC:
netsh interface ip set address "區域連線" dhcp


Clear DNS configuration
netsh interface ip set dns "區域連線" dhcp

No comments: