Find the corresponding network card name
Using commands: ipconfig
Copy Code code as follows:
Ipconfig/all
Windows IP Configuration
Host Name ............:d501-4-3
Primary Dns Suffix ...:
Node Type ............:unknown
IP Routing Enabled ... : No
WINS Proxy Enabled ... : No
Ethernet Adapter Local Area Connection:
Connection-specific DNS Suffix. :
Description ........... : Marvell Yukon 88E8057 pci-e Gigabit
Ethernet Controller
Physical Address ..... . : 44-37-E6-1D-5B-F1
Dhcp Enabled ...... : No
IP address. ...........:192.168.1.111
Subnet Mask ........... : 255.255.255.0
Default Gateway ..... . : 192.168.1.1
DNS Servers ........... : 8.8.8.8
We now need to set the network card name is "Local Area Connection", IP address is 192.168.1.111, subnet mask is 255.255.255.0,dns address is 8.8.8.8
Set IP and DNS to be automatically acquired
To use the command:
netsh interface ip set address "Local Area Connection" DHCP
netsh interface ip set DNS "Local Area Connection" DHCP
Copy Code code as follows:
netsh interface ip set address "Local Area Connection" DHCP
Are you sure.
netsh interface ip set DNS "Local Area Connection" DHCP
Are you sure.
Equivalent operation:
Set IP and DNS to fixed values
To use the command:
netsh interface ip set address "Local Area Connection" static [IP address] [subnet mask] [gateway] [Gateway long jump points: general fill 1]
netsh interface ip set DNS "Local Area Connection" static [DNS address]
Copy Code code as follows:
netsh interface ip set address "Local Area Connection" Static 192.168.1.111 255.255.255.0 192
.168.1.1 1
Are you sure.
netsh interface ip set DNS "Local Area Connection" static 8.8.8.8
Are you sure.
Equivalent operation: