Summary of the invention
Therefore, main purpose of the present invention is to provide a kind of method of filtrating program source, makes can realize the Source-Filtered Multicast function stipulated among the IGMP V3 according to the method at the equipment of data link layer.
For achieving the above object, technical scheme of the present invention specifically is achieved in that a kind of method of filtrating program source, comprises following step:
(1) utilize the program source address and the multicast destination address that comprise in user's claim frame dynamically to generate multicast virtual local area network (LAN) (Virtual Local Area Network; VLAN) address and with the tabulation of above-mentioned multicast virtual lan address corresponding port;
(2) search the multicast virtual lan address that above-mentioned mapping generates according to program source address that comprises in the program stream frame and multicast destination address.
In above-mentioned steps (1), generate above-mentioned multicast virtual lan address and with the tabulation of above-mentioned multicast virtual lan address corresponding port after, with the source address that comprises in above-mentioned user's claim frame, multicast destination address, above-mentioned virtual local area network address as the filter list option.In addition, in above-mentioned steps (1), generate above-mentioned multicast virtual lan address and with the tabulation of above-mentioned multicast virtual lan address corresponding port after, above-mentioned virtual local area network address, above-mentioned port list are sent to the multicast table.Also comprise multicast Media Access Control Address (Media Access Control Address in the above-mentioned multicast table; MAC Address) option.
In above-mentioned steps (2), in above-mentioned filter list, the multicast virtual lan address of searching above-mentioned dynamic generation according to program source address that comprises in the program stream frame and multicast destination address also inserts this address or cover relevant position in the program stream.According to the multicast virtual lan address of above-mentioned generation, in above-mentioned multicast table, search and above-mentioned multicast virtual lan address corresponding port, the program stream frame is transmitted to the above-mentioned port that finds.
Technical solution of the present invention also relates to a kind of device of filtrating program source, this device comprises: first module, be used for utilizing program source address that user's claim frame comprises and multicast destination address dynamically generate the multicast virtual lan address and with above-mentioned multicast virtual lan address corresponding port tabulation, with the program source address that comprises in above-mentioned user's claim frame, multicast destination address, multicast virtual lan address as the filter list option; Second module is used for the multicast virtual lan address that the program source address that comprises according to the program stream frame and multicast destination address are searched above-mentioned dynamic generation, and relevant position in the program stream is inserted or covered in this address.
Wherein, described first module generate above-mentioned multicast virtual lan address and with the tabulation of above-mentioned multicast virtual lan address corresponding port after, above-mentioned virtual local area network address, above-mentioned port list are sent to the multicast table.
Wherein, also comprise multicast Media Access Control Address option in the above-mentioned multicast table.
Wherein, described second module is searched in above-mentioned multicast table and above-mentioned multicast virtual lan address corresponding port according to the multicast virtual lan address of above-mentioned generation, and the program stream frame is transmitted to the above-mentioned port that finds.
As seen, the method for a kind of filtrating program source provided by the present invention and device thereof have following advantage and characteristics:
(1) program source address and the destination address of the inventive method user applies that data link layer device can't be discerned are mapped as multicast virtual lan address and corresponding ports tabulation thereof, thereby can be discerned and handle by two-layer equipment.
(2) the inventive method only needs the employed software of two-layer equipment is changed, and need not to change for hardware device, so improvement cost is low, is easy to realize.
Embodiment
Fig. 1 is a up route processing schematic diagram among the service card IU in the embodiment of the invention one.In above-mentioned uplink, from set-top box (SetTop Box; The request of STB) sending is sent to the port of IP digital subscriber line access multiplex IPDSLAM by digital subscriber line DSL.IP digital subscriber line access multiplex IPDSLAM is a data link layer (two a layers) equipment, is responsible for the data of polymerization digital subscriber line DSL, and it is linked into backbone network.And, because IPDSLAM is the equipment of data link layer, it in can read data packet mac address information and carry out exchanges data according to MAC Address.
IPDSLAM comprises at least two parts usually, a part is a main control card, be expressed as CxU herein, another part is a service card, be expressed as IU herein, a plurality of above-mentioned service cards are connected with a main control card, at above-mentioned service card and the inner switching path at a high speed of setting up of main control card, make things convenient for the forwarding of packet.
The frame format of the signal frame that transmits on digital subscriber line DSL comprises purpose medium access control (MediaAccess Control; MAC) address D A field, source MAC sa field, type field, to pay this packet be that IP agreement, IP wrap field and Frame Check Sequence (Frame CheckSequence to the network layer protocol type of data link layer if this field value is 0800 explanation; FCS) field.Comprise IP field and IGMP content field in the IP bag.Contain information such as type field, IP source address field, IP destination address field (DAF) in the IP head, the message that the type field in the IP head indicates transmission is IGMP.Indicated the program source address (SourceIP of user applies in the IGMP content field; SrcIP) and multicast destination address (DestinationIP; DstIP).The program source address SrcIP of user applies can be for a plurality of.
IP digital subscriber line access multiplex IPDSLAM receives the signal frame of digital subscriber line DSL transmission from its above-mentioned port.There is an Internet igmpinternet igmp filtering device (IGMP filter) among the service card IU, this filter is a hardware device, the information such as type field of IP head during it can wrap according to target MAC (Media Access Control) address field, type field, the IP of the above-mentioned signal frame that receives, identifying the above-mentioned IP bag is the bag that contains the IGMP content, and then transfers the IGMP content field in the above-mentioned IP bag to software processes.
The program source address SrcIP of user applies and multicast destination address DstIP are included in the IGMP content field of above-mentioned IP bag, can't read above-mentioned address and be positioned at two layers IPDSLAM equipment from hardware.For this reason, utilize software that program source address SrcIP, the multicast destination address DstIP of above-mentioned user applies read, and these two addresses are shone upon, generate a multicast virtual lan address McastVLAN, and the pairing port list Plist of this multicast virtual lan address McastVLAN.
If when generating above-mentioned mapping table, find that the multicast virtual lan address McastVLAN that generates exists in mapping table, then need not in mapping table, to add above-mentioned multicast virtual lan address McastVLAN, only need to upgrade port list.Do not exist in mapping table if find the multicast virtual lan address McastVLAN that generates, then the multicast virtual lan address McastVLAN that generates is added in the above-mentioned mapping table.
Then, send in the IGMP V3 filter by the multicast virtual lan address McastVLAN of message program source address SrcIP, the multicast destination address DstIP of above-mentioned user applies, above-mentioned generation.Above-mentioned IGMP V3 filter also is a hardware device, but effect is different with aforementioned igmp filtering device, and its main effect is that the virtual local area network address in the program stream is replaced with corresponding M castVLAN.
Through after the above-mentioned processing, the IP bag the signal frame of the digital subscriber line DSL transmission that service card IU will receive from the port of IP digital subscriber line access multiplex IPDSLAM is transmitted to main control card CxU.
Fig. 2 is a descending route processing schematic diagram among the service card IU in the embodiment of the invention one.The processing procedure of program stream is mainly described at down direction.Service card IU receives the signal frame that transmits from main control card CxU, the frame format of this frame comprises target MAC (Media Access Control) address da field, source MAC sa field, type field, and to pay this packet be that IP agreement, IP wrap field and Frame Check Sequence FCS field to the network layer protocol type of data link layer if this field value is 0800 explanation.Comprise IP field and IP content field in the IP bag.Contain information such as type field, IP source address field, IP destination address field (DAF) in the IP head, the type field in the IP head indicates in the message of transmission and contains program stream.The program source address SrcIP and the multicast destination address DstIP that contain user applies in the IP content field.In addition, from the signal frame that main control card CxU transmits, also have a VLAN type field, a VLAN precedence field, the virtual local area network tags VideoProviderVLAN that video is specific.
Service card IU utilizes the program source address SrcIP and the multicast destination address DstIP of the user applies that the IP content field comprises in the signal frame that main control card CxU transmits, in the IGMPV3 filter, table look-up, find a corresponding multicast virtual lan address McastVLAN, and the virtual local area network tags VideoProviderVLAN that above-mentioned video is specific replaces with this corresponding multicast virtual lan address McastVLAN.
Then, in the multicast table in service card IU, search and corresponding port tabulation Plist according to multicast MAC Address and above-mentioned multicast virtual lan address McastVLAN.According to the port numbers among the port list Plist, the above-mentioned frame that main control card IU receives is transmitted to corresponding ports.
Fig. 3 is a up route processing schematic diagram among the service card IU in the embodiment of the invention two.With similar among Fig. 1, service card IU receives the signal frame that transmits on digital subscriber line DSL, the frame format of this frame comprises target MAC (Media Access Control) address da field, source MAC sa field, type field, and to pay this packet be that IP agreement, IP wrap field and Frame Check Sequence FCS field to the network layer protocol type of data link layer if this field value is 0800 explanation.Comprise IP field and IGMP content field in the IP bag.Contain information such as type field, IP source address field, IP destination address field (DAF) in the IP head, the message that the type field in the IP head indicates transmission is IGMP.The program source address SrcIP and the multicast destination address DstIP of user applies have been indicated in the IGMP content field.The program source address SrcIP of user applies can be for a plurality of.
IP digital subscriber line access multiplex IPDSLAM receives the signal frame of digital subscriber line DSL transmission from its above-mentioned port.The information such as type field of IP head during the hardware device igmp filtering device (IGMP filter) that exists among the service card IU can wrap according to target MAC (Media Access Control) address field, type field, the IP of the above-mentioned signal frame that receives, identifying the above-mentioned IP bag is the bag that contains the IGMP content, and then transfers the IGMP content field in the above-mentioned IP bag to software processes.
The program source address SrcIP of user applies and multicast destination address DstIP are included in the IGMP content field of above-mentioned IP bag, can't read above-mentioned address and be positioned at two layers IPDSLAM equipment from hardware.For this reason, utilize software that program source address SrcIP, the multicast destination address DstIP of above-mentioned user applies read, and these two addresses are shone upon, generate a multicast virtual lan address McastVLAN, and the pairing port list Plist of this multicast virtual lan address McastVLAN.
If when generating above-mentioned mapping table, the multicast virtual lan address McastVLAN that find to generate exists in mapping table, then upgrades port list and sends in the multicast table of service card IU by the multicast virtual lan address McastVLAN and the pairing port list Plist of this multicast virtual lan address McastVLAN of message with above-mentioned generation.Except above-mentioned two, also contain the multicast MAC Address in the multicast table.
If when generating above-mentioned mapping table, find that the multicast virtual lan address McastVLAN that generates does not exist in mapping table, then service card IU sends a request to main control card CxU, and request main control card CxU is that this service card IU distributes a corresponding multicast virtual lan address McastVLAN.
After service card IU receives the multicast virtual lan address McastVLAN that above-mentioned main control card CxU sends over, send in the multicast table of service card IU by the multicast virtual lan address McastVLAN and the pairing port list Plist of this multicast virtual lan address McastVLAN of message equally above-mentioned generation.Except above-mentioned two, also contain the multicast MAC Address in the multicast table.
Through after the above-mentioned processing, the IP bag the signal frame of the digital subscriber line DSL transmission that service card IU will receive from the port of IP digital subscriber line access multiplex IPDSLAM is transmitted to main control card CxU.
Fig. 4 is a up route processing schematic diagram among the main control card CxU in the embodiment of the invention two.Main control card CxU receives the signal frame that service card IU sends, the frame format of this frame comprises target MAC (Media Access Control) address da field, source MAC sa field, type field, and to pay this packet be that IP agreement, IP wrap field and Frame Check Sequence FCS field to the network layer protocol type of data link layer if this field value is 0800 explanation.Comprise IP field and IGMP content field in the IP bag.Contain information such as type field, IP source address field, IP destination address field (DAF) in the IP head, the message that the type field in the IP head indicates transmission is IGMP.The program source address SrcIP and the multicast destination address DstIP of user applies have been indicated in the IGMP content field.The program source address SrcIP of user applies can be for a plurality of.
Also there is an igmp filtering device (IGMP filter) among the main control card CxU as hardware device, the effect of the igmp filtering device among its effect and the service card IU is basic identical, promptly according to the information such as type field of IP head in the type field of the above-mentioned signal frame that receives, the IP bag, identifying the above-mentioned IP bag is the bag that contains the IGMP content, and then transfers the IGMP content field in the above-mentioned IP bag to software processes.
Carried a plurality of service card IU below the main control card CxU, the mapping table among the main control card CxU is the set of the mapping table of all service card IU of carrying of this main control card CxU.When main control card CxU received the request of the corresponding multicast virtual lan address McastVLAN of distribution that above-mentioned service card IU sends, main control card CxU can search in its mapping table set.If main control card CxU therefrom (for example, in the mapping table of another one service card IU) the multicast virtual lan address McastVLAN that found the program source address SrcIP, the multicast destination address DstIP that utilize above-mentioned user applies to generate, the request of then this multicast virtual lan address McastVLAN being sent to distributes the above-mentioned service card IU of a multicast virtual lan address McastVLAN.If main control card CxU does not find the program source address SrcIP that utilizes above-mentioned user applies in the mapping table of its all entrained service card IU, the multicast virtual lan address McastVLAN that multicast destination address DstIP generates, then main control card CxU will utilize the program source address SrcIP of above-mentioned user applies, multicast destination address DstIP mapping generates a multicast virtual lan address McastVLAN, will shine upon the above-mentioned service card IU that the multicast virtual lan address McastVLAN that the generates request of sending to distributes a multicast virtual lan address McastVLAN again.
When above-mentioned multicast virtual lan address McastVLAN is sent to the service card IU that asks, the multicast virtual lan address McastVLAN of program source address SrcIP, the multicast destination address DstIP of above-mentioned user applies, above-mentioned generation is sent to the IGMP V3 filter that is arranged in main control card CxU by message.
Through after the above-mentioned processing, main control card CxU will be transmitted to its upper layer device from the bag of the IP the signal frame that service card IU receives.
Fig. 5 is a descending route processing schematic diagram among the main control card CxU in the embodiment of the invention two.Main control card CxU receives the signal frame that transmits from upper layer device, the frame format of above-mentioned frame comprises target MAC (Media Access Control) address da field, source MAC sa field, type field, and to pay this packet be that IP agreement, IP wrap field and Frame Check Sequence FCS field to the network layer protocol type of data link layer if this field value is 0800 explanation.Comprise IP field and IP content field in the IP bag.Contain information such as type field, IP source address field, IP destination address field (DAF) in the IP head, the type field in the IP head indicates in the message of transmission and contains IGMP agreement or program stream.The program source address SrcIP and the multicast destination address DstIP that contain user applies in the IP content field.In addition, also have a VLAN type field, a VLAN precedence field, the virtual local area network tags VideoProviderVLAN that video is specific in the above-mentioned frame.
The information such as type field of IP head in the type field of the above-mentioned signal frame that the igmp filtering device that exists among the main control card CxU (IGMP filter) basis receives, the IP bag, judge whether the above-mentioned IP bag contains the bag of IGMP content, and then transfer the IGMP content field in the above-mentioned IP bag to software processes, send IGMP V3 filter with program stream.
Main control card CxU utilizes the program source address SrcIP and the multicast destination address DstIP of the user applies that the IP content field comprises in the signal frame that upper layer device transmits, in IGMP V3 filter, table look-up, find a corresponding multicast virtual lan address McastVLAN, and the virtual local area network tags VideoProviderVLAN that above-mentioned video is specific replaces with this corresponding multicast virtual lan address McastVLAN.
Through after the above-mentioned processing, main control card CxU will be transmitted to corresponding business card IU from the bag of the IP the signal frame that upper layer device transmits.
Fig. 6 is a descending route processing schematic diagram among the service card IU in the embodiment of the invention two.Service card IU receives the signal frame that transmits from main control card CxU, the frame format of this frame comprises target MAC (Media Access Control) address da field, source MAC sa field, type field, and to pay this packet be that IP agreement, IP wrap field and Frame Check Sequence FCS field to the network layer protocol type of data link layer if this field value is 0800 explanation.Comprise IP field and IP content field in the IP bag.Contain information such as type field, IP source address field, IP destination address field (DAF) in the IP head, the type field in the IP head indicates in the message of transmission whether contain the IGMP agreement.The program source address SrcIP of user applies and multicast destination address DstIP in the IP content field.In addition, from the signal frame that main control card CxU transmits, also have a VLAN type field, a VLAN precedence field, the virtual local area network tags VideoProviderVLAN that video is specific.
In the multicast table in service card IU, service card IU searches and corresponding port tabulation Plist according to multicast MAC Address and above-mentioned multicast virtual lan address McastVLAN.According to the port numbers among the port list Plist, the above-mentioned frame that service card IU receives is transmitted to corresponding ports.
The foregoing description all is the situation that comprises the program source address SrcIP of user applies, can also indicate the situation that does not only comprise program source address SrcIP among the IGMP V3, this moment is just in mapping table, the port numbers that does not contain above-mentioned user in the pairing row of program source address SrcIP, and above-mentioned user's port numbers is contained in other provisional capitals of mapping table.
From the foregoing description as seen, adopt the inventive method, the program source address of the user applies that data link layer (two layers) Device IP DSLAM can't be able to be discerned and destination address are mapped as multicast virtual lan address and corresponding ports tabulation thereof, thereby can be discerned and handle by two-layer equipment.Owing to only need the employed software of two-layer equipment is changed, so improvement cost is low, is easy to realize.