Chinaunix首页 | 论坛 | 博客
  • 博客访问: 212915
  • 博文数量: 46
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 679
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-16 13:11
文章分类
文章存档

2009年(19)

2008年(27)

我的朋友

分类: 系统运维

2008-12-19 09:30:38

In an effort to merge wireless trace, using cmu-trace objects, with ns tracing, a new, inproved trace format has been intro-

duced. This revised trace support is backwards compatible with the old trace formatting and can be enabled by the following

当前无线模拟中Trace功能是使用cmu-trace对象来实现的,为了配合这样的无线跟踪,我们建议了一个新的trace格式。这个改进的跟踪方法支持对老版本的向后兼容,并且可使用下面的命令。

command:

$ns use-newtrace

This command should be called before the universal trace command

$ns trace-all .Primitive use-newtracesets up new format for wireless tracing by setting a simulator variable callednewTraceFormat. Currently this new trace support is available for wireless simulations only and shall be extended to rest of ns in the near future.

这个命令可在通用的trace命令$ns trace-all 之前被调用。use-newtrace通过设定一个模拟器变量newTraceFormat来设定一个新的无线跟踪格式。当前这个格式只适合于无线模拟,将来可能会得到扩展。

An example of the new trace format is shown below:

s -t 0.267662078 -Hs 0 -Hd -1 -Ni 0 -Nx 5.00 -Ny 2.00 -Nz 0.00 -Ne-1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id -1.255 -It message -Il 32 -If 0 -Ii 0 -Iv 32

s -t 1.511681090 -Hs 1 -Hd -1 -Ni 1 -Nx 390.00 -Ny 385.00 -Nz 0.00 -Ne-1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 1.255 -Id -1.255 -It message -Il 32 -If 0 -Ii 1 -Iv 32

s -t 10.000000000 -Hs 0 -Hd -2 -Ni 0 -Nx 5.00 -Ny 2.00 -Nz 0.00 -Ne-1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 1.0 -It tcp -Il 1000 -If 2 -Ii 2 -Iv 32 -Pn tcp -Ps 0 -Pa 0 -Pf 0 -Po 0

r -t 10.000000000 -Hs 0 -Hd -2 -Ni 0 -Nx 5.00 -Ny 2.00 -Nz 0.00 -Ne-1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 1.0 -It tcp -Il 1000 -If 2 -Ii 2 -Iv 32 -Pn tcp -Ps 0 -Pa 0 -Pf 0 -Po 0

r -t 100.004776054 -Hs 1 -Hd 1 -Ni 1 -Nx 25.05 -Ny 20.05 -Nz 0.00 -Ne-1.000000 -Nl AGT -Nw --- -Ma a2 -Md 1 -Ms 0 -Mt 800 -Is 0.0 -Id 1.0 -It tcp -Il 1020 -If 2 -Ii 21 -Iv 32 -Pn tcp -Ps 0 -Pa 0 -Pf 1 -Po 0

s -t 100.004776054 -Hs 1 -Hd -2 -Ni 1 -Nx 25.05 -Ny 20.05 -Nz 0.00 -Ne-1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 1.0 -Id 0.0 -It ack -Il 40 -If 2 -Ii 22 -Iv 32 -Pn tcp -Ps 0 -Pa 0 -Pf 0 -Po 0

The new trace format as seen above can be can be divided into the following fields :

1Event type事件类型the first field (as in the older trace format) describes the type of event taking place at the nodeand can be one of the four types:

s send发送

r receive接收

d drop丢弃

f forward转发

2General tag(通用标签)The second field starting with "-t" may stand for time or global setting(用于时间或全局设定)

-t time

-t * (global setting)

3Next hop info(下一跳信息)This field provides next hop info and the tag starts with a leading "-H".

-Hs: id for this node

-Hd: id for next hop towards the destination.4Node property tags(节点属性)This field denotes the node properties like node-id, the level at which tracing is being done like agent, router or MAC. The tags start with a leading "-N" and are listed as below:

-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" DROP_END_OF_SIMULATION

"COL" DROP_MAC_COLLISION

"DUP" DROP_MAC_DUPLICATE

"ERR" DROP_MAC_PACKET_ERROR

"RET" DROP_MAC_RETRY_COUNT_EXCEEDED

"STA" DROP_MAC_INVALID_STATE

"BSY" DROP_MAC_BUSY

"NRTE" DROP_RTR_NO_ROUTE i.e no route is available.

"LOOP" DROP_RTR_ROUTE_LOOP i.e there is a routing loop

"TTL" DROP_RTR_TTL i.e TTL has reached zero.

"TOUT" DROP_RTR_QTIMEOUT i.e packet has expired.

"CBK" DROP_RTR_MAC_CALLBACK

"IFQ" DROP_IFQ_QFULL i.e no buffer space in IFQ.

"ARP" DROP_IFQ_ARP_FULL i.e dropped by ARP

"OUT" DROP_OUTSIDE_SUBNET i.e dropped by base stations on receiving routing updates from nodes outside its domain.

5Packet info at MAC levelMAC层的包信息)This field gives MAC layer information and starts with a leading "-M" as shown below:

-Ma: duration

-Md: dst’s ethernet address

-Ms: src’s ethernet address

-Mt: ethernet type

6Packet information at IP level The tagsIP层的分组信息)for this field start with a leading "-I" and are listed along with their explanations asfollowing:

-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

7Packet info at "Application level"(应用层的包信息)The packet information at application level consists of the type of application like ARP,TCP, the type of adhoc routing protocol like DSDV, DSR, AODV etc being traced. This field consists of a leading "-P" and list of tags for different application is listed as below:

应用层的应用包括:ARP, TCPadhoc的路由协议DSDV, DSR, AODV等。这个域首先以"-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 bythe 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

This field is still under development and new tags shall be added for other applications as they get included along theway.

阅读(1352) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~