[閒聊] 小改版

Written on 11:22 上午 by Yu Lai

在看了王小明的征服藍星,
我也加了點新東東在右邊囉。XD
就當做是些資料的統計吧。 *^^*

[技術] 802.3ad

Written on 6:49 下午 by Yu Lai

Ref: 酷學園 & PCDVD

NTEL 叫 LINK AGGREGATION
CISCO 叫 FAST ETHERCHANNEL
3COM 叫 PORT TRUNKING
現在國際標準叫 IEEE802.3ad
白話一點叫併頻寬或頻寬聚集
一般用在解決伺服器網路瓶頸或交換器與交換器連接

從硬體的角度來看

INTEL 伺服器等級的網路卡可以設定以下3個模式

1.AFT(Adapter Fault Tolerance)(希望沒有拼錯好像怪怪的)
假設有兩張網卡時一張是PRIMARY另一張是STANDBY
這時候流量只在PRIMARY上跑
當PRIMARY掛掉時STANDBY會自動啟用接手變成PRIMARY
如果原來PRIMARY恢復時會自動變成STANDBY
(因為大家ALB和ALA都包含AFT,所以基本上沒人會單獨設AFT運作)

2.ALB(Adapter Load Balance)
假設將兩張網路卡設成ALB時
進來流量為100M出去流量為200M
這時候無論接往何種交換器或集線器都可支援
同時間ALB包含容錯功能如果一張網卡故障另一張依然運作
現在INTEL可以做到8張網卡併頻寬

3.ALA(Adapter Link Aggregation)
假設將兩張網路卡設成ALA時
進來流量為200M出去流量為200M
這時候需接往支援LINK AGGREGATION的交換器
同時間ALA包含容錯功能如果一張網卡故障另一張依然運作
現在INTEL可以做到8張網卡併頻寬

Intel 的 teaming 叫做 ians Intel(R) Advanced Network Services

intel 分成

1、Adapter Fault Tolerance (AFT)
2、Switch Fault Tolerance (SFT)
3、Adaptive Load Balancing (ALB)
4、Intel Link Aggregation, Cisco*'s Fast EtherChannel* Technology or static 802.3ad (FEC or FEC/LA/802.3ad: static)

intel pro 若只使用 windows 系統提供的驅動程式的話 , 其 teaming mode 只能支援到 RLB , 若要完全使用其他 teaming mode (LA , Cisco FEC ..)的功能 , 除了需要有支援 802.3ad 規格的 switch 配合外 , 還需要安裝 Intel ANS !!

在使用2張 INTEL SERVER ADAPTER 以上時
正常來說會選 ALB 或 ALA
不管選 ALB 或 ALA 這時 AFT 是一定有作用

當你的交換器是一般或早期的請選 ALB
這時主網卡跑雙工其他子網卡跑單工
系統以主網卡為主
假設四張的話就是進去 100 出來 400

當你的交換器支援 FAST ETHERCHANNEL 或 LINK AGGREGATION 或 802.3ad
這時可以啟用 ALA
所有網卡都跑全雙工
系統以代表所有實體網卡的虛擬網卡為主
假設有四張時就是進去 400 出來 400

[技術] Wireshark抓vlan tag資訊整理

Written on 11:05 上午 by Yu Lai

使用Wireshark時居然發生抓不到VLAN的資訊,
上網找了一下果然是有問題的。
以下為找到的ref: http://blog.rogerz.cn/archives/553

某一些網卡驅動默認會在接收封包的時候過濾vlan tag,使得用wireshark抓到的封包中不含vlan tag,此時需要通過修改註冊表讓驅動保留vlan tag。

對於Intel PRO/1000或PRO/100網卡,需要將註冊表HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00xx下(以DriverDesc來判定xx值為何)的MonitorModeEnabled改為1,如果不存在則新建這麼一個dword鍵。

對於Broadcom Giga網卡,需要在註冊表裡增加一項PreserveVlanInfoInRxPacket=1,類型為string。位置與TxCoalescingTicks相同,後者可以在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet下搜索到。

修改後需要重啟機器讓它生效。這個修改辦法是在UniCA User Manual中看到的,較新的網卡驅動裡都支持這個設置,原文如下:

Intel PRO/1000 or PRO/100 Ethernet controller which are used in e.g. IBM Notebooks (T40 series and others) do not forward VLAN tags to the upper layers; By default, Intel adapters strip the VLAN tag before passing it up the stack. If you need to see the tag you need to use these driver versions: PRO/100 6.x or 7.x or later base driver, PRO/1000 7.2.17.803 (plain 7.2.17 does not have this feature). To enable, you must go into the registry and either add a registry dword and value (for e100) or change the value of the registry key (for e1000). The registry dword is MonitorModeEnabled (for both). It should be placed at HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\00xx where xx is the instance of the network adapter that you need to see tags on. (Check by opening and viewing the name of the adapter). It should be set to read: MonitorModeEnabled= 1. Note: ControlSet001 may need to be CurrentControlSet or another 00x number

For Broadcom 570x Gigabit adapters (for example in Dell systems); Add a registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet to cause the driver not to strip the 802.1Q VLAN header. In order to set that key, you need to find the right instance of the driver in Registry Editor and set that key for it.

* Run the Registry Editor (regedt32).
* Search for 「TxCoalescingTicks」 under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet" and ensure this is the only instance that you have.
* Right-click on the instance number (eg. 0008) and add a new string value.
* Enter 「PreserveVlanInfoInRxPacket」 and give it the value 「1〞.
* Save and Reboot
* You may need to install a recent driver (version 8.27) to make this setting effective