网络分析专家论坛 netexpert's Archiver

softice_debug 发表于 2006-12-25 19:38

组播的网卡mac地址

原来一直以为组播的用的广播的mac地址 FF FF FF FF FF FF
这段时间看windows对tcpip协议的处理。发现收到的包mac是
01-00-5E--00-00-01 有时是  01-00-5E-7F-FF-FA

看来网卡对于 地址 第一字节的 D0=1 网卡是统统接受的。
也是就组播包地址吧

在windows的tcpip协议处理中,也是有判断的[相关程序如下:]
完整的子程序部分在
[url]http://www.netexpert.cn/thread-12652-1-1.html[/url]

0008:F61ADDF6  0FB6467F            MOVZX     EAX,BYTE PTR [ESI+7F] [ESI+7F]=0
0008:F61ADDFA  8A0408              MOV       AL,[ECX+EAX]  ;此处是  [mac地址的第一个字节]
0008:F61ADDFD  22467D              AND       AL,[ESI+7D]   ;为了比较 [ESI+7D]==1
0008:F61ADE00  2A467E              SUB       AL,[ESI+7E]   ;是否是广播  [ESI+7D]==1
0008:F61ADE03  F6D8                NEG       AL            ;地址,或其他
0008:F61ADE05  1BC0                SBB       EAX,EAX       ;特殊地址的包 ;[现在看来是组播包]
0008:F61ADE07  33D2                XOR       EDX,EDX
0008:F61ADE09  40                  INC       EAX
0008:F61ADE0A  39966C010000        CMP       [ESI+0000016C],EDX
0008:F61ADE10  894508              MOV       [EBP+08],EAX
同时通过程序判断,组播地址的位,是可以改变的

[[i] 本帖最后由 softice_debug 于 2006-12-25 19:54 编辑 [/i]]

wawahaha 发表于 2006-12-25 19:58

组播MAC的地址范围01:00:5E:00:00:00 ~ 01:00:5E:7F:FF:FF

scz 发表于 2006-12-26 08:58

你说的是IP组播地址到硬件组播地址的映射范围。

硬件组播地址只有一个要求,第一个字节是奇数。

softice_debug 发表于 2006-12-26 09:50

[quote]原帖由 [i]scz[/i] 于 2006-12-26 08:58 发表
你说的是IP组播地址到硬件组播地址的映射范围。

硬件组播地址只有一个要求,第一个字节是奇数。 [/quote]

也就是对于 硬件地址 第一个字节是奇数的,网卡是接受的。
看程序里面也是可以定义的。
看来 我看到的 01-00-5E- 只是一个特例了。网上找了找也没有
发现相关资料。我当时是推测的
也就 [ESI+7D] [ESI+7E]

lvfengg 发表于 2006-12-26 21:57

[quote]看来 我看到的 01-00-5E- 只是一个特例了。网上找了找也没有
发现相关资料。[/quote]  
见802.3的3.2.3节:
The first bit (LSB) shall be used in the Destination Address field as an address type designation bit to
identify the Destination Address either as an individual or as a group address. If this bit is 0, it shall
indicate that the address field contains an individual address. If this bit is 1, it shall indicate that the
address field contains a group address that identifies none, one or more, or all of the stations con-
nected to the LAN. In the Source Address field, the first bit is reserved and set to 0

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.