已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
LLTD 协议与实现一. LLTD协议介绍 LLTD(Link Layer Topology Discovery:链路层拓扑结构发现)作为Windows Rally技术的关键部分,它主要完成网络设备的发现和网络拓扑结构图的绘制。LLTD工作在wired (802.3 Ethernet) and wireless (802.11) ,以太网协议类型号 #88D9。在LLTD协议中定义了两个实体:Mapper和Responder,Mapper是协议实现中的发起者,同时也是最终拓扑图的绘制者。Mapper由一台装有VISTA操作系统PC担当。Responder顾名思义为响应者,它向Mapper提供自己所在设备的各种信息,协助Mapper确定各Responder所处网络中的位置。Responder可以是一台装有VISTA操作系统PC,一台装有XP操作系统并安装LLTD补丁的PC或者是其他支持LLTD协议的网络设备。LLTD提供了四种服务:1.Quick discovery;2.Topology discovery;3.Quality of service diagnostics for network test;4.Quality of service diagnostics for cross-traffic analysis。三种状态引擎:1.Enumeration State Engine; 2.Session State Engine;3.Topology Discovery State Engine。LLTD可分为Enumeration Phase ,Command Phase和Emit Phase。其中在Enumeration Phase发现所有Responder,并通过Responder发回的Hello Frame获得Responder各种属性值(在协议中微软称之为TLV: Type-length value 例如:主机名,ip地址,mac地址等)。Command Phase完成长度比较大的属性值的传输(在协议中微软称之为LargeTlv )。Emit Phase应该属于Command Phase的子阶段,主要负责确定各个Responder拓扑位置(核心功能)。另外,LLTD通过各种机制保证了协议的安全性(避免DOS攻击等),可靠性(Charge和Flat)。在网络负载控制方面采用了RepeatBAND (block adjust node discovery)方法保证了网络不会因为协议通信出现网络风暴。更多更详细的协议描述请参考文档LLTD-spec.doc,可以从微软的网站下载: /whdc/rally二LLTD协议实现终端网络设备只需要实现LLTD Responder功能,微软提供了一个移植工具包(LLTD Porting Kit)。下载地址: /whdc/rally/rallykit.mspx移植工作分两部分 :1. 是更改makefile文件,实现编译;2. 修改osl_linux.c实现LLTD与操作系统的接口 ,以读取系统的各种参数。主要工作是实现协议中规定的各中属性值.下表是协议规定的值,除了标记有“Optional”外,其他按协议规定必须在 Hello frame中支持,但是并不一定实现,可以置零,具体的每个TLV的描述可以参考附录A。TypeLengthDescriptionContext0x00-End-of-property list marker. Occupies only 1 octet and has no length octet.Mandatory0x016Host ID. Used to uniquely identify the host on which the responder is running.Mandatory0x024Characteristics. Used to identify various characteristics of the responder host and network interface.Mandatory0x034Physical medium. Used to identify the physical medium of a network interface by using one of the IANA-published ifType object enumeration values.Mandatory0x041Wireless mode. Used to identify how an IEEE 802.11 interface connects to the network.802.11 Client0x056802.11 Basic Service Set IDentifier (BSSID). Used to identify an IEEE 802.11 interfaces associated access point.802.11 Client0x06var.802.11 Service Set IDentifier (SSID). Used to identify an IEEE 802.11 interfaces associated access point.802.11 Client0x074IPv4 address. Used to carry the interfaces present and active IPv4 network address.Recommended if available0x0816IPv6 address. Used to carry the interfaces most relevant IPv6 network address. (Generally, this should be the Global v6 address.)Recommended if available0x092802.11 maximum operational rate. Used to identify the maximum data rate at which the radio can run.802.11 Client0x0A8Performance counter frequency. Identifies how fast the timestamp counters run in ticks per second.Optional0x0C4Link speed. Used to identify the network interfaces maximum speed in units of 100 bps.Optional0x0D4802.11 RSSI. Used to identify an IEEE 802.11 interfaces received signal strength indication (RSSI). 802.11 Client0x0E0Icon image. Contains an image exactly as represented in a disk file. The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.0x0Fvar.Machine name. Contains an unterminated UCS-2 string that identifies the devices host name. The maximum length of this TLV is 32 octets.0x10var.Support information. Contains an unterminated UCS-2 string that identifies the device manufacturers support information (for example, telephone number and support URL). The maximum length of this TLV is 64 octets.0x110Friendly name. Contains an unterminated UCS-2 string that identifies the devices friendly name. The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.0x1216Device universally unique identifier (UUID). Used to uniquely identify a device that supports UPnP. This TLV must be identical to the UUID that is associated with the devices UPnP implementation and is optional if the device does not support UPnP.UPnP Client0x130Hardware ID. Contains an unterminated UCS-2 string that Plug and Play uses to match the device with an INF file on a Windows PC. The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.0x144QoS characteristics. Used to identify various QoS-related characteristics of the responder host and network interface. QoS diagnostics function0x151802.11 physical medium. Used to identify the wireless physical medium.802.11 Client0x160AP association table. Used to identify the wireless hosts that are associated with an access point (AP). The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.802.11 Access Point0x180Detailed icon image. This TLV is optional although it is highly recommended that the large icon TLV (0x0E) be available in the presence of this TLV. The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.Optional0x192Sees-list working set. Identifies the maximum entry count in the responders sees-list database.Optional0x1A0Component table. Used by multifunction devices such as APs to report their internal components. The mapper uses this information to generate a more accurate topology map. The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.0x1Bvar.Repeater AP lineage. If the AP is a repeater AP as part of a Wireless Distribution System, then this TLV holds the address of the parent and may optionally hold the chain of parents up to the root. This TLV must have a length that is a multiple of 6 and has a maximum size of 36 octets.AP Repeater0x1C0Repeater AP table. If the AP is a repeater AP as part of a Wireless Distribution System, then this information permits the mapper to generate a more accurate topology map. The length of this property must be set to zero if it can be queried via the QueryLargeTlv function. All other length values are not supported.AP Repeater 表一上述属性是在一个Hello Frame中传输,共享空间,所以对于长度较大的属性,协议会在Commond Phase阶段通过QueryLargeTlv 命令查询,支持的LargeTlv 在表二中列出。 可根据需要选择实现上述的属性。其中的icon image 和Detailed icon image,Mapper只会根据网络规模选用一个,图标文件最好小于32K。图标制作请参考:/tutorials/tutorial-iw023.htmlTypeMax lengthDescription0x0E32768Icon image. Contains an image exactly as represented in a disk file.0x1164Friendly name. Contains an unterminated UCS-2 string that identifies the devices friendly name.0x13400Hardware ID. Contains an unterminated UCS-2 string that Plug and Play uses to match the device with an INF file on a Windows PC.0x164096AP association table. Contains a table that identifies the wireless hosts that are associated with it, along with various other information.0x18262144Detailed icon image. Contains an icon image that is significantly more detailed than that returned by the icon image TLV.0x1A4096Component table. Used by multifunction devices such as APs to report their internal components. The mapper uses this information to generate a more accurate topology map. 表 二 三试验环境的建立首先,将涉及到的硬件设备如下图所示连接起来. 图 一Development PC是指装有我们开发环境的linux主机 .Responder指我们的网络设备.其次是软件设置,将编译好的可执行文件(lld2d)和图标文件(icon.ico)通过FTP传输到Responder.在Responder上输入 :./lld2d -d -t 31 br0其中参数br0是必选参数,指明程序运行在哪个网络端口(我们可以选择让它运行在有线LAN端 ,无线LAN端,桥上 ,一般不允许运行于WAN端).-d参数要求程序运行在前台,以利于输出调试信息.-t 31 指明我们要求输出调试信息的级别.下面是我们可以选择的级别,我们在输入时需要将数值转换为10进制.TRC_BAND= 0x1TRC_PACKET= 0x2TRC_CHARGE= 0x4TRC_TLVINFO= 0x8TRC_STATE= 0x10程序运行成功应该返回类似如下信息:finished mapping: going quiescentENTER: Quiescentlltdd: listening on interface 00:50:04:4d:19:23 当然我们可以在Development PC上运行一个X86版本的程序作为比较,也可以在xp操作系统中打上LLTD补丁(KB922120)让其作为一个比较的Responder。 接下来设置Vista操作系统让其作为Mapper绘出拓扑结构图来,在Vista上找到设置页面Network and Sharing Center,进去后将会看到网络处在Public状态,点击Customize按键按提示将Public 改为Private.这时候我们的LLTD Mapper才开始真正的工作 (微软为了避免不产生不必要的网络数据,在Public 下LLTD Mapper不工作).现在我们需要做的就是点击 Network and Sharing Center左上角View Full Map按钮,给一点时间让Mapper去画它的图吧.这时候我们关心下Responder,它将会输出大量信息,这是我们理解和调试LLTD的好帮手.画出的拓扑图如下: 图二 另外,我们可以在Vista上装上抓包工具 ,微软推荐的是 NetMon 和Ethereal.不过目前的工具都无法帮我们分析出包中各数据的含义,毕竟LLTD是个新的东西,而且是微软的产品. 附录A: TLV定义The following TLVs describe the properties of the responder device:End-Of-Property list marker+-+|00000000|+-+Type=0x00This property marks the end of the TLV list and must exist in a valid Hello frame.Host ID+-+-+-+-+|00000001|00000110| a1 | b1 |+-+-+-+-+| c1 | d1 | e1 | f1 |+-+-+-+-+Type=0x01 Length=6This property provides a way to uniquely identify the host upon which the responder is running. On a host with multiple network interfaces, this may be the lowest MAC address across these interfaces.Characteristics+-+-+-+-+-+-+|00000010|00000100| Characteristics |+-+-+-+-+-+-+Type=0x02 Length=4This property allows a responder to report various simple characteristics of its host or the network interface that it is using.MSB+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|N|N|F|M|L| | | | | | | | | | | |P|X|D|W|P|0|0|0|0|0|0|0|0|0|0|0|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| | | | | | | | | | | | | | | | |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ LSBBits 0-28: Reserved, must be zero.Bit 27: (LP) 1=Interface is looping back outbound packets.Bit 28: (MW) 1 =Device has management Web page accessible via HTTP protocol. The mapper constructs a URL from the reported IPv6 address. If one is not available, the IPv4 address is used instead. The URL is of the form: http:/Bit 29: (FD) 1=Interface is in full duplex mode.Bit 30: (NX) 1 =Interface is NAT-private side.Bit 31: (NP) 1 =Interface is NAT-public side.Physical Medium+-+-+-+-+-+-+|00000011|00000100| Physical Medium |+-+-+-+-+-+-+Type=0x03 Length=4This property allows a responder to report the physical medium type of the network interface it is using. The values are published by the Internet Assigned Numbers Authority (IANA) for the ifType object that is defined in MIB-IIs ifTable.Examples of interesting values are: 6=Ethernet71=Wireless 802.11Wireless Mode+-+-+-+|00000100|00000001| Mode |+-+-+-+Type=0x04 Length=1This property allows a responder to identify how its IEEE 802.11 interface connects to the network. Valid values are:0x00 = IBSS or ad hoc mode0x01 = Infrastructure mode0x02 = Automatic mode802.11 BSSID+-+-+-+-+|00000101|00000110| |+-+-+ BSSID | |+-+-+-+-+Type=0x05 Length=6This property allows a responder to identify the media access control (MAC) address of the access point with which its wireless interface is associated.802.11 SSID+-+-+- . . . .|00000110| Length | 8-bit SSID String (variable) .+-+-+- . . . .Type=0x06This property allows a responder to identify the service set identifier (SSID) of the BSS with which its wireless interface associates.Note that the string is not null terminated and is case sensitive. The maximum length of the string is 32 characters.This TLV always complements the existence of the 802.11 BSSID TLV (0x05).IPv4 Address+-+-+-+-+-+-+|00000111|00000100| IPv4 Address |+-+-+-+-+-+-+Type=0x07 Length=4This property allows a responder to report its most relevant IPv4 address, if available. An IPv4 address is considered to be most relevant if it satisfies one of the following conditions, in order of decreasing priority:1.If more than one address is available, the first public address found is the most relevant.2.If more than one address is available, none of which are public, the first address in the list is the most relevant.3.There is only one address from which to choose.IPv6 Address+-+-+-+ . . . . +-+|00001000|00010000| IPv6 Address |+-+-+-+ . . . . +-+Type=0x08 Length=16This property allows a responder to report its most relevant IPv6 address, if available. An IPv6 address is considered to be most relevant if it satisfies one of the following conditions, in order of decreasing priority:1.If more than one address is available, the first global address found is the most relevant.2. If more than one address is available, none of which are global, the first site-local address found is the most relevant.3. If more than one address is available, none of which are global or site-local, the first link-local address found is the most relevant.4. If there is only one address from which to choose or more than one address is available, none of which are global, site local, or link local, the first address found is the most relevant.802.11 Maximum Operational Rate+-+-+-+-+|00001001|00000010| Rate |+-+-+-+-+Type=0x09 Length=2This property allows a responder to identify the maximum data rate at which the radio can run on its 802.11 interface. The data rate is encoded in units of 0.5 megabit per second (Mbps).Performance Counter Frequency+-+-+-+-+-+-+|00001010|00001000| Perf. Counter Frequency (MSB) |+-+-+ +-+-+| Perf. Counter Frequency (LSB) |+-+-+-+-+Type=0x0A Length=8This property allows a responder to identify how fast its timestamp counters run in ticks per second. This information is particularly useful for deciphering results from timed probe and probegap tests in the QoS diagnostics type of service.Link Speed+-+-+-+-+-+-+|00001100|00000100| Link Speed |+-+-+-+-+-+-+Type=0x0C Length=4This property allows a responder to report the maximum speed of its network interface in units of 100 bps.802.11 RSSI+-+-+-+-+-+-+|00001101|00000100| RSSI (signed integer) |+-+-+-+-+-+-+Type=0x0D Length=4This property allows a responder to identify the IEEE 802.11 interfaces received signal strength indication (RSSI) in dBm. The normal range for the RSSI values is -10 through -200.Icon Image+-+-+|00001110|00000000|+-+-+Type=0x0EThis property contains an icon image that represents the host that is running the responder. The data returned here is exactly as it would be represented in a disk file.The only supported icon image format is Windows icon format (ICO). The icon dimension should be at least 48 pixels wide by 48 pixels tall. Icons should also use the built-in transparency support.This is a large TLV.Machine Name+-+-+- . . . .|00001111| Length | UCS-2 String (variable) .+-+-+- . . . .Type=0x0F Max=32This property contains the devices host name.The maximum length of the string is 16 characters or 32 octets.Note that the string is not null terminated.Support Information+-+-+- . . . .|00010000| Length | UCS-2 String (variable) .+-+-+- . . . .Type=0x10 Max=64This property contains the device manufacturers support information (such as telephone number or support URL). Do not use an Internet URL, which may be filtered so that users cannot see it.The maximum length of the string is 32 characters or 64 octets.Note that the string is not null terminated.Friendly Name+-+-+- . . . .|00010001| Length | UCS-2 String (variable) .+-+-+- . . . .Type=0x11 Max=64This property is used only by computer devices. It contains the friendly name or description that is assigned to the computer.The maximum length of the string is 32 characters or 64 octets.Note that the string is not null terminated.Device UUID+-+-+-+-+|00010010|00010000| |+-+-+ +| |+ +| Device UUID |+ +| |+ +-+-+| |+-+-+Type=0x12 Length=16This property returns the UUID of a device that supports UPnP. The device UUID is essentially the same UUID that is found in the
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 幼儿早期阅读活动指导方案
- 艾尔克的灯光技术解析
- 企业资金流分析标准模板
- 网络服务可靠保证承诺书(5篇)
- 仓库物资盘点管理模板规范物资管理
- 小学二年级英语基础语法练习
- 高档茶具购销合同范本
- 销售环保设备合同范本
- 装修酒庄设计合同范本
- 那天的节日事件作文5篇范文
- 体育设备采购项目方案投标文件(技术方案)
- 小学科学家长会课件
- 锂电池生产中的潜在安全风险及其控制措施
- 《中国在全球治理体系中的地位》课件
- 长城汽车公司管理制度
- GB/T 24477-2025适用于残障人员的电梯附加要求
- 部队防失泄密教育课件
- GB/T 45355-2025无压埋地排污、排水用聚乙烯(PE)管道系统
- 医药销售团队工作职责和分工
- 2025年音视频面试题及答案
- 血管壁的一般结构职业教育医学检验专业教学课件
评论
0/150
提交评论