Summary of the invention
The object of the present invention is to provide a kind of multicast flow forwarding method and equipment thereof and system, to avoid in the existing multicast data flow repeating process the unnecessary multicast phenomenon that floods, for this reason, the present invention adopts following technical scheme:
A kind of multicast flow forwarding method, be applied to include the network of VM, EC, VC, two-layer equipment and three-layer equipment, wherein, the last registration of VM has the gateway router address of EC, enable the IGMPSnopping agreement on the two-layer equipment, and enable the unknown multicast broadcast capability two layers of switching network overall situation, and enable GVRP at two layers of switching network at EC place, this method comprises:
After VM receives the request of VC program request EC multicast data flow, notify described EC to send multicast data flow, described EC uses M-VLAN to send multicast data flow according to described notice, and sends the GVRP logon message to state described M-VLAN;
Described VM judges that whether described VC and described EC are at the same network segment; If the judgment is Yes, then notify described VC to send the GVRP logon message, so that the multicast data flow of described EC arrives described VC through described M-VLAN; If the judgment is No, then be registered to gateway router address among the described VM according to described EC, notice respective gateway router sends the GVRP logon message so that the multicast data flow of described EC arrives described gateway router through described M-VLAN, then through three layers of multicast path by reaching described VC.
In the said method, the port that connects the two-layer equipment of gateway router or VC is set to hybrid interface, and allows all VLAN messages to pass through, wherein, M-VLAN acquiescence for dynamic registration uses the untag mode to pass through, and other interfaces use the Trunk mode to pass through.
In the said method, also comprise:
After described VM receives the request of the video flowing that stops the described EC of program request that described VC sends, if judge that described VC and described EC at the same network segment, then notify described VC use GVRP to nullify described M-VLAN;
If described VM judges that described VC and described EC be not at the same network segment, and do not exist other VC live telecasts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC though there are other VC live telecasts, but this every other VC all with this EC at the same network segment, then notify the gateway router of described EC to use GVRP to nullify described M-VLAN.
In the said method, also comprise: do not exist other VC to have access to the video flowing of described EC if described VM judges, then notify described EC to use GVRP to nullify described M-VLAN in live telecast.
A kind of VM equipment, be applied to include the network of VM, EC, VC, two-layer equipment and three-layer equipment, wherein, described VM goes up the gateway router address that registration has EC, enable the IGMPSnopping agreement on the two-layer equipment, and enable the unknown multicast broadcast capability two layers of switching network overall situation, and on two layers of switching network at EC place, enabling GVRP, this VM comprises:
Interface module is used to receive the request of the multicast data flow of VC program request EC;
Judge module is used for the described request that receives according to described interface module, judges that whether described VC and described EC are at the same network segment;
Notification module is used for after described interface module receives described request, notifies described EC to send multicast data flow, so that described EC uses M-VLAN to send multicast data flow according to this notice and states described M-VLAN; And, be judged as when being at described judge module, notify described VC to send the GVRP logon message, so that the multicast data flow of described EC arrives described VC through described M-VLAN; When described judge module is judged as not, be registered to gateway router address among this VM according to described EC, notice respective gateway router sends the GVRP logon message, so that the multicast data flow of described EC arrives described gateway router through described M-VLAN, then through three layers of multicast path by reaching described VC.
In the above-mentioned VM equipment, described interface module also is used for, and receives the request of the video flowing that stops the described EC of program request of described VC transmission;
Described judge module also is used for, receive the request of the video flowing that stops the described EC of program request that described VC sends in described interface module after, judge that whether described VC and described EC are at the same network segment, and when being judged as not, judge whether to exist other VC live telecasts to have access to the video flowing of described EC, and judge also when existing that whether described other VC and this EC are at the same network segment being judged as;
Described notification module also is used for, if described judge module is judged described VC and described EC at the same network segment, then notifies described VC to use GVRP to nullify described M-VLAN; If described judge module judges that described VC and described EC be not at the same network segment, and do not exist other VC live telecasts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC though there are other VC live telecasts, but this every other VC all with this EC at the same network segment, then notify the gateway router of described EC to use GVRP to nullify described M-VLAN.
In the above-mentioned VM equipment, described notification module also is used for, and judges at described judge module not exist other VC when the video flowing of described EC is had access in live telecast, notifies described EC to use GVRP to nullify described M-VLAN.
A kind of video monitoring system comprises VM, EC, VC, two-layer equipment and three-layer equipment, wherein:
The last registration of VM has the gateway router address of EC, and described VM is used for after the request that receives VC program request EC multicast data flow, notifies described EC to send multicast data flow; And, judge that whether described VC and described EC are at the same network segment; If the judgment is Yes, then notify described VC statement to send the GVRP logon message; If the judgment is No, then be registered to gateway router address among the described VM according to described EC, notice respective gateway router sends the GVRP logon message;
Described EC is used for the notice according to described transmission multicast data flow, uses M-VLAN to send multicast data flow, and states described M-VLAN;
Described VC is used for the notice according to described statement adding M-VLAN, and described M-VLAN is dynamically stated;
Described gateway router is used for the notice according to described statement adding M-VLAN, uses the described M-VLAN of GVRP message statement registration;
Enable IGMP Snopping agreement on the described two-layer equipment, and enable the unknown multicast broadcast capability, on the two-layer equipment that connects EC, enable GVRP; Described two-layer equipment is used for transmitting according to described M-VLAN the multicast data flow of described EC;
Described three-layer equipment is used to use three layers of Routing Protocol to transmit the multicast data flow of described EC.
In the above-mentioned video monitoring system, described EC specifically is used for, and after receiving the statement of described EC to described M-VLAN, the port that receives this statement inbound port of multicast data flow on this two-layer equipment as described EC is joined in the described M-VLAN; After receiving the statement of described VC, the port that receives this statement outbound port of multicast data flow on this two-layer equipment as described EC joined in the described M-VLAN described M-VLAN; Receiving after described gateway router registers the statement of described M-VLAN, the port that receives this statement outbound port of multicast data flow on this two-layer equipment as described EC joined in the described M-VLAN.
In the above-mentioned video monitoring system, the port that connects the two-layer equipment of gateway router or VC is set to hybrid interface, and allows all VLAN messages to pass through, wherein, M-VLAN acquiescence for dynamic registration uses the untag mode to pass through, and other interfaces use the Trunk mode to pass through.
In the above-mentioned video monitoring system, described VM also is used for, and after the request of the video flowing that stops the described EC of program request that receives described VC transmission, if judge described VC and described EC at the same network segment, then notifies described VC to use GVRP to nullify described M-VLAN; If described VM judges that described VC and described EC be not at the same network segment, and do not exist other VC live telecasts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC though there are other VC live telecasts, but this every other VC all with this EC at the same network segment, then notify the gateway router of described EC to use GVRP to nullify described M-VLAN.
In the above-mentioned video monitoring system, described VM also is used for, and does not exist other VC to have access to the video flowing of described EC in live telecast if described VM judges, then notifies described EC to use GVRP to nullify described M-VLAN.
Useful technique effect of the present invention comprises:
At VC and EC situation at the same network segment, VM carries out dynamic multicast VLAN statement by notice EC and notice VC carries out dynamic multicast VLAN statement, can set up the passage from EC to VC, multicast data flow can be forwarded to VC from multicast source along this passage, compared with prior art, avoid unnecessary multicast to flood, reduced taking of bandwidth resources.At VC and EC not in the situation of the same network segment, VM carries out dynamic multicast VLAN statement by notice EC and the notification gateway router carries out dynamic multicast VLAN statement, can set up from EC to the gateway router, passage from the gateway router to VC again, multicast data flow can be forwarded to VC from multicast source along this passage, compared with prior art, avoid unnecessary multicast to flood, reduced taking of bandwidth resources.
Embodiment
Unnecessary multicast in existing multicast data flow repeating process floods, and the embodiment of the invention provides a kind of use GVRP (GARP VLAN Registration Protocol, GARP VLAN log-in protocol) to carry out the dynamic vlan process registration.Wherein, GARP is the abbreviation of Generic Attribute RegistrationProtocol, i.e. Generic Attribute Registration Protocol can be used for propagation property, and GVRP is used for registration and unregistration VLAN attribute.
In general, the embodiment of the invention is at first enabled the GVRP function in two layers of switching network, dispose M-VLAN on EC, and EC is registered to its gateway router IP address information on the VM when VM registers; When VC user's order video flowed, VM notice EC used M-VLAN to send multicast data flow, and EC sends assert packet and carries out the M-VLAN registration when sending multicast data flow.If program request person VC and multicast source EC are at the same network segment, then VM can notify VC to send the GVRP statement, adds this M-VLAN with statement, and flux of multicast can arrive program request person VC through this M-VLAN like this; If program request person VC and multicast source EC be not at the same network segment, then VM can notify the gateway router of EC to send the GVRP statement, add this M-VLAN with statement, flux of multicast can be through this M-VLAN arrival first-hop router like this, then through three layers of multicast path by reaching program request person VC.
Be example with networking structure shown in Figure 3 below, the embodiment of the invention is described in detail.
As shown in Figure 3, at FHR (first-hop router) front end 1 or a plurality of access Layer 2 switch are arranged, switch1 and switch2 wherein, are connected with EC on the port port10 of switch1 as shown in Figure 3.VC A and EC be not at the same network segment, and VC B and EC are at the same network segment.
Under initial environment, carry out following configuration and regulation:
(1) the existing three layers of multicast routing protocol of operation between FHR and other the router (as the Router2 among Fig. 3), such as PIM SM (Protocol Independent Multicast-Sparse Mode, Protocol Independent Multicast-sparse mode), can certainly be other Routing Protocols;
(2) double layer network all disposes IGMP snooping agreement;
(3) overall situation is enabled the unknown multicast broadcast capability on the Layer 2 switch, in the VLAN of static configuration, enable the unknown multicast discard, the unknown multicast packets that receives for dynamic vlan can forward by other interfaces in this VLAN like this, can be dropped for the unknown multicast packets of receiving in the static VLAN;
(4) carry the gateway router IP address of this equipment, the IP address mask of this equipment in the message that EC registers on VM;
(5) VC during Login Register, need carry the IP address and the mask of this equipment on VM;
(6) enable the GVRP function in the switching network of connection EC;
(7) in advance on VM for there being the flood EC channel arrangement M-VLAN of network of multicast.EC is when registration, and VM can be handed down to EC with this M-VLAN.When the user passed through this EC passage of place VC program request, EC used M-VLAN to send multicast data flow.If be the EC of the non-network that floods, then can not need to dispose M-VLAN on the VM, and be to use the current mechanism operation to get final product.
Further, the interface that connects router or VC in the switching network is set to the Hybrid mouth, and allows all VLAN to pass through, and uses the mode of untag to pass through for the VLAN acquiescence of dynamic registration, and other total interface uses the Trunk mode to pass through.
Below in conjunction with Fig. 4 A, Fig. 4 B and Fig. 4 C to program request person VC and multicast source EC not the multicast data flow forwarding process when the same network segment be described.
Shown in Fig. 4 A, this flow process can comprise:
Step 401, VC A sends request to VM, with the video flowing of request program request EC, carries IP address and the mask (being expressed as IP address/mask) thereof of VC A in this request.
Step 402, after VM received this request, notice EC sent multicast data flow.
After EC is notified, by disposing M-VLAN thereon, therefore EC can send multicast data flow with this M-VLAN, EC also uses the GVRP message that this VLAN is stated dynamically, receive the two-layer equipment of this statement, the port that receives this statement is joined in the described M-VLAN as the inbound port of this multicast data flow on this two-layer equipment.After statement was finished, shown in Fig. 4 B, layer 2-switched part interface (as the port10 of the switch1 among Fig. 4 B, the port20 of switch2) joined in this dynamic vlan.But multicast data flow can't be transmitted on other interface, because have only an incoming interface to add this VLAN (as the port10 of the switch1 among Fig. 4 B) on the direct-connected switch, does not have outgoing interface in the VLAN.
Step 403, after VM receives this request, also according to IP address/mask of the IP address/mask of VC A and EC judge VC user whether with EC at the same network segment, if, then change step 404 over to not at the same network segment; Otherwise change the step 504 of flow process shown in Fig. 5 A over to.In the present embodiment, judged result is not for being the same network segment.
Wherein, EC is when VM registers, and with its IP address/mask, and the gateway router of this EC (i.e. FHR among the figure) IP address registration is to VM, and VM can be stored in the IP address/mask of EC and the gateway ip address of this EC in the database.
Step 404, VM obtains the gateway router IP address of this EC from database, and use SNMP (Simple Network Management Protocol, Simple Network Management Protocol) this gateway router of message notifying uses this M-VLAN of GVRP statement registration, and the multicast data flow of EC sends to VC A by this M-VLAN.
Receive the two-layer equipment of this gateway router statement, the port that receives this statement outbound port of multicast data flow on this two-layer equipment as described EC joined in the described M-VLAN.After succeeding in registration, shown in Fig. 4 C, after the port port21 of switch2 and the port port12 of switch1 receive the assert packet of gateway router, port21 and port12 are joined in the M-VLAN as the outgoing interface of multicast data flow, just set up the tunnel of a M-VLAN between like this from EC to FHR.After the multicast data flow of EC arrives direct-connected switch switch1, can be owing to the unknown multicast broadcast capability, interfaces all in M-VLAN are broadcasted, like this, multicast data flow can arrive FHR through this VLAN tunnel, and after FHR received multicast data flow, three layers multicast protocol of its operation of process was forwarded to VC A.
Wherein, on the outgoing interface of the switch of direct-connected FHR (as the port21 of the switch2 among the figure), multicast message can be peeled off the tag of M-VLAN because the untag function of hybrid interface, allow message send to FHR, thereby make FHR can normally receive this multicast message in the mode of untag.
Need to prove that in the above-mentioned flow process, VM notice EC sends multicast data flow, judge that with VM VC and EC are whether in the same network segment and the subsequent treatment of carrying out according to judged result, not strict demand on sequential.
From above flow process as can be seen, at program request person VC and multicast source EC not under the situation at the same network segment, VM carries out dynamic multicast VLAN statement by notice EC, can receive on the two-layer equipment of this statement, this multicast data flow inbound port is joined in the M-VLAN, carry out the dynamic multicast statement by the notification gateway router, can receive on the two-layer equipment of this statement, this multicast data flow outbound port is linked in the M-VLAN, thereby set up from multicast source EC to gateway router, the passage of VC from gateway router to program request person again, multicast data flow can be forwarded to program request person VC along this passage from multicast source, compared with prior art, avoid unnecessary multicast to flood, reduced taking of bandwidth resources.
Below in conjunction with Fig. 5 A and Fig. 5 B and Fig. 5 C program request person VC and the multicast source EC multicast data flow forwarding process when the same network segment is described.
Shown in Fig. 5 A, this flow process can comprise:
Step 501, VC B sends request to VM, with the video flowing of request program request EC, carries IP address and the mask (being expressed as IP address/mask) thereof of VC A in this request.
Step 502, after VM received this request, notice EC sent multicast data flow.
After EC is notified, by disposing M-VLAN thereon, therefore EC can send multicast data flow with M-VLAN, EC also uses the GVRP message that this VLAN is stated dynamically, receive the two-layer equipment of this statement, the port that receives this statement is joined in the described M-VLAN as the inbound port of this multicast data flow on this two-layer equipment.After statement was finished, shown in Fig. 5 B, layer 2-switched part interface (as the port10 of the switch1 among Fig. 5 B, the port20 of switch2) joined in this dynamic vlan.But multicast data flow can't be transmitted on other interface, because direct-connected switch has only an interface to add this VLAN (as the port10 of the switch1 among Fig. 5 B).
Step 503, after VM receives this request, also according to IP address/mask of the IP address/mask of VC B and EC judge VC user whether with EC at the same network segment, if at the same network segment, then change step 504 over to; Otherwise change the step 404 of flow process shown in Fig. 4 A over to.In the present embodiment, judged result is at the same network segment.
Wherein, EC is when VM registers, and with its IP address/mask, and the gateway router IP address registration of this EC is to VM.
Step 504, VM notice VC B uses GVRP this M-VLAN to be stated dynamically the multicast data flow of EC sends to VC B by this M-VLAN.
Receive the two-layer equipment of VC B statement, the port that receives this statement is joined in the described M-VLAN as the outbound port of this multicast data flow on this two-layer equipment.After statement was finished, the outgoing interface dynamic registration of switch was in VLAN.Shown in Fig. 5 C, after the port port11 of switch1 receives the assert packet of VC B, port11 is joined in the M-VLAN as the outgoing interface of multicast data flow, like this from EC to the tunnel of just having set up a M-VLAN the VC B.The multicast data flow of EC is forwarded to VC B in this M-VLAN, and can not forward on other the switch.
Wherein, on the outgoing interface of the switch of direct-connected VC B (as the port11 of the switch1 among the figure), multicast message can be peeled off the tag of M-VLAN because the untag function of hybrid interface, allow message send to VC B, thereby make VC B can normally receive this multicast message in the mode of untag.
Need to prove that in the above-mentioned flow process, VM notice EC sends multicast data flow, judge that with VM VC and EC are whether in the same network segment and the subsequent treatment of carrying out according to judged result, not strict demand on sequential.
From above flow process as can be seen, at program request person VC and multicast source EC under the situation at the same network segment, VM carries out dynamic multicast VLAN statement by notice EC, can receive on the two-layer equipment of this statement, this multicast data flow inbound port is joined in the M-VLAN, carry out the dynamic multicast statement by notice program request person VC, can receive on the two-layer equipment of this statement, this multicast data flow outbound port is linked in the M-VLAN, thereby set up the passage from multicast source EC to program request person VC, multicast data flow can be forwarded to program request person VC along this passage from multicast source, compared with prior art, avoid unnecessary multicast to flood, reduced taking of bandwidth resources.
When program request person VC request halt video flowing, need take into account the cancellation of action attitude VLAN, also need simultaneously to consider whether to exist other user using this dynamic vlan.Concrete, this flow process can comprise as shown in Figure 6:
Step 601, program request person VC sends request to VM, stops the video flowing of program request EC with request, carries IP address and the mask (being expressed as IP address/mask) thereof of this VC in this request.
Step 602, after VM receives this request, do as judge, and carry out respective handling according to judged result:
Step 603A, VM judges this VC and EC at the same network segment according to IP address/mask of this VC and IP address/mask of EC, then notifies this VC to use GVRP to nullify this dynamic M-VLAN; If be judged as not at the same network segment then do not need to notify VC;
Step 603B, VM judges that according to IP address/mask of this VC and IP address/mask of EC this VC and EC be not at the same network segment, and do not exist other VC live telecasts to have access to the video flowing of this EC (promptly having asked the video flowing of this EC), then notify the gateway router of EC to use GVRP to nullify this dynamic M-VLAN; Other situations do not need the notification gateway router;
Step 603C, VM judges that according to IP address/mask of this VC and IP address/mask of EC this VC and EC be not at the same network segment, have access to the video flowing of this EC though there are other VC live telecasts, but this every other VC all with EC at the same network segment, then notify the gateway router of EC to use GVRP to nullify this dynamic M-VLAN; Other situations do not need the notification gateway router.
Further, if there is no other VC has access to the video flowing of this EC in live telecast, also need to notify EC to use GVRP to nullify this M-VLAN, other situations (when existing other VC live telecasts to have access to the video flowing of this EC) do not notify the gateway router of this EC to use GVRP to nullify this dynamic M-VLAN.
Based on identical technical conceive, the embodiment of the invention also provides a kind of video management server that can be applicable to above-mentioned networking structure and flow process.
Referring to Fig. 7, the structural representation of the video management server (VM) that provides for the embodiment of the invention.This VM goes up the gateway router address that registration has EC, and this VM can comprise:
Interface module 701 is used to receive the request of the multicast data flow of VC program request EC;
Judge module 702 is used for the described request that receives according to interface module 701, judges that whether described VC and described EC are at the same network segment;
Notification module 703 is used for after interface module 701 receives described request, notifies described EC to send multicast data flow, so that described EC uses M-VLAN to send multicast data flow according to this notice and states described M-VLAN; And, be judged as when being at judge module 702, notify described VC to send the GVRP logon message, so that the multicast data flow of described EC arrives described VC through described M-VLAN; When judge module 702 is judged as not, be registered to gateway router address among this VM according to described EC, notice respective gateway router sends the GVRP logon message, so that the multicast data flow of described EC arrives this gateway router (being first-hop router) through described M-VLAN, then through three layers of multicast path by reaching described VC.
In the above-mentioned VM equipment, interface module 701 also can receive the request of the video flowing that stops the described EC of program request of described VC transmission; Accordingly, judge module 702 also can be after interface module 701 receives the request of the video flowing that stops the described EC of program request that described VC sends, judge that whether described VC and described EC are at the same network segment, and when being judged as not, judge whether to exist other VC live telecasts to have access to the video flowing of described EC, and judge also when existing that whether described other VC and this EC are at the same network segment being judged as; Notification module 703 also is used for: if judge module 702 is judged described VC and described EC at the same network segment, then notify described VC to use GVRP to nullify described M-VLAN; If judge module 702 judges that described VC and described EC be not at the same network segment, and do not exist other VC live telecasts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC though there are other VC live telecasts, but this every other VC all with this EC at the same network segment, then notify the gateway router of described EC to use GVRP to nullify described M-VLAN.Further, notification module 703 also can not exist other VC when the video flowing of described EC is had access in live telecast in judge module 702 judgements, notifies described EC to use GVRP to nullify described M-VLAN.
In the above-mentioned VM equipment, described VM goes up IP address and the mask thereof that registration has the gateway router of EC, carries IP address and the mask thereof of this VC in the request of described VC program request EC multicast data flow; Accordingly, judge module 702 can be according to IP address and the mask thereof of described VC, and the IP address and the mask thereof of the gateway router of EC, judges that whether described VC and described EC are at the same network segment.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a station terminal equipment (can be mobile phone, personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.