IP address modification in dos environment

Source: Internet
Author: User

Netsh interface ip dump> c: \ pc1.txt

This command is an interface IP Address Configuration that displays "Local Connection" of course, and is stored in the pc1.txt text file.

Check the file c: \ pc1.txt.

The IP configuration of the current "Local Connection" interface is displayed. We can use the command ipconfig/allto check that the configuration of the current interface is the same as that of pc1.txt.

The two are the same. open the PC1.TXT file, change the IP address 192.168.0.18 of "set address name =" Local Connection "source = static addr = 192.168.0.18" to 192.168.0.118, and save it. then, use NotePad to create a new file and enter netsh-f c: \ pc1.txt.

Bytes --------------------------------------------------------------------------------------------------------------

Modify the IP address of a computer in DOS:
Modifying the IP address in CMD requires the netsh Script Function.

C: \ netsh

C: \ netsh> interface

C: \ netsh \ interface> ip

C: \ netsh \ interface \ ip> dump (display configuration information)

Next, use exit to exit the netsh environment.

C: \> netsh-c interface ip dump> c: \ interface.txt (you can export the configuration script)

Click Edit now. In the resource manager, open interface.txt and change the ip address. xixi.

Next we should export the script.

C: \> netsh-f c: \ interface.txt (import script)

The ip address is changed at the command prompt.

After 2000 is fixed, the service cannot be started by double-clicking!

The netsh command has the following powerful functions:

C: \> netsh

Netsh>?

The following commands are valid:

Commands in this context:

...... -Move to the context level of the previous layer.

? -Display the command list.

Aaaa-change to 'aaa' context.

Abort-discard the changes made in offline mode.

Add-add a configuration item to the project list.

Alias-add an alias

Bye-exit the program.

Commit-submit the changes made in offline mode.

Delete-delete a configuration item from the project list.

Dhcp-changed to the 'dhcp 'context.

Dump-displays a configuration script.

Exec-run a script file.

Exit-exit the program.

Help-display the command list.

Interface-changed to the 'interface' context.

Offline-set the current mode to offline.

Online-set the current mode to a VM instance.

Popd-open a context from the stack.

Pushd-push the current context into the stack.

Quit-exit the program.

Ras-changed to 'Ras 'context.

Routing-changed to the 'routing' context.

Set-Update Configuration Settings.

Show-display information

Unalias-delete an alias.

Wins-changed to the 'WINS 'context.

Bytes ----------------------------------------------------------------------------------------------

Modify IP Address at Command Prompt

Run cmd
:> Ipconfig (first use the ipconfig command to check the IP address changed)

Windows 2000 IP Configuration

Ethernet adapter local connection:

Connection-specific DNS Suffix .:
IP Address ......: 192.168.0.250 (the ip Address before the local connection is changed)
Subnet Mask ......: 255.255.255.0
Default Gateway...: 192.168.0.1

PPP adapter dial-up connection:

Connection-specific DNS Suffix .:
IP Address ......: 211.149.128.147
Subnet Mask ......: 255.255.255.255
Default Gateway ......: 211.149.128.147

C:> netsh (then execute the netsh command)
Netsh> interface (subcommand of the netsh command)
Interface> ip (subcommands of interface commands)
Interface ip> set (subcommand of interface ip command)

The following commands are valid:

Commands in this context:
Set address-set the IP address or default gateway of the specified interface.
Set dns-set the DNS server mode and address.
Set wins-set the WINS server mode and address.
Interface ip> set address "Local Connection" static 192.168.0.2 255.255.255.0 192.168.0.1
1 (set IP address)
OK.

Interface ip> exit

C:> ipconfig (use the ipconfig command to check whether the IP address is successfully changed)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.