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 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 upper registration of VM has the gateway router address of EC, enable the IGMPsnooping agreement on 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, the 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 is used 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, 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, according to described EC, be registered to the gateway router address in described VM, 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 Routing, reaches described VC.
In 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 is used the untag mode to pass through, and other interfaces are used the Trunk mode to pass through.
In 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, described VC and described EC are at the same network segment, 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 facts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC although there are other VC facts, but this every other VC all with this EC at the same network segment, notify the gateway router of described EC to use GVRP to nullify described M-VLAN.
In said method, also comprise: if described VM judgement does not exist other VC to have access to the video flowing of described EC in fact, notify described EC to use GVRP to nullify described M-VLAN.
A kind of VM equipment, be applied to include the network of VM, EC, VC, two-layer equipment and three-layer equipment, wherein, the upper registration of described VM has the gateway router address of EC, enable IGMP snooping agreement on two-layer equipment, and enable the unknown multicast broadcast capability two layers of switching network overall situation, and enabling GVRP on two layers of switching network at EC place, this VM comprises:
Interface module, for the request of the multicast data flow that receives VC program request EC;
Judge module, for the described request received according to described interface module, judge that whether described VC and described EC are at the same network segment;
Notification module, after in described interface module, receiving described request, notify described EC to send multicast data flow, so that described EC is used M-VLAN send multicast data flow and state described M-VLAN according to this notice; And, when described judge module is judged as YES, 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 NO, be registered to the gateway router address in 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 Routing, reach described VC.
In above-mentioned VM equipment, described interface module also for, receive the request of the video flowing that stops the described EC of program request that described VC sends;
Described judge module also 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 NO, judge whether to exist other VC facts to have access to the video flowing of described EC, and also judge that whether described other VC and this EC are at the same network segment being judged as while existing;
Described notification module also for, if described judge module judges that described VC and described EC are at the same network segment, notify 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 facts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC although there are other VC facts, but this every other VC all with this EC at the same network segment, notify the gateway router of described EC to use GVRP to nullify described M-VLAN.
In above-mentioned VM equipment, described notification module also for, in the judgement of described judge module, do not exist other VC when the video flowing of described EC is had access in fact, notify described EC to use GVRP to nullify described M-VLAN.
A kind of video monitoring system, comprise VM, EC, VC, two-layer equipment and three-layer equipment, wherein:
The upper registration of VM has the gateway router address of EC, and described VM, 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, notify described VC statement to send the GVRP logon message; If the judgment is No, according to described EC, be registered to the gateway router address in described VM, notice respective gateway router sends the GVRP logon message;
Described EC, for the notice according to described transmission multicast data flow, used M-VLAN to send multicast data flow, and state described M-VLAN;
Described VC, for add the notice of M-VLAN according to described statement, dynamically state described M-VLAN;
Described gateway router, for add the notice of M-VLAN according to described statement, used the described M-VLAN of GVRP message statement registration;
Enable IGMP snooping agreement on 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 for forwarding the multicast data flow of described EC according to described M-VLAN;
Described three-layer equipment, forward the multicast data flow of described EC for using three layers of Routing Protocol.
In above-mentioned video monitoring system, described EC specifically for, after receiving the statement of described EC to described M-VLAN, the inbound port of multicast data flow on this two-layer equipment using the port that receives this statement as described EC joins in described M-VLAN; After receiving the statement of described VC to described M-VLAN, the outbound port of multicast data flow on this two-layer equipment using the port that receives this statement as described EC joins in described M-VLAN; After receiving described gateway router and registering the statement of described M-VLAN, the outbound port of multicast data flow on this two-layer equipment using the port that receives this statement as described EC joins in described M-VLAN.
In 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 is used the untag mode to pass through, and other interfaces are used the Trunk mode to pass through.
In above-mentioned video monitoring system, described VM also for, after the request that receives the video flowing that stops the described EC of program request that described VC sends, if judge, described VC and described EC are at the same network segment, 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 facts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC although there are other VC facts, but this every other VC all with this EC at the same network segment, notify the gateway router of described EC to use GVRP to nullify described M-VLAN.
In above-mentioned video monitoring system, described VM also for, if described VM judgement does not exist other VC to have access to the video flowing of described EC in fact, notify described EC to use GVRP to nullify described M-VLAN.
Useful technique effect of the present invention comprises:
Situation for VC and EC 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.For 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 present invention provides a kind of use GVRP method that (GARP VLAN Registration Protocol, GARP VLAN log-in protocol) carries out the dynamic vlan 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 for registration and unregistration VLAN attribute.
In general, at first the embodiment of the present invention enables the GVRP function in two layers of switching network, configures M-VLAN on EC, and EC is registered to its gateway router IP address information on VM when VM registers; When VC user's order video flows, VM notice EC is used M-VLAN to send multicast data flow, and EC, when sending multicast data flow, sends assert packet and carries out the M-VLAN registration.If program request person VC and multicast source EC are at the same network segment, VM can notify VC to send the GVRP statement, with statement, adds this M-VLAN, 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, VM can notify the gateway router of EC to send the GVRP statement, add this M-VLAN with statement, flux of multicast can arrive first-hop router through this M-VLAN like this, then through three layers of Multicast Routing, reaches program request person VC.
Below take the networking structure shown in Fig. 3 as example, the embodiment of the present 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, be 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, configure as follows and stipulate:
(1) the existing three layers of multicast routing protocol of operation between FHR and other router (as the Router2 in 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 configures IGMP snooping agreement;
(3) on Layer 2 switch, the overall situation is enabled the unknown multicast broadcast capability, enable the unknown multicast discard in the VLAN of static configuration, the unknown multicast packets received for dynamic vlan like this can forward to other interfaces in this VLAN, for the unknown multicast packets of receiving in static VLAN, can be dropped;
(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 to carry 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 passage configuration M-VLAN of network of multicast.EC is when registration, and VM can be handed down to EC by this M-VLAN.When the user passes through this EC passage of place VC program request, EC is used M-VLAN to send multicast data flow.If be the EC of the non-network that floods, on VM, can not need to configure M-VLAN, but use the current mechanism operation to get final product.
Further, in switching network, the interface of connection route device or VC is set to the Hybrid mouth, and allows all VLAN to pass through, and for the VLAN acquiescence of dynamic registration, uses the mode of untag to pass through, and other total interface is used 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.
As shown in Figure 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 receives this request, notice EC sends multicast data flow.
After EC is notified, by disposing thereon M-VLAN, therefore EC can send multicast data flow with this M-VLAN, EC is also used the GVRP message to state dynamically this VLAN, receive the two-layer equipment of this statement, using the port that receives this statement, as this multicast data flow, the inbound port on this two-layer equipment joins in described M-VLAN.After having stated, as shown in Figure 4 B, layer 2-switched part of interface (as the port10 of the switch1 in Fig. 4 B, the port20 of switch2) joins in this dynamic vlan.But multicast data flow can't be forwarded on other interface, because only have an incoming interface to add this VLAN (as the port10 of the switch1 in Fig. 4 B) on direct-connected switch, there is no outgoing interface in VLAN.
Step 403, after VM receives this request, also according to IP address/mask of IP address/mask of VC A and EC judge VC user whether with EC at the same network segment, if, not at the same network segment, proceed to step 404; Otherwise proceed to the step 504 of flow process shown in Fig. 5 A.In the present embodiment, judgment result is that and be not the same network segment.
Wherein, EC is when registering to VM, and by its IP address/mask, and the gateway router of this EC (i.e. FHR in figure) IP address registration is upper to VM, and VM can be stored in IP address/mask of EC and the gateway ip address of this EC in 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 is used 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 outbound port of multicast data flow on this two-layer equipment using the port that receives this statement as described EC joins in described M-VLAN.After succeeding in registration, as shown in Figure 4 C, after the port port21 of switch2 and the port port12 of switch1 receive the assert packet of gateway router, outgoing interface using port21 and port12 as multicast data flow joins in M-VLAN, has 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 due to the unknown multicast broadcast capability, to all interface broadcast in M-VLAN, like this, multicast data flow can arrive FHR through this VLAN tunnel, and after FHR receives multicast data flow, the multicast protocol of three layers of its operation of process is forwarded to VC A.
Wherein, on the outgoing interface of the switch of direct-connected FHR (as the port21 of the switch2 in figure), multicast message can, due to the untag function of hybrid interface, be peeled off the tag of M-VLAN, allow message send to FHR in the mode of untag, thereby make FHR can normally receive this multicast message.
It should be noted that, in above-mentioned flow process, VM notice EC sends multicast data flow, with VM, judge that 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, can find out, in the situation that program request person VC and multicast source EC be not 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 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 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 along this passage from multicast source program request person VC, compared with prior art, avoided unnecessary multicast to flood, reduced taking of bandwidth resources.
Below in conjunction with Fig. 5 A and Fig. 5 B and Fig. 5 C, to program request person VC and multicast source EC, the multicast data flow forwarding process when the same network segment is described.
As shown in Figure 5A, 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 receives this request, notice EC sends multicast data flow.
After EC is notified, by disposing thereon M-VLAN, therefore EC can send multicast data flow with M-VLAN, EC is also used the GVRP message to state dynamically this VLAN, receive the two-layer equipment of this statement, using the port that receives this statement, as this multicast data flow, the inbound port on this two-layer equipment joins in described M-VLAN.After having stated, as shown in Figure 5 B, layer 2-switched part of interface (as the port10 of the switch1 in Fig. 5 B, the port20 of switch2) joins in this dynamic vlan.But multicast data flow can't be forwarded on other interface, because direct-connected switch only has an interface to add this VLAN (as the port10 of the switch1 in Fig. 5 B).
Step 503, after VM receives this request, also according to IP address/mask of 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, proceed to step 504; Otherwise proceed to the step 404 of flow process shown in Fig. 4 A.In the present embodiment, judgment result is that at the same network segment.
Wherein, EC is when registering to VM, and by its IP address/mask, and the gateway router IP address registration of this EC is to VM.
Step 504, VM notice VC B is used GVRP dynamically to state this M-VLAN, and the multicast data flow of EC sends to VC B by this M-VLAN.
Receive the two-layer equipment of VC B statement, using the port that receives this statement, as this multicast data flow, the outbound port on this two-layer equipment joins in described M-VLAN.After having stated, the outgoing interface dynamic registration of switch is in VLAN.As shown in Figure 5 C, after the port port11 of switch1 receives the assert packet of VC B, the outgoing interface using port11 as multicast data flow joins in M-VLAN, like this from EC to the tunnel of just having set up a M-VLAN VC B.The multicast data flow of EC is forwarded to VC B in this M-VLAN, and can not forward on other switch.
Wherein, on the outgoing interface of the switch of direct-connected VC B (as the port11 of the switch1 in figure), multicast message can be due to the untag function of hybrid interface, peel off the tag of M-VLAN, allow message send to VC B in the mode of untag, thereby make VC B can normally receive this multicast message.
It should be noted that, in above-mentioned flow process, VM notice EC sends multicast data flow, with VM, judge that 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, can find out, in the situation that program request person VC and multicast source EC are 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 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 M-VLAN, thereby set up the passage from multicast source EC to program request person VC, multicast data flow can be forwarded to along this passage from multicast source program request person VC, compared with prior art, avoided unnecessary multicast to flood, reduced taking of bandwidth resources.
When program request person VC request halt video flowing, need to take into account the cancellation of Mobile state VLAN, also need to consider whether to exist other user using this dynamic vlan simultaneously.Concrete, this flow process can as shown in Figure 6, comprise:
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 judged, and carry out respective handling according to judged result:
Step 603A, VM judges that according to IP address/mask of this VC and IP address/mask of EC this VC and EC are at the same network segment, notifies this VC to use GVRP to nullify this dynamic M-VLAN; If be judged as not at the same network segment 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 facts to have access to the video flowing of this EC (having asked the video flowing of this EC), 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 although there are other VC facts, but this every other VC all with EC at the same network segment, 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 fact, also need to notify EC to use GVRP to nullify this M-VLAN, other situations (when existed other VC facts 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.
Technical conceive based on identical, the embodiment of the present 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) provided for the embodiment of the present invention.The upper registration of this VM has the gateway router address of EC, and this VM can comprise:
Interface module 701, for the request of the multicast data flow that receives VC program request EC;
Judge module 702, for the described request received according to interface module 701, judge that whether described VC and described EC are at the same network segment;
Notification module 703, after in interface module 701, receiving described request, notify described EC to send multicast data flow, so that described EC is used M-VLAN send multicast data flow and state described M-VLAN according to this notice; And, when judge module 702 is judged as YES, 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 NO, be registered to the gateway router address in 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 Routing, reach described VC.
In 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 NO, judge whether to exist other VC facts to have access to the video flowing of described EC, and also judge that whether described other VC and this EC are at the same network segment being judged as while existing; Notification module 703 also for: if the described VC of judge module 702 judgement with described EC at the same network segment, notify described VC use GVRP to nullify described M-VLAN; If the judge module 702 described VC of judgement and described EC be not at the same network segment, and do not exist other VC facts to have access to the video flowing of described EC, perhaps, have access to the video flowing of described EC although there are other VC facts, but this every other VC all with this EC at the same network segment, 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 fact in judge module 702 judgements, notifies described EC to use GVRP to nullify described M-VLAN.
In above-mentioned VM equipment, the upper registration of described VM has IP address and the mask thereof of 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 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 in 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 the present embodiment.The module of above-described embodiment 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 mode that the present invention can add essential general hardware platform by software and realize, can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Understanding based on such, 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 a storage medium, comprise that some instructions are with so that a station terminal equipment (can be mobile phone, personal computer, server, or the network equipment etc.) the described method of execution each embodiment of the present invention.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.