how to use smart bits 6000

25
淺淺 Smart Bits 6000 Smart Bits 有有有有有 20020006000/B/C Smart WindowSmart ApplicationSmart FlowIP multicast…有 有有有有有有有 體,體 Smart Bits 有有有 MAC 有有 License 有有 throughput 有有有 Smart Application 有 有 Smart WindowSmart Bits 有有有有有有有有 throughput 有有有有有有有 session 有 generate 有有 session session 有 有 IP MAC 有有有 protocol type 有有 。, topicsClass 1 Smart Bits 有有有有 Class 2 有有 DUT - 有有有有有有有有有 stream ? Class 3 有有有有有有 packet type ? 有有有有 custom packet ? Class 4 有有有有 / 有有 receiver port 有有有 source stream? 有有 Trigger Class 5 IGMP 有有Class 6 有有有有 Class 7‧有 Smart Application 有 Latency 有有Class 8‧有 Smart Application 有 throughput 有有有有有有有有有有有有有有

Post on 22-Apr-2015

376 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Use Smart Bits 6000

淺談 Smart Bits 6000

Smart Bits 有許多型號:200、2000、6000/B/C,可以搭配 Smart Window、Smart

Application、Smart Flow、IP multicast…等等多套軟體使用,但某些軟體只能在特定型號使用或者用 Smart Bits 本身的 MAC 來綁 License。本份文件介紹的測試除了 throughput 可搭配 Smart Application 之外,其餘皆是搭配 Smart Window。

Smart Bits 在測試上主要用於 throughput 測試或者以大量 session 做壓力測試。它可以generate 許多 session,這些 session 可以是不同封包長度、不同 IP、不同 MAC 或不同

protocol type。本份文件僅就日常測試最需要的部分做說明,共分為六個 topics:

Class 1 ‧ Smart Bits 介面說明。

Class 2 ‧ 灌爆 DUT - 如何自動產生上千筆 stream ?

Class 3 ‧ 想要測試各種 packet type ,怎麼做 ? 如何設定 custom packet ?

Class 4 ‧ 如何觀察 / 區隔 receiver port 上不同 source stream? 設定 Trigger 。

Class 5 ‧ IGMP 測試。

Class 6 ‧ 儲存設定。

Class 7‧用 Smart Application 做 Latency 測試。Class 8‧用 Smart Application 做 throughput 測試。

所有測試的邏輯圖皆如下圖:

Page 2: How to Use Smart Bits 6000

Class 1‧Smart Bits 介面說明

將 control PC 接上 Smart Bits 6000 並將 IP 設為同網段。執行 Smart Window 後會跳出主視窗,依照圖中步驟與 SmartBits 連線。※ Smart Bits 的 IP 必須以 DB-25 的 console 設定。

Page 3: How to Use Smart Bits 6000

連線後還需指定要使用的卡板,在要使用的卡板旁邊空白處按滑鼠右鍵,選擇

“Reserve This Module”。卡板上藍色燈號表示已啟用,綠色則否,不可使用。旁邊的數字與中間的 A/B 則是用

來辨別,如目前已啟用的卡板為 1A,卡板上的 6 個 port 分別為 1A-01、1A-02、1A-03 ~1A-

06。

Page 4: How to Use Smart Bits 6000

Name Description

1 LAN-3101A-Port 1A-01 該 Port 的完整名稱2 Transmit Setup 該 Port 主要設定頁面3 Trigger Setup Port Trigger 設定,稍後會有介紹4 Port Setup 設定 IGMP 時必要的設定5 當 auto negotiation 勾選時,會無法設定該 port 目前連

線速率。6 Smart Metric Mode 此項設定會使 Transmit Setup 的設定方式改變,於 class

2 介紹。7 IGMP Setup 設定 IGMP group

8 Enable Auto Negotiation 自動調整該 port 連線速率9 Display Capture Data Smart Bits 抓封包的 tool,與 Ethereal 相同10 Copy Port Data

Paste Port Data

將此 port 設定複製到其他的 port,可一次複製多個

port,在做多 port 設定時相當方便。11 Group Member 同一個 group member 可同時送封包,不用依序手動傳

送。

Page 5: How to Use Smart Bits 6000

12 Smart Module File Open

Smart Module File Save

載入該卡板所有 port 的設定檔。儲存該卡板所有 port 的設定。

13 Smart Port File Open

Smart Port File Save

載入單 port 設定檔。儲存單 port 設定。

14 Update This Port 做完任何設定最好能 update,以更新 Smart Bits 狀態。

Class 2‧灌爆DUT - 如何自動產生上千筆 stream ?

Option 1‧不帶 IP address,僅有 MAC address 的封包。

Step 1‧在卡板上按滑鼠右鍵,點選”Transmit Setup”。(注意此時的 SmartMetric Mode 是disable 的)

Page 6: How to Use Smart Bits 6000

Step 2‧LAN 端設定畫面VLAN:如需帶 tag,可以在此處指定 VID。Transmit Mode:傳送模式,Single Burst 可以指定 SmartBits 每次皆送出固定的

封包數。如例圖設定 1024 筆 MAC destination,Single Murst 設為 1024,恰可觀察是否 1024 筆皆能正確送出。或者,也可將 Transmit Mode 設為 continue,此時 SmartBits 會反覆的傳送 1024 筆 MAC,通常用於壓力測試。

Length:根據不同的 test case,會需要測試封包長度是否會影響 DUT 運作。Interpacket Gap:Loading,決定這個 port 會送出多少流量的封包。MAC Destination:”State”為 increment 時,勾選”Cycle Count”,輸入要 generate

的 session 數。MAC Source:”State”為 Static 時,代表只會從這個 source MAC 送出封包。

Page 7: How to Use Smart Bits 6000

Step 3‧WAN 端設定和 LAN 端相仿,只要注意 source MAC 和 destination MAC 以及Interpacket Gap 等設定即可。

Step 4‧開始執行時,SmartBits 會詢問是否要 update 所有設定,just click yes。

Page 8: How to Use Smart Bits 6000

Step 5‧按 F9,叫出 Results Framework,觀測封包收送情況。反白一旁的 LAN port / WAN port,在畫面上按滑鼠右鍵,勾選 Rates Only。觀測 LAN port / WAN port 收送的封包數是否一致。

Page 9: How to Use Smart Bits 6000
Page 10: How to Use Smart Bits 6000

Step 6‧在 WAN port 上按右鍵,選取 Display Capture Data 觀察封包。

Option 2‧帶有 source IP 及 destination IP。(Smart Metric Mode)

Step1‧在欲使用的 LAN /WAN port 上按滑鼠右鍵,勾選 Smart Metric Mode 後再選取

Transmit Setup 開始設定。

Page 11: How to Use Smart Bits 6000

Step 2‧設定畫面已經完全不同。按照圖中步驟新增 stream。Steam:輸入要新增的 steam 數目,建議先建立一筆後再複製。Protocol:可選擇許多不同的 Protocol,稍後仍可更改。Frame Length:封包長度,稍後仍可更改。

Step 3‧設定 packet length、MAC、VLAN (option)、Protocol Type、IP。此處的設定需注意 DUT 是否有 NAT。若有 NAT,則 Destination MAC 必須設為

DUT 的 MAC,而非 WAN port 的 MAC。

設定 transmit mode 及 Interpacket Gap,此處設定方式和前述相同。

Page 12: How to Use Smart Bits 6000

Step 4‧要怎麼一次 create 出 900 筆 stream?反白 step 3 新增的 stream,按下一旁的

Copy 、Paste 就可以了。

Step 5‧新增完 900 筆之後還有一個問題:每一筆的 MAC、IP都相同。如圖示將所有 stream 反白,在 MAC Destination 的位置按滑鼠右鍵,SmartBits 會自動將數值 +1,不過 stream太多時要注意是否有 overlap。其餘 MAC Source 及 IP

都可依此方式修改。(IP、MAC、Length、Frame Rate…等都可以利用這個方式節省時間)

※ 小技巧:

Page 13: How to Use Smart Bits 6000

Protocol Type 為 TCP /UDP 時,如果要修改每筆 stream 的 port number 可不要一筆筆修改,只要將所有 stream 反白,按下一旁的 Edit,叫出如上圖畫面後,將 src / dst 反白,按下滑鼠右鍵設定即可。

Step 6‧由於撰寫文件時 WAN port 所用的卡板是 LAN-3300A ,所以設定畫面略有不同。在速率方面的設定如上圖所示,需修改 Requested Rate 或 Requested Utilization,下方顯示的 Total Bit Rate 則是目前所有 stream 的速率總和。其他封包類型及內容的設定方式則無不同。

Page 14: How to Use Smart Bits 6000

Class 3‧想要測試各種 packet type,怎麼做? 如何設定 custom packet ?

Smart Bits 預設有幾個常用的 Protocol:TCP、UDP、IP、ARP、IPX,但仍有一些未包含在內的該如何利用 Smart Bits 進行測試? 如上圖所示,在新增 stream 時可以選擇 Custom 的選項,稍後再來制訂需要的 Protocol Type。需要注意的地方是 custom packet 無法自動填入 VLAN 及 priority 等參數,必須自行編輯封包內容。

Step 1‧新增 stream,Protocol Type 選擇 Custom。

Page 15: How to Use Smart Bits 6000

Step 2‧反白新增 stream,按下右邊選單的 Edit。Step 3‧再按下 Edit 編輯封包內容

Step 4‧依照所需的 protocol type 填入代碼。

Page 16: How to Use Smart Bits 6000

上圖範例是一個帶 VLAN 的封包,以 8100 表示此封包帶有 VLAN,而 VLAN ID 為 006D

(十進位為 109)

Class 4‧如何觀察/ 區隔 receiver port 上收到的不同 stream? Trigger的設定。

本項測試以 QoS 為說明範例。由 WAN 往 LAN 端送八筆不同 priority 的 stream,priority 最高的 stream 會獨佔所有頻寬,若 priority 最高的 stream未使用所有頻寬,餘下的頻寬會由priority 次高的 stream 使用。但因八筆同時送往 LAN 端,如何得知 LAN 收到的封包是由哪筆 stream 收下來的?由封包觀察固然是一種方式,但終究不及 trigger 來得易於統計且便捷。

以下為環境設定:WAN

MAC Dst MAC Src VLAN Pri Network Src Network Dst

1 00-00-00-00-00-01 00-00-00-00-26-01 101 0 198.19.1.2 198.19.1.1

Page 17: How to Use Smart Bits 6000

2 00-00-00-00-00-01 00-00-00-00-26-02 101 1 198.19.1.3 198.19.1.1

3 00-00-00-00-00-01 00-00-00-00-26-03 101 2 198.19.1.4 198.19.1.1

4 00-00-00-00-00-01 00-00-00-00-26-04 101 3 198.19.1.5 198.19.1.1

5 00-00-00-00-00-01 00-00-00-00-26-05 101 4 198.19.1.6 198.19.1.1

6 00-00-00-00-00-01 00-00-00-00-26-06 101 5 198.19.1.7 198.19.1.1

7 00-00-00-00-00-01 00-00-00-00-26-07 101 6 198.19.1.8 198.19.1.1

8 00-00-00-00-00-01 00-00-00-00-26-08 101 7 198.19.1.9 198.19.1.1

LAN

MAC Dst MAC Src VLAN Pri Network Src Network Dst

1 00-00-00-00-26-01 00-00-00-00-00-01 198.19.1.1 198.19.1.2

Step 1‧設定完成後開始由 WAN 端 generate 封包,在 Smart Window 主畫面按下 F9 叫出Results Framework。如上圖標示,依序完成設定。

Page 18: How to Use Smart Bits 6000

在 Work Shop 畫面可看到 LAN 接收到的 Frame 數目共有 75,000 個,但這些是由哪筆 stream 所送的?這些 stream 又各送了多少 Frame ?

Step 2‧在 Smart Bits 主畫面的 LAN Port 上按滑鼠右鍵,點選 Trigger Setup。依照上圖設定Trigger 設定的是稍後要觀察的 MAC source。範例中所觀察的是 priority 最高的第八筆 stream。

Page 19: How to Use Smart Bits 6000

Step 3‧再回過頭來看看 Work Shop,Rx Triggers 的欄位出現了數字。此時只要再修改

Trigger Setup 的設定,就可以看到每一筆 stream 所送出的封包數是否符合QoS比例。

Class 5‧IGMP 測試

IGMP 測試所需的設定,一是 stream server,二是 client。Stream Server 我們以 3300 的卡板權充,client 則是 3101A。

Page 20: How to Use Smart Bits 6000

同樣地,在 3300A 的卡板按滑鼠左鍵叫出設定選單。

Class 2 已經介紹過設定畫面,此處不再贅述。在此項測試範例中,總共設定了 128 筆 stream。新增UDP stream,將 Network Destination 設為 multicast address,SmartBits 會自動判別此為 multicast stream 並修改 MAC Dst。不過 packet length、Frame Rate、MAC Src 及 Network

Source仍須自行設定。

Page 21: How to Use Smart Bits 6000

接下來是 client 端的設定,如圖示,client 端需設定的有兩項:Port Setup 與 IGMP Setup。

Port Setup裡頭,紅線框起的部分要和 stream server 及 IGMP Setup 的設定相同。

Page 22: How to Use Smart Bits 6000

IGMP Setup 設定。叫出畫面後,按下”Groups”:1‧將要設定的卡板及 port 反白。2‧選擇 IGMP version。3‧輸入要在這個 port 上建立的 receiver 數目。4‧按下 Apply 後完成。

Page 23: How to Use Smart Bits 6000

依此方式在各 port 建立 receiver 後,設定 Group Membership、IP Source 及 MAC Source。如前所述,這些設定要與 Port Setup 及 Stream Server 的設定相符。在上圖中,每個 port 皆建立了 4 筆 receiver。至此,IGMP 的設定便算完成。

Page 24: How to Use Smart Bits 6000

此時,server stream 不斷送出 traffic,而 client 端則由這個畫面去做 join / leave 的動作,先反白要 join 的 port 及 receiver,按下 join 就會送出 IGMP report,最後再從 Results

Framework去判斷封包的收送是否正確。

Class 6‧儲存設定

在做完所有的設定與測試後,必須將設定存檔,以便應用在下一個產品的測試上,該如何存檔?工具列→ File → Save ?這並不是最好的方法,這種存檔方式,會將所有卡板的位置一併記錄下來,若是日後有插拔其他卡板,那麼 Smart Bits 就無法再還原先前的設定,因為〝卡板位置錯誤〞。

在一開始的介紹中曾經提過以下兩種存檔方式。以 Module 存檔會記錄該卡板上所有 port

的設定。Restore config file 時只要是同一類型的卡板,如:3310A,那麼不管在哪一部

SmartBits 或是哪個位置都可以載入先前的設定,也因此,by Module 來存檔會是比較便利的方式。

Page 25: How to Use Smart Bits 6000

Smart Module File Open

Smart Module File Save

載入該卡板所有 port 的設定檔。儲存該卡板所有 port 的設定。

Smart Port File Open

Smart Port File Save

載入單 port 設定檔。儲存單 port 設定。

Class 7‧Latency 測試

在做

Class 8‧throughput測試。

SmartBits application