<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[刘新修]]></title> 
<link>http://pic1.liuxinxiu.com:80/index.php</link> 
<description><![CDATA[刘新修的个人博客 (Liuxinxiu'S Blog)]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[刘新修]]></copyright>
<item>
<link>http://pic1.liuxinxiu.com:80/ifconfig/</link>
<title><![CDATA[Linux 网络连接终端配置]]></title> 
<author>刘新修 &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Linux/Unix]]></category>
<pubDate>Mon, 06 Jan 2014 18:21:51 +0000</pubDate> 
<guid>http://pic1.liuxinxiu.com:80/ifconfig/</guid> 
<description>
<![CDATA[ 
	<p><span style="color: rgb(255, 255, 255); "><span style="background-color: rgb(0, 0, 255); "><strong>Debian.5.0.6----&gt;7.3/ 网络连接终端配置</strong></span></span></p><p>修改网络配置文件 : <span style="font-family: arial, helvetica, sans-serif; line-height: 28px; text-align: left; ">修改</span><span style="color: rgb(0, 0, 0); "><strong><span style="background-color: rgb(255, 255, 0); "><span style="font-family: arial, helvetica, sans-serif; line-height: 28px; text-align: left; "> /etc/network/interfaces</span><span style="font-family: arial, helvetica, sans-serif; line-height: 28px; text-align: left; "> </span></span></strong></span></p><div class="codeText"><div class="codeHead">C#代码</div><ol start="1" class="dp-c"><li class="alt"><font color="#000000"><ul><li class="alt"># The primary network interface</li><li class="alt">auto eth0</li><li class="alt">iface eth0 inet static</li><li class="alt">address 192.168.1.252</li><li class="alt">netmask 255.255.255.0</li><li class="alt">gateway 192.168.1.1</li></ul></font></li></ol></div><p>----------k----------</p><p>H &lt;---&nbsp;&nbsp;点 ---&gt; L</p><p>----------J---------</p><p>VI 删除 配合方向坐位标，如删除右边一个字符是：dL</p><p>Debian 重启网络命令： <span style="color: rgb(255, 255, 255); "><span style="background-color: rgb(255, 0, 0); ">/etc/init.d/networking restart</span></span></p><p>######################################################################</p><p><span style="color: rgb(255, 255, 255); "><span style="background-color: rgb(0, 0, 255); "><strong>CentOS-6.5 网络连接终端配置</strong></span></span></p><p style="text-align: left;">修改网络配置文件 : <span style="font-family: arial, helvetica, sans-serif; line-height: 28px; text-align: left; ">修改</span><strong><span style="color: rgb(0, 0, 0); "><span style="background-color: rgb(255, 255, 0); "><span style="font-family: arial, helvetica, sans-serif; line-height: 28px; text-align: left; "> </span><font face="arial, helvetica, sans-serif"><span style="line-height: 28px; ">/etc/sysconfig/network-scripts/ifcfg-eth0</span></font></span></span></strong></p><p>&nbsp;</p><div class="codeText"><div class="codeHead">Python代码</div><ol start="1" class="dp-py"><li class="alt"><span><span>ONBOOT=yes&nbsp;&nbsp;</span></span></li><li><span>BOOTPROTO=static&nbsp;&nbsp;</span></li><li class="alt"><span>IPADDR=<span class="number">192.168</span><span>.</span><span class="number">1.10</span><span>&nbsp;&nbsp;</span></span></li><li><span>NETMASK=<span class="number">255.255</span><span>.</span><span class="number">255.0</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>GATEWAY=<span class="number">192.168</span><span>.</span><span class="number">1.1</span><span>&nbsp;&nbsp;</span></span></li><li><span>DNS1=<span class="number">192.168</span><span>.</span><span class="number">1.1</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>BOOTPROTO=dhcp (这里是原来的设置，就是自动获取IP)&nbsp;&nbsp;</span></li></ol></div><p>&nbsp;</p><p>========================================</p><pre id="answer-content-1411493438" accuse="aContent" class="answer-text mb-10" style="margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; white-space: pre-wrap; word-wrap: break-word; color: rgb(51, 51, 51); line-height: 24px;">重新导入ifcfg-eth0网络配置文件 <br />[root@localhost ~]# <span style="color: rgb(255, 255, 255); "><span style="background-color: rgb(255, 0, 0); ">/etc/init.d/network reload </span></span><br type="_moz" /></pre><pre accuse="aContent" class="answer-text mb-10" style="margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; white-space: pre-wrap; word-wrap: break-word; color: rgb(51, 51, 51); line-height: 24px;"><pre id="answer-content-1411493438" accuse="aContent" class="answer-text mb-10" style="margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; white-space: pre-wrap; word-wrap: break-word;">网卡接口关闭与激活 <br />[root@localhost ~]# ifdown eth0&nbsp;&nbsp; #关闭网络 <br />[root@localhost ~]# ifup eth0&nbsp;&nbsp;&nbsp;&nbsp; #启动网络 <pre id="answer-content-1411493438" accuse="aContent" class="answer-text mb-10" style="margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; white-space: pre-wrap; word-wrap: break-word;">网络服务启动与关闭 <br />方法一: <br />[root@localhost ~]# service network stop&nbsp;&nbsp;&nbsp;&nbsp;#关闭网络服务 <br />[root@localhost ~]# service network start&nbsp;&nbsp; #启动网络服务 <br />[root@localhost ~]# service network restart #重启网络服务 <br />方法二： <br />[root@localhost ~]# /etc/init.d/network stop <br />[root@localhost ~]# /etc/init.d/network start <br />[root@localhost ~]# /etc/init.d/network restart <pre id="answer-content-1411493438" accuse="aContent" class="answer-text mb-10" style="margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; white-space: pre-wrap; word-wrap: break-word;">网卡状态查询 <br />[root@localhost ~]# service network status <br />Configured devices: <br />lo eth0 <br />Currently active devices: <br />lo eth0</pre></pre></pre></pre><p>&nbsp;</p>
]]>
</description>
</item><item>
<link>http://pic1.liuxinxiu.com:80/ifconfig/#blogcomment</link>
<title><![CDATA[[评论] Linux 网络连接终端配置]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://pic1.liuxinxiu.com:80/ifconfig/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>