中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-01 23:13
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS批处理 & 脚本技术(批处理室) » How to open the local connection or modify the IP address in DOS
Printable Version  2,695 / 6
Floor1 chainliq Posted 2006-07-05 21:13
高级用户 Posts 244 Credits 635 From 广西贵港
I want to change the IP. But I can't find the Local Area Connection. Does anyone know how to open the properties of the Local Area Connection or change the IP under DOS!

[ Last edited by chainliq on 2006-7-6 at 02:32 ]
Floor2 manfred Posted 2006-07-20 02:38
新手上路 Posts 6 Credits 12
It's okay...
When you just asked someone...
Just go to Baidu to find it...
Most people find it by going to Baidu... Hehe...
Floor3 flying008 Posted 2006-07-20 08:10
中级用户 Posts 103 Credits 245
Enter "netsh /?" at the command line to view the help for setting the IP.
Netsh interface ip set address local static 192.168.0.12 255.255.255.0 192.168.0.1 1
==============
IP address: 192.168.0.12
Subnet mask: 255.255.255.0
Gateway: 192.168.0.1
Hop count: 1
Modify the relevant data values according to your actual situation.
1. Change the IP address in command mode using netsh
c:>\netsh
netsh>interface
interface>ip
interface ip >set address name = "local area connection" source = static addr =192.168.0.1 mask =255.255.255.0
2. Use netsh -c interface ip dump > config.txt to output a file, then open config.txt to modify the address. Then use the command netsh -f d:\config.txt
That's it.


[ Last edited by flying008 on 2006-7-20 at 09:03 ]
Floor4 bagpipe Posted 2006-07-20 09:09
银牌会员 Posts 425 Credits 1,144 From 北京
One more thing, if you can use the NETSH command smoothly, first make sure that the state of the "remote registry service" service is enabled; otherwise, it cannot be executed.
Floor5 Scott0902 Posted 2006-07-20 18:58
中级用户 Posts 237 Credits 466
Originally posted by bagpipe at 2006-7-20 09:09:
Add one more point. If you can use the NETSH command smoothly, the first thing is to ensure that the status of the "remote registry service" is enabled; otherwise, it cannot be executed.

My Windows 2000 can still use NETSH even after disabling this service.
Floor6 chainliq Posted 2006-07-21 22:44
高级用户 Posts 244 Credits 635 From 广西贵港
Can you compile a CMD script, that is, just change the IP to be changed in CMD, and it can be changed as soon as the script is run~!~!
I think this method is relatively practical oh~!
Floor7 namejm Posted 2006-07-22 00:21
荣誉版主 Posts 1,737 Credits 5,226 From 成都
Brother bagpipe's previous code, re-posted here, might be useful.

Modify/Add/Backup Computer IP Address http://www.cn-dos.net/forum/viewthread.php?tid=19577&fpage=1&highlight=IP
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023