For Windows XP:
编写两个 cmd 文件
For DHCP:
netsh interface ip set address “interface name” dhcp
For Static:
netsh interface ip set address "interface name" static 192.168.11.179 255.255.255.0 192.168.11.1 1
点击即可切换网络。
也可以用
netsh interface set interface 来连接断开网络
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
refer to
Cool Things to Do with Netsh
http://support.microsoft.com/kb/257748
Netsh Commands
For Linux:
具体参见如下网页
注:好像 common profile 必选选择一个 device,那就选择 eth0,可以设置为 inactive when system boot up.
其他两个 devices 设为系统启动时 active.
对于每一个配置写一个 shell script
sudo system-config-network-cmd --profile 11 --activate
则执行该shell就是启用某一个
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment