Background technology
Use for example in some networking: in many ways in the teleconference, there are simultaneously a plurality of recipients and a plurality of multicast source, in this case, press shortest path tree (SPT if use traditional PIM-dense mode (DM, Dense Mode) or PIM-sparse mode (SM, Sparse Mode), Shortest Path Tree) multicast data forwarding, need to create (S, G) list item for each multicast source on every router, this will take a large amount of system resource.In order to address this problem, the concept of bidirectional pim has been proposed.Bidirectional pim is developed by PIM-SM, it is by setting up with point (RP, Rendezvous Point) centered by, connects multicast source and recipient's two-way point tree (RPT respectively, Rendezvous PointTree), make multicast packet be forwarded to recipient from multicast source via RP along two-way RPT.Like this, on every router, only need safeguard that (*, G) list item gets final product, thereby save system resource.
Bidirectional pim is made of two parts: a part is the RPT take RP as root, take direct-connected recipient's router as leaf, is called for short recipient's side RPT; Another part then is the RPT take RP as root, take the router of direct-connected multicast source as leaf, is called for short multicast source RPT.The building process of these two parts RPT is different, and the below is introduced respectively.
Fig. 1 has provided existing recipient's side RPT and has made up schematic diagram, and the building process of RPT is similar among the building process of recipient's side RPT and the PIM-SM, and as shown in Figure 1, its building process is as follows:
(1) when the recipient will add a multicast group G, send Internet Group Management Protocol (IGMP to its direct-connected router first, Internet Group Management Protocol) report (Report) message, this message carries multicast group G information.
(2) recipient's direct-connected router receives IGMP Report message, generate (*, G) list item, and the receiving interface of this message is added in the outgoing interface tabulation of this list item, send PIM to RP direction hop-by-hop corresponding to multicast group G simultaneously and add (Join) message, PIM Join message carries multicast group G information.
(3) recipient's direct-connected router and the DF between the RP receive PIM Join message, generate (*, G) list item, and the receiving interface of this message is added in the outgoing interface tabulation of this list item, transmit this PIM Join message to the RP direction simultaneously.
Like this, from recipient's direct-connected router to RP the router of process just formed the branch of recipient's side RPT, these routers have all generated (*, G) list item in it is transmitted.
When a recipient is no longer interested in multicast group G, can send the IGMP that carries multicast group G information to its direct-connected router and leave (Leave) message, after recipient's direct-connected router receives this message, can be with the receiving interface of this message (* from correspondence, G) deletion in the tabulation of the outgoing interface of list item is simultaneously against RP direction hop-by-hop transmission PIM beta pruning (Prune) message of recipient's side RPT to this multicast group G; After DF receives PIM Prune message, with receiving interface deletion from the outgoing interface tabulation of (*, G) list item of correspondence of this message, and check whether oneself has the recipient of this multicast group G, if do not have, then continue this PIM Prune message of forwarded upstream.
Fig. 2 has provided existing multicast source RPT and has made up schematic diagram, and as shown in Figure 2, its building process is as follows:
(1) multicast source sends the multicast data flow of a multicast group G.
(2) this multicast data flow is all unconditionally transmitted to RP by the appointment forwarding person of this network segment (DF, Designated Forwarder) at each network segment of approach, simultaneously, each DF can generate (*, G) list item, and self RPF interface is added in the outgoing interface tabulation of this list item.
Like this, from the direct-connected router of multicast source to RP the router of process just formed the branch of multicast source RPT, these routers have all generated (*, G) list item in it is transmitted.
After two-way RPT structure is finished, will be successively along multicast source RPT and recipient's side RPT by the multicast data flow that multicast source sends, be forwarded to the recipient via RP.
The shortcoming of prior art is as follows:
When there is two-layer network device in recipient's side RPT, can intercept (Snooping) function at two-layer network device operation PIM, when two-layer network device listens to PIM Join message, just the receiving port with the PIMJoin message adds in the corresponding multicast forwarding list item, to realize the precise relay of multicast message.
And when there is two-layer network device in multicast source RPT, by the building process of above-mentioned multicast source RPT as can be known: multicast source RPT makes up by multicast data flow rather than PIM Join message, so two-layer network device can't be realized by PIM Snooping function the precise relay of multicast data flow.
Fig. 3 has provided the networking exemplary plot that has two-layer network device on the multicast source RPT path, as shown in Figure 3, in existing the realization, multicast data flow can be by double layer network at VLAN (VLAN, VirtualLocal Area Network) broadcasting in, only have the DF interface in this network segment multicast data flow could be transmitted to RP, and other interface can abandon it after receiving multicast data flow.So in double layer network, multicast data flow can be broadcasted, and has caused the waste of the network bandwidth, simultaneously, the PIM router needs and will abandon from the multicast data flow that non-DF interface is received, has increased the processing pressure of PIM router.
Summary of the invention
The invention provides bidirectional pim retransmission method and two-layer network device, with the precise relay of the two-layer network device on the raising multicast source RPT to multicast data flow.
Technical scheme of the present invention is achieved in that
Only there is a point RP in a kind of bidirectional protocol independent multicast PIM retransmission method in the multicast network, the method comprises:
Two-layer network device on the bidirectional pim multicast source point tree RPT is intercepted from the winner message of specifying forwarding person DF, and the receiving port of winner message is set to the upstream port of all multicast group;
When two-layer network device receives multicast data flow for arbitrary multicast group, this multicast data flow is transmitted to described upstream port.
Described method further comprises:
When described two-layer network device received for the joining message an of multicast group, the receiving port of this message was set to the downstream port of downstream multicast forwarding-table item corresponding to this multicast group;
And, describedly when receiving multicast data flow for arbitrary multicast group, two-layer network device further comprises:
Two-layer network device is searched downstream multicast forwarding-table item corresponding to this multicast group, if find, then this multicast data flow is transmitted to each downstream port of this list item.
Only exist definite method of a point RP to comprise in the described multicast network:
According to the network planning and configuration, learn only to have a RP in the multicast network;
Perhaps, two-layer network device is intercepted the bootstrap message BSM that the BootStrap Router BSR in the multicast network sends, and resolves the RP address among this BSM, if only be resolved to a RP address, then determines only to have a RP in the multicast network.
There are a plurality of RP in a kind of bidirectional pim retransmission method in the multicast network, the method comprises:
Two-layer network device on the bidirectional pim multicast source RPT is intercepted the winner message from DF, resolves this message, obtains RP address corresponding to this message, records this RP address, and the receiving port of this winner message is set to the upstream port of this RP address simultaneously;
When two-layer network device receives multicast data flow for a multicast group, obtain RP address corresponding to this multicast group according to the address computation of this multicast group, this multicast data flow is forwarded from upstream port corresponding to this RP address.
Described method further comprises:
When described two-layer network device receives for the joining message an of multicast group, search downstream multicast forwarding-table item corresponding to this multicast group, the receiving port of this message is set to the downstream port of this list item;
And, describedly when receiving multicast data flow for a multicast group, two-layer network device further comprises:
Two-layer network device is searched downstream multicast forwarding-table item corresponding to this multicast group, if find, then this multicast data flow is transmitted to each downstream port of this list item.
Exist definite method of a plurality of RP to comprise in the described multicast network:
According to the network planning and configuration, learn to have a plurality of RP in the multicast network;
Perhaps, two-layer network device is intercepted the BSM that the BSR in the multicast network sends, and resolves the RP address among this BSM, if be resolved to a plurality of RP address, then determines to have a plurality of RP in the multicast network.
Only there is a RP in two-layer network device on a kind of bidirectional pim multicast source RPT in the multicast network at this two-layer network device place, this two-layer network device comprises:
Intercept module: intercept the winner message from DF, the receiving port of winner message is set to the upstream port of all multicast group;
Forwarding module: when the multicast data flow that receives for arbitrary multicast group, this multicast data flow is transmitted to described upstream port.
The described module of intercepting is further used for, and when receiving for the joining message an of multicast group, the receiving port of this message is set to the downstream port of downstream multicast forwarding-table item corresponding to this multicast group;
And described forwarding module is further used for, and when the multicast data flow that receives for arbitrary multicast group, searches downstream multicast forwarding-table item corresponding to this multicast group, if find, then this multicast data flow is transmitted to each downstream port of this list item.
There are a plurality of RP in two-layer network device on a kind of bidirectional pim multicast source RPT in the multicast network at this two-layer network device place, this two-layer network device comprises:
Intercept module: intercept the winner message from DF, resolve this message, obtain RP address corresponding to this message, record this RP address, and the receiving port of this winner message is set to the upstream port of this RP address;
Forwarding module: when the multicast data flow that receives for a multicast group, obtain RP address corresponding to this multicast group according to the address computation of this multicast group, this multicast data flow is forwarded from upstream port corresponding to this RP address.
The described module of intercepting is further used for: when receiving for the joining message an of multicast group, the receiving port of this message is set to the downstream port of downstream multicast forwarding-table item corresponding to this multicast group;
And described forwarding module is further used for, and when the multicast data flow that receives for a multicast group, searches downstream multicast forwarding-table item corresponding to this multicast group, if find, then this multicast data flow is transmitted to each downstream port of this list item.
Compared with prior art, among the present invention, the two-layer network device on the multicast source RPT can be realized the precise relay of multicast data flow, has reduced the broadcasting packet in the double layer network, has saved the network bandwidth; Simultaneously, avoid multicast data flow to transmit to irrelevant PIM neighbours, alleviated the pressure of PIM router.
Embodiment
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
The bidirectional pim retransmission method flow chart that Fig. 4 provides for the embodiment of the invention one, as shown in Figure 4, its concrete steps are as follows:
Step 401: the RP that the two-layer network device SW1 on the multicast source RPT obtains in the multicast domain arranges (RP-Set) information, if only there is a RP in the multicast domain, then oneself state is set to single RP pattern.
When the network planning and configuration, may just a RP only be set in the definite network, at this moment, can be set to single RP pattern by the state of the direct SW1 such as webmaster; Perhaps, because BootStrap Router (BSR, BootStrapping Router) bootstrap message (BSM that sends, BootStrapping Message) carries the address of all RP in, therefore, the BSM that SW1 also can send by the BSR that intercepts in the multicast network determines whether only there is a RP in the network, when only carrying a RP address among the BSM, just determines only to have a RP in the network.
Step 402:SW1 is enabling to intercept in each VLAN of PIM agreement, intercept victor (winner) message in the PIM protocol massages, the receiving port of winner message is set to the upstream port of all multicast group, continues simultaneously the winner message is broadcasted in this VLAN.
The winner message is that DF sends, then the port that namely is connected with the DF interface of the receiving port of winner message.
Here, the receiving port of winner message is set to the upstream port of all multicast group, its specific implementation can for: increase a upstream multicast forwarding-table item, this list item comprises: multicast group address and upstream extremity slogan.Wherein, multicast group address is *, represent any multicast group address all can, the upstream extremity slogan is the receiving port number of winner message.
Step 403: when having multicast on demand person between multicast source and RP, when this multicast on demand person determines to receive the multicast data flow of a multicast group G, send the IGMP Report message that carries multicast group G sign, multicast on demand person's direct-connected router receives this message, send the PIM Join message that carries multicast group G sign, SW1 listens to PIM Join message, and the receiving port of PIM Join message is set to the downstream port of the downstream multicast forwarding-table item of multicast group G.
Here, the receiving port of PIM Join message is set to the downstream port of the multicast forwarding list item of multicast group G, its specific implementation can for: in the downstream multicast forward table that has generated, search downstream multicast forwarding-table item corresponding to multicast group G, if find, the receiving port number of PIM Join message is added in the downstream port tabulation of this list item; If do not find, generate the downstream multicast forwarding-table item of multicast group G, and the receiving port number of PIM Join message is added in the downstream port tabulation of this list item.
Step 404: when SW1 receives the multicast data flow of a multicast group G, the upstream port of all multicast group that arrange according to step 402, this multicast data flow is transmitted to this upstream port, simultaneously, search the downstream multicast forwarding-table item corresponding with multicast group G, if there is downstream port in this list item, then this multicast data flow is transmitted to each downstream port.
Below provide the application example of an embodiment of the invention one:
As shown in Figure 5, a RP is only arranged in the multicast network, SW1 can receive the winner message that DF sends from port P1, then P1 is set to the upstream port of all multicast group, afterwards, receive multicast data flow 1 that multicast source 1,2 sends, 2 the time, multicast data flow 1,2 all can be forwarded from P1 as SW1.
In the embodiment shown in fig. 4, the receiving port that " receiving port of winner message is set to the upstream port of all multicast group " mentioned in the step 402 is actually winner message in software unit is set to the upstream port of all multicast group; " receiving port of PIM Join message is set to the downstream port of the multicast forwarding list item of multicast group G " mentioned in the step 403 in fact also is the downstream port that the receiving port of PIM Join message in software unit is set to the multicast forwarding list item of multicast group G.
In order to accelerate to transmit, can carry out following optimization to embodiment illustrated in fig. 4:
1) in step 402, SW1 directly is issued to the receiving port of the winner message upstream port as all multicast group in the driving after receiving the winner message.
2) in step 403, SW1 is after listening to PIM Join message, and directly the downstream multicast forwarding-table item that multicast group G is corresponding is issued in the driving, and wherein, the downstream port of the list item that issues is the receiving port of PIMJoin message.
3) step 404 replaces with: when SW1 receives the multicast data flow of a multicast group G, directly in driving, find the upstream port of all multicast group, this multicast data flow is transmitted to this upstream port, simultaneously, in driving, search the downstream multicast forwarding-table item corresponding with multicast group G, if find, then this multicast data flow is transmitted to each downstream port of this list item.
The bidirectional pim retransmission method flow chart that Fig. 6 provides for the embodiment of the invention two, as shown in Figure 6, its concrete steps are as follows:
Step 601: the two-layer network device SW1 on the multicast source RPT obtains the RP-Set information in the multicast domain, if there are a plurality of RP in the multicast domain, then oneself state is set to many RP pattern.
When the network planning and configuration, may just a plurality of RP be set in the definite network, at this moment, can be set to many RP pattern by the state of the direct SW1 such as webmaster; Perhaps, the BSM that SW1 can send by the BSR that intercepts in the multicast network determines whether there are a plurality of RP in the network, when carrying a plurality of RP address among the BSM, just determines to have a plurality of RP in the network.
Step 602:SW1 is enabling to intercept in each VLAN of PIM agreement, intercept the winner message in the PIM protocol massages, resolve the winner message, obtain RP address corresponding to this winner message, in the multicast forward table of upstream, the receiving port of this winner message is set to the upstream port of this RP address, namely records the corresponding relation of RP address and upstream extremity slogan.
Step 603: when having multicast on demand person between multicast source and RP, when this multicast on demand person determines to receive the multicast data flow of a multicast group G, send the IGMP Report message that carries multicast group G sign, multicast on demand person's direct-connected router receives this message, send the PIM Join message that carries multicast group G sign, SW1 listens to PIM Join message, and the receiving port of PIM Join message is set to the downstream port of downstream multicast forwarding-table item corresponding to multicast group G.
Step 604:SW1 receives the multicast data flow of multicast group G, finds that oneself state is many RP pattern, obtains RP address corresponding to this multicast group G according to the address computation of multicast group G.
Here, obtain RP address corresponding to this multicast group G according to the address computation of multicast group G and can adopt existing techniques in realizing.
Step 605:SW1 determines upstream port corresponding to RP address that calculate this multicast data flow to be forwarded from upstream port according to the RP address of record and the corresponding relation of upstream extremity slogan; Simultaneously, search downstream multicast forwarding-table item corresponding to multicast group G, if find, then this multicast data flow each downstream port from this list item is forwarded.
Below provide the application example of an embodiment of the invention two:
As shown in Figure 7, two RP:RP1 and RP2 are arranged in the multicast network, SW1 can receive the winner message that DF 1 sends from port P1, carries the RP1 address in the message, then P1 is made as the upstream port of RP1; SW1 can receive the winner message that DF2 sends from port P2, carries the RP2 address in the message, then P2 is made as the upstream port of RP2.Afterwards, when SW1 receives the multicast data flow 1 of the multicast group G1 that multicast source 1 sends, calculate the corresponding RP1 of multicast group G1, then multicast data flow 1 is forwarded from upstream port P1 corresponding to RP1; When SW1 receives the multicast data flow 2 of the multicast group G2 that multicast source 2 sends, calculate the corresponding RP2 of multicast group G2, then multicast data flow 2 is forwarded from upstream port P2 corresponding to RP2.
In the embodiment shown in fig. 6, the receiving port that " receiving port of PIM Join message is set to the downstream port of the multicast forwarding list item of multicast group G " mentioned in the step 603 is actually PIMJoin message in software unit is set to the downstream port of the multicast forwarding list item of multicast group G.
In actual applications, in order to accelerate to transmit, can carry out following optimization to embodiment illustrated in fig. 6:
1) in step 603, SW1 is after listening to PIM Join message, and directly the downstream multicast forwarding-table item that multicast group G is corresponding is issued in the driving, and wherein, the downstream port of the list item that issues is the receiving port of PIMJoin message.
2) in step 605, SW1 is behind upstream port corresponding to the RP address of determining to calculate, the upstream multicast forwarding-table item of multicast group G is issued in the driving, wherein, the multicast group address of the list item that issues is the multicast group G address in the multicast data flow that receives, and the upstream port of list item is upstream port corresponding to RP address that calculates.
3) step 604,605 replaces with: when SW1 receives the multicast data flow of multicast group G, find that oneself state is many RP pattern, then in driving, search first upstream multicast forwarding-table item corresponding to multicast group G, if find, then according to the upstream port of list item, this multicast data flow is forwarded from upstream port; Simultaneously, in driving, search downstream multicast forwarding-table item corresponding to multicast group G, if find, then according to the downstream port of list item, this multicast data flow is forwarded from each downstream port; If in driving, do not find upstream multicast forwarding-table item, then go to the action of " address computation according to multicast group G obtains RP address corresponding to this multicast group G " in the step 604 shown in Figure 6.
The composition diagram of the two-layer network device on the bidirectional pim multicast source RPT that Fig. 8 provides for the embodiment of the invention one, only there is a RP in the multicast network at this two-layer network device place, as shown in Figure 8, this two-layer network device mainly comprises: intercept module 81, list item memory module 82, forwarding module 83, wherein:
Intercept module 81: enabling to intercept in each VLAN of PIM agreement, intercept the winner message from DF, the upstream port that the receiving port of winner message is set to all multicast group is, issue a upstream multicast forwarding-table item to list item memory module 82, the multicast group address of list item is *, upstream port is the receiving port of winner message, simultaneously the winner message is broadcasted in this VLAN.
List item memory module 82: storage multicast forwarding-table item.
Forwarding module 83: when the multicast data flow that receives for arbitrary multicast group, search upstream multicast forwarding-table item corresponding to this multicast group in list item memory module 82, this multicast data flow is transmitted to the upstream port of this list item.
Intercepting module 81 can be further used for, when receiving for the joining message an of multicast group, the downstream port that the receiving port of this message is set to downstream multicast forwarding-table item corresponding to this multicast group is, issue a downstream multicast forwarding-table item to list item memory module 82, the multicast group address of list item is multicast group address corresponding to this message, and the downstream port of list item is the receiving port of this message;
And forwarding module 83 can be further used for, and when the multicast data flow that receives for arbitrary multicast group, searches downstream multicast forwarding-table item corresponding to this multicast group in list item memory module 82, if find, then this multicast data flow is transmitted to each downstream port of this list item.
Intercepting module 81 can be further used for, and when the winner message that listens to from DF, the receiving port of winner message is set to the upstream port of all multicast group in driving; When receiving for the joining message an of multicast group, the receiving port of this message is set to the downstream port of downstream multicast forwarding-table item corresponding to this multicast group in driving;
And, forwarding module 83 can be further used for, when the multicast data flow that receives for arbitrary multicast group, in driving, find the upstream port of this multicast group, simultaneously in driving, search downstream multicast forwarding-table item corresponding to this multicast group, if find, then obtain the downstream port of this multicast group, with with multicast data flow from upstream port, perhaps forward from upstream port and downstream port.
The composition diagram of the two-layer network device on the bidirectional pim multicast source RPT that Fig. 9 provides for the embodiment of the invention two, there are a plurality of RP in the multicast network at this two-layer network device place, as shown in Figure 9, this two-layer network device mainly comprises: intercept module 91, RP logging modle 92, forwarding module 93, wherein:
Intercept module 91: enabling to intercept in each VLAN of PIM agreement, intercept the winner message from DF, resolve this message, obtain RP address corresponding to this message, this RP address of record in RP logging modle 92, and the receiving port of this winner message is set to the upstream port of this RP address.
RP logging modle 92: the corresponding relation of record RP address and upstream extremity slogan.
Forwarding module 93: when the multicast data flow that receives for a multicast group, obtain all RP addresses from RP logging modle 92, address computation according to this multicast group obtains RP address corresponding to this multicast group, and this multicast data flow is forwarded from upstream port corresponding to this RP address.
Intercepting module 91 can be further used for: when receiving for the joining message an of multicast group, the receiving port of this message is set to the downstream port of downstream multicast forwarding-table item corresponding to this multicast group;
And forwarding module 93 is further used for, and when the multicast data flow that receives for a multicast group, searches downstream multicast forwarding-table item corresponding to this multicast group, if find, then this multicast data flow is transmitted to each downstream port of this list item.
Forwarding module 93 can be further used for, and when receiving for the joining message an of multicast group, the receiving port of this message is set to the downstream port of downstream multicast forwarding-table item corresponding to this multicast group in driving; After calculating RP address corresponding to this multicast group, according to this multicast group and selected upstream port corresponding to RP address, set up a upstream multicast forwarding-table item, this list item is issued in the driving; And, when the multicast data flow that receives for a multicast group, in driving, search upstream multicast forwarding-table item corresponding to this multicast group first, if find, then according to the upstream port of this list item, this message repeating is gone out; Simultaneously, in driving, search downstream multicast forwarding-table item corresponding to this multicast group, if find, then the downstream port of multicast data flow from this list item forwarded; If do not find upstream multicast forwarding-table item, then carry out the action that described address computation according to this multicast group obtains RP address corresponding to this multicast group.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.