Difference between revisions of "Yocto kernel上支持IGMP协议"

From ESS-WIKI
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div style="white-space: pre-wrap;  line-height: 1.875;  text-align: left;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">1.在内核中添加支持</span></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">make menuconfig</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">Networking sopport-----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 56px;  text-align: left;  font-size: 14px">Networking options -----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 84px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: multicasting</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 112px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: multicast routing</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 140px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: multicasting</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 168px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: PIM-SM version 1 support</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 168px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: PIM-SM version 2 support<br/></div><div>[[File:111111.png|RTENOTITLE]]<br/></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">Networking sopport-----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 56px;  text-align: left;  font-size: 14px">Networking options -----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 84px;  text-align: left;  font-size: 14px">[*]802.1d Ethernet Bridging</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 112px;  text-align: left;  font-size: 14px">[*]IGMP/MLD Bridging</div><div>[[File:222222.png|RTENOTITLE]]<br/></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-align: left;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">2.切换IGMP的版本号</span></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">[1]查看当前内核IGMP的版本号</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#cat&nbsp;/proc/sys/net/ipv4/conf/eth0/force_igmp_version</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#0</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">0 表示最高有效版本号,目前默认最高版本是V3。</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 28px;  font-size: 14px">[2]更改版本号</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#echo&nbsp;"2"&nbsp;>&nbsp;/proc/sys/net/ipv4/conf/eth0/force_igmp_version</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#cat&nbsp;/proc/sys/net/ipv4/conf/eth0/force_igmp_version</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#2</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">3.使用QTDEMO发包测试</span></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[1]测试demo链接:[http://pan.baidu.com/s/1i4Y4aVj http://pan.baidu.com/s/1i4Y4aVj] 密码:bzq2</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[2]配置本地ip进行发包</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">4.使用Wireshark进行抓包测试</span></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[1]安装工具[http://sw.bos.baidu.com/sw-search-sp/software/22b4fb6405f49/Wireshark_win32_2.2.1.0.exe 链接]<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[2]将board PC 通过交换机连成局域网。</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[3]开始抓包<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[4]抓到如下包时说明IGMP功能以实现。<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px"><br/></div><div>[[File:3333333.png|RTENOTITLE]]<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div>
+
<span style="color: rgb(51, 51, 51);  font-family: arial, 宋体, sans-serif;  font-size: 14px;  font-style: normal;  font-variant: normal;  font-weight: normal;  letter-spacing: normal;  line-height: 24px;  orphans: auto;  text-align: start;  text-indent: 28px;  text-transform: none;  white-space: normal;  widows: 1;  word-spacing: 0px;  -webkit-text-stroke-width: 0px;  display: inline !important;  float: none;  background-color: rgb(255, 255, 255)">Internet 组管理协议称为IGMP协议(Internet Group Management Protocol),是因特网协议家族中的一个组播协议。</span>
 +
 
 +
<span style="color: rgb(51, 51, 51);  font-family: arial, 宋体, sans-serif;  font-size: 14px;  font-style: normal;  font-variant: normal;  font-weight: normal;  letter-spacing: normal;  line-height: 24px;  orphans: auto;  text-align: start;  text-indent: 28px;  text-transform: none;  white-space: normal;  widows: 1;  word-spacing: 0px;  -webkit-text-stroke-width: 0px;  display: inline !important;  float: none;  background-color: rgb(255, 255, 255)">该协议运行在主机和组播路由器之间。IGMP协议共有三个版本,即IGMPv1、v2 和v3。</span> &nbsp;
 +
<div style="white-space: pre-wrap;  line-height: 1.875;  text-align: left;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">1.在内核中添加支持</span><br/></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">make menuconfig</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">Networking sopport-----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 56px;  text-align: left;  font-size: 14px">Networking options -----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 84px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: multicasting</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 112px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: multicast routing</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 140px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: multicasting</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 168px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: PIM-SM version 1 support</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 168px;  text-align: left;  font-size: 14px">[*] IP&nbsp;: PIM-SM version 2 support<br/></div><div>[[File:111111.png|RTENOTITLE]]<br/></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">Networking sopport-----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 56px;  text-align: left;  font-size: 14px">Networking options -----></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 84px;  text-align: left;  font-size: 14px">[*]802.1d Ethernet Bridging</div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 112px;  text-align: left;  font-size: 14px">[*]IGMP/MLD Bridging</div><div>[[File:222222.png|RTENOTITLE]]<br/></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-align: left;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">2.切换IGMP的版本号</span></div><div style="white-space: pre-wrap;  line-height: 1.875;  text-indent: 28px;  text-align: left;  font-size: 14px">[1]查看当前内核IGMP的版本号</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#cat&nbsp;/proc/sys/net/ipv4/conf/eth0/force_igmp_version</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#0</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">0 表示最高有效版本号,目前默认最高版本是V3。</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 28px;  font-size: 14px">[2]更改版本号</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#echo&nbsp;"2"&nbsp;>&nbsp;/proc/sys/net/ipv4/conf/eth0/force_igmp_version</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#cat&nbsp;/proc/sys/net/ipv4/conf/eth0/force_igmp_version</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">#2</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">3.使用QTDEMO发包测试</span></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[1]测试demo[http://pan.baidu.com/s/1kVGzqLp 链接]<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[2]配置本地ip进行发包</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><span style="font-size:16px;  font-weight:bold">4.使用Wireshark进行抓包测试</span></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[1]安装工具[http://sw.bos.baidu.com/sw-search-sp/software/22b4fb6405f49/Wireshark_win32_2.2.1.0.exe 链接]<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[2]将board PC 通过交换机连成局域网。</div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[3]开始抓包<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px">[4]抓到如下包时说明IGMP功能以实现。<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  text-indent: 56px;  font-size: 14px"><br/></div><div>[[File:3333333.png|RTENOTITLE]]<br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div><div style="white-space: pre-wrap;  text-align: left;  line-height: 1.5;  font-size: 14px"><br/></div>

Latest revision as of 08:42, 1 December 2016

Internet 组管理协议称为IGMP协议(Internet Group Management Protocol),是因特网协议家族中的一个组播协议。

该协议运行在主机和组播路由器之间。IGMP协议共有三个版本,即IGMPv1、v2 和v3。  

1.在内核中添加支持
make menuconfig
Networking sopport----->
Networking options ----->
[*] IP : multicasting
[*] IP : multicast routing
[*] IP : multicasting
[*] IP : PIM-SM version 1 support
[*] IP : PIM-SM version 2 support
RTENOTITLE
Networking sopport----->
Networking options ----->
[*]802.1d Ethernet Bridging
[*]IGMP/MLD Bridging
RTENOTITLE
2.切换IGMP的版本号
[1]查看当前内核IGMP的版本号
#cat /proc/sys/net/ipv4/conf/eth0/force_igmp_version
#0
0 表示最高有效版本号,目前默认最高版本是V3。
[2]更改版本号
#echo "2" > /proc/sys/net/ipv4/conf/eth0/force_igmp_version
#cat /proc/sys/net/ipv4/conf/eth0/force_igmp_version
#2
3.使用QTDEMO发包测试
[1]测试demo链接
[2]配置本地ip进行发包
4.使用Wireshark进行抓包测试
[1]安装工具链接
[2]将board PC 通过交换机连成局域网。
[3]开始抓包
[4]抓到如下包时说明IGMP功能以实现。

RTENOTITLE