========================================================================
適用:windows2000 2003 XP
將TCP/IP更改為DHCP
#netsh interface ip set address "區域網路" dhcp
更改TCP/IP設定如下。IP=192.168.1.28 網路遮罩=255.255.255.0 閘道器=192.168.1.254
#netsh interface ip set address "區域網路" static 192.168.1.28 255.255.255.0 192.168.1.254
設定DNS為168.95.1.1
#netsh interface ip set dns "區域網路" static 168.95.1.1
========================================================================
適用:windows 7 2008
設定成DHCP
#netsh interface ipv4 set address "eth0" source=dhcp
#netsh set dnsserver "eth0" source=dhcp
設定成固定IP。IP=192.168.1.28 網路遮罩=255.255.255.0 閘道器=192.168.1.254
#netsh interface ipv4 set address "eth0" static 192.168.1.28 255.255.255.0 192.168.1.254
設定DNS依序為192.168.1.101,192.168.1.102,168.95.1.1
#netsh interface ipv4 set dnsservers name="eth0" static 192.168.1.101 primary
#netsh interface ipv4 add dnsservers name="eth0" 192.168.1.102 index=2
#netsh interface ipv4 add dnsservers name="eth0" 168.95.1.1 index=3
*在設定固定的DNS位置時,會偵測是否該DNS是否存在。所以若出現不存在的話也不用在意。因為設定值還是有設定到IP裡。