<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://sufan.maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://sufan.maytide.net/read.php/40.htm</link>
<title><![CDATA[[Server Core] 在 Core 下手工分配 IP]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[Windows Server]]></category>
<pubDate>Sat, 05 Jan 2008 06:01:26 +0000</pubDate> 
<guid>https://sufan.maytide.net/read.php/40.htm</guid> 
<description>
<![CDATA[ 
	<p>      Server Core 下为网卡配置动态或静态 IP 可以使用 netsh 命令，这里以配置静态 IP 为例，首先我们需要先查看计算机当前连接信息；为指定网卡分配一个静态 IP，并指定其子网掩码及默认网关；并根据需要为其配置所使用的 DNS 服务器。为此我们需要执行如下步骤：</p><p><div class="code">1、<strong>netsh interface ipv4 show interfaces</strong>（注：显示计算机上所有的网络接口）</p><p>2、<strong>netsh interface ipv4 set address name=</strong><em>ID</em>（或连接名称） <strong>source=static address=</strong><em>IP</em> <strong>mask=</strong><em>SubnetMask</em> <strong>gateway=</strong><em>DefaultGateway_IP</em> </p><p>3、<strong>netsh interface ipv4 add dnsserver name=</strong><em>ID</em>（或连接名称） <strong>address=</strong><em>DNS_IP</em> <strong>index=1</strong></div></p><p><img src="http://goxia.maytide.net/up/hypervincore/1.jpg" /></p><p>      如果使用动态主机协议来获取 IP 则使用如下命令行：</p><p><div class="code"><strong>netsh interface ipv4 set address name=</strong><em>ID</em> <strong>source=dhcp</strong></div></p>
]]>
</description>
</item>
</channel>
</rss>