Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making all other embodiment that obtain under the creative work prerequisite.
The method that one embodiment of the invention provides a kind of foundation to act on behalf of member database is used for network and has moved in IGMP Snooping and the IGMP Proxy Layer 2 switch, and network connection as shown in Figure 1.Switch second line of a couplet port connects each user's main frame, and first line of a couplet port links to each other with each multicast source by multicast router, moves IGMP Snooping and IGMP Proxy in the switch simultaneously.Switch operation IGMP snooping is used for the group record according to each second line of a couplet port, calculates the member of vlan's list item for forward multicast packets; Operation IGMP Proxy is used for setting up IGMP snooping and acts on behalf of member database, act on behalf of the report of member database content feed multicast router member relation according to IGMP snooping, perhaps when IGMP snooping acts on behalf of the member database renewal, initiatively send report to multicast router.As shown in Figure 2, described method comprises:
101, switch determines to act on behalf of group record in the member database according to virtual LAN VLAN member list item.
Wherein, member of vlan's list item is by behind the switch operation IGMP snooping, calculates according to the group record of each second line of a couplet port.Because member of vlan's list item that various computational methods obtain is identical, so do not limit the computational methods of selecting for use in the embodiment of the invention.Member of vlan's list item comprises source IP address, group IP address and forwarding port list, and wherein, group IP address is the IP address of multicast group, and available G represents; Source IP address is the IP address of each multicast source in the multicast group for this reason, and source IP address can be zero IP address, when being illustrated in multicast data forwarding, to this list item source IP address that do not match, only mating the group IP address of this list item and transmits port list; Transmit port and represent to receive on the switch second line of a couplet port of multicast source packet in this multicast group, transmit port list and can be sky.In member of vlan's list item, when source IP address is zero IP address, can be expressed as (*, G) list item; When the non-vanishing IP of source IP address address, can be expressed as that (therefore, member of vlan's list item has four kinds for S, G) list item: (*, G have the forwarding port), (*, G do not transmit port), (S, G have the forwarding port), (S, G do not transmit port).
Need to prove, acting on behalf of member database is made up of the group record of several multicast group, the group address of each multicast group is different, the group record comprises filtered model and source tabulation, wherein filtered model comprises include pattern and exclude pattern, the include pattern is to explicitly call for reception from the multicast packet of the multicast source of listing in the tabulation of source, the exclude pattern is to explicitly call for refusal from the multicast packet of the multicast source of listing in the tabulation of source, and a multicast group can only be in a kind of filtered model.
In embodiments of the present invention, switch is member of vlan's list item of zero IP address according to source IP address in the member of vlan's list item that belongs to same multicast group, determines to act on behalf of the filtered model of the group record of this multicast group in the member database; Member of vlan's list item according to the non-vanishing IP of source IP address address in the member of vlan's list item that belongs to same multicast group, determine to act on behalf of the source tabulation of the group record of this multicast group in the member database, wherein, the member of vlan's list item that belongs to same multicast group is the identical member of vlan's list item in group IP address, and the concrete process of determining is as follows:
Be sky if described source IP address is the forwarding port list of member of vlan's list item of zero IP address, determine that the filtered model of described group of record is the include pattern; Be not sky if described source IP address is the forwarding port list of member of vlan's list item of zero IP address, determine that the filtered model of described group of record is the exclude pattern;
When the filtered model of the described group of record of determining is the include pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is not empty, then described source IP address is added in the tabulation of described source, form the tabulation of described source;
When the filtered model of the described group of record of determining is the exclude pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is empty, then described source IP address is added in the tabulation of described source, form the tabulation of described source;
When the filtered model of the described group of record of determining is the include pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is empty, then refuse described source IP address is added in the tabulation of described source;
When the filtered model of the described group of record of determining is the exclude pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is not empty, then refuse described source IP address is added in the tabulation of described source.
102, switch use group record is set up and is acted on behalf of member database.
Wherein, afterstep 101 had determined that the group of each multicast group records content, switch was set up IGMP snooping according to the content of each group record and is acted on behalf of member database.
Need to prove, in embodiments of the present invention, only receive the query message of multicast router and multicast group when upgrading at switch, just can carry out the process that IGMP snooping acts on behalf of member database of setting up.It is a virtual database that the IGMP snooping that sets up acts on behalf of member database, to act on behalf of the data structure of member database identical for storage IGMP snooping in the data structure of member of vlan's list item and the prior art, switch is according to the member of vlan's list item that has existed, set up IGMP snooping and act on behalf of member database, do not need its storage, can directly act on behalf of the member database content according to IGMP snooping the member relation report is fed back to multicast router.
When switch calculates IGMP snooping and acts on behalf of member database according to the group of second line of a couplet port record in the prior art, need to increase layer proxy member database structure storage result of calculation, the member relation that calculates could be fed back to multicast router.Compared with prior art, member of vlan's list item that switch has calculated according to IGMP snooping in the embodiment of the invention, set up IGMP snooping and act on behalf of member database, to act on behalf of the data structure of member database identical for storage IGMP snooping in the data structure of member of vlan's list item and the prior art, the IGMP snooping that sets up acts on behalf of member database and need not storage, switch can directly be acted on behalf of the member database content according to IGMP snooping the member relation report is fed back to multicast router, so system need not additionally to use a layer data structures.Solved in the prior art, the IGMP snooping that need additionally use a layer data structures to store calculating acts on behalf of the problem of member database.By solving the problems of the technologies described above, can reduce the data structure of system, reduce the complexity of system.
The method that further embodiment of this invention provides a kind of foundation to act on behalf of member database, network connection are as shown in Figure 3.Switch second line of a couplet port A, B and C are connected the main frame of user A, B and C respectively, and first line of a couplet port links to each other with each multicast source by multicast router, moves IGMP Snooping and IGMP Proxy in the switch simultaneously.Two legal multicast sources are arranged: multicast source 1 and multicast source 2, the address is respectively 192.168.36.31 and 192.168.36.32, an illegal multicast source: multicast source 3, address are 192.168.37.11, and three multicast sources all send multicast packet to multicast group 224.1.1.12.Pass through multicast router, the multicast packet of three multicast sources is all from also entering switch from the last connecting port of switch, the state of this moment is: user A receives only the multicast packet from multicast source 192.168.36.31, and user B rejection is from the multicast packet of multicast source 192.168.36.32.Switch operation IGMP snooping is used for the group record according to each second line of a couplet port, calculates the member of vlan's list item for forward multicast packets; Operation IGMP Proxy is used for setting up IGMP snooping and acts on behalf of member database, act on behalf of the report of member database content feed multicast router member relation according to IGMP snooping, perhaps when IGMP snooping acts on behalf of the member database renewal, initiatively send report to multicast router.As shown in Figure 4, described method comprises:
201, switch is the filtered model that member of vlan's list item of zero IP address determines to act on behalf of the group record of this multicast group in the member database according to source IP address in member of vlan's list item.
Need to prove, switch has calculated the member of vlan's list item that is used for forward multicast packets under current state, wherein group address is that the content of the list item of 224.1.1.12 is: source IP address is that member of vlan's list item of zero IP address is (*, 224.1.1.12, transmit port-for-port B); Member of vlan's list item of the non-vanishing IP of source IP address address is (192.168.36.31,224.1.1.12 transmit port-for-port A and port B) and (it is empty transmitting port for 192.168.36.32,224.1.1.12).
Wherein, switch calculates IGMP snooping according to the content of above-mentioned list item and acts on behalf of in the member database, and group address is the filtered model of the group record of 224.1.1.12.By source IP address in member of vlan's list item be zero IP address contents in table as can be known, under this state source IP address be the forwarding port list of member of vlan's list item of zero IP address for empty, be that the filtered model of the group record of 224.1.1.12 is the exclude pattern so can determine group address.
202, switch determines to act on behalf of the source tabulation of the group record of this multicast group in the member database according to member of vlan's list item of the non-vanishing IP of source IP address address in member of vlan's list item.
Need to prove, when the filtered model of the group record of determining is the exclude pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of source IP address address is empty, then source IP address is added in the source tabulation of group record of this multicast group to the tabulation of formation source; If the forwarding port list of member of vlan's list item of the non-vanishing IP of source IP address address is not empty, then refuse source IP address is added in the source tabulation of group record of this multicast group.
In embodiments of the present invention,step 201 has determined that group address is that the filtered model of the group record of 224.1.1.12 is the exclude pattern, be the list item of zero IP address according to article one source IP address in member of vlan's list item: (192.168.36.31,224.1.1.12, transmit port-for-port A and port B), the forwarding port list that is member of vlan's list item of the non-vanishing IP of source IP address address is not sky, so 192.168.36.31 can not add in the source tabulation of group record; Be the list item of zero IP address according to second source IP address in member of vlan's list item: (192.168.36.32,224.1.1.12, it is empty transmitting port), the forwarding port list that is member of vlan's list item of the non-vanishing IP of source IP address address is sky, so 192.168.36.32 need add in the source tabulation of group record.
203, switch use group record is set up and is acted on behalf of member database.
Wherein, afterstep 201 and 202 had determined that multicast group address is the group record content of 224.1.1.12, switch was set up IGMP snooping according to the content of group record and is acted on behalf of member database.
In embodiments of the present invention, only there is a multicast group, so acting on behalf of, the IGMP snooping that sets up has only a group record in the member database, generally can there be a plurality of multicast group in the network, so the IGMP snooping that sets up acts on behalf of and has a plurality of groups of records in the member database, the method of determining each group record is identical withstep 201 and 202, does not repeat them here.
Need to prove, in embodiments of the present invention, only receive the query message of multicast router and multicast group when upgrading at switch, just can carry out the process that IGMP snooping acts on behalf of member database of setting up.It is a virtual database that the IGMP snooping that sets up acts on behalf of member database, to act on behalf of the data structure of member database identical for storage IGMP snooping in the data structure of member of vlan's list item and the prior art, switch is according to the member of vlan's list item that has existed, set up IGMP snooping and act on behalf of member database, do not need its storage, can directly act on behalf of the member database content according to IGMP snooping the member relation report is fed back to multicast router.
When switch calculates IGMP snooping and acts on behalf of member database according to the group of second line of a couplet port record in the prior art, need to increase layer proxy member database structure storage result of calculation, the member relation that calculates could be fed back to multicast router.Compared with prior art, member of vlan's list item that switch has calculated according to IGMP snooping in the embodiment of the invention, set up IGMP snooping and act on behalf of member database, to act on behalf of the data structure of member database identical for storage IGMP snooping in the data structure of member of vlan's list item and the prior art, the IGMP snooping that sets up acts on behalf of member database and need not storage, switch can directly be acted on behalf of the member database content according to IGMP snooping the member relation report is fed back to multicast router, so system need not additionally to use a layer data structures.Solved in the prior art, the IGMP snooping that need additionally use a layer data structures to store calculating acts on behalf of the problem of member database.By solving the problems of the technologies described above, can reduce the data structure of switch system, reduce the complexity of system.
Thedevice 30 that further embodiment of this invention provides a kind of foundation to act on behalf of member database, as shown in Figure 5, describeddevice 30 comprises:
Determiningunit 31 is for the group record of determining to act on behalf of member database according to virtual LAN VLAN member list item;
Set upunit 32, be used for using described group of record to set up the described member database of acting on behalf of.
Wherein, described member of vlan's list item comprises source network protocol IP address, group IP address and transmits port list; Described group of record comprises filtered model and source tabulation, and described filtered model comprises include pattern and the refusal exclude pattern of receiving.
Further, as shown in Figure 6, described determiningunit 31 can also comprise:
First determinessubelement 311, determines the filtered model of described group of record for the member of vlan's list item that according to the member of vlan's list item source IP address that belongs to same multicast group is zero IP address;
Second determinessubelement 312, be used for determining according to the member of vlan's list item that belongs to the non-vanishing IP of the member of vlan's list item source IP address address of same multicast group the source tabulation of described group of record, the described member of vlan's list item that belongs to same multicast group is described group of member of vlan's list item that the IP address is identical.
Further, described first determines thatsubelement 311 specifically is used for:
Be sky if described source IP address is the forwarding port list of member of vlan's list item of zero IP address, determine that the filtered model of described group of record is the include pattern; Be not sky if described source IP address is the forwarding port list of member of vlan's list item of zero IP address, determine that the filtered model of described group of record is the exclude pattern.
Further, described second determines thatsubelement 312 specifically is used for:
When described first determines that thesubelement 311 described group of definite filtered models that record are the include pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is not empty, then described source IP address is added in the tabulation of described source, form the tabulation of described source; When described first determines that thesubelement 311 described group of definite filtered models that record are the exclude pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is empty, then described source IP address is added in the tabulation of described source, form the tabulation of described source.
Further, described second determines thatsubelement 312 specifically also is used for:
When described first determines that thesubelement 311 described group of definite filtered models that record are the include pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is empty, then refuse described source IP address is added in the tabulation of described source; When described first determines that thesubelement 311 described group of definite filtered models that record are the exclude pattern, if the forwarding port list of member of vlan's list item of the non-vanishing IP of described source IP address address is not empty, then refuse described source IP address is added in the tabulation of described source.
Need to prove, in embodiments of the present invention, only receive the query message of multicast router and multicast group when upgrading atdevice 30, just can carry out the process that IGMP snooping acts on behalf of member database of setting up.It is a virtual database that the IGMP snooping that sets up acts on behalf of member database, to act on behalf of the data structure of member database identical for storage IGMP snooping in the data structure of member of vlan's list item and the prior art,device 30 is according to the member of vlan's list item that has existed, set up IGMP snooping and act on behalf of member database, do not need its storage, can directly act on behalf of the member database content according to IGMP snooping the member relation report is fed back to multicast router.
Whendevice 30 calculates IGMP snooping and acts on behalf of member database according to the groups of second line of a couplet port record in the prior art, need to increase layer proxy member database structure storage result of calculation, the member relation that calculates could be fed back to multicast router.Compared with prior art, member of vlan's list item thatdevice 30 has calculated according to IGMP snooping in the embodiment of the invention, set up IGMP snooping and act on behalf of member database, to act on behalf of the data structure of member database identical for storage IGMP snooping in the data structure of member of vlan's list item and the prior art, the IGMP snooping that sets up acts on behalf of member database and need not storage,device 30 can directly be acted on behalf of the member database content according to IGMP snooping the member relation report is fed back to multicast router, so system need not additionally to use a layer data structures.Solved in the prior art, the IGMP snooping that need additionally use a layer data structures to store calculating acts on behalf of the problem of member database.By solving the problems of the technologies described above, can reduce the data structure ofdevice 30 systems, reduce the complexity of system.
The device of member database is acted on behalf of in a kind of foundation that the embodiment of the invention provides, and the above-mentioned method embodiment that provides can be provided, concrete function realizes seeing also the explanation among the method embodiment, does not repeat them here.Method and device that member database is acted on behalf of in a kind of foundation that the embodiment of the invention provides have gone for moving the Layer 2 switch of IGMP Snooping, but are not limited only to this.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.