tag:blogger.com,1999:blog-85722359987981353162024-03-20T17:48:04.710+08:00Mr.C的工作日誌Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-8572235998798135316.post-80196519168123347682017-04-01T01:23:00.001+08:002017-04-01T22:56:09.458+08:00[RouterOS] 自動將 Log 郵寄至 E-Mail<h3>前言</h3><div><br />
</div>前陣子使用了 syslog-ng 來收 log,但是要看 log 還要登入進 Raspberry Pi 上看略嫌麻煩,不如讓 RouterOS 定時寄到我信箱看比較方便些。<br />
(本腳本適用於每日 log 量不大的家用設備,一天會超過兩三千條的還是乖乖用 syslog server 吧!)<br />
<br />
<h3>Script</h3><div></div><div><code><br />
<div>#read log</div><div>:local logcontent</div><div>:foreach int in=[/log find ] do={</div><div>:set logcontent ("$logcontent\r\n" .[/log get $int time]. " - " .[/log get $int message])</div><div>}</div><div>#send email</div><div>/tool e-mail send to="example@email.com" subject=("[Syslog] " . "Mikrotik " . [/system clock get date]) body=$logcontent</div><div>#delete old log</div><div>/system logging action set memory memory-lines=1</div><div>/system logging action set memory memory-lines=500</div><div>:log info "finishing the log dump"</div></code><br />
</div><div><br />
</div><div><h3>用法</h3></div><span style="font-weight: normal;"><br />
</span> <span style="font-weight: normal;">首先在 /system script 下新增腳本,將上面那段腳本貼上,</span><br />
接下來在 /system scheduler 下新增排程,輸入 /system script run LogDump<br />
我是設定每 6 小時寄送一次,因為這個腳本一次寄送上限大概是 500 條 log 左右,<br />
如果設備每天的 log 不多,可以調整為每 12 小時或是每 24 小時寄送一次就好。<br />
<div><br />
</div><div><br />
</div><h3>參考資料</h3><ul><li><a href="https://forum.mikrotik.com/viewtopic.php?t=22207">script to save logs and send via email</a></li>
</ul>Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-17193759071118420632017-04-01T00:30:00.000+08:002017-04-01T22:56:17.248+08:00[網路] 淺談 STP - Spanning Tree Protocol <script src="https://hackpad.com/8RqCrEECFXg.js?format=html-notitle"></script><noscript><div>View <a href="https://hackpad.com/8RqCrEECFXg">Spanning Tree Protocol</a> on Hackpad.</div></noscript>Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-13684413045195421852017-03-26T01:48:00.002+08:002017-03-26T02:29:57.084+08:00[RouterOS] 實作 VLAN Trunk 讓 MOD 流量通過 Switch 並隔離其他上網流量<h3>
架構圖</h3>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixW9MPtlcRc_HIQXGEmwmArL3yFgM2gL_ORDtTIfXtHot2KlfERvoLYR4N6jrOFJ5g-UQTGB0KMxTP2uBlvWyq8Z1-Q0-GNOIKmzQeIcO6XJ5LYW0FBUtnOvqR7Ot1bOCnXAd07gZ0UeE/s1600/MikroTik+with+Mod+over+Vlan100.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="526" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixW9MPtlcRc_HIQXGEmwmArL3yFgM2gL_ORDtTIfXtHot2KlfERvoLYR4N6jrOFJ5g-UQTGB0KMxTP2uBlvWyq8Z1-Q0-GNOIKmzQeIcO6XJ5LYW0FBUtnOvqR7Ot1bOCnXAd07gZ0UeE/s640/MikroTik+with+Mod+over+Vlan100.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<h3>
說明</h3>
<div>
<ul>
<li>Home Gateway 到 MOD 只有一條線,想要在那條線後接除了 MOD 外的設備</li>
<li>將 RB750GL 當成網管型 Switch 使用</li>
<li>MOD 為 VLAN 100,其餘設備皆為 VLAN 1</li>
</ul>
<a name='more'></a><ul>
</ul>
</div>
<h3>
操作</h3>
<div>
<br /></div>
<div>
<h4>
<span style="font-size: large;">MikroTik hEX</span></h4>
</div>
<div>
<div>
<span style="color: #3d85c6;">/interface ethernet</span></div>
<div>
<span style="color: #e06666;">set</span> [ <span style="color: #e06666;">find</span> <span style="color: #6aa84f;">default-name</span>=ether1 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether1-gateway</div>
<div>
<span style="color: #e06666;">set</span> [ <span style="color: #e06666;">find</span> <span style="color: #6aa84f;">default-name</span>=ether2 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether2-master-local</div>
<div>
<span style="color: #e06666;">set</span> [ <span style="color: #e06666;">find</span> <span style="color: #6aa84f;">default-name</span>=ether3 ] <span style="color: #6aa84f;">master-port</span>=ether2-master-local <span style="color: #6aa84f;">name</span>=ether3-slave-local</div>
<div>
<span style="color: #e06666;">set</span> [ <span style="color: #e06666;">find</span><span style="color: #6aa84f;"> default-name</span>=ether4 ] <span style="color: #6aa84f;">master-port</span>=ether2-master-local <span style="color: #6aa84f;">name</span>=ether4-slave-local</div>
<div>
<span style="color: #e06666;">set</span> [ <span style="color: #e06666;">find</span> <span style="color: #6aa84f;">default-name</span>=ether5 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether5-Hinet-MOD</div>
<div>
<span style="color: #3d85c6;"><br />
</span></div>
<div>
<div>
<span style="color: #3d85c6;">/interface ethernet switch port</span></div>
<div>
<span style="color: #e06666;">set</span> 0 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 1 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 2<span style="color: #6aa84f;"> vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 3 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 4 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 5 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
</div>
<div>
<br /></div>
<div>
<span style="color: #3d85c6;">/interface vlan</span></div>
<div>
<span style="color: #e06666;">add</span> <span style="color: #6aa84f;">interface</span>=ether5-Hinet-MOD<span style="color: #6aa84f;"> name</span>=eth5_vlan100_MOD <span style="color: #6aa84f;">vlan-id</span>=100</div>
<div>
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> interface</span>=ether5-Hinet-MOD <span style="color: #6aa84f;">name</span>=eth5_vlan1_LAN <span style="color: #6aa84f;">vlan-id</span>=1</div>
<div>
<br /></div>
<div>
<div>
<span style="color: #3d85c6;">/interface bridge</span></div>
<div>
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> name</span>=bridge_vlan1</div>
<div>
<span style="color: #e06666;">add</span> <span style="color: #6aa84f;">name</span>=bridge_vlan100</div>
</div>
<div>
<br /></div>
<div>
<span style="color: #3d85c6;">/interface bridge port</span></div>
<div>
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan1 <span style="color: #6aa84f;">interface</span>=ether2-master-local</div>
<div>
<span style="color: #e06666;">add</span> <span style="color: #6aa84f;">bridge</span>=bridge_vlan1 <span style="color: #6aa84f;">interface</span>=eth5_vlan1_LAN</div>
<div>
<span style="color: #e06666;">add</span> <span style="color: #6aa84f;">bridge</span>=bridge_vlan100 <span style="color: #6aa84f;">interface</span>=eth5_vlan100_MOD</div>
<div>
<span style="color: #e06666;">add</span> <span style="color: #6aa84f;">bridge</span>=bridge_vlan100 <span style="color: #6aa84f;">interface</span>=ether1-gateway</div>
</div>
<div>
<br /></div>
<div>
<b>PPPoE</b> 撥號介面請改為 <b>bridge_vlan100</b><br />
<b>DHCP Server / IPv4 Address </b>介面請改為 <b>bridge_vlan1</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgubFt8GHXoFoVbG9ilmVwOCbq1qQaCmdbtP8DfXiyK0depocN4u5Xu8vd3J2Mb37xOSjhLzEspdQEbvg_A_H-Ue-uAKOpgWwVFxbTLpDcpQ4aDTAp92zbBCUE9ADV3YpwARG7Wn3n27HA/s1600/%25E6%2593%25B7%25E5%258F%25962655.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgubFt8GHXoFoVbG9ilmVwOCbq1qQaCmdbtP8DfXiyK0depocN4u5Xu8vd3J2Mb37xOSjhLzEspdQEbvg_A_H-Ue-uAKOpgWwVFxbTLpDcpQ4aDTAp92zbBCUE9ADV3YpwARG7Wn3n27HA/s640/%25E6%2593%25B7%25E5%258F%25962655.jpg" width="640" /></a></div>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<br />
<h4>
<b><span style="font-size: large;"><br /></span></b></h4>
<h4>
<b><span style="font-size: large;"><br /></span></b></h4>
<h4>
<b><span style="font-size: large;"><br /></span></b></h4>
<h4>
<b><span style="font-size: large;"><br /></span></b></h4>
<h4>
<b><span style="font-size: large;"><br /></span></b></h4>
<div>
<b><span style="font-size: large;"><br /></span></b></div>
<div>
<b><span style="font-size: large;"><br /></span></b></div>
<div>
<b><span style="font-size: large;"><br /></span></b></div>
<div>
<b><span style="font-size: large;"><br /></span></b></div>
<h4>
<b><span style="font-size: large;">MikroTik RB750GL</span></b></h4>
</div>
<div>
<div>
<span style="color: #3d85c6;">/interface ethernet switch port</span></div>
<div>
<span style="color: #e06666;">set</span> 0 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 1 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 2<span style="color: #6aa84f;"> vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 3 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 4 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
<div>
<span style="color: #e06666;">set</span> 5 <span style="color: #6aa84f;">vlan-mode</span>=disabled <span style="color: #6aa84f;">vlan-header</span>=leave-as-is <span style="color: #6aa84f;">default-vlan-id</span>=auto </div>
</div>
<div>
<span style="color: #3d85c6;"><br /></span></div>
<div>
<span style="color: #3d85c6;">/interface ethernet</span><br />
<span style="color: #e06666;">set </span>[ <span style="color: #e06666;">find </span><span style="color: #6aa84f;">default-name</span>=ether2 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether2-RPI<br />
<span style="color: #e06666;">set </span>[ <span style="color: #e06666;">find </span><span style="color: #6aa84f;">default-name</span>=ether3 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether3-1043ND<br />
<span style="color: #e06666;">set </span>[ <span style="color: #e06666;">find </span><span style="color: #6aa84f;">default-name</span>=ether4 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether4-MOD<br />
<span style="color: #e06666;">set </span>[ <span style="color: #e06666;">find </span><span style="color: #6aa84f;">default-name</span>=ether5 ] <span style="color: #6aa84f;">master-port</span>=none <span style="color: #6aa84f;">name</span>=ether5-hEX<br />
<br />
<span style="color: #3d85c6;">/interface vlan</span><br />
<span style="color: #e06666;">add </span><span style="color: #6aa84f;">interface</span>=ether5-hEX <span style="color: #6aa84f;">name</span>=eth5_vlan100_MOD <span style="color: #6aa84f;">vlan-id</span>=100<br />
<span style="color: #e06666;">add </span><span style="color: #6aa84f;">interface</span>=ether5-hEX <span style="color: #6aa84f;">name</span>=eth5_vlan1_LAN <span style="color: #6aa84f;">vlan-id</span>=1<br />
<br />
<span style="color: #3d85c6;">/interface bridge</span><br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> name</span>=bridge_vlan1<br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> name</span>=bridge_vlan100<br />
<span style="color: #3d85c6;"><br /></span>
<span style="color: #3d85c6;">/interface bridge port</span><br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan100 <span style="color: #6aa84f;">interface</span>=eth5_vlan100_MOD<br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan100 <span style="color: #6aa84f;">interface</span>=ether4-mod<br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan1 <span style="color: #6aa84f;">interface</span>=eth5_vlan1_LAN<br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan1 <span style="color: #6aa84f;">interface</span>=ether1<br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan1 <span style="color: #6aa84f;">interface</span>=ether2-RPI<br />
<span style="color: #e06666;">add</span><span style="color: #6aa84f;"> bridge</span>=bridge_vlan1 <span style="color: #6aa84f;">interface</span>=ether3-1043ND<br />
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjykoe2lVzo2gL70Fft21WrhqiwVwQOm_Qdo9BQfhJwSiQhHcZl8Po5oytMjYbToYqyiS-V-8NCBASJp8pJg6ogPhP0ZyQX4O3tppzR8U2WGTSX-SyWKkrx0PJcD-RhdJoPGaGA6f4EJM/s1600/%25E6%2593%25B7%25E5%258F%25962653.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjykoe2lVzo2gL70Fft21WrhqiwVwQOm_Qdo9BQfhJwSiQhHcZl8Po5oytMjYbToYqyiS-V-8NCBASJp8pJg6ogPhP0ZyQX4O3tppzR8U2WGTSX-SyWKkrx0PJcD-RhdJoPGaGA6f4EJM/s640/%25E6%2593%25B7%25E5%258F%25962653.jpg" width="640" /></a></div>
<br />
<br />
<br /></div>
<div>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<div>
<br /></div>
<div>
<br /></div>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
<h3>
參考資料</h3>
</div>
<div>
<ul>
<li><a href="https://wiki.mikrotik.com/wiki/Manual:Interface/VLAN" target="_blank">Manual:Interface/VLAN</a></li>
<li><a href="https://www.mobile01.com/topicdetail.php?f=110&t=4393418&p=1" target="_blank">使用VLAN連接MOD Part 1</a></li>
<li><a href="http://deanma.blogspot.tw/2015/06/routeros-vlan-cht-mod.html" target="_blank">[RouterOS] 透過BRIDGE(軟體式)作VLAN連接MOD 實做紀錄</a></li>
</ul>
</div>
<div>
<br /></div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-21931754558453749542017-03-22T23:10:00.004+08:002017-03-25T22:53:28.863+08:00[Raspberry Pi] 利用 syslog-ng 收取 RouterOS 的 Log<h3>
前言</h3>
<div>
<br /></div>
<div>
最近剛好有將 Syslog 備存的需求,就用擱置在旁的 Rpi 來當 Syslog Server 吧!</div>
<div>
<br /></div>
<h3>
操作準備</h3>
<div>
<br /></div>
<div>
版本:<a href="http://dietpi.com/downloads/images/DietPi_RPi-armv6-(Jessie).7z" target="_blank">DietPi_v145_RPi-armv6-(Jessie)</a></div>
<div>
燒錄進記憶卡後開機並將基本設定完畢,本次教學會略過 DietPi 的基礎設定。</div>
<div>
<br /></div>
<h3>
本文</h3>
<br />
<ul>
<li>安裝 s<b>yslog-ng</b><span style="color: #6aa84f;"><b><br />
</b><span style="color: #6aa84f;">root@DietPi:~#</span></span><b> apt-get install syslog-ng</b></li>
</ul>
<div>
<ul>
<li>編輯 <b>syslog-ng</b> 的設定檔<span style="color: #6aa84f;"><br />
root@DietPi:~#</span><b> nano /etc/syslog-ng/syslog-ng.conf<br />
<a name='more'></a></b></li>
</ul>
</div>
<div>
</div>
<ul>
<li>在 <b>SOURCES</b> 前貼上這段後存檔</li>
</ul>
<div class="MsoNormal">
<code>
# Accept connection on UDP<br />
source s_net { udp (); };<br />
# MIKROTIK ###########<br />
# Add Filter to add our mikroti<br />
filter f_mikrotik { host( "Your_Router_IP_Addr" ); };<br />
# Add destination file where logs will be stored<br />
#destination df_mikrotik { file("/var/log/mikrotik.log"); };<br />
log { source ( s_net ); filter( f_mikrotik ); destination ( df_mikrotik ); };<br />
destination df_mikrotik {<br />
file("/var/log/mikrotik/mikrotik.${YEAR}.${MONTH}.${DAY}.log"<br />
# template("${HOUR}:${MIN}:${SEC} ${HOST} ${MSG} ${MSG}\n")<br />
template-escape(no));<br />
};</code><br />
<ul>
<li>在 <b>/var/log</b> 下新增 <b>mikrotik</b> 資料夾<br /><span style="color: #6aa84f;">root@DietPi:~#</span><span style="color: #3d85c6;"> </span><b>mkdir /var/log/mikrotik</b></li>
</ul>
<ul>
<li>重新啟動 <b>syslog-ng</b> 服務來套用新的設定檔<br /><span style="color: #6aa84f;">root@DietPi:~#</span><span style="color: #6fa8dc;"> </span><b>service syslog-ng restart</b></li>
</ul>
<ul>
<li>將<b> syslog-ng</b> 設定成開機自動啟動<br /><span style="color: #6aa84f;">root@DietPi:~#</span><span style="color: #6fa8dc;"> </span><b>update-rc.d syslog-ng defaults</b></li>
</ul>
<ul>
<li>重新開機<br /><span style="color: #6aa84f;">root@DietPi:~#</span> <b>reboot</b></li>
</ul>
<ul>
<li>確認 <b>syslog-ng</b> 是否有自動啟動<br /><span style="color: #6aa84f;">root@DietPi:~#</span> <b>htop</b></li>
</ul>
<ul>
<li>檢查 <b>Log</b> 是否有正確進到 <b>Syslog Server</b><span style="color: #6aa84f;"><br />
root@DietPi:~#</span><span style="color: #6fa8dc;"> </span><b>tail -f /var/log/mikrotik/mikrotik.YYYY.MM.DD.log</b></li>
</ul>
<br />
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="https://aacable.wordpress.com/tag/howto-send-mikrotik-logs-to-remote-syslog-server/" target="_blank">Howto Save Mikrotik Logs to Remote SYSLOG Server</a></li>
</ul>
</div>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-82992605148651906892017-03-22T17:18:00.000+08:002017-03-22T23:19:19.736+08:00[RouterOS] 將中華電信 MOD 接在 Router 後面<h3>
前言</h3>
<div>
</div>
<div>
為了將所有設備接在 Router 後方便管理以及查看總流量,才誕生了本次教學。</div>
<div>
<br /></div>
<h3>
操作</h3>
<div>
</div>
<div>
首先將預定要接上 MOD 介面的 <span style="color: #f1c232;">Master Port </span>修改為 <span style="color: #e06666;">none</span></div>
<div>
<span style="color: #e06666;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEcdBXLmSTsMP0qS-7pp6FWmMLxUj_Il0mvakoJXU2O1xZEddhrxziu29R2Z5WC-CUpRj1eYEMtmgNpB_YfxeDpOqvCSZQHi9Hje4c4ojVwk_pDT2_lkhQUF9iDFydBd4JeuPpUK-Boug/s1600/%25E6%2593%25B7%25E5%258F%25962647.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="510" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEcdBXLmSTsMP0qS-7pp6FWmMLxUj_Il0mvakoJXU2O1xZEddhrxziu29R2Z5WC-CUpRj1eYEMtmgNpB_YfxeDpOqvCSZQHi9Hje4c4ojVwk_pDT2_lkhQUF9iDFydBd4JeuPpUK-Boug/s640/%25E6%2593%25B7%25E5%258F%25962647.jpg" width="640" /></a></div>
<div>
<span style="color: #e06666;"><br /></span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
接下來建立一個 <span style="color: #f1c232;">Bridge</span>,並將 MOD 與 Gateway 的 Port 新增到該 Bridge</div>
<div>
<br />
<a name='more'></a><br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecRN8_LQnOiR121PI1MBMH8ZTjmhKy7tyiHGDj0Rv8RRzeyXFZXnl2aaIkeQ4oCCnY-TwPl-eYn-7cvDp5BNJv7DRmnMIyFQ7-t96F-8Trql48AnyAxGY5Ty0eZWD08LLBf0FgEhM0ZA/s1600/%25E6%2593%25B7%25E5%258F%25962648.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="395" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecRN8_LQnOiR121PI1MBMH8ZTjmhKy7tyiHGDj0Rv8RRzeyXFZXnl2aaIkeQ4oCCnY-TwPl-eYn-7cvDp5BNJv7DRmnMIyFQ7-t96F-8Trql48AnyAxGY5Ty0eZWD08LLBf0FgEhM0ZA/s640/%25E6%2593%25B7%25E5%258F%25962648.jpg" width="640" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3E6UqJDOQS09x2-x0i4yG4Y8c0UBx1dq0u7d9c8cmXAqbxlFgQioOchWfTrVY9OFkj40GgfYKqPz8UZ2aW6IGPCxLXgVDMGeQUC-rOAjdvRlBJu9SzQDSnKposhAB7aZJyT1Xh4qpJY/s1600/%25E6%2593%25B7%25E5%258F%25962649.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3E6UqJDOQS09x2-x0i4yG4Y8c0UBx1dq0u7d9c8cmXAqbxlFgQioOchWfTrVY9OFkj40GgfYKqPz8UZ2aW6IGPCxLXgVDMGeQUC-rOAjdvRlBJu9SzQDSnKposhAB7aZJyT1Xh4qpJY/s640/%25E6%2593%25B7%25E5%258F%25962649.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
新增完畢後,將原本 <span style="color: #f1c232;">PPPoE</span> 撥號介面修改成剛剛新增的 Bridge</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxtfdJBg2CLDjdCggdZnUvis9irPEEY4YOG-Jl4FCc_SrRAKTJlcNIAkbqzsFmnuMsjqImc3Dn82SQ5hHpoQvdwYbdyFTfqK3IZio7NOousx1rOtZuKSIdZN96uhh4SIcJy8NlusHjSJU/s1600/%25E6%2593%25B7%25E5%258F%25962650.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="403" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxtfdJBg2CLDjdCggdZnUvis9irPEEY4YOG-Jl4FCc_SrRAKTJlcNIAkbqzsFmnuMsjqImc3Dn82SQ5hHpoQvdwYbdyFTfqK3IZio7NOousx1rOtZuKSIdZN96uhh4SIcJy8NlusHjSJU/s640/%25E6%2593%25B7%25E5%258F%25962650.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
到這邊就設定完畢,可以把 MOD 開機起來確認是否能正常運作。</div>
<div>
<br /></div>
<h3>
參考資料</h3>
<div>
<ul>
<li><a href="https://www.mobile01.com/topicdetail.php?f=110&t=4393418&p=1" target="_blank">使用VLAN連接MOD Part 1</a></li>
</ul>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com1tag:blogger.com,1999:blog-8572235998798135316.post-84358305320605319692015-01-29T11:38:00.000+08:002015-01-29T11:38:11.124+08:00[網路] CCNA 讀書筆記 (Hackpad)<script src="https://hackpad.com/WWYJMBGB6h5.js?format=html-notitle"></script><noscript><div>View <a href="https://hackpad.com/WWYJMBGB6h5">CCNA Note</a> on Hackpad.</div></noscript>Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-33703043713646874472014-11-13T19:41:00.000+08:002015-01-29T11:43:02.995+08:00[RouterOS] Stateless Address Autoconfiguration (SLAAC) + Stateless DHCPv6 配置方法<h3>
前言</h3>
<div>
<br /></div>
<div>
之前已經將 <a href="http://downager.blogspot.tw/2013/09/routeros-hinet-ipv6-dual-stack.html" target="_blank">Hinet IPv6 Dual Stack</a> 給配置完畢了,接下來要使用 <span style="color: #45818e;">SLAAC + Stateless DHCPv6</span> 來配置 <span style="color: #3d85c6;">IPv6 Address</span> 及 <span style="color: #3d85c6;">IPv6 DNS Server</span>。</div>
<div>
<br /></div>
<h3>
操作</h3>
<div>
<br /></div>
開啟 <span style="color: #e69138;">IP/DNS</span> ,配置 <span style="color: #f1c232;">IPv6 DNS Server</span><br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-P6-RCveSX98OEgy2Ue4JmvLXvDGiYYTTcs4vWvuZu_R7Eo2Lf7GvmzzMdy8kR4_hovc4chzTXPMPiWbxL2qAb5eiPwgu6raLebuOaYNR5p97q0pYBCDp0v9XNyvFXa22KXJpv9jMu3A/s1600/%E6%93%B7%E5%8F%961664.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-P6-RCveSX98OEgy2Ue4JmvLXvDGiYYTTcs4vWvuZu_R7Eo2Lf7GvmzzMdy8kR4_hovc4chzTXPMPiWbxL2qAb5eiPwgu6raLebuOaYNR5p97q0pYBCDp0v9XNyvFXa22KXJpv9jMu3A/s1600/%E6%93%B7%E5%8F%961664.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
開啟 <span style="color: #e69138;">IPv6/DHCPv6 Server</span> ,新增 <span style="color: #f1c232;">DHCPv6 Server</span> 並啟用它</div>
<div>
<br />
<a name='more'></a><br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeffsMLCGG4vFsJM0XsRr0Zq0V44sQehv9Sl0qMxTgFufMD0g1oVOKysL0QeNHOza6yjypamdN8wt7EGOK7bKR7fKy-rOxVoc2YBAKaHGcQEDRgAVh7zQrEeCGf0x3lD6k6q-PjYQ5nWk/s1600/%E6%93%B7%E5%8F%961665.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeffsMLCGG4vFsJM0XsRr0Zq0V44sQehv9Sl0qMxTgFufMD0g1oVOKysL0QeNHOza6yjypamdN8wt7EGOK7bKR7fKy-rOxVoc2YBAKaHGcQEDRgAVh7zQrEeCGf0x3lD6k6q-PjYQ5nWk/s1600/%E6%93%B7%E5%8F%961665.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
開啟 <span style="color: #e69138;">IPv6/ND</span>,確定 <span style="color: #e06666;">Other Configuration</span> 是勾起的</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8zxDn6reAzWyIbzlBHTyBln46xE5sC1Am_WHZi9Zvlbz9Ub4I_ev4MGYx06NI0cOmXhhaOB5CYonb2M3U1RZ7gU2pmJv3IIric5cpAAKWhkneCkG-bcQJcYo2jtImKYDTTl1skberxzY/s1600/%E6%93%B7%E5%8F%961666.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8zxDn6reAzWyIbzlBHTyBln46xE5sC1Am_WHZi9Zvlbz9Ub4I_ev4MGYx06NI0cOmXhhaOB5CYonb2M3U1RZ7gU2pmJv3IIric5cpAAKWhkneCkG-bcQJcYo2jtImKYDTTl1skberxzY/s1600/%E6%93%B7%E5%8F%961666.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
這邊說明一下四個選項的意義:</div>
<div>
<ul>
<li><span style="color: #e06666;">Advertise MAC Address</span> : 預設是勾起,決定 <span style="color: #f1c232;">Router Advertisement (RA)</span> 是否自帶介面 <span style="color: #3d85c6;">MAC Address</span>。</li>
<li><span style="color: #e06666;">Advertise DNS</span> : 決定 <span style="color: #f1c232;">Router Advertisement (RA)</span> 是否自帶 <span style="color: #3d85c6;">DNS Server</span> 資訊,若勾起則為 <span style="color: #45818e;">SLAAC + RDNSS</span> ,目前 Windows 尚未支援。</li>
<li><span style="color: #e06666;">Managed Adddress Configuration</span> : 決定是否由 <span style="color: #f1c232;">DHCPv6 Server</span> 發送 <span style="color: #3d85c6;">IPv6 Address</span> ,若勾起則為 <span style="color: #45818e;">Stateful DHCPv6</span>,經測試後發現尚有問題 (ver. 6.20)。</li>
<li><span style="color: #e06666;">Other Configuration</span> : 決定是否向 <span style="color: #f1c232;">DHCPv6 Server</span> 要求 <span style="color: #3d85c6;">DNS</span> 資訊等等,單獨勾起不會要求 <span style="color: #3d85c6;">IPv6 Address</span>,此為 <span style="color: #45818e;">Stateless DHCPv6</span>。</li>
</ul>
</div>
<div>
<br /></div>
<div>
設定到這邊就可以去確定 Client 是否有配置成功 <span style="color: #3d85c6;">IPv6 Address</span> 及 <span style="color: #3d85c6;">IPv6 DNS Server</span> 了,</div>
<div>
如果配置正確會如下圖:</div>
<div>
<br /></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigghwP9U7MgRdwQIlyoUVExhrhsi4ZMrpEcxgKYZfhBoUrpoMbn-Y8kwbOZDMggzQCQd0Pcde9Lk7o71y37gfm_aVvle1OFFhn353pTabmrLwj9eJqlw_OLj-fyPXucHfA3NtBRNK2qvI/s1600/%E6%93%B7%E5%8F%961663.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigghwP9U7MgRdwQIlyoUVExhrhsi4ZMrpEcxgKYZfhBoUrpoMbn-Y8kwbOZDMggzQCQd0Pcde9Lk7o71y37gfm_aVvle1OFFhn353pTabmrLwj9eJqlw_OLj-fyPXucHfA3NtBRNK2qvI/s1600/%E6%93%B7%E5%8F%961663.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
成功!若有任何設定上的疑問皆可在下方發問,我會盡快回覆。<br />
<br />
<h4>
11/15 新增 MikroTik 回信</h4>
</div>
<div>
<div>
<br /></div>
<code><br />
Hello,<br />
</code><br />
<div>
<code><br />
</code></div>
<div>
<code>RouterOS does not have DHCPv6 implementation. <span style="color: #e06666;">All address negotiation is done</span></code></div>
<div>
<code><span style="color: #e06666;">only via RA</span>. But you can add DHCP-PD server '/ipv6 dhcp-server' and if you have</code></div>
<div>
<code>ipv6 ip addresses set as DNS servers router will give them out to clients</code></div>
<div>
<code>asking for it.</code></div>
<div>
<code><br />
</code></div>
<div>
<code>Regards,</code></div>
<div>
<code>Janis K.</code></div>
<br />
<div>
看起來是確定不支援 Stateful DHCPv6 了。</div>
</div>
<div>
</div>
<br />
<h3>
參考資料</h3>
<div>
<ul>
<li><a href="https://www.gsnv6.tw/docu/SOP/08.IPv6_SOP_Home_Gateway.pdf" target="_blank">IPv6 升級實作技術手冊第1.1版</a></li>
<li><a href="http://www.lijyyh.com/2012/04/ipv6ipv6-auto-configuration.html" target="_blank">傲笑紅塵路: IPv6自動組態配置(IPv6 Auto configuration)</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com1tag:blogger.com,1999:blog-8572235998798135316.post-56606583476771970992014-10-09T23:29:00.000+08:002018-03-05T19:28:16.172+08:00[網路] IEEE 802.11 分散式系統 (Distribution System) 訊框 (Frame) 交換簡解<h4>
前言</h4>
<div>
<br /></div>
<div>
這篇比較像是學習筆記,有些部分就不會寫那麼仔細了。</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
分散式系統 (Distribution System)</h3>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnfxse75cpJO7U7nUU3PeENQOCppf48aeTHo8fDNgSZ03ad7z9ZbFQLyiruQqEE3ORCq5TeYh2WqIMpVRLUv5tJfxmb2Wtcwa5kjTbGg3w0jG_GXSTUIK_QUTEradBvolhcETFul7Dvl0/s1600/%E6%93%B7%E5%8F%961589.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnfxse75cpJO7U7nUU3PeENQOCppf48aeTHo8fDNgSZ03ad7z9ZbFQLyiruQqEE3ORCq5TeYh2WqIMpVRLUv5tJfxmb2Wtcwa5kjTbGg3w0jG_GXSTUIK_QUTEradBvolhcETFul7Dvl0/s1600/%E6%93%B7%E5%8F%961589.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
這邊分散式系統指的是將每個 AP 相互連結,使得彼此的客戶端能夠交換資料的一套系統。</div>
<div>
<br /></div>
<div>
<br />
<a name='more'></a><br /></div>
<h3>
IEEE 802.11 Frame Format</h3>
<div>
<br /></div>
IEEE 802.11 我們常見的應用 Wi-Fi 就是其中之一,它的 Frame 長這樣:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYBEh9xGHTmPSTFoThRA51HR-kA4Re64U43jDQKdACwctpTUWEivtGO7Np2ARUQ8suG4x3ZpPiiiiogkOMlFBpfyfE-4_Zi1wWfIs6CTRNxhdocGIYmXKdSTQejdm18WUVhWiQcXk765U/s1600/%E6%93%B7%E5%8F%961587.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYBEh9xGHTmPSTFoThRA51HR-kA4Re64U43jDQKdACwctpTUWEivtGO7Np2ARUQ8suG4x3ZpPiiiiogkOMlFBpfyfE-4_Zi1wWfIs6CTRNxhdocGIYmXKdSTQejdm18WUVhWiQcXk765U/s1600/%E6%93%B7%E5%8F%961587.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
我們可以看到,802.11 的 MAC Header 的地址欄位有四欄,和 802.3 (Ethernet) 非常不同,等等會繼續提到。<br />
<br />
另外要先提的是,Frame Control 欄位裡的 To DS 和 From DS<br />
<br />
<ul>
<li>To DS : 目的地是否為分散式系統,是就打 1 ,否就打 0 </li>
<li>From DS : 發送地是否為分散式系統,是就打 1 ,否就打 0 </li>
</ul>
<br />
<br />
接下來看到這張圖,這是 802.3 下 MAC Header 會遇到的四種情形:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWowASonBYzxs58-GlpnUD5MhjFqGaGvQLVj0_8Ajqx5LGzvRJlECNKz7SHyFhEKW_nmU7MRYWbYPytznd3KaUVopdiM6U3puHxBewviijtRaku7VBPmKqNDX_YHP-pmOKyJFSWYKVTEA/s1600/%E6%93%B7%E5%8F%961588.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWowASonBYzxs58-GlpnUD5MhjFqGaGvQLVj0_8Ajqx5LGzvRJlECNKz7SHyFhEKW_nmU7MRYWbYPytznd3KaUVopdiM6U3puHxBewviijtRaku7VBPmKqNDX_YHP-pmOKyJFSWYKVTEA/s1600/%E6%93%B7%E5%8F%961588.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<ul>
<li>BSSID : AP 的 MAC address</li>
<li>SA : 原始來源地址</li>
<li>DA : 最終目的地地址</li>
<li>TA : 發送端地址</li>
<li>RA : 接收端地址</li>
</ul>
第一種都是 0 的,就是在同一 AP 訊號涵蓋範圍下互送<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_yQ0NvRnH-ODQcF0wcu-tmManHatRuugMAmVkOwv49dth2QAWDFifPfxgKHsY8rckQO3BICevzv-94fSPQAR7LCl7x0xWKxeYIxlIY4_B1G9ZMhatCSmV5vh7qpBuPnfvFrIoLyuf2NQ/s1600/%E6%93%B7%E5%8F%961590.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_yQ0NvRnH-ODQcF0wcu-tmManHatRuugMAmVkOwv49dth2QAWDFifPfxgKHsY8rckQO3BICevzv-94fSPQAR7LCl7x0xWKxeYIxlIY4_B1G9ZMhatCSmV5vh7qpBuPnfvFrIoLyuf2NQ/s1600/%E6%93%B7%E5%8F%961590.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<ul>
<li>To DS = <span style="color: #3d85c6;">0</span></li>
<li>From DS = <span style="color: #3d85c6;">0</span></li>
<li>Addr 1 = <span style="color: #e69138;">Laptop B</span></li>
<li>Addr 2 = <span style="color: #e69138;">Laptop A</span></li>
<li>Addr 3 = <span style="color: #e69138;">AP 0</span></li>
<li>Addr 4 = <span style="color: #e06666;">N/A</span></li>
</ul>
<br />
<br />
第二到四種我合在一起講:<br />
假設現在 Laptop A 要送資料給 Laptop D,由於雙方並不在同一 AP 下那勢必會經過 DS,所以總共有三步驟:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5imeb327Od4RUibNoTuqvIfUozEjIESCHekd3VLPeWN7ZupqctwiMHbzhHJRqfmNctOnlm2hpPvWgZ349XZq3fGQQ8Rg2Z5Yu1HGiikI20KnAbVbFgBLFXhvxxNXI9dqCjyPfn23kPE/s1600/%E6%93%B7%E5%8F%961591.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5imeb327Od4RUibNoTuqvIfUozEjIESCHekd3VLPeWN7ZupqctwiMHbzhHJRqfmNctOnlm2hpPvWgZ349XZq3fGQQ8Rg2Z5Yu1HGiikI20KnAbVbFgBLFXhvxxNXI9dqCjyPfn23kPE/s1600/%E6%93%B7%E5%8F%961591.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
a. <span style="color: #e69138;">Laptop A</span> to <span style="color: #e69138;">AP 0</span> :<br />
<br />
<ul>
<li>To DS = <span style="color: #3d85c6;">1</span></li>
<li>From DS = <span style="color: #3d85c6;">0</span></li>
<li>Addr 1 = <span style="color: #e69138;">AP 0</span></li>
<li>Addr 2 = <span style="color: #e69138;">Laptop A</span></li>
<li>Addr 3 = <span style="color: #e69138;">Laptop D</span></li>
<li>Addr 4 = <span style="color: #e06666;">N/A</span></li>
</ul>
<br />
<br />
b. <span style="color: #e69138;">AP 0</span> to <span style="color: #e69138;">AP 2</span> :<br />
<br />
<ul>
<li>To DS = <span style="color: #3d85c6;">1</span></li>
<li>From DS = <span style="color: #3d85c6;">1</span></li>
<li>Addr 1 = <span style="color: #e69138;">AP 2</span></li>
<li>Addr 2 = <span style="color: #e69138;">AP 0</span></li>
<li>Addr 3 = <span style="color: #e69138;">Laptop D</span></li>
<li>Addr 4 = <span style="color: #e69138;">Laptop A</span></li>
</ul>
<br />
c. <span style="color: #e69138;">AP 2</span> to <span style="color: #e69138;">Laptop D</span> :<br />
<br />
<ul>
<li>To DS = <span style="color: #3d85c6;">0</span></li>
<li>From DS = <span style="color: #3d85c6;">1</span></li>
<li>Addr 1 = <span style="color: #e69138;">Laptop D</span></li>
<li>Addr 2 = <span style="color: #e69138;">AP 2</span></li>
<li>Addr 3 = <span style="color: #e69138;">Laptop A</span></li>
<li>Addr 4 = <span style="color: #e06666;">N/A</span></li>
</ul>
<br />
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="http://en.wikipedia.org/wiki/IEEE_802.11">IEEE 802.11</a></li>
</ul>
</div>
<br />
大致上就是這樣,有什麼錯誤或是問題歡迎在下方指出,感謝您的閱讀。<br />
<br />
<br />
<br />
<br />Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com2tag:blogger.com,1999:blog-8572235998798135316.post-69701258608879449492014-01-11T07:59:00.004+08:002014-01-11T08:00:22.659+08:00[RouterOS] 自動重播PPPoE-client以取得特定網段IP Address<h4>
前言</h4>
<div>
<br /></div>
<div>
種花電信某些網段連外容易塞車,此腳本可幫助您取得連外速度較優良之IP。</div>
<div>
相關討論:<a href="http://www.mobile01.com/topicdetail.php?f=507&t=3369399&p=1">111夜間聯陸暴PING~石牌二機房過海纜第一站300ms</a></div>
<div>
<br /></div>
<h4>
本文</h4>
<div>
<br /></div>
<div>
</div>
<code> #Script:<br />
# Auto Redial PPPoE-client<br />
#Version:<br />
# RouterOS v6.7<br />
#Descript: <br />
# 自動重播PPPoE-client以取得特定網段IP Address<br />
#History:<br />
# 2014/01/10 Downager(http://downager.blogspot.tw/)<br />
#---------------------------------------------------------------<br />
#在此設定PPPoE Interface及所需要的IP網段(藍色字為需要修改的部分)<br />
:local PPPoEInt "<span style="color: #6fa8dc;">Hinet-PPPoE-out2</span>";<br />
:local Network <span style="color: #6fa8dc;">1.160.0.0/12</span>;<br />
<br />
#取得Interface IP address<br />
:local IntIPAddress [/ip address get [find interface=$PPPoEInt] address];<br />
:set IntIPAddress [:pick $IntIPAddress 0 [:find $IntIPAddress "/"]];<br />
:local CheckIP ([:toip $IntIPAddress] in $Network);<br />
<br />
#確認目前IP是否在目標網段內<br />
:if ($CheckIP = false) do={<br />
:do {<br />
/interface pppoe-client disable $PPPoEInt;<br />
/interface pppoe-client enable $PPPoEInt;<br />
:log info ($PPPoEInt . ": " . $IntIPAddress);<br />
:log info ($PPPoEInt . ": " . "IP不符需求");<br />
:delay 10;<br />
#重新寫入新取得的IP<br />
:set IntIPAddress [/ip address get [find interface=$PPPoEInt] address];<br />
:set IntIPAddress [:pick $IntIPAddress 0 [:find $IntIPAddress "/"]];<br />
:set CheckIP ([:toip $IntIPAddress] in $Network)} while=($CheckIP = false)}<br />
:log info ($PPPoEInt . ": " . $IntIPAddress);<br />
:log info ($PPPoEInt . ": " . "IP符合需求");</code><br />
<br />
<a name='more'></a>另外,也可以使用此 script 搭配 Multi-Session PPPoE 做策略路由,進一步優化連外速度。<br />
<br />
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="http://wiki.mikrotik.com/wiki/Manual:Scripting">Manual:Scripting - MikroTik Wiki</a></li>
<li><a href="http://wiki.mikrotik.com/wiki/Manual:Scripting-examples">Manual:Scripting-examples - MikroTik Wiki</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com1tag:blogger.com,1999:blog-8572235998798135316.post-79120088245349538102014-01-05T09:54:00.001+08:002014-01-06T09:19:55.212+08:00[RouterOS] 將特定流量導向至VPN的作法 (策略路由) <h4>
前言</h4>
<div>
<br /></div>
<div>
日本、中國有許多資源常常只有開放給國內,對海外 IP 採取封鎖狀態,這是通常都會使用 VPN 來做翻牆,但其他國內流量也被強迫導向至海外 VPN ,因此拖慢了網路速度,這時使用策略路由就能完美解決囉!</div>
<div>
<br /></div>
<h3>
正文</h3>
<div>
<br /></div>
<div>
首先,新增一個<span style="color: #e06666;"> VPN Interface</span></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzqKz7Tk7vVDix8aBaSE4FKpurQ-3TstaO0XUQh3dnuA5_gkLzb8UgJnuzE_s9lvpYcZXtGIhyphenhyphenxiA5FsGx_E27uyj8aGIEYravrzTDCN_R7YANWLrWX9ZY7R6-xiwu9EUsnjUnr0_rTiQ/s1600/%E6%93%B7%E5%8F%961196.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzqKz7Tk7vVDix8aBaSE4FKpurQ-3TstaO0XUQh3dnuA5_gkLzb8UgJnuzE_s9lvpYcZXtGIhyphenhyphenxiA5FsGx_E27uyj8aGIEYravrzTDCN_R7YANWLrWX9ZY7R6-xiwu9EUsnjUnr0_rTiQ/s1600/%E6%93%B7%E5%8F%961196.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<a name='more'></a>在 <span style="color: #e69138;">IP/Firewall</span> 底下建立 <span style="color: #e06666;">Address List</span> ,以後方便維護</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8nj1J-TRu46BH2UcRrU5WhAdEQJI51oxLJVfqsrhsc25jrzT_8RCwCrQjCxka6V7nxKNx55IZuytn7C3v6EXb1DIErh3Cx15MdnPLa0Jav4TkiYSFZQup6hmiiBqIacaH80Vn6hUMyb8/s1600/%25E6%2593%25B7%25E5%258F%25961197.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8nj1J-TRu46BH2UcRrU5WhAdEQJI51oxLJVfqsrhsc25jrzT_8RCwCrQjCxka6V7nxKNx55IZuytn7C3v6EXb1DIErh3Cx15MdnPLa0Jav4TkiYSFZQup6hmiiBqIacaH80Vn6hUMyb8/s1600/%25E6%2593%25B7%25E5%258F%25961197.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
新增 <span style="color: #e06666;">Mangle</span> ,標記路由</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdBXXcl8v1n3DpWMFHAUYrjtHyDUMfyWsdKhLAgUoN7PnWfvUPP82JgjSF-ANgHcGMZzUmFsot5FItqsK5l_lQul9WTcFqlmuDapl9jMkz4EwoGxHFld1F6xwHAY7fUXkbkvA8OBYytLQ/s1600/%25E6%2593%25B7%25E5%258F%25961198.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdBXXcl8v1n3DpWMFHAUYrjtHyDUMfyWsdKhLAgUoN7PnWfvUPP82JgjSF-ANgHcGMZzUmFsot5FItqsK5l_lQul9WTcFqlmuDapl9jMkz4EwoGxHFld1F6xwHAY7fUXkbkvA8OBYytLQ/s1600/%25E6%2593%25B7%25E5%258F%25961198.jpg" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizPf0ZVPpD6KbA8ObS44N0wCkpHl_NRQbiL7f-smDF9uW4VgRoBAqZuk-JmZceh0tr1RVP-DvOABqunlg0ygjbnMoJ25E6ot35SS0V28OYR8trGkfZ8UPQTvcNZ9M8QT9DZ93hEin04CA/s1600/%25E6%2593%25B7%25E5%258F%25961199.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizPf0ZVPpD6KbA8ObS44N0wCkpHl_NRQbiL7f-smDF9uW4VgRoBAqZuk-JmZceh0tr1RVP-DvOABqunlg0ygjbnMoJ25E6ot35SS0V28OYR8trGkfZ8UPQTvcNZ9M8QT9DZ93hEin04CA/s1600/%25E6%2593%25B7%25E5%258F%25961199.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_CsQ3xpKE36RFWR4sYrmkEQ-sfThvfUGxOmIp9VGaEKxsj8mL6NATRm9nkD5xqGxLj8YG2u49q4hIhfqSOkaqu7cUFIf2bGZ0pUHRuSnNEkMm-SRXAOgxO_xCCV1c2i2O7A-uHbH1I8I/s1600/%E6%93%B7%E5%8F%961204.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_CsQ3xpKE36RFWR4sYrmkEQ-sfThvfUGxOmIp9VGaEKxsj8mL6NATRm9nkD5xqGxLj8YG2u49q4hIhfqSOkaqu7cUFIf2bGZ0pUHRuSnNEkMm-SRXAOgxO_xCCV1c2i2O7A-uHbH1I8I/s1600/%E6%93%B7%E5%8F%961204.jpg" /></a></div>
<br /></div>
<div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
新增 <span style="color: #e06666;">NAT</span> ,沒 NAT會出不去的<br />
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyPDW_wqIZRVNj0sd7xC1PIs2W3vd6v1WylU767RcDBqzkYaYd2PUnbsdtNOAYC9CiMx1QzSgCsNHVxDaQ-7VwKXW_b5sxUMx_xtHm19L6dBH0a1lNCkQ4tnorhXJtXBmOTRYl7UbwnKw/s1600/%E6%93%B7%E5%8F%961201.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyPDW_wqIZRVNj0sd7xC1PIs2W3vd6v1WylU767RcDBqzkYaYd2PUnbsdtNOAYC9CiMx1QzSgCsNHVxDaQ-7VwKXW_b5sxUMx_xtHm19L6dBH0a1lNCkQ4tnorhXJtXBmOTRYl7UbwnKw/s1600/%E6%93%B7%E5%8F%961201.jpg" /></a></div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPtTrTaScJn_t1sA0sWDtUZ-PkaO1GK5q39OqT6swPry-UYrQ4dKA-UoGi9tjC88nPBGQjnq0erZn5BAXNnVdAJ9gw1FdpddRjbwrl7Nc5UyWzB6z2S31_GoQRDbS6Hu6cNGwBfv1s3gQ/s1600/%25E6%2593%25B7%25E5%258F%25961202.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPtTrTaScJn_t1sA0sWDtUZ-PkaO1GK5q39OqT6swPry-UYrQ4dKA-UoGi9tjC88nPBGQjnq0erZn5BAXNnVdAJ9gw1FdpddRjbwrl7Nc5UyWzB6z2S31_GoQRDbS6Hu6cNGwBfv1s3gQ/s1600/%25E6%2593%25B7%25E5%258F%25961202.jpg" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPtTrTaScJn_t1sA0sWDtUZ-PkaO1GK5q39OqT6swPry-UYrQ4dKA-UoGi9tjC88nPBGQjnq0erZn5BAXNnVdAJ9gw1FdpddRjbwrl7Nc5UyWzB6z2S31_GoQRDbS6Hu6cNGwBfv1s3gQ/s1600/%25E6%2593%25B7%25E5%258F%25961202.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
新增<span style="color: #e06666;">路由</span> ( <span style="color: #e69138;">IP/Routes</span> )</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkg4x5tXfq3mryhr9BUjET9qjdkWGm3qFShELQw2VTDExFe8-Kc5VKnbW7joQAl9psdAyL481zlYI2VZSP0SR739PO22u8c-Sj_0pqkvLcdvyM129tWQokpgQLG7gHIOEDeYmjJaRrc00/s1600/%25E6%2593%25B7%25E5%258F%25961203.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkg4x5tXfq3mryhr9BUjET9qjdkWGm3qFShELQw2VTDExFe8-Kc5VKnbW7joQAl9psdAyL481zlYI2VZSP0SR739PO22u8c-Sj_0pqkvLcdvyM129tWQokpgQLG7gHIOEDeYmjJaRrc00/s1600/%25E6%2593%25B7%25E5%258F%25961203.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
完成!</div>
<div>
<br /></div>
<div>
使用 Traceroute 驗證一下</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTMwUJ0j47ggVUb3jN9faeaTHIs4FjpakLdILOHwO70H0bVLg_4qzqhX8XF70f3raRRoyT93mZOYuoUA1WlZn7XvKaUtP8jq2BpDOgAcPPGc9d_7E-MI_JYXIOMM1Rt2QTmrq8BVfBJI/s1600/%E6%93%B7%E5%8F%961200.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTMwUJ0j47ggVUb3jN9faeaTHIs4FjpakLdILOHwO70H0bVLg_4qzqhX8XF70f3raRRoyT93mZOYuoUA1WlZn7XvKaUtP8jq2BpDOgAcPPGc9d_7E-MI_JYXIOMM1Rt2QTmrq8BVfBJI/s1600/%E6%93%B7%E5%8F%961200.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<h3>
參考資料</h3>
<div>
<ul>
<li><a href="http://www.mobile01.com/topicdetail.php?f=110&t=3205444&p=33#42935068#42935068">[研究所] MikroTik RouterOS 學習</a></li>
</ul>
</div>
<div>
<br /></div>
<div>
<br /></div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-91723840922875558802013-09-15T20:10:00.004+08:002013-09-15T20:25:46.742+08:00[RouterOS] 使用NetWatch監測主機狀態,主機離線時自動傳送警告信首先,請先將E-Mail相關設定配置完成,否則無法寄出警告信<br />
<br />
<span style="color: #e69138;">Tools/Email </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqSK4X2YYvpe8P6VXhXdn9FKpZeFv0OmBlJxi7NngzIbfqxDx94eUf9BcVhQoTAQBAzK5TlHbcwYN4iSx1Suufp0GG5uVMNFzo83LwCbwlvEZfopmt3bmIQ8-YiNfKEcHWG5_3obbEB1k/s1600/%E6%93%B7%E5%8F%961105.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqSK4X2YYvpe8P6VXhXdn9FKpZeFv0OmBlJxi7NngzIbfqxDx94eUf9BcVhQoTAQBAzK5TlHbcwYN4iSx1Suufp0GG5uVMNFzo83LwCbwlvEZfopmt3bmIQ8-YiNfKEcHWG5_3obbEB1k/s1600/%E6%93%B7%E5%8F%961105.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
( <span style="color: #e06666;">for Gmail</span> )<br />
<br />
<br />
<span style="color: #e69138;">Tools/Netwatch</span><br />
<br />
<a name='more'></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKkoUv6NBhpgwgPxK5396ndkEuCBPhBt_YSnbskXblzne8UIqC8i3AZi7rHyi5wJl_xPfotF_F6Y3dUti1Ico4IAAkv7LZQdVp3ncj0sW5TmAHQg0_PIb3nJZpy4KMWOxxuv3mF2NC5ds/s1600/%25E6%2593%25B7%25E5%258F%25961106.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKkoUv6NBhpgwgPxK5396ndkEuCBPhBt_YSnbskXblzne8UIqC8i3AZi7rHyi5wJl_xPfotF_F6Y3dUti1Ico4IAAkv7LZQdVp3ncj0sW5TmAHQg0_PIb3nJZpy4KMWOxxuv3mF2NC5ds/s1600/%25E6%2593%25B7%25E5%258F%25961106.jpg" /></a><br />
<br />
Host 填上你要偵測的主機 IP address<br />
Interval 設定偵測間隔<br />
Timeont 設定多久沒回應判定主機為Down<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgUwhtGCeEq6k2yfAOVQUWbMg9c6V0IYCL6nrBNrgXpVr6p7g56nFLTRX93e5Bw7Q0OzOUrgMRkhTPwpvv3bwpKMuylkGTw2ILRjARZ3oxqHPM0Yv0n48bO7vfA9NXcGS_aY2gul5IZiY/s1600/%E6%93%B7%E5%8F%961107.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgUwhtGCeEq6k2yfAOVQUWbMg9c6V0IYCL6nrBNrgXpVr6p7g56nFLTRX93e5Bw7Q0OzOUrgMRkhTPwpvv3bwpKMuylkGTw2ILRjARZ3oxqHPM0Yv0n48bO7vfA9NXcGS_aY2gul5IZiY/s1600/%E6%93%B7%E5%8F%961107.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Up&Down 當偵測到主機Up或Down時執行該指令<br />
<br />
當偵測到主機為Down時,自動寄送警告信<br />
<br />
<code><br />
/tool e-mail send to="<span style="color: #3d85c6;">指定信箱</span>" from="<span style="color: #3d85c6;">寄送者</span>" subject=("[Warning!] " . [/system clock get time] . " <span style="color: #3d85c6;">主旨訊息</span>") body="<span style="color: #3d85c6;">內文訊息</span>"</code><br />
成果!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju__WEDxGK9pPSuE8-pdWAc6-F2OBx1d4k03dgnP9Y_TqOKJYxnHU1GfSdxNSjM_UIb2K1FP13TlUgvTr3xUJ-zsDUjc9YHPv01PyMgjJEM-boPm_1HcPLpZhbJFBuKKasUGsHAn8Oc5k/s1600/%25E6%2593%25B7%25E5%258F%25961104.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju__WEDxGK9pPSuE8-pdWAc6-F2OBx1d4k03dgnP9Y_TqOKJYxnHU1GfSdxNSjM_UIb2K1FP13TlUgvTr3xUJ-zsDUjc9YHPv01PyMgjJEM-boPm_1HcPLpZhbJFBuKKasUGsHAn8Oc5k/s1600/%25E6%2593%25B7%25E5%258F%25961104.jpg" /></a></div>
<br />
<br />
<br />
<h4>
</h4>
<h4>
</h4>
<h4>
</h4>
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="http://blog.kyosls.org/index.php/2012/03/02/routeros-%E4%BD%BF%E7%94%A8netwatch-%E5%81%B5%E6%B8%AC%E4%B8%BB%E6%A9%9F/">RouterOS 使用NetWatch 偵測主機</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-77327834352414683652013-09-13T19:40:00.004+08:002013-09-15T15:18:02.048+08:00[RouterOS] 每日自動備份設定檔Script (Gmail only)<h4>
前言</h4>
<div>
<br /></div>
<div>
為了避免設備無預警掛點,排程備份設定檔是必須的工作。<br />
本Script為參考"<span style="color: #e69138;"><a href="http://www.minitw.com/routeros/automatic-backup-routeros-and-email-send-backup-file.htm">電腦茶包 Blog</a></span>"所製作之Script修改而來<br />
<br />
<h4>
操作</h4>
</div>
<div>
<br /></div>
<div>
打開 <span style="color: #e69138;">System/Scripts</span>,新增一個新的Script並命名為"<span style="color: #f1c232;">gmail_backup_system</span>"</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbrOT0mJH1tgY4-7R7WmjHCmDiS6aXaXhNqy-lcPPJRI4ZBnMNXW2XL19dYjES1t46as0eUQMVNCkje8RAnEdKskks3yfGI2Cx0W_PKM5Dm0VjdifvPt4xubf6JBTNzA9xP4GCyV1651I/s1600/%E6%93%B7%E5%8F%961101.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbrOT0mJH1tgY4-7R7WmjHCmDiS6aXaXhNqy-lcPPJRI4ZBnMNXW2XL19dYjES1t46as0eUQMVNCkje8RAnEdKskks3yfGI2Cx0W_PKM5Dm0VjdifvPt4xubf6JBTNzA9xP4GCyV1651I/s1600/%E6%93%B7%E5%8F%961101.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<a name='more'></a><br /></div>
<div>
將Script貼入Source內</div>
<br />
<code><br />
#Script Name:gmail_backup_system<br />
#本Script為參考"電腦茶包 Blog"所製作之Script修改而來<br />
#----------------------------------------------<br />
#設定Gmail帳號&密碼<br />
:local GUser "Gmail_UserName"<br />
:local GPass "Gmail_PassWord"<br />
#寄件人<br />
:local MailFrom "From@exam.com"<br />
<br />
#收件人<br />
:local MailTo "example@exam.com"<br />
<br />
#寄出後是否刪除已存檔的Log(/file裡的檔案)<br />
#0=保留 1=刪除<br />
<br />
:local DeleteLogFile 1<br />
<br />
:local BackupFileName<br />
:set BackupFileName ([/system identity get name] . "_Backup-" . [:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".backup");<br />
/system backup save name=($BackupFileName);<br />
delay 10;<br />
<br />
<br />
/tool e-mail set address=74.125.129.108 port=587 start-tls=yes<br />
/tool e-mail set user=$GUser<br />
/tool e-mail set password=$GPass<br />
/tool e-mail set from=$MailFrom<br />
<br />
/tool e-mail send to=$MailTo subject=([/system identity get name] . " -- RouterOS Backup " . [:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6]) file=[$BackupFileName];<br />
<br />
:delay 10;<br />
<br />
:if ($DeleteLogFile =1) do={<br />
/file rem [/file find name=($BackupFileName)];<br />
}<br />
<br />
:log info ("System Backup emailed at " . [/sys cl get time] . " " . [/sys cl get date] . " ");<br />
<br />
#---<br />
#---</code><br />
<div>
</div>
<br />
<div>
打開 <span style="color: #e69138;">System/Schedule</span>,建立新的排程,設定每日執行"<span style="color: #f1c232;">gmail_backup_system</span>"</div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCDtupIKgAlcxsLDjDtIDqYbqtglimnmbjJu4TdYbPFyyYLd6JVuRmy8S2EfygRz4IAOtmcPuSXs-poGL6OYuj35Qxq-q_taeJwXnaM9ZHOpEubS-vv3LKW3ZkkAO4h4knhUTQmoihLiM/s1600/%25E6%2593%25B7%25E5%258F%25961102.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCDtupIKgAlcxsLDjDtIDqYbqtglimnmbjJu4TdYbPFyyYLd6JVuRmy8S2EfygRz4IAOtmcPuSXs-poGL6OYuj35Qxq-q_taeJwXnaM9ZHOpEubS-vv3LKW3ZkkAO4h4knhUTQmoihLiM/s1600/%25E6%2593%25B7%25E5%258F%25961102.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
成果!</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIY7WX94Q4GeDfpWZlcjsn7jB8z-bY72y1TogSeUqsMBx5xgFxJHY8dLx3gdK-9RgvhkdESbOv7YZjzz_DjLV782Xye-wgEzOEfivjQE0gJ7SZhBDy65Dg8t0jszqiMon0KyJMPZFQdjM/s1600/%E6%93%B7%E5%8F%961100.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIY7WX94Q4GeDfpWZlcjsn7jB8z-bY72y1TogSeUqsMBx5xgFxJHY8dLx3gdK-9RgvhkdESbOv7YZjzz_DjLV782Xye-wgEzOEfivjQE0gJ7SZhBDy65Dg8t0jszqiMon0KyJMPZFQdjM/s1600/%E6%93%B7%E5%8F%961100.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
設定完成後,可以檢視log確認是否運作正常</div>
<div>
<br /></div>
<div>
另外,再次提醒<span style="color: #cc0000;"><b>本Script只適用於Gmail</b></span></div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="http://www.minitw.com/routeros/automatic-backup-routeros-and-email-send-backup-file.htm">全自動備份 RouterOS,並以Email寄送備份檔</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-46321937685714230842013-09-12T20:46:00.002+08:002013-09-15T15:10:50.725+08:00[RouterOS] Dynamic DNS配置 (for No-IP DNS)<h4>
前言</h4>
<div>
<br /></div>
<div>
RouterOS的DDNS設定和常見的分享器比較不同,需透過Script達成。</div>
<div>
<br /></div>
<h4>
正文</h4>
<div>
<br /></div>
<div>
打開<span style="color: #e69138;"> System/Scripts</span>,新增一個新的Script並命名為"<span style="color: #f1c232;">no-ip_ddns_update</span>"</div>
<div>
所需的權限為 <span style="color: #f1c232;">read</span>,<span style="color: #f1c232;">write</span>,<span style="color: #f1c232;">test</span> ,再將Script貼入Source內</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-cvZofxLtMQ2WJZ1psxDolvD18vdijHhR5U14R7mHU2hKgE08A1QJKQMNiUZfpbAhtMHANfOmUiV03pcuCxj_uoOQOv1LinAh2NnvOtG3VbBfqhgMXRkGDSaDDYdCPMk-BnjvY6Cajc/s1600/%E6%93%B7%E5%8F%961095.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-cvZofxLtMQ2WJZ1psxDolvD18vdijHhR5U14R7mHU2hKgE08A1QJKQMNiUZfpbAhtMHANfOmUiV03pcuCxj_uoOQOv1LinAh2NnvOtG3VbBfqhgMXRkGDSaDDYdCPMk-BnjvY6Cajc/s1600/%E6%93%B7%E5%8F%961095.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<a name='more'></a><br />
<code><br />
# No-IP automatic Dynamic DNS update<br />
<br />
#--------------- Change Values in this section to match your setup ------------------<br />
<br />
# No-IP User account info<br />
:local noipuser "<span style="color: #3d85c6;">No-IP帳號</span>"<br />
:local noippass "<span style="color: #3d85c6;">No-IP密碼</span>"<br />
<br />
# Set the hostname or label of network to be updated.<br />
# Hostnames with spaces are unsupported. Replace the value in the quotations below with your host names.<br />
# To specify multiple hosts, separate them with commas.<br />
:local noiphost "hostname.no-ip.net"<br />
<br />
# Change to the name of interface that gets the dynamic IP address<br />
:local inetinterface "<span style="color: #3d85c6;">對外Interface ex:Hinet-PPPoE-out</span>"<br />
#------------------------------------------------------------------------------------<br />
# No more changes need<br />
<br />
:global previousIP<br />
<br />
:if ([/interface get $inetinterface value-name=running]) do={<br />
# Get the current IP on the interface<br />
:local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address]<br />
<br />
# Strip the net mask off the IP address<br />
:for i from=( [:len $currentIP] - 1) to=0 do={<br />
:if ( [:pick $currentIP $i] = "/") do={<br />
:set currentIP [:pick $currentIP 0 $i]<br />
}<br />
}<br />
<br />
:if ($currentIP != $previousIP) do={<br />
:log info "No-IP: Current IP $currentIP is not equal to previous IP, update needed"<br />
:set previousIP $currentIP<br />
<br />
# The update URL. Note the "\3F" is hex for question mark (?). Required since ? is a special character in commands.<br />
:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"<br />
:local noiphostarray<br />
:set noiphostarray [:toarray $noiphost]<br />
:foreach host in=$noiphostarray do={<br />
:log info "No-IP: Sending update for $host"<br />
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt")<br />
:log info "No-IP: Host $host updated on No-IP with IP $currentIP"<br />
}<br />
} else={<br />
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"<br />
}<br />
} else={<br />
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."<br />
}</code></div>
<div>
</div>
<br />
<div>
打開<span style="color: #e69138;"> System/Schedule</span>,建立新的排程,設定每5分鐘執行"<span style="color: #f1c232;">no-ip_ddns_update</span>"</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp_jzgmEOnluq2NunLedkjZcDIv1iIa0ItyePFYnpb7g7V6OVpTL82JWiTRnU0HS3TnTT29uvBekrapxYm93DNl7dLMerBHvsRJKf2QnKRiG085xR8y2KePpbAWJ9G-zSmggr7r_1D6v4/s1600/%E6%93%B7%E5%8F%961096.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp_jzgmEOnluq2NunLedkjZcDIv1iIa0ItyePFYnpb7g7V6OVpTL82JWiTRnU0HS3TnTT29uvBekrapxYm93DNl7dLMerBHvsRJKf2QnKRiG085xR8y2KePpbAWJ9G-zSmggr7r_1D6v4/s1600/%E6%93%B7%E5%8F%961096.jpg" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
設定完成後,可以檢視Log確定有無正確運作,更新後約五分鐘即可解析至正確的位置</div>
<div>
<br />
<br /></div>
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_No-IP_DNS">Dynamic DNS Update Script for No-IP DNS</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-62764858893873876692013-09-12T17:59:00.002+08:002013-09-12T19:13:41.687+08:00[RouterOS] 如何設定Hinet IPv6 Dual Stack首先,打開<span style="color: #e69138;">IPv6/DHCP Client</span>,將Interface指向PPPoE的介面<br />
再來設定Pool Name,稍後LAN Port會去此Pool取Prefix。<br />
<br />
記得勾選加入預設路由<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU771BsCXJYwK2G4zsqvQ2MNSsflyC2TFm7sDwXonHe_5Xx4smRxKsRRQD8h530TOfpwORzf198BWlhyBaLx3o5i_xAUAzwC0AkChZFyqEUTjwYowPgPi5GcvbNN5YJaeoCoOeTTslL_4/s1600/%25E6%2593%25B7%25E5%258F%25961093.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU771BsCXJYwK2G4zsqvQ2MNSsflyC2TFm7sDwXonHe_5Xx4smRxKsRRQD8h530TOfpwORzf198BWlhyBaLx3o5i_xAUAzwC0AkChZFyqEUTjwYowPgPi5GcvbNN5YJaeoCoOeTTslL_4/s1600/%25E6%2593%25B7%25E5%258F%25961093.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
打開<span style="color: #e69138;">IPv6/Address</span>,在Address的部分輸入<span style="color: #f1c232;"> ::1/64</span>,Pool選擇剛剛建好的 <span style="color: #f1c232;">hinet_ipv6_prefix</span>,<br />
ROS就會自動帶入prefix組合成IPv6 Address。<br />
<br />
<a name='more'></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjMD_h0MGS-3VsBtITM-BGPcji4ofh43DRBXL6tmM1gb_Ei7FG0_D6hknwXd8V1i_s34yfn2nMCfCYXqRb-Iw2Z7oILWDDXGRLDtvjYxqwthQpj7Id3fxTqobIL2LNfTWgv_FIUTkd2JI/s1600/%25E6%2593%25B7%25E5%258F%25961092.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjMD_h0MGS-3VsBtITM-BGPcji4ofh43DRBXL6tmM1gb_Ei7FG0_D6hknwXd8V1i_s34yfn2nMCfCYXqRb-Iw2Z7oILWDDXGRLDtvjYxqwthQpj7Id3fxTqobIL2LNfTWgv_FIUTkd2JI/s1600/%25E6%2593%25B7%25E5%258F%25961092.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
套用後,將會自動組合Address<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnd-Xx3Ce45bQ5_4cLYmTpeAP3qPyDA6kZw6UxtDTlOGhvsq8BhKFnzvKZQoS7sd5hXWNA_BuYjri1LuIlfFP3zrzekDURFwwuH8c2N7AaX4zOavVYl7XlwH0poqwki7o3VlpVYPHQLk/s1600/%25E6%2593%25B7%25E5%258F%25961094.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnd-Xx3Ce45bQ5_4cLYmTpeAP3qPyDA6kZw6UxtDTlOGhvsq8BhKFnzvKZQoS7sd5hXWNA_BuYjri1LuIlfFP3zrzekDURFwwuH8c2N7AaX4zOavVYl7XlwH0poqwki7o3VlpVYPHQLk/s1600/%25E6%2593%25B7%25E5%258F%25961094.jpg" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
完成!<br />
<br />
<h4>
參考資料</h4>
<div>
<ul>
<li><a href="http://www.mobile01.com/topicdetail.php?f=110&t=3195673&m=f&last=41706915">[已解決] RouterOS IPv6 Dual Stack 設定請益</a></li>
<li><a href="http://www.mobile01.com/topicdetail.php?f=110&t=3205444&p=22#42134859#42134859#42134859#42134859">[研究所] MikroTik RouterOS 學習</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-45100770150817703782013-07-22T21:44:00.001+08:002014-01-06T09:20:33.521+08:00[網路]淺談路由器(Router)工作原理<h3>
前言</h3>
<div>
<br /></div>
<div>
在乙太網路上,許多協定都會使用到廣播來做資料交換,數量一多就會造成網路效能低落,因此使用路由器作為廣播網域(Broadcast Domain)邊界,切割出不同網段來遏止廣播風暴蔓延。</div>
<div>
<br /></div>
<h3>
原理</h3>
<div>
<br /></div>
<div>
在TCP/IP的設定中,有個預設閘道(Default Gateway)欄位讓你填,如果你要離開本地網段的話,ARP就會去詢問預設閘道的Mac Address,將L2表頭的目的地位址填上預設閘道的實體位址,送出封包後L2的目的地位址會是預設閘道的網卡。</div>
<div>
</div>
<div>
<br />
舉個例吧,"PC0"要Ping"PC3",封包轉送前和轉送後的改變。<br />
<br /></div>
<a href="http://lh5.ggpht.com/-wtaFDawG5B4/Ue1Fe6l4BBI/AAAAAAAAAmI/JpkIQuUlpqc/s1600-h/%2525C3%2525B7%2525C3%252596974%25255B7%25255D.jpg"><img alt="擷取974" border="0" src="http://lh3.ggpht.com/-8nxq21ovF64/Ue1FfvzbsYI/AAAAAAAAAmQ/nTgXXshsnXs/%2525C3%2525B7%2525C3%252596974_thumb%25255B5%25255D.jpg?imgmax=800" height="400" style="border: 0px; display: inline;" title="擷取974" width="639" /></a> <br />
<br />
當PC0(192.168.10.10/24)要Ping PC3(192.168.20.10/24)時,ARP會判斷目標IP是否在同一網段。<br />
此例是跨網段,故ARP會回覆預設路由的MAC<br />
<br />
<a name='more'></a><br />
<br />
<a href="http://lh5.ggpht.com/-xLEvCDRuvP4/Ue1Ff5y4BwI/AAAAAAAAAmY/Cw7a5G2mpbQ/s1600-h/%2525C3%2525B7%2525C3%252596976%25255B7%25255D.jpg"><img alt="擷取976" border="0" src="http://lh6.ggpht.com/-Pq5n-eAmerI/Ue1FgzZhHAI/AAAAAAAAAmg/ULZeKy3to9Y/%2525C3%2525B7%2525C3%252596976_thumb%25255B5%25255D.jpg?imgmax=800" height="539" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="擷取976" width="534" /></a> <br />
<br />
這是PC0像PC3發出的ICMP封包,我們可以看到L2的目標MAC是填預設閘道(Router)的MAC,L3的的目標IP則是PC3的IP位址。<br />
<br />
<a href="http://lh3.ggpht.com/-wxqn2ydDhoQ/Ue1FhT5UsdI/AAAAAAAAAmo/LsfVgzhysk8/s1600-h/%2525C3%2525B7%2525C3%252596978%25255B10%25255D.jpg"><img alt="擷取978" border="0" src="http://lh4.ggpht.com/-P2l6ow9ygp0/Ue1FhzaXxSI/AAAAAAAAAmw/bgPBkuNKcYM/%2525C3%2525B7%2525C3%252596978_thumb%25255B8%25255D.jpg?imgmax=800" height="393" style="border: 0px; display: inline;" title="擷取978" width="645" /></a> <br />
<br />
經由路由器轉發後,封包內的L2的原始MAC改為192.168.20.254這張網卡的MAC,但L3不會改變。<br />
<br />
<a href="http://lh3.ggpht.com/-a9y1ZLn-2Jg/Ue1FiWikKKI/AAAAAAAAAm4/Yqm3dfBr6lo/s1600-h/%2525C3%2525B7%2525C3%252596977%25255B4%25255D.jpg"><img alt="擷取977" border="0" src="http://lh4.ggpht.com/-ZyuR_s0qutw/Ue1FiyiDIHI/AAAAAAAAAnA/p2jCKYvYiAM/%2525C3%2525B7%2525C3%252596977_thumb%25255B2%25255D.jpg?imgmax=800" height="539" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="擷取977" width="534" /></a><br />
<br />
你問我怎麼回去?怎麼來的就怎麼回去阿,來源MAC/IP和目標MAC/IP調換就是了。Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com3tag:blogger.com,1999:blog-8572235998798135316.post-35209632826580316812013-07-03T21:40:00.002+08:002013-07-04T16:30:28.405+08:00[網路]淺談ARP(Address Resolution Protocol)運作原理<h3>
用途</h3>
<div>
<br /></div>
<div>
在乙太網路上,資料的傳遞必須要有實體位址(MAC Address),Layer 2設備會驗證Frame的實體位址,不是找它的一律捨棄,但設備一開機總不可能就有所有設備的實體位址吧?所以就需要ARP協定來協助取得各個設備的實體位址。</div>
<div>
<br /></div>
<h3>
介紹</h3>
<div>
<br /></div>
<div>
ARP是利用乙太網路的廣播功能所設計出來的位址解析協定,它的主要特性是它的位址對應關係是動態的,以查詢的方式來獲得IP位址(IP Address)和實體位址(MAC Address / Physical Address)的對應關係。<br />
<br />
只要是Layer 3的設備都一定會有ARP Cache,並且會在ARP快取內建立APR表格(ARP Table)用來記錄IP位址和實體位址的對應關係。這個Table會依據自身的存活時間遞減而消失,以確保資料的正確性。<br />
<br />
<h3>
原理</h3>
</div>
<div>
<br /></div>
<div>
<div>
當<b>發送</b>主機有一個封包要傳送給<b>目標</b>主機時,並且已獲得<b>目標</b>主機的 IP 位址,那<b>發送</b>主機會先檢查自己的 ARP 表格中有沒有該 IP 位址的實體位址對應。</div>
</div>
<div>
<br /></div>
<div>
如果有,就直接將此IP所對應的MAC Address填入Layer 2表頭。</div>
<div>
如果沒有,則向網路發出一個 ARP Request 的廣播封包,查詢<b>目標</b>主機的實體位址。</div>
<div>
<br />
<a name='more'></a><br /></div>
<div>
例:PC0要Ping PC1,且該網段還有一台PC2</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLRogfpyl7XgC064e7m7yW4PIuTMUS2Wwu9sQVaopVekH8ZlmU4HnBWr8Sb9i8Fg3eY1jF75CHWD4dYgb7UnKRbtiMViwMSzho8k7MoFsY86CF9y3ViZOzOapcRGwVZCBgH62WqVsn1oM/s1113/%25E6%2593%25B7%25E5%258F%2596906.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLRogfpyl7XgC064e7m7yW4PIuTMUS2Wwu9sQVaopVekH8ZlmU4HnBWr8Sb9i8Fg3eY1jF75CHWD4dYgb7UnKRbtiMViwMSzho8k7MoFsY86CF9y3ViZOzOapcRGwVZCBgH62WqVsn1oM/s640/%25E6%2593%25B7%25E5%258F%2596906.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
綠色為ARP Request 的廣播封包,L2表頭內的目標實體位址全為FFFF</div>
<div class="separator" style="clear: both; text-align: left;">
黃綠色為ICMP(Ping)封包,等待填入L2表頭內的目標實體位址</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja6Sw89vOVOMn38hxqow1FCF668Py3YloDkfgmfn48a2hY9FkbPh_pWr8xsrMl3p682JHrlyr2SBtdsdSjGDWMnTDATimZobevlc_1nDxq0RXfk5CDJjbWc-XiABpft3j1JzRTD5dDVWk/s539/%E6%93%B7%E5%8F%96899.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja6Sw89vOVOMn38hxqow1FCF668Py3YloDkfgmfn48a2hY9FkbPh_pWr8xsrMl3p682JHrlyr2SBtdsdSjGDWMnTDATimZobevlc_1nDxq0RXfk5CDJjbWc-XiABpft3j1JzRTD5dDVWk/s400/%E6%93%B7%E5%8F%96899.jpg" width="396" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
ARP Request封包</div>
當初我看到這張圖時心裡就想,沒有IP位址的話L3不是沒辦法辨認嗎?<br />
後來才發現,原來ARP和IP同屬於Layer 3的 Protocol,拆開後發現是給ARP的封包就丟給ARP處理囉!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzP5gqHAWq_WGc5602fQmG_XBZR-HdJ2xS1LxI-uxx9hjU2CmvGVT7ukjNNRAUUZql4uyKYdclHHdHK2fYobFqnRCbMuedW-EpQbY90xv0Z9dgy0mURaH8jLa1pumEj6h7ZEr1N48XGEg/s1113/%E6%93%B7%E5%8F%96907.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzP5gqHAWq_WGc5602fQmG_XBZR-HdJ2xS1LxI-uxx9hjU2CmvGVT7ukjNNRAUUZql4uyKYdclHHdHK2fYobFqnRCbMuedW-EpQbY90xv0Z9dgy0mURaH8jLa1pumEj6h7ZEr1N48XGEg/s640/%E6%93%B7%E5%8F%96907.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
由於是廣播封包,所以L2會移除表頭後交給L3做處理,PC2的ARP接收後發現目標IP並不是找他,故丟棄之。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCSn6MsaA6QFcwURAGoBGPh7Jaro3XEJsxF3PpVr9aCNRh_rEoc0Q5veqtheaolZ9CgH_NPdGuizGhfRql2WRyCnBN7Gy38-xdnCyEBv11J3KM9d8PCQ2MdMfQ0qruuBNGyNEKDvOtYU/s1113/%25E6%2593%25B7%25E5%258F%2596908.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCSn6MsaA6QFcwURAGoBGPh7Jaro3XEJsxF3PpVr9aCNRh_rEoc0Q5veqtheaolZ9CgH_NPdGuizGhfRql2WRyCnBN7Gy38-xdnCyEBv11J3KM9d8PCQ2MdMfQ0qruuBNGyNEKDvOtYU/s640/%25E6%2593%25B7%25E5%258F%2596908.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
PC1在收到ARP Request封包後發現是找自己的,便將PC0的IP位址及MAC位址對應寫到ARP表格裡以及回傳一個ARP Reply封包給PC0。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7aE2nwJkpL9wOhlHm6N8ASJ58sXld5LeOGM4MDtKzVae8s5L4wmxERJaO3poIUABQPCieWd3Re5hH2h5Ucc9ndw693X5crnK230jCmlnb2Lk4wDRfAHtTItJt4kMksuRXCWZ30ZS9CtE/s539/%E6%93%B7%E5%8F%96902.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7aE2nwJkpL9wOhlHm6N8ASJ58sXld5LeOGM4MDtKzVae8s5L4wmxERJaO3poIUABQPCieWd3Re5hH2h5Ucc9ndw693X5crnK230jCmlnb2Lk4wDRfAHtTItJt4kMksuRXCWZ30ZS9CtE/s400/%E6%93%B7%E5%8F%96902.jpg" width="396" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: 16px; line-height: 30px;">ARP </span><span style="line-height: 30px;">Reply</span><span style="font-size: 16px; line-height: 30px;">封包內包含Source MAC/IP及Target MAC/IP。</span><span style="font-size: 16px; line-height: 30px;">(ARP </span>Request沒有目標MAC Address)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgusvWg1W9azLJGpFc8VAWDPoOCHmyUCbPhTDC9N6qG3s76mxIGLd6ibcDVhfjdJZ7KNiauGyASNX3Ani0QActmLa9Z-RAIMVxiaI8EyOnmt3vLuYjdf44KhIrA8n09ruEdb-MpXP0gRLE/s400/ARP.mp4_20130703_212807.136.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgusvWg1W9azLJGpFc8VAWDPoOCHmyUCbPhTDC9N6qG3s76mxIGLd6ibcDVhfjdJZ7KNiauGyASNX3Ani0QActmLa9Z-RAIMVxiaI8EyOnmt3vLuYjdf44KhIrA8n09ruEdb-MpXP0gRLE/s1600/ARP.mp4_20130703_212807.136.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
PC0收到ARP Reply後,將目標MAC Address填入ICMP(Ping)封包的L2表頭之後就開始執行Ping PC1的動作。(註:綠色為ARP Reply、橘色為ICMP)</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
那PC2會不會將PC0的對應關係寫進去ARP表格啊?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkHhu4z0oR9W4Nde7fleMWFUOwGpdVZ-k-EE20nRThlD3dNiVIEMmvp6uhGh8ezk3Y-5EVuHCddfHmgZ3CzJrga8Tpl8kaf30_5N-bCk4HGrs65Rv1XI3PoR25QDu0WahAR67iOtJ-rc/s1113/%E6%93%B7%E5%8F%96909.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkHhu4z0oR9W4Nde7fleMWFUOwGpdVZ-k-EE20nRThlD3dNiVIEMmvp6uhGh8ezk3Y-5EVuHCddfHmgZ3CzJrga8Tpl8kaf30_5N-bCk4HGrs65Rv1XI3PoR25QDu0WahAR67iOtJ-rc/s640/%E6%93%B7%E5%8F%96909.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
上面也提到了,雖然L2會往上送,但L3會捨棄此封包,所以ARP表格內不會有PC0的記錄。<br />
<br />
<br />
<br /></div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com1tag:blogger.com,1999:blog-8572235998798135316.post-67873348599235658952013-07-01T19:59:00.000+08:002013-07-01T23:01:57.178+08:00[網路]集線器(Hub)與交換器(Switch)的差別<h3>
集線器(Hub)</h3>
<div>
<br /></div>
<div>
Hub是屬於Layer 1(實體層)的設備,所有資料只會視為電子流,只做洪泛、沖刷(flood)的動作。</div>
<div>
<br /></div>
<div>
另外,由於Hub也有訊號增益的功能,所以能將每個Port視為一個Repeater。</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO5TwmJP42saP-IRdDbiEOc1sJrizYl4-0ce48OLpTzDKid7l4VNdeZt8wss40KubJRFgYNad4r16EAFCgQhXhG0Chyphenhyphen6Kj8yszlZg_gzcfaxmhKA6Lqh02jKlhpF26a0gIz6gMwTa8IlE/s400/HUB.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO5TwmJP42saP-IRdDbiEOc1sJrizYl4-0ce48OLpTzDKid7l4VNdeZt8wss40KubJRFgYNad4r16EAFCgQhXhG0Chyphenhyphen6Kj8yszlZg_gzcfaxmhKA6Lqh02jKlhpF26a0gIz6gMwTa8IlE/s1600/HUB.gif" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
這張圖我們可以看到,Hub會將資料沖刷到每個Port造成頻寬壅塞,故集線器只適合用於臨時串接。</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<a name='more'></a><br />
<br />
<h3>
交換器(Switch)</h3>
<div>
<br /></div>
<div>
Switch則是Layer 2(資料鏈結層)的設備,L2的設備最大的不同是他會以學習的方式記錄每一個Port底下的Mac Address,再根據Mac Address Table內的資料做轉發的動作。</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7snRXbkvAv2P_lLqjHHX55HioYz5XVYal7IcBg52HDVUV1jhVPn6__4A7DJ88WaJdotD4jV4v0HpwalatiD7leFJkoSeG9W9mBDgWcOIenmGGwxdwPvOx0nQY8Vm1WDVBU2j-sqWi3Mo/s400/Switch.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7snRXbkvAv2P_lLqjHHX55HioYz5XVYal7IcBg52HDVUV1jhVPn6__4A7DJ88WaJdotD4jV4v0HpwalatiD7leFJkoSeG9W9mBDgWcOIenmGGwxdwPvOx0nQY8Vm1WDVBU2j-sqWi3Mo/s1600/Switch.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Mac Address Table</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0PvihcCCMVSfuaVfmZNXQu-g-E7XAwvIQ55ZupaVFY_ZainbVIuzgOFOLrmTM2M6_qDJO3EBTZIoVvDWBMcb0HCDSk-80YToQtmSzOT4QDWtPuR80xT8SKJd0wbPOyMu4XDl_a9ptF04/s655/%E6%93%B7%E5%8F%96895.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0PvihcCCMVSfuaVfmZNXQu-g-E7XAwvIQ55ZupaVFY_ZainbVIuzgOFOLrmTM2M6_qDJO3EBTZIoVvDWBMcb0HCDSk-80YToQtmSzOT4QDWtPuR80xT8SKJd0wbPOyMu4XDl_a9ptF04/s400/%E6%93%B7%E5%8F%96895.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Cisco Switch預設是會記錄在RAM裡300秒,超過300秒無流量就會自動刪除該筆資料。</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<br /></div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-44089584873047079602013-06-19T00:19:00.001+08:002013-06-19T03:48:57.346+08:00[開箱]LGA771 雙路Xeon 5160 —— 老兵不死,只是凋零<h3>
前言</h3>
<div>
<br /></div>
<div>
沒事不要亂看東西啊,不小心就跌入坑了</div>
<div>
<br /></div>
<div>
心血來潮想弄台雙路Xeon來玩,仔細評估價格和效能後決定採用LGA771作為主軸。</div>
<div>
<br /></div>
<h3>
配備清單</h3>
<div>
<ol>
<li>Intel Xeon 5160 *2 <span style="color: #6fa8dc;">(二手)</span> <span style="color: #ffd966;">$ 800</span> </li>
<li>TYAN Tempest i5000VS (S5372) <span style="color: #6fa8dc;">(庫存新品)</span> <span style="color: #ffd966;">$ 1500</span> </li>
<li>Kingston DDR2 667 1G FB-Dimm *2 <span style="color: #6fa8dc;">(二手)</span> <span style="color: #ffd966;">$ 600</span> </li>
<li>LGA 771 原廠純銅CPU散熱器 *2 <span style="color: #6fa8dc;">(二手)</span> <span style="color: #ffd966;">$ 500</span> </li>
<li>保銳 戰斧 80+ 450W <span style="color: #6fa8dc;">(全新)</span> <span style="color: #ffd966;">$ 1500</span></li>
</ol>
<div>
合計 <span style="color: #ffd966;">$ 4900</span> (NTD) </div>
</div>
<div>
<br /></div>
<h3>
配備介紹</h3>
<div>
<br /></div>
Intel Xeon 5160(3GHz/4MB L2/1333MHz FSB)<br />
<br />
<a href="http://lh6.ggpht.com/-j1j3z5GTnKU/UcCQIhqzU4I/AAAAAAAAAeU/61XbUqnSUjE/s1600-h/DSC03846%25255B1%25255D.jpg"><img alt="DSC03846" border="0" height="480" src="http://lh6.ggpht.com/-OzjAZ3o9Na8/UcCQI92CETI/AAAAAAAAAeY/7cO2LhIfG4g/DSC03846_thumb.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="DSC03846" width="360" /></a><br />
<br />
<a name='more'></a><br />
<br />
這是Xeon(Woodcrest)採用Core 2架構(65nm)Server級雙核心處理器(2C/2T),<br />
採用LGA 771(Socket J),全線只有Xeon 5160的TDP是80W,其餘皆為65W。<br />
<br />
<br />
TYAN Tempest i5000VS (S5372)<br />
<br />
<a href="http://lh3.ggpht.com/-vWgWw2CwjB0/UcCVe47zvDI/AAAAAAAAAdQ/EERPt7mTFEo/s1600-h/01%25255B11%25255D.jpg"><img alt="01" border="0" height="480" src="http://lh6.ggpht.com/-7QhXO11ykFc/UcCVffKMEtI/AAAAAAAAAdY/I1KSm1fzlxw/01_thumb%25255B7%25255D.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="01" width="528" /></a> <br />
<br />
這張圖片可以看到,在左下角的部分有除錯代碼燈號,很貼心的設計<br />
除錯燈旁邊的是Speaker,本來要去找來裝的,定睛一看才發現已經內建在板子上了阿<br />
<br />
<a href="http://lh5.ggpht.com/-L7jImISoUuc/UcCVfz9tLXI/AAAAAAAAAdg/hUHYAzxnpE8/s1600-h/02%25255B12%25255D.jpg"><img alt="02" border="0" height="480" src="http://lh3.ggpht.com/-32lH3FnbZqQ/UcCVgVW1H1I/AAAAAAAAAdo/wmUAj964ArI/02_thumb%25255B8%25255D.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="02" width="640" /></a> <br />
<br />
LGA 771 Socket *2<br />
<br />
<a href="http://lh3.ggpht.com/-OlY8NDfhw9M/UcCVg9hb6tI/AAAAAAAAAdw/VMFoSWHji7A/s1600-h/03%25255B9%25255D.jpg"><img alt="03" border="0" height="480" src="http://lh5.ggpht.com/-ZNDwy8l3vcE/UcCVhW_DUbI/AAAAAAAAAd4/CBgvTReY2QU/03_thumb%25255B5%25255D.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="03" width="640" /></a> <br />
<br />
FBDIMM *6<br />
<br />
<a href="http://lh6.ggpht.com/-Qg9ZicbhPnY/UcCVhwBKMWI/AAAAAAAAAeA/NyEwic9IGsw/s1600-h/04%25255B7%25255D.jpg"><img alt="04" border="0" height="480" src="http://lh5.ggpht.com/-BARtexfMq2w/UcCViWsn3WI/AAAAAAAAAeI/jrYWjGrft2s/04_thumb%25255B3%25255D.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="04" width="640" /></a> <br />
<br />
雙Gigabit乙太網路卡<br />
<br />
規格表:<br />
<br />
Processor <br />
• (2) LGA771 sockets<br />
• Supports up to two Intel® Xeon® processors <br />
5000/5100/5300 series; dual-core<br />
• 1333/1066/667MHz FSB; VRD 11.0 <br />
Chipset <br />
• Intel® 5000V chipset<br />
• Intel® 6321ESB I/O Controller Hub<br />
• SMSC SCH5017 Super I/O chip <br />
Memory <br />
• Dual memory channels<br />
• (6) 240-pin DDR2 FBDIMM sockets<br />
• Supports up to 24GB of ECC memory<br />
• Supports FBDIMM 667/533MHz <br />
Expansion Slots <br />
• One 64/133 PCI-X slot in-lined with one (1)<br />
inversed PCI-E x4 slot (routed to PCI-E x8 bus)<br />
• One 32/33 PCI 2.3 slot<br />
• One x8 PCI-E slot (with PCI-E x4 bus)<br />
• One TYAN TARO™ SO-DIMM socket <br />
Integrated I/O <br />
• One floppy connector; one IDE connector<br />
• Six (6) SATA ports support RAID 0, 1, 5, 10<br />
• Four (4) USB 2.0 ports (two at rear, two via cable)<br />
• Two (2) COM ports (one at rear, one via cable)<br />
• Tyan 2 x 9 front-panel pin header<br />
• Tyan 2 x 6 front-panel pin header for LAN/ID LED<br />
• Two 25-pin connector for Tyan IPMI SMDC (opt.) <br />
Back Panel I/O ports<br />
• One 9-pin COM port<br />
• One 15-pin VGA port <br />
• Stacked PS/2 mouse & keyboard ports<br />
• Following ports come with activity LED:<br />
- Stacked two USB 2.0 & RJ45 10/100 ports<br />
- Two RJ-45 10/100/1000 Base-T port <br />
Integrated SATA Controller (ESB2)<br />
• (1) Serial ATA Host controller embedded<br />
• (6) SATA ports, RAID 0, 1, 5, 10 supported<br />
(Window OS only)<br />
• SATA activity LED connector <br />
Integrated LAN Controllers <br />
• Dual Gigabit MAC (ESB2 embedded) with<br />
i82563EB dual-PHY<br />
• Intel® i82551QM fast ethernet LAN controller<br />
- Operating at 32bit/33MHz interface<br />
• Pin headers for front panel LAN LED <br />
<br />
Kingston DDR2 667 1G FB-Dimm<br />
<br />
<a href="http://lh3.ggpht.com/-m0oaTg-0wXc/UcCbPtBAU7I/AAAAAAAAAeg/8nMNoOeKlgg/s1600-h/DSC03833%25255B4%25255D.jpg"><img alt="DSC03833" border="0" height="480" src="http://lh3.ggpht.com/-iRuK3to4fsU/UcCbQGLS22I/AAAAAAAAAeo/LLs3_J7dSc0/DSC03833_thumb%25255B2%25255D.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="DSC03833" width="640" /></a> <br />
<br />
FB-Dimm<br />
Fully Buffered DIMM(全緩存模組技術)串行內存技術<br />
由INTEL公司研發,特點為採用已有的DDR2內存芯片,借助一個緩衝芯片將並行數據轉換為串行數據流,並經由類似PCI Express的點對點高速串行總線將數據傳輸給CPU。若採用DDR2-800顆粒,FB-DIMM的帶寬將提升到38.4GBps,而它的帶寬極限可突破57.6GBps。在多通道設計上,FB-DIMM非常靈活,你可以使用單通道、雙通道、四通道或者是六通道。(百度百科) <br />
<br />
<br />
<h3>
上機測試</h3>
<div>
<br />
<br /></div>
<div>
</div>
<div>
<a href="http://lh4.ggpht.com/-1nouu6gFNCw/UcCiTAzvZ2I/AAAAAAAAAe4/_clcVwcExEE/s1600-h/DSC03850%25255B4%25255D.jpg"><img alt="DSC03850" border="0" height="480" src="http://lh3.ggpht.com/-xE7Q9KnjH1Q/UcCiT1x_iBI/AAAAAAAAAfA/Vo3HsS1i_Dw/DSC03850_thumb%25255B2%25255D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="DSC03850" width="640" /></a> </div>
<br />
先來張CPU-Z驗明正身<br />
<br />
<a href="http://lh3.ggpht.com/-6HGUnwDiFbI/UcCiUAU-2zI/AAAAAAAAAfI/uGQVfR3KwPU/s1600-h/%2525C3%2525B7%2525C3%252596001%25255B4%25255D.jpg"><img alt="擷取001" border="0" height="400" src="http://lh6.ggpht.com/-XtZVKNrueKM/UcCiUkHbg2I/AAAAAAAAAfQ/uK70_zgPRxE/%2525C3%2525B7%2525C3%252596001_thumb%25255B2%25255D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="擷取001" width="407" /></a> <a href="http://lh4.ggpht.com/-yk44lHkPKXA/UcCiVKs36lI/AAAAAAAAAfY/i2Xihk-Qeag/s1600-h/%2525C3%2525B7%2525C3%252596002%25255B6%25255D.jpg"><img alt="擷取002" border="0" height="400" src="http://lh4.ggpht.com/-D1PdGwjdafE/UcCiVhFZ2iI/AAAAAAAAAfg/B26ADH3iglg/%2525C3%2525B7%2525C3%252596002_thumb%25255B4%25255D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="擷取002" width="407" /></a> <br />
<br />
待機約1小時後的溫度<br />
<br />
<br />
<br />
除了CPU以外其他最好都別摸,很燙很恐怖<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmF8SryNLaE9SXYqLbiO5lY0467fHlhlfMHDttrRzUvoFjOTSM7moglsqOfqyEHAo61aVT75-s_c-a8Y8MWFww6nHQUiXKGOJlpAX4JZMYhuVKFk6VxSgTk9j9D8q90ksAT5a9qDK1eFE/s1600/%25E6%2593%25B7%25E5%258F%2596003.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="504" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmF8SryNLaE9SXYqLbiO5lY0467fHlhlfMHDttrRzUvoFjOTSM7moglsqOfqyEHAo61aVT75-s_c-a8Y8MWFww6nHQUiXKGOJlpAX4JZMYhuVKFk6VxSgTk9j9D8q90ksAT5a9qDK1eFE/s640/%25E6%2593%25B7%25E5%258F%2596003.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
再次驗身<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfcinnLJ9o1Xu-qqa0Dx5JT_wPSssuzDFgjc2Ll1lyjlD4I2To8WUn20xj9aSVKF0kp5YOMurYryoRmGXEEOwfOF_UAJHJAK8dcvwk0HWg6cw5rUgoaDdJKMtIg9jCUwiKlQftPUixVrw/s1600/%25E6%2593%25B7%25E5%258F%2596004.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="568" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfcinnLJ9o1Xu-qqa0Dx5JT_wPSssuzDFgjc2Ll1lyjlD4I2To8WUn20xj9aSVKF0kp5YOMurYryoRmGXEEOwfOF_UAJHJAK8dcvwk0HWg6cw5rUgoaDdJKMtIg9jCUwiKlQftPUixVrw/s640/%25E6%2593%25B7%25E5%258F%2596004.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
AIDA64 Memtest<br />
<br />
<a href="http://lh3.ggpht.com/-ar88B2R71LM/UcCiYc_hanI/AAAAAAAAAgI/Pg2M5EPG_ps/s1600-h/5160%252520Memtest%25255B4%25255D.png"><img alt="5160 Memtest" border="0" height="515" src="http://lh3.ggpht.com/-TSnRMPxq80w/UcCiZOj6M6I/AAAAAAAAAgQ/FpmjGdT2gpk/5160%252520Memtest_thumb%25255B2%25255D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="5160 Memtest" width="539" /></a><br />
<br />
CINEBENCH R11.5<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBwV86WGn6RehNvoJqs07e3fpyQPcJdz9KNkqO0SDI1Vl9LXOgAL5Pk2nq01YLBQ_0WrHq66W3ABK9XA_C_TZNW_r3KC7cP6R_zNQiF08PrzMupHrL-c9tK2T4paXRtFznLDwA6_zJy5Q/s1600/CINEBENCH.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBwV86WGn6RehNvoJqs07e3fpyQPcJdz9KNkqO0SDI1Vl9LXOgAL5Pk2nq01YLBQ_0WrHq66W3ABK9XA_C_TZNW_r3KC7cP6R_zNQiF08PrzMupHrL-c9tK2T4paXRtFznLDwA6_zJy5Q/s640/CINEBENCH.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Nuclearus Multi Core<br />
<br />
<a href="http://lh4.ggpht.com/-XYE8x5m5z4o/UcCiaW1ygwI/AAAAAAAAAgo/tErofCsSYMs/s1600-h/%2525C3%2525B7%2525C3%252596005%25255B4%25255D.jpg"><img alt="擷取005" border="0" height="585" src="http://lh3.ggpht.com/-4AOrKE3xM4k/UcCiawZXuII/AAAAAAAAAgw/3SaRdSPAdyY/%2525C3%2525B7%2525C3%252596005_thumb%25255B2%25255D.jpg?imgmax=800" style="border: 0px; display: inline;" title="擷取005" width="466" /></a><br />
<br />
Fritz Chess Benchmark<br />
<br />
<a href="http://lh3.ggpht.com/-Wplx4HqRVqs/UcCibZtViZI/AAAAAAAAAg4/ene0kYqL510/s1600-h/%2525C3%2525B7%2525C3%252596007%25255B4%25255D.jpg"><img alt="擷取007" border="0" height="465" src="http://lh3.ggpht.com/-dLyJ_7VKiC4/UcCib-9jYFI/AAAAAAAAAhA/CqxuyINuUuY/%2525C3%2525B7%2525C3%252596007_thumb%25255B2%25255D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="擷取007" width="446" /></a> <br />
<br />
總結:<br />
單核效能被i3-3220菊爆,不過仗著實體四核心,全線程能贏個10%到30%沒問題的。<br />
<br />
<br />Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com4tag:blogger.com,1999:blog-8572235998798135316.post-17581036746121695002013-05-01T02:34:00.002+08:002013-05-01T16:33:02.458+08:00[記錄]撰寫uTorrent自動備份腳本(批次檔)<h3>
前言</h3>
<div>
<br /></div>
<div>
<div>
前陣子聽到朋友的uTorrent崩潰,吃掉了所有做種中的種子,為了以防萬一,寫了個自動備份腳本。<br />
<br /></div>
<div>
</div>
</div>
<h3>
本文</h3>
<div>
<br /></div>
批次檔:<br />
<blockquote class="tr_bq">
@echo off <br />
<span style="color: #8e7cc3;">REM -----將日期格式更改為yyyymmdd</span><br />
set dd=%date:~8,2%<br />
set dm=%date:~5,2%<br />
set dy=%date:~0,4%<br />
set mydate=%dy%%dm%%dd%<br />
<span style="color: #8e7cc3;">REM -----將7z加入環境變數</span><br />
path <span style="color: #3d85c6;">"7z路徑" (ex:C:\Program Files\7-Zip)</span><br />
<span style="color: #8e7cc3;">REM -----使用7z壓縮uTorrent資料夾</span><br />
7z a -mx=9 <span style="color: #3d85c6;">"備份儲存位置"</span>\%mydate%_uTorrent.7z <span style="color: #3d85c6;">"uTorrent設定檔位置"</span><br />
<span style="color: #8e7cc3;">REM -----自動刪除3天前備份</span><br />
forfiles -p <span style="color: #3d85c6;">"備份儲存位置" </span>-s -m *.7z -d -3 -c "cmd /c del @path"</blockquote>
<br />
<a name='more'></a>注:uTorrent設定檔位置通常在 " <span style="color: #3d85c6;">%appdata%\uTorrent</span> " <br />
<br />
<h3>
參考資料</h3>
<ul>
<li><a href="http://flyfox.pixnet.net/blog/post/28905281-bat---%E5%88%AA%E9%99%A4%E4%B8%83%E5%A4%A9%E5%89%8D%E7%9A%84%E6%AA%94%E6%A1%88">bat - 刪除七天前的檔案</a></li>
<li><a href="http://blog.xuite.net/eric10104/blog/41711658-7-zip%E8%87%AA%E5%8B%95%E5%82%99%E4%BB%BD+%2B+(DOS%E6%89%B9%E6%AC%A1%E6%8C%87%E4%BB%A4)">7-zip自動備份 + (DOS批次指令)</a></li>
<li><a href="http://download.ithome.com.tw/article/index/id/1218">如何設定批次檔,讓7-zip幫你自動化壓縮兼備份檔案 – 7-zip</a></li>
</ul>
<div>
<br /></div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-36526427891482675012013-04-26T06:46:00.001+08:002013-05-19T14:53:25.110+08:00uTorrent 3.3 版本 程式不定期崩潰<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiozuiOhSJzDnAuPsp9sK_ofXD1RCcxkjV3JzxTevD54jGXYJhqlWKNpNWl3U0GdKqQaG0oU2_CRNn2pMQ9mTWdMeL4z5fKdSv6pACDZuWz2dVcnLPPd5sR1bM7522pEu6tT7VlneIPlV8/s1600/utorrent-14-520x535.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiozuiOhSJzDnAuPsp9sK_ofXD1RCcxkjV3JzxTevD54jGXYJhqlWKNpNWl3U0GdKqQaG0oU2_CRNn2pMQ9mTWdMeL4z5fKdSv6pACDZuWz2dVcnLPPd5sR1bM7522pEu6tT7VlneIPlV8/s200/utorrent-14-520x535.png" width="194" /></a></div>
<h2>
</h2>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
<br /></h3>
<h3>
<br /></h3>
<h3>
<br /></h3>
<h3>
<br /></h3>
<h3>
前言</h3>
<br />
uTorrent 3.3已經被許多使用者指出連接數量一多就有機會使corked jobs一直上升,最後在快取裡的資料就無法寫回硬碟,快取爆掉造成程式崩潰。只有回去使用「uTorrent 3.2.3 build 28705」以前的版本才能解決,目前3.3所有build都沒修正這問題。<br />
<br />
<h3>
解決方法</h3>
<div>
<ol>
<li>關閉uTorrent,備份設定及種子資料<br />複製 <span style="color: #f1c232;">" %appdata%\utorrent " </span></li>
<li>下載「uTorrent 3.2.3 build 28705」(註:綠色版)<a name='more'></a><br /><a href="https://docs.google.com/file/d/0B8tiEzzDH2HVOUxURlBpU0xzc0U/edit">Google文件</a>、<a href="https://dl.dropboxusercontent.com/u/16266088/uTorrentPortable_3.2.3.28705.elpf.exe">Dropbox</a></li>
<li>安裝uTorrent Portable</li>
<li>把剛剛在<span style="color: #f1c232;"> " %appdata%\utorrent " </span>的檔案複製到 <span style="color: #f1c232;">" \uTorrentPortable\App\uTorrent " </span>下</li>
<li>啟動uTorrentPortable.exe,確認設定及種子資料無誤</li>
<li>完成!</li>
</ol>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3>
</h3>
<h3>
參考資料</h3>
<div>
<ul>
<li><a href="http://forum.utorrent.com/viewtopic.php?pid=723896">utorrent 3.3 all builds crashing with corked jobs</a></li>
<li><a href="http://www.ptt.cc/bbs/P2PSoftWare/M.1366762225.A.8ED.html">#1HToBnZj (P2PSoftWare) [ptt.cc]</a></li>
</ul>
</div>
<div>
<br /></div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-63571952843164313572013-04-20T05:05:00.001+08:002013-04-29T11:14:00.477+08:00BuyVM VPS購買流程及介面介紹前篇:<a href="http://downager.blogspot.tw/2013/04/buyvmvps.html">BuyVM低價VPS介紹</a><br />
<br />
在上一篇介紹了BuyVM VPS,本篇主要是要介紹相關流程及介面。<br />
<br />
<h3>
購買流程</h3>
<div>
首先,<br />
選擇要訂購的Plan<br />
<br /></div>
<div>
<a href="http://lh5.ggpht.com/-gqXrkq9hXFk/UX3jfjnFS0I/AAAAAAAAAYU/DTU7zEFkj8Y/s1600-h/%2525C3%2525B7%2525C3%252596711%25255B9%25255D.jpg"><img alt="擷取711" border="0" height="413" src="http://lh3.ggpht.com/-h-teBoiTXJY/UX3jgIcdCAI/AAAAAAAAAYc/WRGgnZrQ7VM/%2525C3%2525B7%2525C3%252596711_thumb%25255B5%25255D.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取711" width="686" /></a></div>
<br />
<a name='more'></a><br /><br />
填寫主機名稱及選擇預設安裝系統<br />
<br />
<a href="http://lh4.ggpht.com/-5gfOrVuA-OI/UX3jgrTYqYI/AAAAAAAAAYk/7OfbJgZIxCo/s1600-h/%2525C3%2525B7%2525C3%252596708%25255B4%25255D.jpg"><img alt="擷取708" border="0" height="621" src="http://lh5.ggpht.com/-ZxYCZlv0CoQ/UX3jhcfSBaI/AAAAAAAAAYs/SQG6FEZJFOQ/%2525C3%2525B7%2525C3%252596708_thumb%25255B2%25255D.jpg?imgmax=800" style="background-image: none; border: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取708" width="686" /></a><br />
<br />
結帳,BuyVM提供Google Checkout及Paypal兩種結帳方式<br />
(注:沒有帳號前面應該會要你填寫個人資料,照實填就好。<br />
<br />
<a href="http://lh3.ggpht.com/-2w8puVGifus/UX3jh2fmBpI/AAAAAAAAAY0/zhO7mAZlo7E/s1600-h/%2525C3%2525B7%2525C3%252596710%25255B4%25255D.jpg"><img alt="擷取710" border="0" height="611" src="http://lh4.ggpht.com/-FigPAI7j-m0/UX3jiU7VM9I/AAAAAAAAAY8/UMm4ofglI88/%2525C3%2525B7%2525C3%252596710_thumb%25255B2%25255D.jpg?imgmax=800" style="background-image: none; border: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取710" width="687" /></a><br />
<br />
結帳完畢後會發郵件給你,內有VPS位置和管理後台帳號密碼,<br />
如果遲遲沒有收到可以到<a href="https://my.frantech.ca/clientarea.php">https://my.frantech.ca/clientarea.php</a>發個Ticket詢問,<br />
聽說能發中文Ticket,各位可以嘗試看看。<br />
<br />
<br />
<h3>
管理後台介紹</h3>
<div>
<br /></div>
<div>
</div>
<div>
<a href="http://lh3.ggpht.com/-OAQAQauVTuQ/UX3kDy7e9gI/AAAAAAAAAZE/tcxtG3ZVY3M/s1600-h/%2525C3%2525B7%2525C3%252596712%25255B3%25255D.jpg"><img alt="擷取712" border="0" height="529" src="http://lh5.ggpht.com/-_QZyBq18RMg/UX3kEqLJAXI/AAAAAAAAAZM/eisV8-IiLyo/%2525C3%2525B7%2525C3%252596712_thumb%25255B1%25255D.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取712" width="689" /></a><br />
<br />
結完帳後,信箱找找這封信,上面有管理後台帳號<br />
到<a href="http://manage.buyvm.net/">http://manage.buyvm.net</a>,輸入Contrlo Panel Access下的帳號密碼</div>
<div>
登入後,系統會秀出你目前可管理的VPS</div>
<div>
<br />
<a href="http://lh3.ggpht.com/-3m7_w0tI2qo/UX3kFVeAcFI/AAAAAAAAAZU/5NUxiOZtm14/s1600-h/%2525C3%2525B7%2525C3%252596713%25255B3%25255D.jpg"><img alt="擷取713" border="0" height="406" src="http://lh5.ggpht.com/-mwgKRA2AgaI/UX3kGHbPcnI/AAAAAAAAAZc/TK2z2vncrMw/%2525C3%2525B7%2525C3%252596713_thumb%25255B1%25255D.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取713" width="688" /></a><br />
<br />
VPS狀態及管理介面<br />
<br /></div>
<div>
<a href="http://lh6.ggpht.com/-Drt3P1Ew44Q/UX3kGfd_8qI/AAAAAAAAAZk/17CcGEnJ8pk/s1600-h/%2525C3%2525B7%2525C3%252596714%25255B3%25255D.jpg"><img alt="擷取714" border="0" height="334" src="http://lh4.ggpht.com/-_UQ9tlQdeBU/UX3kHMV-cUI/AAAAAAAAAZs/Juuyid8hUjo/%2525C3%2525B7%2525C3%252596714_thumb%25255B1%25255D.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取714" width="687" /></a><br />
<br />
介面簡單明瞭,操作方便,Re-install OS也只要3分鐘左右,相當快速!<br />
<br />
<a href="http://lh4.ggpht.com/-X7skY9voJi4/UX3kH60nY0I/AAAAAAAAAZ0/HU87KEPxzqg/s1600-h/%2525C3%2525B7%2525C3%252596715%25255B4%25255D.jpg"><img alt="擷取715" border="0" height="375" src="http://lh5.ggpht.com/-KgwzciTgxD4/UX3kISOCSNI/AAAAAAAAAZ8/gIWDivX_iNw/%2525C3%2525B7%2525C3%252596715_thumb%25255B2%25255D.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="擷取715" width="690" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
附上測速結果<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.speedtest.net/result/2652702898.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://www.speedtest.net/result/2652702898.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
介紹就到此結束,感謝您的觀看,有問題歡迎在下方留言討論! Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-9151429191967953802013-04-20T04:19:00.000+08:002013-04-29T11:13:35.502+08:00BuyVM低價VPS介紹<a href="http://buyvm.net/">BuyVM</a><br> <div>一間以便宜和高CP值著稱的VPS供應商。</div> <div>在他們的首頁你可以看到,最便宜的方案只要15刀/年,</div> <div>有15GB的Space和128MB的RAM(突發256MB),整體是非常划算的。</div> <div> </div> <div><a href="http://lh6.ggpht.com/-fhi06HIgdMY/UX3lPg6Sa_I/AAAAAAAAAaY/AYaz73IOJGA/s1600-h/%2525C3%2525B7%2525C3%252596707%25255B5%25255D.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="擷取707" border="0" alt="擷取707" src="http://lh3.ggpht.com/-tdNqnLAj_R8/UX3lQVt0DxI/AAAAAAAAAac/fxqxYJxUIrk/%2525C3%2525B7%2525C3%252596707_thumb%25255B3%25255D.jpg?imgmax=800" width="569" height="530"></a><br></div> <a name='more'></a> <div> </div> <div> </div> <div>這麼便宜的VPS也導致該方案長期缺貨,直到增加了CA地區的機房才改善許多,</div> <div><a href="http://buyvm.net/">BuyVM</a>有個網頁能查詢剩餘數量,網址:<a href="http://www.doesbuyvmhavestock.com/">http://www.doesbuyvmhavestock.com/</a><br><br>至於穩定度方面,相信在Google上稍微搜尋下就知道了,口碑非常好,<br>我自己試用後感覺也不錯,推薦給大家!</div> <div><span style="font-family: georgia, bitstream charter, serif; color: #333333"><span style="line-height: 24px"><a href="http://buyvmstatus.com/">BuyVM主機狀態查詢</a></span></span><br><br></div> <div>下一篇:<a href="http://downager.blogspot.tw/2013/04/buyvm-vps.html">BuyVM VPS購買流程及介面介紹</a><br><br></div> Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-63329074375397489392013-04-20T03:20:00.001+08:002013-05-01T16:29:15.453+08:00如何在Linux下使用speedtest.net測速(Ubuntu/Debian)<div style="text-align: left;">
<br />
<h3>
前言</h3>
<div>
<br /></div>
<div>
<div>
想要測試VPS的網速嗎?使用知名的<a href="http://speedtest.net/">Speedtest.net</a>來測試和分享速率圖片吧!</div>
<div>
本篇適用於大多數VPS,文字介面下即可產生結果!<br />
<br />
<h3>
操作步驟</h3>
</div>
</div>
<div>
<br /></div>
</div>
<ol>
<li>安裝Python<br />
<span style="color: #f1c232;">$ sudo apt-get install python</span></li>
<li>查看當前Python版本<br />
<span style="color: #f1c232;">$ sudo python --version</span></li>
<li>2.x版本請使用<br />
<span style="color: #f1c232;">$ sudo wget https://dl.dropboxusercontent.com/u/16266088/speedtest-cli.py</span><br />
3.x版本請使用<br />
<span style="color: #f1c232;">$ sudo wget https://dl.dropboxusercontent.com/u/16266088/speedtest-cli-3.py</span></li>
<li>執行<br />
<span style="color: #f1c232;">$ sudo python speedtest-cli.py --share<a name='more'></a></span></li>
<li>結果<br /><span style="color: lime;">pi@raspberrypi</span> <span style="color: blue;">~ $</span> <span style="color: #f1c232;">sudo python speedtest-cli --share</span><br />Retrieving speedtest.net configuration...<br />Retrieving speedtest.net server list...<br />Testing from CHTD, Chunghwa Telecom Co., Ltd. (59.127.*.*)...<br />Selecting best server based on ping...<br />Hosted by TFN Media CO., Ltd. (Kaohsiung) [4.04 km]:<span style="color: #3d85c6;"> 684.659 ms</span><br />Testing download speed........................................<br />Download: <span style="color: #3d85c6;">19.99 Mbit/s</span><br />Testing upload speed..................................................<br />Upload: <span style="color: #3d85c6;">3.06 Mbit/s</span><br />Share results: <span style="color: #0b5394;"><a href="http://www.speedtest.net/result/2656606924.png">http://www.speedtest.net/result/2656606924.png</a></span></li>
</ol>
<br />
<h3>
參考資料</h3>
<div>
<ul>
<li><a href="http://www.lowendguide.com/using-linux/use-speedtest-net-from-your-vps-without-using-vnc/">Use Speedtest.net from your vps without using vnc</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-34637820352076280902013-04-19T23:53:00.000+08:002013-04-20T03:49:56.260+08:00Raspberry Pi 安裝作業系統<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlNQTKrdR1xbnPHEMOs_oExwxvOty640cdJN1sm5TsNn1TIY089j5ZoxI45ojZQDgc0lmOyLxeXq97aWCeuRdv4KZl7hHEoVt5TG86lnNb7ZoSFCThQVPWs2Y0ydXXdEe8Q3X5SbC__hM/s1600/%25E6%2593%25B7%25E5%258F%2596705.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlNQTKrdR1xbnPHEMOs_oExwxvOty640cdJN1sm5TsNn1TIY089j5ZoxI45ojZQDgc0lmOyLxeXq97aWCeuRdv4KZl7hHEoVt5TG86lnNb7ZoSFCThQVPWs2Y0ydXXdEe8Q3X5SbC__hM/s1600/%25E6%2593%25B7%25E5%258F%2596705.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<ol>
<li>到官方網站選擇合適的映像檔(<a href="http://www.raspberrypi.org/downloads">http://www.raspberrypi.org/downloads</a>)</li>
<li>下載「Win32DiskImager」(<a href="http://sourceforge.net/projects/win32diskimager/">http://sourceforge.net/projects/win32diskimager</a>)</li>
<li>解壓縮後,執行「Win32DiskImager.exe」<a name='more'></a></li>
<li>選擇「Image File」,填上映像檔路徑</li>
<li>選擇「Device」,選取至SD卡槽</li>
<li>點選「Write」,寫入映像檔</li>
<li>燒錄完畢,插入Raspberry Pi即可開機</li>
</ol>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com0tag:blogger.com,1999:blog-8572235998798135316.post-8671892274448624122013-03-22T14:49:00.002+08:002013-04-20T00:55:20.832+08:00Raspberry Pi 變身為Seedbox製作實錄(PPPoE+DDNS+BT+FTP)<h3>
前言</h3>
<div>
<br /></div>
<div>
本文章大部分都是參考網路上的資源,<br />
純粹只是自己做個紀錄,<br />
內容有誤還望各位先進指教!<br />
<br />
<h3>
操作準備</h3>
<div>
<br /></div>
<div>
韌體版本:<a href="http://www.raspberrypi.org/downloads">2013-02-09-wheezy-raspbian</a><br />
格式成exFAT的隨身硬碟</div>
<div>
<br />
<a name='more'></a></div>
<h3>
本文</h3>
</div>
<div>
<br /></div>
<div>
第一次開機就能用ssh進入了</div>
<div>
帳號:pi</div>
<div>
密碼:raspberry</div>
<div>
<br /></div>
<div>
登入後先把預設密碼改掉</div>
<div>
<span style="color: #f1c232;">$ passwd</span></div>
<div>
<span style="color: #f1c232;"><br /></span></div>
<div>
<div>
更改鍵盤配置</div>
<div>
<span style="color: #f1c232;">$ sudo dpkg-reconfigure keyboard-configuration</span></div>
</div>
<div>
注:ssh底下無法使用這指令</div>
<div>
<br /></div>
<div>
更改地區</div>
<div>
<span style="color: #f1c232;">$ sudo dpkg-reconfigure locales</span></div>
<div>
<span style="color: #f1c232;"><br /></span></div>
<div>
設定時區</div>
<div>
<span style="color: #f1c232;">$ sudo dpkg-reconfigure tzdata</span></div>
<div>
<span style="color: #f1c232;"><br /></span></div>
<div>
更新<span style="font-family: Arial;"><span style="line-height: 20px;">索引清單(package list)</span></span></div>
<div>
<span style="color: #f1c232;">$ sudo apt-get update</span></div>
<div>
<span style="color: #f1c232;"><br /></span></div>
<div>
更新套件</div>
<div>
<span style="color: #f1c232;">$ sudo apt-get -y dist-upgrade</span></div>
<div>
注:這動作會耗費一段時間,可以先泡杯咖啡</div>
<div>
<br /></div>
<div>
清除更新時所下載的檔案</div>
<div>
<span style="color: #f1c232;">$ sudo apt-get clean</span></div>
<div>
<br /></div>
<div>
安裝PPPoE撥號程式</div>
<div>
<span style="color: #f1c232;">$ sudo apt-get install pppoeconf</span></div>
<div>
<br /></div>
<div>
設定PPPoE</div>
<div>
<span style="color: #f1c232;">$ sudo pppoeconf</span></div>
<div>
注:如果不是直接接在數據機後請先跳過</div>
<div>
<br />
<br /></div>
<div>
安裝no-ip</div>
<div>
<ol>
<li><span style="color: #f1c232;">$ cd /usr/local/src/</span></li>
<li><span style="color: #f1c232;">$ sudo wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz</span></li>
<li><span style="color: #f1c232;">$ sudo tar xf noip-duc-linux.tar.gz</span></li>
<li><span style="color: #f1c232;">$ cd noip-2.1.9-1/</span></li>
<li><span style="color: #f1c232;">$ sudo make install</span></li>
<li><span style="color: #e69138;">輸入 no-ip資料</span></li>
<li><span style="color: #e69138;">建立 /etc/init.d/noip2</span></li>
<li><span style="color: #f1c232;">$ sudo touch /etc/init.d/noip2</span><br /><span style="color: #f1c232;">$ sudo nano /etc/init.d/</span><span style="color: #f1c232;">noip2</span><span style="color: #f1c232;"> </span><br />貼上<br /><pre style="background-color: #cccccc;"><span style="color: #333333;"><span style="line-height: 18px;">#! /bin/sh
# /etc/init.d/noip
### BEGIN INIT INFO
# Provides: noip
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start a program at boot
# Description: A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.
### END INIT INFO
# If you want a command to always run, put it here
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting noip"
# run application you want to start
/usr/local/bin/noip2
;;
stop)
echo "Stopping noip"
# kill application you want to stop
killall noip2
;;
*)
echo "Usage: /etc/init.d/noip {start|stop}"
exit 1
;;
esac
exit 0</span></span></pre>
</li>
<li>變更 script 權限<br /><span style="color: #f1c232;">$ </span><span style="color: #f1c232;">sudo chmod 755 /etc/init.d/noip2</span></li>
<li>進行開機啟動<br /><span style="color: #f1c232;">$ sudo update-rc.d noip2 defaults</span></li>
</ol>
</div>
<div>
一鍵安裝rtorrent+rutorrent</div>
<div>
<ol>
<li><span style="color: #f1c232;">$ cd ~</span></li>
<li><span style="color: #f1c232;">$ sudo wget <a href="https://dl.dropbox.com/u/16266088/rtorrent.sh">https://dl.dropbox.com/u/16266088/rtorrent.sh</a></span></li>
<li><span style="color: #f1c232;">$ sudo </span><span style="color: #f1c232;">sh rtorrent.sh</span></li>
</ol>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXSBpKoj9jFD50xdTQt0h71Zqh3j8qkK6vx2gLlLF7Z5mcx9XO8wR7P1EbCdxn1tM1Rkq1r4bxPCLgNRyeRy0iWR2p-Z1O1FwMpqAuwPHKSDt5QRbJar3i28NKHHM5j9I0lbYhobmdC_Y/s1600/%E8%87%AA%E5%8B%95%E5%AE%89%E8%A3%9DRT.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXSBpKoj9jFD50xdTQt0h71Zqh3j8qkK6vx2gLlLF7Z5mcx9XO8wR7P1EbCdxn1tM1Rkq1r4bxPCLgNRyeRy0iWR2p-Z1O1FwMpqAuwPHKSDt5QRbJar3i28NKHHM5j9I0lbYhobmdC_Y/s640/%E8%87%AA%E5%8B%95%E5%AE%89%E8%A3%9DRT.png" width="476" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
注:這部分會裝很久,久到不可思議。</div>
<div class="separator" style="clear: both; text-align: left;">
注二:rutorrent出問題請嘗試</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #e69138;">$ sudo rm /home/rtorrent/rtorrent/session/rtorrent.lock</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
接上硬碟,確認是否在/dev/sda1下</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo fdisk -l</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
安裝exfat-fuse,讓mount支持exFAT格式</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo apt-get install exfat-fuse</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
建立資料夾,將隨身硬碟掛載到下面</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo mkdir /mnt/extHDD</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo mount /dev/sda1 /mnt/extHDD/</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
確認是否正確掛載</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ df -h</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
開機自動掛載</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo nano /etc/fstab </span></div>
<div class="separator" style="clear: both; text-align: left;">
加入下面這行</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<pre style="background-color: #cccccc;"><eivind rygge.org="" style="line-height: 18px;"><span style="color: #333333;">/dev/sda1 /mnt/extHDD exfat-fuse defaults 0 0</span></eivind></pre>
注:使用tab空格<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
修改rtorrent.rc</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
<span style="color: #f1c232;">$ sudo nano /home/rtorrent/.rtorrent.rc</span></div>
<div class="separator" style="clear: both;">
修改預設下載位置</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<pre style="background-color: #cccccc;"><span style="color: #333333; line-height: 18px;">directory = /mnt/extHDD</span></pre>
增加記憶體使用上限<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<pre style="background-color: #cccccc;"><span style="color: #333333; line-height: 18px;">max_memory_usage = 256M</span></pre>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
修改rutorrent conf.php</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo nano /var/rutorrent/rutorrent/conf/config.php</span></div>
<div class="separator" style="clear: both; text-align: left;">
修改這兩項</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<pre style="background-color: #cccccc;"><span style="color: #333333; line-height: 18px;">$scgi_port = "23876";
$topDirectory = '/mnt/extHDD';</span></pre>
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
儲存完畢後重新開機</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #f1c232;">$ sudo shutdown -r now</span></div>
<div class="separator" style="clear: both; text-align: left;">
檢查pppoe noip ftp rtorrent rutorrent mount是否正確運作</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-size: large;">這記錄就到此結束了,有任何問題可以在下方留言,</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-size: large;">有地方能夠更精簡也歡迎指教,感謝您的觀看。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-size: large;"><br /></span></div>
<h3>
參考資料</h3>
<div>
<ul>
<li><a href="http://yehnan.blogspot.tw/2012/06/raspberry-pi_10.html">Raspberry Pi基本設定、編譯核心、上網</a></li>
<li><a href="http://apt.nc.hcc.edu.tw/web/apt/apt.html">APT 的安裝、使用</a></li>
<li><a href="http://kawa812.blogspot.tw/2013/02/raspberry-pi.html">Raspberry PI 設定紀錄</a></li>
<li><a href="http://jayshao.com/it-network/vps-install-rtorrent-rutorrent.html">VPS一键安装rtorrent+rutorrent</a></li>
<li><a href="http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html">Raspberry Pi - run program at start-up</a></li>
</ul>
</div>
Downagerhttp://www.blogger.com/profile/11616001168647672085noreply@blogger.com8