How to reserve your network adapter
configration without connecting?
检索词:网卡配置、不接网线、拔掉网线、网卡生效
keywords:network adapter configration、link state、Media
Sensing、connecting
今天老大在笔记本上配置了个vmware,用来安装linux,为了方便,笔记本当然不是随时都插着网线的,但拔掉网线之后,windows
xp里面的网卡的网络配置全部失效了,怎样才能够保证在不接网线的情况下是网卡设置生效呢?
在网上查了些文档,不是很多,绝大部分的解决办法是做一个自连的水晶头,然后插上(如果是千兆网卡还需要将网卡的配置改为100M),这种做法比较无聊啦,哈哈。当然也有解决方法是增加一个虚拟网卡,这个没试过,应该也可以的吧。
最后还是在msdn上找到了答案,其实只需要改动一个注册表值,让系统不检查网络的连接状态即可,具体操作如下:
打开注册表(regedit),找到以下键值:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
增加一个DWORD项,项名为:DisableDHCPMediaSense,键值设为1,然后重启服务器即可。
原文内容参考如下:
Windows contains the “Media Sensing” feature. You may use
this feature on a Windows-based computer using Transmission Control
Protocol/Internet Protocol (TCP/IP) to detect whether your network
media is in a “link state.” A “link state” is defined as the
physical media connecting or inserting itself on the network. For
example, assuming a 10bt or 100bt physical media, Ethernet network
adapters and hubs typically have a “link” light to indicate the
current connection status. This is the same condition in which
Windows can detect a link. Whenever Windows detects a “down” state
on the media, it removes the bound protocols from that adapter
until it is detected as “up” again. There may be situations where
you may not want your network adapter to detect this state, and you
can configure this by editing the registry.
To prevent your network adapter from detecting the link state,
follow these steps.
Note NetBEUI and IPX do not recognize Media Sense.
| 1. | Use Registry Editor (Regedt32.exe) to view the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
Add the following registry value: Value Name: DisableDHCPMediaSense
Data Type: REG_DWORD -Boolean Value Data Range: 0, 1 (False, True) Default: 0 (False) Description: This parameter controls DHCP Media Sense behavior. If |
| 2. | Restart your computer. |
Note In Windows Server 2003, the function which controls
Media Sense was added to the cluster system. Even if the
DisableDHCPMediaSense is not set or 0 (False) is set in the
registry, the cluster system is changing Media Sense into disabled.
Then, because of the system which wants to make Media Sense enable,
the DisableClusSvcMediaSense registry value was introduced in the
SP1. You can set ON/OFF of the control function of the cluster
system by using the following registry subkey:
- Key: HKEY_LOCAL_MACHINE\Cluster\Parameters
- Value Name: DisableClusSvcMediaSense
- Data Type: REG_DWORD -Boolean
- Data Range: 0, 1 (False, True) - Default: 0 (False).
The DisableClusSvcMediaSense is default 0 (False). Therefore, the
control function is ON and Media Sense is disabled. You can set the
DisableClusSvcMediaSense to 1 (True). Then, the control function is
OFF. After that, you can use the DisableDHCPMediaSense registry to
set enable/disable of Media Sense. This is similar to the cluster
environment of the Windows 2000 Server.
Note If you disable the “Media Sensing” feature, you may
experience problems. For example, if you have a computer that has
two network adapters and you disable the “Media Sensing” feature,
if one network adapter does not work, it is unbound. Additionally,
if a default gateway is configured, associated routes are removed
so that all traffic goes through the other network adapter.
In another example, if the “Media Sensing” feature is disabled when
you disconnect the network cable from the computer, the “Local Area
Connection” icon in the notification area displays a “Network cable
is unplugged” status message. Additionally, you receive a “Media
State …..: Cable Disconnected” message when you run the
ipconfig command. However, in this case, the network adapter
is bound to TCP/IP. To verify that the network adapter is bound to
TCP/IP, view the route table. To view the route table, use the
route print command. The route table shows the IP address of
the network adapter. You can also use the ping command to
ping the IP address of your network adaptor to verify that the
network adapter is bound to TCP/IP.
Tags: adapter, configration, 网卡
<?xml version=”1.0″ ?>
<!– RSS 版本 –>
<rss version=”2.0″>
<channel>
<!–必须的频道节点:title,定义频道名称–>
<title>暨南大学图书馆新闻订阅</title>
<!–必须的频道节点:link,响应频道的网站URL–>
<link>http://lib.jnu.edu.cn/</link>
<!–必须的频道节点:description,频道的描述–>
<description>暨南大学图书馆新闻订阅.</description>
<!–必须频道节点结束–>
<!–以下为可选的频道节点–>
<!–语种:language–>
<language>zh-cn</language>
<!–版权声明:copyright–>
<copyright>Copyright 2006
暨南大学图书馆. All Rights Reserved.</copyright>
<!–负责人EMAIL:managingEditor–>
<managingEditor>jnuzyx@126.com</managingEditor>
<!–技术人员EMAIL:webMaster–>
<webMaster>jnuzyx@126.com</webMaster>
<!–发布时间:pubDate–>
<pubDate>Fri, 08 Sep 2006
18:00:00 GMT+8</pubDate>
<!–最后更新时间:lastBuildDate–>
<lastBuildDate>Fri, 08
Sep 2006 20:00:00 GMT+8</lastBuildDate>
<!–频道所属的分类:category,可多个,要遵循与ITEM级category元素相同的规则,所以一般在此不标注,而在ITEM级标注分类–>
<category>新闻</category>
<!–生成频道的程序名称:generator–>
<generator>JNULRSS
1.0(beta)</generator>
<!–指向RSS格式解释文档的URL:docs,用以向需要了解更多的人介绍RSS的格式情况–>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<!–可以忽略的时段:skipHours,0-24–>
<skipHours>0</skipHours>
<!–可以忽略的天:skipDays,星期–>
<skipDays>Sunday</skipDays>
<!–cache生命周期:ttl,分–>
<ttl>60</ttl>
<!–频道的统计图片地址:rating,未用过–>
<rating></rating>
<!–指定rssCloud接口的WEB服务:cloud,rssCloud接口可以用HTTP-POST,XML-RPC或SOAP1.1实现,目的是允许通知注册为cloud的进程频道被更新,从而实现一个轻量级的发布订阅协议,这个还不是很明白:(–>
<cloud domain=”rpc.sys.com”
port=”80″ path=”/RPC2″ registerProcedure=”myCloud.rssPleaseNotify”
protocol=”xml-rpc” />
<!–频道LOGO:image,jpg,png,gif格式,3个必选子节点及3个可选子节点–>
<!–image节点开始–>
<image>
<!–image节点必选子节点–>
<!–LOGO文件的URL地址:url–>
<url>http://lib.jnu.edu.cn/rss/img/logo.jpg</url>
<!–LOGO标题:title,相当于alt属性,应与频道的title节点值相同–>
<title>暨南大学图书馆新闻订阅</title>
<!–LOGO的链接:link,应与频道的link节点值相同–>
<link>http://lib.jnu.edu.cn/</link>
<!–image节点可选子节点–>
<!–LOGO的宽度:width,默认为88,最大为144,单位为像素–>
<width>88</width>
<!–LOGO的高度:height,默认为31,最大为400,单位为像素–>
<height>31</height>
<!–LOGO描述:description,未用过–>
<description></description>
</image>
<!–image节点结束–>
<!–频道可嵌入的textInput表单,包含4个可选子节点,可以用它提供一个搜索引擎输入框,或让读者提供反馈信息,不常用。–>
<!–textInput节点开始–>
<textInput>
<!–表单的提交按钮的标签:title–>
<title>搜索</title>
<!–表单的文本输入区的描述:description–>
<description>百度一下</description>
<!–表单的文本输入区的名称:name–>
<name>关键词</name>
<!–表单提交的URL
:link–>
<link>http://www.baidu.com/s</link>
</textInput>
<!–textInput节点结束–>
<!–可选频道节点结束–>
<!–必须的,可重用的频道节点:item,频道的项目,一个条目可表示一条记录–>
<item>
<!–所有子节点都是可选的,但应该包含title,description子节点–>
<!–标题:title–>
<title>置顶新闻:9月14日学而优书店现场选书通知</title>
<!–记录的URL:link–>
<link>http://lib.jnu.edu.cn/show.jsp?ID=720</link>
<!–描述:description,可以通过使用CDATA部件,告诉解析器忽略描述内容中的HTML解释–>
<description><![CDATA[<a
href="http://lib.jnu.edu.cn/show.jsp?ID=720">查看详细报道</a>]]></description>
<!–作者的EMAIL:author–>
<author>ocat@jnu.edu.cn</author>
<!–分类:category,可以是一个或多个–>
<category>通知</category>
<!–评论地址:comments–>
<comments>http://lib.jnu.edu.cn/feedback/showfeedback.jsp?sysname=新闻系统&itemid=720</comments>
<!–附加的媒体对象:enclosure,有三个必须属性,url属性,length指出它的字节大小,type属性指出它的标准MIME类型–>
<!–<enclosure
url=”http://lib.jnu.edu.cn/upfile/vpn.wmv”
length=”6742080″ type=”audio/mpeg” />–>
<!–rss来源频道名称:source,从item的title衍生而来,有一个必须包含的属性url,链接到XML序列化源,作用是提高连接的声望–>
<source
url=”http://lib.jnu.edu.cn/rss/news.xml”>jnul
news</source>
<!–item发布时间:pubDate–>
<pubDate>Fri,
08 Sep 2006 20:00:00 GMT+8</pubDate>
<!–唯一确定item的字符串:guid–>
<guid>http://lib.jnu.edu.cn/show.jsp?ID=720</guid>
</item>
<item>
<title>好消息:西文全文电子期刊统一检索系统正式推出使用</title>
<description>西文电子期刊导航</description>
</item>
<!–item结束–>
</channel>
</rss>