NS2のNew Trace Fileの読み方

new-wireless-trace(シナリオ中に"$ns use-newtrace"と記述する)

$ns  trace-all $tracefd 
$ns  namtrace-all-wireless $namtrace $val(x) $val(y)

$ns use-newtrace

tracefile

r -t 10.094370289 -Hs 0 -Hd 0 -Ni 0 -Nx 10.75 -Ny 5.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 13a -Md 0 -Ms 2 -Mt 800 -Is 1.255 -Id 0.255 -It DSR -Il 52 -If 0 -Ii 4 -Iv 253 -P dsr -Ph 3 -Pq 0 -Ps 2 -Pp 1 -Pn 2 -Pl 3 -Pe 0->1 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0 

読み方

  • Node property tags:-N
    • Ni: node id
    • Nx: node’s x-coordinate
    • Ny: node’s y-coordinate
    • Nz: node’s z-coordinate
    • Ne: node energy level
    • Nl: trace level, such as AGT, RTR, MAC
    • Nw: reason for the event. The different reasons for dropping a packet are given below:END, COL, DUP, ERR, RET, STA, BSY, NRTE, LOOP, TTL, TOUT, CBK ,IFQ, ARP, OUT
  • acket information at IP level:-I
    • Is: source address.source port number
    • Id: dest address.dest port number
    • It: packet type
    • Il: packet size
    • If: flow id
    • Ii: unique id
    • Iv: ttl value
  • Next hop info:-H
    • Hs: id for this node
    • Hd: id for next hop towards the destination
  • Packet info at MAC level:-M
  • Packet info at “Application level”:-P
    • P arp Address Resolution Protocol. Details for ARP is given by the following tags:
      • Po: ARP Request/Reply
      • Pm: src mac address
      • Ps: src address
      • Pa: dst mac address
      • Pd: dst address
    • P dsr This denotes the adhoc routing protocol called Dynamic source routing. Information on DSR is represented by the following tags:
      • Pn: how many nodes traversed
      • Pq: routing request flag
      • Pi: route request sequence number
      • Pp: routing reply flag
      • Pl: reply length
      • Pe: src of srcrouting->dst of the source routing
      • Pw: error report flag ?
      • Pm: number of errors
      • Pc: report to whom
      • Pb: link error from linka->linkb
    • P cbr Constant bit rate. Information about the CBR application is represented by the following tags:
      • Pi: sequence number
      • Pf: how many times this pkt was forwarded
      • Po: optimal number of forwards
    • P tcp Information about TCP flow is given by the following subtags:
      • Ps: seq number
      • Pa: ack number
      • Pf: how many times this pkt was forwarded
      • Po: optimal number of forwards



NS2 Training Course Wireless Network参考