China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 21:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to open the local connection or modify the IP address in DOS View 2,691 Replies 6
Original Poster Posted 2006-07-05 21:13 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
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 ]
Floor 2 Posted 2006-07-20 02:38 ·  中国 广西 梧州 电信
新手上路
Credits 12
Posts 6
Joined 2006-07-19 13:40
20-year member
UID 58841
Status Offline
It's okay...
When you just asked someone...
Just go to Baidu to find it...
Most people find it by going to Baidu... Hehe...
Floor 3 Posted 2006-07-20 08:10 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
20-year member
UID 57801
Gender Male
Status Offline
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 ]
Floor 4 Posted 2006-07-20 09:09 ·  中国 北京 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
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.
Floor 5 Posted 2006-07-20 18:58 ·  中国 广东 广州 天河区 电信
中级用户
★★
Credits 466
Posts 237
Joined 2005-10-12 20:53
20-year member
UID 43413
Status Offline
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.
Floor 6 Posted 2006-07-21 22:44 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
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~!
Floor 7 Posted 2006-07-22 00:21 ·  中国 四川 成都 鹏博士宽带
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
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
Forum Jump: