Skip to main content

NS2 無線模擬結果 Trace 檔分析

· 3 min read

新 r 33.908773621 3 MAC --- 334 mipv6_bu 70 [13a 1 4 800] ------- [4196353:0 0:0 32 4198400] 舊 s -t 1.000075000 -Hs 22 -Hd 2147483647 -Ni 22 -Nx 100.00 -Ny 2200.00 -Nz 0.00 -Ne -1.000000 -Nl MAC -Nw --- -Ma 0 -Md ffffffff -Ms 14 -Mt 800 -Is 4222977.0 -Id 2147483647.0 -It ipv6_sol -Il 100 -If 0 -Ii 1 -Iv 255

欄位: event type 事件類型)

有四種基本事件類型

  • s: send (傳送)
  • r: receive (接收)
  • d:drop(丟棄)
  • f: forward (轉送)

還有一種特別類型

  • m: move (移動)

欄位 2: general flag

-t: time (時間)

欄位 3: Next hop info (下一站的資訊)

-Hs: id for this node -Hd: id for next hop towards the destination

欄位 4: Node property type tag (節點屬性類型標籤

-Ni: node id (節點 ID) -Nx –Ny -Nz: node s x/y/z coordinate (節點 x/y/z 的座標位置) -Ne: node energy level -Nl: trace level, such as AGT, RTR, MAC -Nw: reason for the event (事件發生原因)

欄位 5: packet info at MAC level (封包在 Mac 層的資訊)

-Ma: duration -Md: dest’s ethernet address -Ms: src’s ethernet address -Mt: ethernet type

欄位 6: Packet information at IP level (封包在 IP 層的資訊)

-Is: source address. Source port number (來源位置,a.b 其中 a 為節點 ID, b 為埠號 -Id: dest address.dest port number (目的位置) -It: packet type (封包類型) -Il: packet size (封包大小) -If: flow id (資料流 ID) -Ii: unique id (唯一的 ID 編號) -Iv: ttl value (Time To Live 的值)

欄位 7: 封包在應用層的資訊。

包含的應用程式類型如 arp, tcp 或者是 adhoc 路由協定,這個欄位都是以 P 所開頭的, 且標籤為隨著應用程式不同而不同

Trace 檔分析:

Packet Loss 數量計算: 不考慮 Out-of-Order 情況時,Packet Loss 數量的計算方法最簡單,每一個封包在傳送端發送前,傳送端都會給封包一個序號,序號是連續性的,因此若是在接收到發現序號有不連續的發生,則可視為有封包的移失。

OWD&IPDV 計算: 最重要的欄位是 Sending Time (傳送時間) 和 Sequence Number (封包序號), 可以用來計算出 One Way Delay (OWD) 和 IP Delay Variance (IPDV,或是 Jitter)。

One Way Delay = 接收時間 – 傳送時間

IPDV = | 目前量測到的 OWD - 上一次量測到的 OWD|

Reference:

http://140.116.72.80/~smallko/ns2/wireless1.htm http://www.k-lug.org/~griswold/NS2/ns2-trace-formats.html http://www.ee.surrey.ac.uk/Personal/L.Wood/ns/

9th. day of porting INET6 第九天

· One min read

17th Part:

檔案管理方式決定: 用 freemind 畫好了 INET6 與 INET 檔案分佈圖, 隨時比較兩者間相應模組與進度

封包測試方式決定: 使用 tictoc scenario 先測試 IPv6, ICMPv6 封包格式的正確性

Module Functions

· One min read

The Mobility module provides a geographical position of the host and handles its movement.

The Blackboard module is used for cross layer communication. It provides information relevant to more than one layer like the actual energy status of the host, the display appearance or the status of the radio.

When less is more

· One min read

就好像 Unix Programming guide 講的,unix 程式設計的哲學就是ㄧ件工具能將ㄧ件事做的最好,然後再將各種工具 "串接"(pipe) 起來共同完成一項工作.

在實體世界中,這種 "簡約"(Simplicity) 的思考,體現在 "ipod" 等商品熱賣上. 人們將會擁有一堆能將單一工作做的最好的工具.

使各種工具ㄧ起完成工作,工具之間的溝通當然是透過網路. 而擔任如 perl 或 python 在作業中 "膠合劑"(glue) 的腳色的會是我在ㄧ篇論文裡提出的個人化內容分散式網路的概念 (Personal Content Distribution Internetwork)

"Ubiquitous Computing"

8th. day of porting INET6 第八天

· One min read

15th Part:

模組組成

  • PING6, TraceRoute6
  • UDP6

IP6

  • ICMP6
  • ND (replace ARP) -- future --
  • MLD
  • IPSEC

封包處理流程: 收到封包 -> 判斷是給自己或給別人的封包 (Deliver locally/Addressed to another node) If 給別人 ->Look up routing table -> 轉送封包到對應介面上 (identified interface)

16th Part: 位址格式:

  • unicast
  • link-local
  • multicast
  • IPv4-compatible address 評估: flatconfigurator6 是否可以先使用 IPv4-compatible address 的方式設定?

Addressing format (參考 Smartbit-smartflow):

  • Full hexadecimal
  • No leading zero (前面的 0 省略)
  • Compact (最簡化 ex: 2001::1)
  • Mixed (最後四碼接 IPv4 位址 ex: 2001::192.168.0.1)