首页 IP与组播MAC地址映射关系

IP与组播MAC地址映射关系

举报
开通vip

IP与组播MAC地址映射关系IP与组播MAC地址映射关系 IP与组播MAC地址映射关系2010-04-20 09:12Map Multicast MAC address to IP Multicast Addresses In the course of reading through the BSCI authorize self-study guide,I've come across amulticast example where the author talks about the concepts behind the mul...

IP与组播MAC地址映射关系
IP与组播MAC地址映射关系 IP与组播MAC地址映射关系2010-04-20 09:12Map Multicast MAC address to IP Multicast Addresses In the course of reading through the BSCI authorize self-study guide,I've come across amulticast example where the author talks about the concepts behind the multicast IP to MAC address mapping. In order to achieve the translation between aLayer 3IP multicast address and Layer 2multicast MAC address,the low-order 23 bits of the IP address(Layer 3)is mapped into the low-order 23 bits of the MAC address(Layer 2).The high order 4bits of the Layer 3IP address is fixed to 1110to indicate the Class Daddress space between 224.0.0.0 through 239.255.255.255 Ethernet MAC addresses start with 01:00: 5E,allowing for arange from 01:00:5E:00:00:00through 01:00:5E: 7F:FF:FF.With 32 total bits present in an IP address and 4high order bits of it set at 1110,we are left with 28 bits of unique IP addresses we can use(32-4=28).But remember,23 low-order bits out of the 28 available bits are mapped to the MAC address,giving us 5r emaining bits of overlap.With the 5bits of extra overlap,there are 32(25=32)IP multicast address that map to one MAC multicast address.The problem is,the book does not explain or show how it solved the mapping.So Iwent about researching how it was done.If you happened to be studying for BSCI,I am referring to the section of the BSCI:Authorized Self-Study Guide,by Teare and Paquet,that starts on page 598– 600. The following is an example of how we arrive with those 32 IP addresses that map to asingle MAC address: For reference,use the following conversion chart for converting hex to binary and vice versa Let's start by using the example MAC address given in the book: 01:00:5e:0a:00:01 Convert the hexadecimal MAC address 01:00: 5e:0a:00:01to binary 0000 0001:0000 0000:0101 1110:0000 1010: 0000 0000:0000 001Here's abreakdown of the conversion bit by bit: Isolate the 23 low-order binary bits from the converted MAC address: 0000 0001:0000 0000:0101 1110:0000 1010:0000 0000:000 00001Take the low order 23 bits from step 2and plug it into the low-order 23 bits of the IP address(do this in binary): x000 1010:0000 0000:0000 0000 1110-First 4high-order 1110 xxxx: bits of the IP address for the multicast address space(224.x.x.x).xxxx x-5 remaining bits after the 23bits of the IP address is mapped to the MAC address plus the 4high order bits 1110.This is equal to 32 total IP addresses.Convert the binary equivalent of the IP addresses to decimal,replacing the xvariables with all the values to get all 32 possible IP addresses: 111000000000 1010:0000 0000:0000 0001=224.10.0.1111000010000 1010:0000 0000:0000 0001=225.10.0.1111000100000 1010:0000 0000: 0000 0001=226.10.0.1111000110000 1010:0000 0000:0000 0001=227.10.0.1111001000000 1010:0000 0000:0000 0001=228.10.0.1111001010000 1010:0000 0000:0000 0001=229.10.0.1111001100000 1010:0000 0000:0000 0001=230.10.0.1111001110000 1010:0000 0000:0000 0001=231.10.0.1111010000000 1010:0000 0000:00 00 0001=232.10.0.1111010010000 1010:0000 0000:0000 0001=233.10.0.1111010100000 1010:0000 0000:0000 0001=234.10.0.1111010110000 1010:0000 0000:0000 0001=235.10.0.1111011000000 1010:0000 0000:0000 0001=236.10.0.1111011010000 1010:0000 0000:0000 0001=237.10.0.1111011100000 1010:0000 0000:0000 0001=238.10.0.1111011110000 1010:0000 0000:0000 0001=239.10.0.1111000001000 1010:0000 0000:0000 0001=224.10.0.1111000011000 1010:0000 0000:0000 0001=225.138.0.1111000101000 1010:0000 0000:0000 0001=226.138.0.1111000111000 1010:0000 0000:0000 0001=227.138.0.1111001001000 1010:0000 0000:0000 0001=228.138.0.1111001011000 1010:0000 0000:0000 0001=229.138.0.1111001101000 1010:0000 0000:0000 0001=230.138.0.1111001111000 1010:0000 0000:0000 0000 0000:0000 0001=231.138.0.1111010001000 1010: 0001=232.138.0.1111010011000 1010:0000 0000:0000 0001=233.138.0.1111010101000 1010:0000 0000:0000 0001=234.138.0.1111010111000 1010:0000 0000:0000 0001=235.138.0.1111011001000 1010:0000 0000:0000 0001=236.138.0.1111011011000 1010:0000 0000:0000 0001=237.138.0.1111011101000 1010:0000 0000:0000 0001=238.138.0.1111011111000 1010:0000 0000:0000 0001=239.138.0.1 All the 32 IP addresses on step 4map to MAC address 01:00:5e:0a: 00:01Convert IP Multicast Address to Multicast MAC Address Conversely,a multicast IP address can be converted to its equivalent MAC address.Once you've figured out how to convert from Layer 2MAC to Layer 3IP,doing the reverse is easy. To start,we can pick any address from the 32 IP addresses we converted above.Let's pick arandom one like 227.138.0.1 First convert the address 227.138.0.1 to binary: 11100011:10001010 00000000 00000001 We're only concerned with the red colored portion which represents the low-order 23bits of the IP address.Notice that we are dropping the high order bit of the second octet.Convert those 23 bits to hexadecimal: 0A:00:01We already know that the first 3-bytes(24 bits)of the MAC address is 01:00:5E.This was established earlier in the article.Simply append the result on step 2to the first 3-bytes and you have your MAC address: 01:00:5E:0A:00:01*You can pick any of the 32 Ip addresses we have on the list above and you will always get 01:00:5E:0A:00: 01as your MAC address following the steps just mentioned.To summarize: 1st octet– Notice that the first octet is left alone.2nd octet– You only need to convert the last 7bits to hex.The second octet in decimal is 138.But if you drop the highest order bit,it becomes adecimal 10 or hex 0A.3rd octet– Convert it directly to hex.4th octet– Convert it directly to hex.
本文档为【IP与组播MAC地址映射关系】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_731942
暂无简介~
格式:doc
大小:22KB
软件:Word
页数:5
分类:生活休闲
上传时间:2017-12-10
浏览量:19