<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>【知行合一】-Poople&#039;s Blog &#187; 网络管理</title>
	<atom:link href="http://99dev.net/archives/category/tech/netadmin/feed" rel="self" type="application/rss+xml" />
	<link>http://99dev.net</link>
	<description>智巧终归庸俗，雄谋只余虚话</description>
	<lastBuildDate>Wed, 12 Oct 2011 01:19:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hillstone安全网关相关问题收集</title>
		<link>http://99dev.net/archives/1016</link>
		<comments>http://99dev.net/archives/1016#comments</comments>
		<pubDate>Sat, 09 Apr 2011 09:34:45 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[网络管理]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/1016</guid>
		<description><![CDATA[Hillstone的Stone OS和Netscreen OS有很高的相似度，因此以下配置也可作为Netscreen设备的参考。
Q：如何与AD活动目录，或者LDAP目录数据库集成，提供AAA身份认证。
A：范例如下   #增加local用户    aaa-server &#34;local&#34; type local    user &#34;vpnuser&#34;    exit
#定义角色映射，将AD用户映射为local用户角色   role &#34;vpnuser&#34;    role-mapping-rule &#34;vpnuser&#34;    &#160; match user &#34;vpnuser&#34; role &#34;vpnuser&#34;    exit
<span class="readmore"><a href="http://99dev.net/archives/1016" title="Hillstone安全网关相关问题收集" target="_blank">阅读全文——共485字</a></span>]]></description>
			<content:encoded><![CDATA[<p>Hillstone的Stone OS和Netscreen OS有很高的相似度，因此以下配置也可作为Netscreen设备的参考。</p>
<p>Q：如何与AD活动目录，或者LDAP目录数据库集成，提供AAA身份认证。</p>
<p>A：范例如下   <br />#增加local用户    <br />aaa-server &quot;local&quot; type local    <br />user &quot;vpnuser&quot;    <br />exit</p>
<p>#定义角色映射，将AD用户映射为local用户角色   <br />role &quot;vpnuser&quot;    <br />role-mapping-rule &quot;vpnuser&quot;    <br />&#160; match user &quot;vpnuser&quot; role &quot;vpnuser&quot;    <br />exit</p>
<p>#配置AAA服务器授权，LDAP类似   <br />aaa-server &quot;DC2008&quot; type active-directory    <br />&#160; host 192.168.30.201    <br />&#160; role-mapping-rule &quot;vpnuser&quot;    <br />&#160; base-dn &quot;DC=epfuture,DC=com&quot;    <br />&#160; login-dn &quot;cn=auth_ldap,cn=users,DC=epfuture,DC=com&quot;    <br />&#160; login-password EoK9fzVgbJ9bEjjbgzolUSTpXr8r    <br />exit</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/1016/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Server的类Xinetd服务－srvany</title>
		<link>http://99dev.net/archives/984</link>
		<comments>http://99dev.net/archives/984#comments</comments>
		<pubDate>Thu, 16 Dec 2010 07:25:42 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[网络管理]]></category>

		<guid isPermaLink="false">http://99dev.net/?p=984</guid>
		<description><![CDATA[应用场景
      有几个应用系统，工作在windows平台上，由金蝶等第三方厂商提供，运行都是stand_alone模式。弊端很明显，每次开机/重启，都必须RDP登录上去，把应用开启，然后断开RDP连接。（不能注销，一注销应用也就跟着shutdown了）
必须将其注册为Windows服务，所幸Microsoft在Resource Kit Tools包中提供了实现方法。
工作原理
<span class="readmore"><a href="http://99dev.net/archives/984" title="Windows Server的类Xinetd服务－srvany" target="_blank">阅读全文——共1055字</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>应用场景</strong></p>
<p>      有几个应用系统，工作在windows平台上，由金蝶等第三方厂商提供，运行都是stand_alone模式。弊端很明显，每次开机/重启，都必须RDP登录上去，把应用开启，然后断开RDP连接。（不能注销，一注销应用也就跟着shutdown了）<br />
必须将其注册为Windows服务，所幸Microsoft在Resource Kit Tools包中提供了实现方法。</p>
<p><strong>工作原理</strong></p>
<p>      开机由某后台用户（可以是系统用户，本地用户和域用户，只要权限足够即可，稳定方面考虑，建议system用户）启动superdaemon进程srvadny.exe，再由其调用application.exe载入后台进程工作。这一点，可以在任务管理器里确认，srvany.exe和application.exe是同时存在的。</p>
<p>      原理和Linux的Xinet服务机制较像，关于Xinetd的服务机制，<a href="http://linux.vbird.org/linux_basic/0560daemons.php#fig_111">鸟哥的Blog</a>有详细描述。<br />
<span id="more-984"></span><br />
<strong>实现步骤</strong></p>
<p>1.安装Resource Kit Tools，<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&#038;DisplayLang=en">下载地址</a></p>
<p>2.利用instsrv注册一个srvany的实例MyApps</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Program Files\Windows Resource Kits\Tools<span style="color: #33cc33;">&gt;</span>instsrv.exe MyApps &quot;C:\Program File<br />
s\Windows Resource Kits\Tools\srvany.exe&quot;<br />
<br />
The service was successfuly added<span style="color: #33cc33;">!</span><br />
<br />
Make sure that you go into the Control Panel and use<br />
the Services applet to change the Account Name and<br />
Password that this newly installed service will use<br />
<a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> its Security Context.</div></td></tr></tbody></table></div>
<p>3.编辑该实例的各项属性<br />
注册表编辑器regedit.exe，进入以下路径，展开以下<br />
“HKEY_LOCAL_MACHINE\SYSTEM\currentcontrolset\services”，找到MyApps项，新建子项，名称为”Parameters”，在里面建立以下键值</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Application=&quot;MyApps.exe程序绝对路径&quot;<br />
Description=&quot;该服务描述信息&quot;<br />
AppDirectory＝&quot;程序初始目录，一般指该进程工作所在目录&quot;</div></td></tr></tbody></table></div>
<p>4.打开service.msc，找到MyApps服务，编辑其它属性，如启动用户，开机是否自动启动。</p>
<p>5.在service.msc中启动该服务。</p>
<p>6.重启服务器，确定该service自动启动成功。</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/984/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Server时间校对 &#8211; 优雅式</title>
		<link>http://99dev.net/archives/871</link>
		<comments>http://99dev.net/archives/871#comments</comments>
		<pubDate>Thu, 15 Jul 2010 08:36:58 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[MySQL数据库]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[网络管理]]></category>
		<category><![CDATA[databse]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/871</guid>
		<description><![CDATA[在《解决Linux Server时间不准确的问题》一文中，使用了crontab定期执行ntpdate来校对时间。之后恰巧某博客上的文章，提出一个观点“时钟的跃变，有时候会导致很严重的问题。许多应用程序依赖连续的时钟——毕竟，这是一项常见的假定，即，取得的时间是线性的，一些操作，例如数据库事务， 通常会地依赖这样的事实：时间不会往回跳跃。”时间的瞬变，对于crontab等对时间敏感的系统任务，也是很容易造成错乱的。

优雅的解决方案是，在机器刚开机时，执行ntpupdate直接修改系统时间，然后启动ntpd守护进程，渐进式逼近地调整系统时间，基本可以做到分毫不差。
误差小的时候，ntpd不会直接修改系统时间的，只是对时钟频率进行校正。这种方式好处是系统时间不会有跳变，不会影响像crontab这样程序的运行，缺点是校正需要一定的时间。
<span class="readmore"><a href="http://99dev.net/archives/871" title="Linux Server时间校对 &#8211; 优雅式" target="_blank">阅读全文——共585字</a></span>]]></description>
			<content:encoded><![CDATA[<p>在《解决Linux Server时间不准确的问题》一文中，使用了crontab定期执行ntpdate来校对时间。之后恰巧某博客上的文章，提出一个观点“时钟的跃变，有时候会导致很严重的问题。许多应用程序依赖连续的时钟——毕竟，这是一项常见的假定，即，取得的时间是线性的，一些操作，例如数据库事务， 通常会地依赖这样的事实：时间不会往回跳跃。”时间的瞬变，对于crontab等对时间敏感的系统任务，也是很容易造成错乱的。<br />
<span id="more-871"></span><br />
优雅的解决方案是，在机器刚开机时，执行ntpupdate直接修改系统时间，然后启动ntpd守护进程，渐进式逼近地调整系统时间，基本可以做到分毫不差。</p>
<p>误差小的时候，ntpd不会直接修改系统时间的，只是对时钟频率进行校正。这种方式好处是系统时间不会有跳变，不会影响像crontab这样程序的运行，缺点是校正需要一定的时间。</p>
<p>RHEL系统上，我们常用ntpd来完成该任务；而在Ubuntu系统里，我们则用openntpd来替代它。相对ntpd，openntpd是轻量级的网络时间协议，设置比较简单。<br />
关于ntpd和openntpd的设置，参考以下2篇文章</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">NTP 時間伺服器 &nbsp; &nbsp; http://linux.vbird.org/linux_server/0440ntp.php<br />
设定 OpenNTPD &nbsp; &nbsp; http://wiki.debian.org.hk/w/Setup_OpenNTPD</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/871/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux时间校对-起手式</title>
		<link>http://99dev.net/archives/870</link>
		<comments>http://99dev.net/archives/870#comments</comments>
		<pubDate>Tue, 13 Jul 2010 11:29:56 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/870</guid>
		<description><![CDATA[服务器每隔好几个月，总会差那么几分钟。应对措施，就是每隔段时间，进行网络对时。
以下摘自《鸟哥的私房菜》，可解读为什么会有偏差的问题。
1234567事實上，在我們的身邊就有很多的原子鐘，例如石英表，還有電腦主機上面的 BIOS 內部就含有一個原子鐘在
紀錄與計算時間的進行吶！不過由於原子鐘主要是利用計算晶片 (crystal) 的原子震盪週期去計時的，
<span class="readmore"><a href="http://99dev.net/archives/870" title="Linux时间校对-起手式" target="_blank">阅读全文——共1921字</a></span>]]></description>
			<content:encoded><![CDATA[<p>服务器每隔好几个月，总会差那么几分钟。应对措施，就是每隔段时间，进行网络对时。</p>
<p>以下摘自《鸟哥的私房菜》，可解读为什么会有偏差的问题。</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">事實上，在我們的身邊就有很多的原子鐘，例如石英表，還有電腦主機上面的 BIOS 內部就含有一個原子鐘在<br />
紀錄與計算時間的進行吶！不過由於原子鐘主要是利用計算晶片 (crystal) 的原子震盪週期去計時的，<br />
這是因為每種晶片都有自己的獨特的震盪週期之故。 然而因為這種晶片的震盪週期在不同的晶片之間多多少少都會有點差異性,<br />
甚至同一批晶片也可能會或多或少有些許的差異(就連溫度也可能造成這樣的誤差呢！)，<br />
因此也就造成了BIOS的時間會三不五時的給他快了幾秒或者慢了幾秒。<br />
或許您會認為，BIOS 計時器每天快個五秒也沒有什麼了不起的，不過如果您再仔細的算一算，會發現，一天快五秒， 那麼一個月快2.5分鐘，<br />
一年就快了 75 分鐘了！所以說，呵呵！時間差是真的會存在的！ （依据该原理，只要关机或者重启次数越多，时间就会差得越离谱）</div></td></tr></tbody></table></div>
<p>1.挑选最快最稳定的ntp上层服务器</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Documents and Settings\linqp<span style="color: #33cc33;">&gt;</span>ping ntp.api.bz -n 100<br />
Approximate round trip times <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> milli-seconds:<br />
Minimum = 67ms, Maximum = 89ms, Average = 80ms<br />
<br />
C:\Documents and Settings\linqp<span style="color: #33cc33;">&gt;</span>ping t3.hshh.org -n 50<br />
Approximate round trip times <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> milli-seconds:<br />
Minimum = 18ms, Maximum = 22ms, Average = 19ms<br />
<br />
C:\Documents and Settings\linqp<span style="color: #33cc33;">&gt;</span>ping t1.hshh.org -n 50<br />
Approximate round trip times <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> milli-seconds:<br />
Minimum = 22ms, Maximum = 27ms, Average = 24ms<br />
<br />
C:\Documents and Settings\linqp<span style="color: #33cc33;">&gt;</span>ping 1.cn.pool.ntp.org -n 50<br />
Ping statistics <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> 122.226.192.4:<br />
Packets: Sent = 50, Received = 50, Lost = 0 <span style="color: #33cc33;">(</span>0<span style="color: #33cc33;">%</span> loss<span style="color: #33cc33;">)</span>,<br />
Approximate round trip times <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> milli-seconds:<br />
Minimum = 18ms, Maximum = 24ms, Average = 21ms</div></td></tr></tbody></table></div>
<p>2.使用ntpdate同步系统时间</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">root@krc:~# </span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate t3.hshh.org</div></td></tr></tbody></table></div>
<p>修改前</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">root@krc:~# </span><span style="color: #c20cb9; font-weight: bold;">date</span><br />
Tue Jul <span style="color: #000000;">13</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">22</span>:<span style="color: #000000;">42</span> CST <span style="color: #000000;">2010</span><br />
<span style="color: #666666;">root@krc:~# </span>hwclock <span style="color: #660033;">-r</span><br />
Tue <span style="color: #000000;">13</span> Jul <span style="color: #000000;">2010</span> 04:<span style="color: #000000;">21</span>:<span style="color: #000000;">23</span> PM CST -<span style="color: #000000;">0.001126</span> seconds</div></td></tr></tbody></table></div>
<p>修改后</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">root@krc:~# </span><span style="color: #c20cb9; font-weight: bold;">date</span><br />
Tue Jul <span style="color: #000000;">13</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">26</span>:<span style="color: #000000;">33</span> CST <span style="color: #000000;">2010</span><br />
<span style="color: #666666;">root@krc:~# </span>hwclock <span style="color: #660033;">-r</span><br />
Tue <span style="color: #000000;">13</span> Jul <span style="color: #000000;">2010</span> 04:<span style="color: #000000;">26</span>:<span style="color: #000000;">45</span> PM CST -<span style="color: #000000;">0.001124</span> seconds</div></td></tr></tbody></table></div>
<p>3.建立计划任务</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">root@krc:~#</span>crontab <span style="color: #660033;">-e</span><br />
<span style="color: #666666; font-style: italic;"># m h dom mon dow command</span><br />
00 00 <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>webserver<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>cut_nginx_log.sh<br />
<span style="color: #000000;">28</span> <span style="color: #000000;">23</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>webmin<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>tempdelete.pl<br />
<span style="color: #000000;">1</span> <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>data1<span style="color: #000000; font-weight: bold;">/</span>backup_zone<span style="color: #000000; font-weight: bold;">/</span>data_www<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #660033;">-mtime</span> +<span style="color: #000000;">28</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span><br />
<span style="color: #000000;">10</span> 00 <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>data1<span style="color: #000000; font-weight: bold;">/</span>backup_zone<span style="color: #000000; font-weight: bold;">/</span>data_www<span style="color: #000000; font-weight: bold;">/</span>snapfile<br />
<span style="color: #000000;">11</span> 00 <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>script-bak<span style="color: #000000; font-weight: bold;">/</span>bak_www.sh<br />
<span style="color: #000000;">1</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>script-bak<span style="color: #000000; font-weight: bold;">/</span>bak_conf.sh<br />
<span style="color: #000000;">11</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1</span> <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>data1<span style="color: #000000; font-weight: bold;">/</span>backup_zone<span style="color: #000000; font-weight: bold;">/</span>data_conf<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #660033;">-mtime</span> +<span style="color: #000000;">28</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span><br />
<span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">10</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate t3.hshh.org <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>hwclock <span style="color: #660033;">-w</span></div></td></tr></tbody></table></div>
<p>4.参考资料</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">鸟哥的教程 http://linux.vbird.org/linux_server/0440ntp.php<br />
Public NTP Server http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers<br />
Asia Public NTP Server http://www.pool.ntp.org/zone/asia</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/870/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Collection]Windows系统的本地提权</title>
		<link>http://99dev.net/archives/864</link>
		<comments>http://99dev.net/archives/864#comments</comments>
		<pubDate>Thu, 17 Jun 2010 06:50:33 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/864</guid>
		<description><![CDATA[如同Linux的”sudo”
C:\Documents and Settings\linqp&#62;runas /h   RUNAS 用法: 
RUNAS [ [/noprofile &#124; /profile] [/env] [/netonly] ]   &#160;&#160;&#160;&#160;&#160;&#160;&#160; /user:&#60;UserName&#62; program 
RUNAS [ [/noprofile &#124; /profile] [/env] [/netonly] ]   &#160;&#160;&#160;&#160;&#160;&#160;&#160; /smartcard [/user:&#60;UserName&#62;] program 
<span class="readmore"><a href="http://99dev.net/archives/864" title="[Collection]Windows系统的本地提权" target="_blank">阅读全文——共977字</a></span>]]></description>
			<content:encoded><![CDATA[<p>如同Linux的”sudo”</p>
<p>C:\Documents and Settings\linqp&gt;runas /h   <br />RUNAS 用法: </p>
<p>RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; /user:&lt;UserName&gt; program </p>
<p>RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; /smartcard [/user:&lt;UserName&gt;] program </p>
<p> <span id="more-864"></span>
</p>
<p>&#160;&#160; /noprofile&#160;&#160;&#160;&#160;&#160;&#160;&#160; 指定不应该加载用户的配置文件。   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 这会加速应用程序加载，但    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 可能会造成一些应用程序运行不正常。    <br />&#160;&#160; /profile&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 指定应该加载用户的配置文件。    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 这是默认值。    <br />&#160;&#160; /env&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 要使用当前环境，而不是用户的环境。    <br />&#160;&#160; /netonly&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 只在指定的凭据限于远程访问的情况下才使用。 </p>
<p>&#160;&#160; /savecred&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 用用户以前保存的凭据。   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Windows XP Home Edition 上没有这个选项。    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 该选项会被忽略。    <br />&#160;&#160; /smartcard&#160;&#160;&#160;&#160;&#160;&#160;&#160; 如果凭据是智能卡提供的，则使用这个选项。 </p>
<p>&#160;&#160; /user&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;UserName&gt; 应使用 USER@DOMAIN 或 DOMAIN\USER 形式   <br />&#160;&#160; program&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; EXE. 的命令行。请参阅下面的例子 </p>
<p>例如:   <br />&gt; runas /noprofile /user:mymachine\administrator cmd    <br />&gt; runas /profile /env /user:mydomain\admin &quot;mmc %windir%\system32\dsa.ms    <br />&gt; runas /env /user:user@domain.microsoft.com &quot;notepad \&quot;my file.txt\&quot;&quot; </p>
<p>注意:&#160; 只在得到提示时才输入用户的密码。   <br />注意:&#160; USER@DOMAIN 跟 /netonly 不兼容。    <br />注意:&#160; /profile 跟 /netonly 不兼容。 </p>
<p>C:\Documents and Settings\linqp&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/864/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Collection]Linux服务器绑定ARP,防止ARP欺骗</title>
		<link>http://99dev.net/archives/843</link>
		<comments>http://99dev.net/archives/843#comments</comments>
		<pubDate>Fri, 23 Apr 2010 12:52:04 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/843</guid>
		<description><![CDATA[编辑/etc/ethers,要这样格式写,还必须有可执行权限
IP空格MAC　(MAC间用：分开)
如下：

<span class="readmore"><a href="http://99dev.net/archives/843" title="[Collection]Linux服务器绑定ARP,防止ARP欺骗" target="_blank">阅读全文——共305字</a></span>]]></description>
			<content:encoded><![CDATA[<p>编辑/etc/ethers,要这样格式写,还必须有可执行权限</p>
<p>IP空格MAC　(MAC间用：分开)</p>
<p>如下：</p>
<blockquote>
<p>192.168.0.11 04:4B:80:80:80:01</p>
<p>192.168.0.12 04:4B:80:80:80:02</p>
<p>192.168.0.13 04:4B:80:80:80:03</p>
<p>192.168.0.14 04:4B:80:80:80:04</p>
</blockquote>
<p>最后在rc.local里加上下面一行</p>
<blockquote>
<p>arp -f /etc/ethers</p>
</blockquote>
<p>就OK了，开机自动加载</p>
<p><i>注:ethers文件里不能本机IP绑定本机MAC（不能自己梆自己），否则出错<br /></i></p>
<p>arp -s 用于在命令行下暂时绑定IP和MAC</p>
<p>arp -s 192.168.0.1 04:4B:80:80:80:04</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/843/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Colletcion]上亿个小文件如何备份或拷贝？</title>
		<link>http://99dev.net/archives/842</link>
		<comments>http://99dev.net/archives/842#comments</comments>
		<pubDate>Wed, 21 Apr 2010 03:05:16 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[系统架构]]></category>
		<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/842</guid>
		<description><![CDATA[CCF的讨论,有参考价值,转过来研究一下
服务器上有上亿的25k~40k小文件约4T左右（每天还在不停增加），但磁盘马上要满了
磁盘结构NTFS
用treesize 列目录用了一个晚上，大概8小时
<span class="readmore"><a href="http://99dev.net/archives/842" title="[Colletcion]上亿个小文件如何备份或拷贝？" target="_blank">阅读全文——共468字</a></span>]]></description>
			<content:encoded><![CDATA[<p><b>CCF的讨论,有参考价值,转过来研究一下</b></p>
<p>服务器上有上亿的25k~40k小文件约4T左右（每天还在不停增加），但磁盘马上要满了</p>
<p>磁盘结构NTFS</p>
<p>用treesize 列目录用了一个晚上，大概8小时</p>
<p>用killcopy拷贝到NAS，在收集信息时就崩溃了</p>
<p>现在还没有好的方法处理这些文件</p>
<p>打开磁盘并不慢，因为这些文件被分在不同的目录下，目录也很多</p>
<p><span id="more-842"></span>
<p>A1:</p>
<p>RAR 估计够呛，我感觉 RAR 是先收集文件列表然后开始压缩的，而且还会故意把不同路径文件名相同的放在一起压。我们算一下，假如每个文件路径和相关信息存放在内存里平均需要 512 字节空间，那么收集 10 亿个文件列表就需要 476.8GB 内存，就算更乐观的情况——256 字节一个 file path entry，1 亿文件的列表也需要 23.84GB 内存空间。</p>
<p>这显然不具备实际意义。所以要是真想备份出去就只能用 ghost 之类的磁盘镜像工具了。ghost 出来以后要是想恢复部分文件，可以使用官方的 ghost Explorer。</p>
<p>A2:</p>
<p>这么多小文件，只能用block的方式去操作</p>
<p>以上的思路应该是正解,继续关注此帖,等待更好的解决思路.</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/842/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Collection]使用密钥登录Linux SSH Server</title>
		<link>http://99dev.net/archives/800</link>
		<comments>http://99dev.net/archives/800#comments</comments>
		<pubDate>Mon, 12 Apr 2010 23:56:55 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[其他Linux技术]]></category>
		<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://99dev.net/?p=800</guid>
		<description><![CDATA[在本地主机生成SSH公钥和私钥(这里是用Mac OS X的"终端"工具,其他*Nix以及SSH Client步骤类似)  lin-pooplematoMacBook:~ linpoople$ ssh-keygen  lin-pooplematoMacBook:~ linpoople$ cd .ssh  lin-pooplematoMacBook:.ssh linpoople$ ls  id_rsa id_rsa.pub known_hosts #id_rsa为私钥,留在客户端;id_rsa为公钥,传至服务器端  2.  利用U盘或者FTP等方式,把公钥传至服务器,存放位置为服务器用户的.ssh目录(如果没有该目录,请创建) 


...在服务器上执行一下操作,导入公钥  [lqp@sqdata1 ~]$ cat ~/.ssh/id_rsa.pub &#62;&#62; ~/.ssh/authorized_keys  4.  核实修改.ssh目录(755)和目录下文件的权限(644)(这个貌似还是比较严格的,试过放宽权限,结果认证不了)  [lqp@sqdata1 ~]$ ls -al .ssh/  drwxr-xr-x 2 lqp lqp 4096 04-12 12:45 .  drwx------ 3 lqp lqp 4096 04-12 12:46 ..  -rw-r--r-- 1 lqp lqp 419 04-12 12:45 authorized_keys  -rw-rw-r-- 1 lqp lqp 419 04-12 12:45 id_rsa.pub  -rw-r--r-- 1 lqp lqp 395 04-12 11:35 known_hosts ]]></description>
			<content:encoded><![CDATA[<p>1.在本地主机生成SSH公钥和私钥(这里是用Mac OS X的”终端”工具,其他*Nix以及SSH Client步骤类似)</p>
<p>lin-pooplematoMacBook:~ linpoople$ ssh-keygen</p>
<p>lin-pooplematoMacBook:~ linpoople$ cd .ssh</p>
<p>lin-pooplematoMacBook:.ssh linpoople$ ls</p>
<p>id_rsa id_rsa.pub known_hosts #id_rsa为私钥,留在客户端;id_rsa为公钥,传至服务器端</p>
<p>2.利用U盘或者FTP等方式,把公钥传至服务器,存放位置为服务器用户的.ssh目录(如果没有该目录,请创建)</p>
<p><span id="more-800"></span>
<p>3.在服务器上执行一下操作,导入公钥</p>
<p>[lqp@sqdata1 ~]$ cat ~/.ssh/id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys</p>
<p>4.核实修改.ssh目录(755)和目录下文件的权限(644)(这个貌似还是比较严格的,试过放宽权限,结果认证不了)</p>
<p>[lqp@sqdata1 ~]$ ls -al .ssh/</p>
<p>drwxr-xr-x 2 lqp lqp 4096 04-12 12:45 .</p>
<p>drwx&#8212;&#8212; 3 lqp lqp 4096 04-12 12:46 ..</p>
<p>-rw-r&#8211;r&#8211; 1 lqp lqp 419 04-12 12:45 authorized_keys</p>
<p>-rw-rw-r&#8211; 1 lqp lqp 419 04-12 12:45 id_rsa.pub</p>
<p>-rw-r&#8211;r&#8211; 1 lqp lqp 395 04-12 11:35 known_hosts</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/800/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Original]测试Netapp与Windows Server域扩展（基于Linux+NetApp Simulator）</title>
		<link>http://99dev.net/archives/779</link>
		<comments>http://99dev.net/archives/779#comments</comments>
		<pubDate>Sun, 14 Mar 2010 08:18:25 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[其他Linux技术]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Netapp]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/779</guid>
		<description><![CDATA[详细方法官方文档说得很清楚，请移步文章末尾的附件。
#文中提到Data Ontap为Netapp存储的操作系统，基于*Nix定制
几个注意点：
1.需要域控制器上面同时有DNS server。对域控制器不熟的兄弟，可以利用“Windows2003 EE &#8211; 管理工具 &#8211; 管理您的服务器 &#8211; 添加删除角色 -第一台服务器”模式安装。这会把常用的Service都装上，然后移除不需要的服务即可。
<span class="readmore"><a href="http://99dev.net/archives/779" title="[Original]测试Netapp与Windows Server域扩展（基于Linux+NetApp Simulator）" target="_blank">阅读全文——共970字</a></span>]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">详细方法官方文档说得很清楚，请移步文章末尾的附件。</font></span></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">#文中提到Data Ontap为Netapp存储的操作系统，基于*Nix定制</font></span></span></p>
<p><span style="font-size: x-small"><strong><span style="font-size: x-small"><font size="2">几个注意点：</font></span></strong></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"><strong>1.</strong>需要域控制器上面同时有DNS server。对域控制器不熟的兄弟，可以利用“Windows2003 EE &#8211; 管理工具 &#8211; 管理您的服务器 &#8211; 添加删除角色 -第一台服务器”模式安装。这会把常用的Service都装上，然后移除不需要的服务即可。</font></span></span></p>
<p> <span id="more-779"></span><font size="2"></font><span style="font-size: x-small"></span><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"><strong>2.</strong>需要保持Data Ontap和DC服务器时间误差在5分钟以内。否则，客户机登陆CIFS共享时，将会有“权限不足”等的错误提示。同时，NetApp的console界面返回如下信息</font></span></span>
</p>
<blockquote><p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">NTN3600A&gt; Sat Mar 13 11:30:18 GMT [cifs.trace.GSS:error]: AUTH: Unable to acquire filer credentials: (0x96c73a25) Filer and domain time differ by more than 5 minutes.</font></span></span></p>
</blockquote>
<p><span style="font-size: x-small"><font size="2"><span style="font-size: x-small">在Netapp WebUI中调整时间，注意，时区必须选择“PRC”。Data Ontap</span><span style="font-size: x-small">的内核有点诡异，时区选择GMT+8也是不行的。</span></font></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"></font></span></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"><strong>3.</strong>Netapp首次安装，除了3张系统盘，额外的虚拟磁盘，均是不可用。具体表现如下</font></span></span></p>
<blockquote><p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"><strong>a.</strong>启动时，显示如下信息：</font></span></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">“Disk v4.40 Shelf ? Bay ? [NETAPP VD-1000MB-FZ-520 0042] S/N [18084922] has no valid labels. It will be taken out of service to prevent possible data loss.”</font></span></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"><strong>b.</strong>在“Data Ontap &#8211; Storage &#8211; Disk”里显示这几张盘为Broken</font></span></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"><strong>c.</strong>做Aggregates时，会提示“at least 2 spare disks”</font></span></span></p>
</blockquote>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">可以做如下操作来解决这个问题</font></span></span></p>
<blockquote><p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">&gt;priv set diag           <br />*&gt;disk unfail -s v4.19 (where v4.19 is your disk,maybe 4.20,4.21…)            <br />*&gt;disk zero spares</font></span></span></p>
</blockquote>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2"></font></span></span></p>
<p><span style="font-size: x-small"><strong><span style="font-size: x-small"><font size="2">相关工具和文档</font></span></strong></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">1.IBM RedBook:</font></span><a href="http://ftp.99dev.net/Document%ce%c4%b5%b5%d7%ca%c1%cf/Setting%20up%20CIFS%20shares%20and%20joining%20the%20Active%20Dictory.pdf"><span style="font-size: x-small"><font size="2">Setting up CIFS shares and joining the Active Dictory</font></span></a></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">2.</font></span><a href="http://ftp.99dev.net/OS.ISO/7.2.1P1-sim-cdrom-image-v19.iso"><span style="font-size: x-small"><font size="2">模拟器：Netapp Simulator v7.1</font></span></a></span></p>
<p><span style="font-size: x-small"><span style="font-size: x-small"><font size="2">3.模拟器使用文档：</font></span><a href="http://ftp.99dev.net/[Document]%ce%c4%b5%b5%d7%ca%c1%cf/simulator7_3.pdf" target="_blank"><span style="font-size: x-small"><font size="2">Netapp Simulator User Guide v7.1</font></span></a></span></p>
<p><font size="2"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/779/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Original]NetAPP的负载均衡</title>
		<link>http://99dev.net/archives/778</link>
		<comments>http://99dev.net/archives/778#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:37:41 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[系统架构]]></category>
		<category><![CDATA[网络管理]]></category>
		<category><![CDATA[Netapp]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/778</guid>
		<description><![CDATA[NetAPP存储支持以下三种端口聚合方式：
a.single-mode&#160; 端口工作在active和standby状态，只有一个端口处于actvie状况。当active端口失效,系统自动从standby中选择一个端口成为active口。不需要交换机支持aggre，也不需要在交换机上做任何相关配置。所有端口具有相同的ＭＡＣ地址，实现最基本的链路冗余。
b.multi-mode(static)&#160; 与IEEE 802.3ad(static)兼容，所有端口处于active状态，具有相同的mac地址；能够检测端口的链路状态，但不能数据的丢失；交换机需要支持 LAC；;在multimode(包括static和dynamic)下，存储系统对outbound traffic支持三种load-balance算法:IP-based/MAC-based/Round robin;。
<span class="readmore"><a href="http://99dev.net/archives/778" title="[Original]NetAPP的负载均衡" target="_blank">阅读全文——共2795字</a></span>]]></description>
			<content:encoded><![CDATA[<p><font size="4"><strong>NetAPP存储支持以下三种端口聚合方式：</strong></font></p>
<p><font size="2">a.<strong>single-mode&#160; </strong>端口工作在active和standby状态，只有一个端口处于actvie状况。当active端口失效,系统自动从standby中选择一个端口成为active口。不需要交换机支持aggre，也不需要在交换机上做任何相关配置。所有端口具有相同的ＭＡＣ地址，实现最基本的链路冗余。</font></p>
<p><font size="2">b.<strong>multi-mode(static)&#160; </strong>与IEEE 802.3ad(static)兼容，所有端口处于active状态，具有相同的mac地址；能够检测端口的链路状态，但不能数据的丢失；交换机需要支持 LAC；;在multimode(包括static和dynamic)下，存储系统对outbound traffic支持三种load-balance算法:IP-based/MAC-based/Round robin;。</font></p>
<p><font size="2">c.<strong>multi-mode(dynamic)&#160; </strong>与IEEE 802.3ad(dynamic)兼容，即lLACP协议(cisco叫做PAgP)，所有端口均处于active状态，具有相同的mac地址。交换机需要支持LACP。在lacp下,vif接口必须配置为 first-level，并且LB应该配置为IP-based(这也是默认方式)；在lacp下，存储系统不仅能检测链路的丢失,还能检测数据流的丢失，因此该模式与HA环境相兼容。<strong>此种模式有其局限性，只能使用IP Balance算法。</strong></font></p>
<p> <span id="more-778"></span>
<p><font size="2"></font></p>
<p><font size="4"><strong>三种load-balance算法的比较：</strong></font></p>
<p><font size="2">a. <strong>ip balance&#160; </strong>根据来源IP动态负载均衡，得出的结果不会太平均。故障切换，会有一个丢包。在故障恢复后，会将流量重定向回该端口。      <br /></font><font size="2"></font></p>
<p><font size="2">b. <strong>mac balance&#160; </strong>多个不同mac地址的端口，平均分配负载。比较有意思的是，长期测试之后，会发现，其中接收包都集中在一个端口，发送包集中在另一个端口。在拔掉一个接口的情况下，另一个接口会接管所有流量。在网络断掉的一瞬间，会有一个丢包。      <br /></font></p>
<p><font size="2">c. <strong>rr balance （Round-Robin Scheduling） </strong>轮询调度算法的原理是每一次把来自用户的请求轮流分配给内部中的服务器，从1开始，直到N(内部服务器个数)，然后重新开始循环。适用于请求方软硬件条件和请求数差不多的情况。</font></p>
<p><font size="2">d. <strong>port balance</strong>方式下，所有流量由两个端口均衡，得出的结果平均。在网络断掉的一瞬间，会有一个丢包。从端口和带宽利用率来考虑，这是最佳方式。</font></p>
<p><font size="2">以上所说丢包，都是基于连续ping测试。</font></p>
<p><font size="4"><strong>以下是IBM NS3600做VIF的一个实例</strong></font></p>
<blockquote><p>NTN3600B&gt; ifconfig e0a down     <br />NTN3600B&gt; ifconfig e0b down      <br />NTN3600B&gt; ifconfig vif1 down      <br />ifconfig: vif1: no such interface      <br />NTN3600B&gt; vif destroy vif1      <br />vif1 is not a valid vifname       <br />NTN3600B&gt; vif create multi vif1 -b port e0a e0b       <br />NTN3600B&gt; ifconfig vif1 192.168.125.2      <br />NTN3600B&gt; ifconfig vif1 up      <br />NTN3600B&gt; ping 192.168.125.2      <br />192.168.125.2 is alive</p>
<p>NTN3600B&gt; vif stat vif1     <br />Virtual interface (trunk) vif1      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; e0b&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; e0a&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; Pkts In&#160;&#160; Pkts Out&#160; Pkts In&#160;&#160; Pkts Out      <br />&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 83&#160;&#160;&#160;&#160;&#160;&#160;&#160; 66&#160;&#160;&#160;&#160;&#160;&#160;&#160; 23&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 5&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160; </p>
<p>NTN3600B&gt; vif status&#160;&#160; <br />default: transmit &#8216;IP Load balancing&#8217;, VIF Type &#8216;multi_mode&#8217;, fail &#8216;log&#8217;      <br />vif1: 2 links, transmit &#8216;IP+port Load balancing&#8217;, VIF Type &#8216;multi_mode&#8217; fail &#8216;default&#8217;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; VIF Status&#160;&#160;&#160;&#160; Up&#160;&#160;&#160;&#160;&#160; Addr_set       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; up:      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; e0b: state up, since 10Mar2010 14:02:01 (00:02:45)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mediatype: auto-1000t-fd-up      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; flags: enabled      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; input packets 2, input bytes 128      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; output packets 131, output bytes 9414      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; up indications 1, broken indications 0      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; drops (if) 0, drops (link) 0      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; indication: up at 10Mar2010 14:02:01      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; consecutive 164, transitions 1      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; e0a: state up, since 10Mar2010 14:02:01 (00:02:45)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mediatype: auto-1000t-fd-up      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; flags: enabled      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; input packets 113, input bytes 9006      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; output packets 23, output bytes 1576      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; up indications 1, broken indications 0      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; drops (if) 0, drops (link) 0      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; indication: up at 10Mar2010 14:02:01      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; consecutive 164, transitions 1</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/778/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

