[go: up one dir, main page]

WO2009018770A1 - Method and router for positioning the last hop router and multicasting routing track - Google Patents

Method and router for positioning the last hop router and multicasting routing track Download PDF

Info

Publication number
WO2009018770A1
WO2009018770A1 PCT/CN2008/071882 CN2008071882W WO2009018770A1 WO 2009018770 A1 WO2009018770 A1 WO 2009018770A1 CN 2008071882 W CN2008071882 W CN 2008071882W WO 2009018770 A1 WO2009018770 A1 WO 2009018770A1
Authority
WO
WIPO (PCT)
Prior art keywords
router
multicast
network segment
query message
query
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2008/071882
Other languages
French (fr)
Chinese (zh)
Inventor
Kang Zi
Jun Pan
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2009018770A1 publication Critical patent/WO2009018770A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership

Definitions

  • the present invention relates to the field of network communications, and in particular, to a method, a router, and a multicast route tracking method for locating a last hop router in multicast route tracking.
  • Mtracert (Multicast Trace Route) is a fault diagnosis tool for multicast routing protocols. It collects traffic statistics of multicast routes, provides abnormal node information, and collects hop-by-hop (S, G) traffic. Statistics and other functions.
  • the development of the Mtracert tool follows a mechanism for tracking the network path through which a group of books broadcasts data from a multicast source to a specific destination receiver: Enter the mtrace command on the router (or network management host) that performs multicast route tracking, which specifies Source address, destination address, and multicast group; the router sends an IGMP (Internet Group Management Protocol) Tracert Query message to the last hop router (Last-Hop) of the destination address, the last hop After receiving the packet, the router adds the response data block of the hop (including the interface address and packet statistics of the hop), and then sends an IGMP Tracert Request to the upstream hop router along the reverse multicast path to the source address.
  • IGMP Internet Group Management Protocol
  • Request a message; after each hop router receives the request message, it adds the response data block of the hop and forwards the request message to the source; when the first hop router connected to the multicast source receives After the request message adds the response data block of the hop, it responds to the response address specified in the query message (Response Addr Ess) Sends an IGMP Tracert Response message.
  • router Q1 For example, see Figure 1.
  • the router Q1 sends a query message to the destination address D.
  • the last hop router R4 After receiving the query message, the last hop router R4 sends a request message to the upstream hop router R2 along the reverse multicast path to the source address, and in the message. Adding the information of this hop, R2 also adds its own hop information after receiving it, and continues to send the request message to the upstream hop router R1, and so on.
  • the first hop router R1 connected to the multicast source receives the request packet, it adds its own hop information, and then sends a response packet to the response address (may be router Q1) specified in the Query message.
  • the querier needs to send the Query message to the last hop router of the destination address. Therefore, how to locate the last hop router becomes a key issue in the multicast route tracking process.
  • the following method is used to locate the last hop router: The router that performs multicast route tracking (that is, the querier) sends a query message to the router in the network.
  • the router that receives the query message determines whether it meets the following two conditions: At least one
  • the interface running the multicast belongs to the same network segment as the destination address.
  • the multicast data stream from the specified source is forwarded to the network segment. If both conditions are met, then you are the last hop router, otherwise it is not.
  • the router that receives the Query message finds that it is not the last hop router, it further determines the type of the received Query message. If the Query message is a unicast message, it sends a response message with the error code WRONG_LAST_HOP. After the querier receives the response packet, the querier continues to send the Query message after resending the sender and re-locates the last hop router. If the Query message is a multicast packet, the Query message is discarded. deal with.
  • the querier sends the Query message
  • the following sending mode can be used:
  • the querier unicasts a query message with the destination address D to the receiver, and the query If the packet carries the Router Alert IP option, the query packet may be received by the last hop router on the shared network segment where the receiver resides.
  • the unicast path and the multicast path may be different. Therefore, the Query message cannot be accurately sent to the multicast hop router.
  • the unicast path from the querier Q1 to the receiver PC2 is: Q1->R3->R5->PC2
  • the actual path of the multicast data stream from the multicast source PC1 to PC2 is: PC1->R1->R2->R4->PC2, that is, R5 is the unicast last hop router of PC2
  • R4 is the multicast last hop router of PC2, so the query message will be unicast last hop router.
  • R5 receives, R5 finds that it is not the real multicast last hop router, it will send a response message with the error code WR0NG_LAST_H0P to the querier, and the real multicast last hop router R4 does not receive the query message.
  • the embodiment of the present invention provides a method and a router for locating the last hop router in the multicast route tracking.
  • the technical solution is as follows:
  • a method for locating a last hop router in multicast route tracking includes:
  • the router receives the query message that the router performing the multicast route tracking unicasts to the receiver;
  • the router determines whether it is in the network segment to which the receiver address belongs, and does not forward the multicast data stream. If yes, it determines whether there is an active multicast member in the network segment, and if so, the modification The queried message is forwarded to the network segment, and the last hop router located in the network segment receives the modified query message.
  • a router in another aspect, includes: a receiving module, configured to receive a query message that the router performing the multicast route tracking unicasts to the receiver, and a determining module, configured to determine whether the router is in the network segment to which the receiver address belongs, and does not forward the multicast Data stream, if yes, determining whether there is an active multicast member in the network segment;
  • the locating module is configured to: when the determining module determines that there is an active multicast member in the network segment, modify the Query message received by the receiving module and forward the Query message to the network segment.
  • the embodiment of the present invention further provides a method for multicast route tracking, where the method includes:
  • the router that performs multicast route tracking unicasts the query message to the receiver.
  • the router After receiving the query message, the router determines whether it is in the network segment to which the receiver address belongs, and does not forward the multicast data stream. If yes, it determines whether there is an active multicast member in the network segment. If yes, modify the query message and forward it to the network segment;
  • the last hop router in the network segment After receiving the modified query message, the last hop router in the network segment sends a multicast tracking request message to the upstream hop router along the reverse multicast path to the multicast source address.
  • the first hop router connected to the multicast source After receiving the request packet, the first hop router connected to the multicast source sends a multicast tracking response packet to the response address specified in the query packet.
  • the embodiment of the present invention determines whether the router that receives the query message is in the same network segment as the receiver, does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query. After the packet is forwarded to the network segment, the router can accurately locate the last hop router in the multicast route tracking, which reduces the number of probes sent by the query mode during positioning, which greatly improves the success of multicast route tracking. rate. After the last hop router is successfully located, multicast route tracking is performed, which greatly improves the accuracy, reliability, and success rate of multicast route tracking. DRAWINGS
  • FIG. 1 is a schematic diagram of a multicast routing tracking networking in the prior art
  • FIG. 2 is a flowchart of a method for locating a last hop router in multicast route tracking according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of a router according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a method for multicast route tracking according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention determines whether the router that receives the query message is in the same network segment as the receiver, does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query. After the packet is forwarded to the network segment, the last hop router is accurately located in the multicast route tracking. This reduces the number of probes sent by the query packet during positioning, and improves the success rate of the last hop router. .
  • an embodiment of the present invention provides a method for locating a last hop router in multicast route tracking, which specifically includes the following steps:
  • Step 101 In the multicast route tracking, the router performing the multicast route tracking unicasts the query message to the multicast receiver. On the router that performs multicast route tracking, enter the mtrace command.
  • the mtrace command specifies the multicast source address, multicast receiver address, and multicast group address.
  • the router that performs multicast route tracking follows the unicast path according to the mtrace command. Send a query message to the network.
  • Step 102 The router in the network receives the query message to determine whether it is the last hop router. If yes, the location is successful, and the multicast route tracking process is started until the multicast route tracking is completed; otherwise, step 103 is performed; Step 103: The router determines whether it is in the network segment to which the multicast receiver address belongs, and does not forward the multicast data stream; if yes, that is, both conditions are met, step 104 is performed; otherwise, step 107 is performed.
  • the foregoing judgment may be specifically: determining whether the interface is directly connected to the network segment to which the multicast receiver address belongs, and the interface is not in the outbound interface list of the multicast forwarding entry.
  • Step 104 Determine whether there is an active multicast member in the network segment. If yes, execute step 105. At this time, the router may be a loser; otherwise, execute step 107.
  • Step 105 Modify the query packet received by the router, and then forward the modified query packet to the network segment.
  • the modification query message is specifically:
  • the modified query packet can be received by all multicast routers in the network segment.
  • the TTL (Time To Live) of the received query message may be modified, and the number of times of the modified query message is limited. For example, the TTL of the query packet is changed to 1, and the modified query message is modified. It can only be forwarded once. After the query packet is received by the router on the network segment, it cannot be forwarded again. After the last hop router is successfully located, the query packet is forwarded in the network segment, thus avoiding The message is flooding.
  • the query packet can be directly forwarded from the interface connected to the network segment by the router.
  • Step 106 The multicast last hop router in the network segment receives the modified query message, so that the last hop router is located, and the location is successful, and the multicast route tracking process is started until the multicast route tracking is completed.
  • the last hop router determines whether it is the last hop router, that is, whether it has at least one interface running multicast and the receiver address belong to the same network segment, and will be from the specified source.
  • the multicast data stream is forwarded to the network segment. If both conditions are met, then it is the last hop router, otherwise it is not the last hop router.
  • Step 107 The router that receives the query message returns a response message containing the error code (WRONG_LAST_HOP) to the response address specified in the query message.
  • the querier Q1 unicasts the Query message to the multicast receiver PC2.
  • the router R5 receives it, it finds that it has an interface IF0 directly connected to the network segment to which the PC2 address belongs, but the interface is not in the corresponding In the outbound interface list of the multicast forwarding entry, the multicast data stream is not forwarded by itself.
  • the destination address in the IP header of the received query packet is changed. Change the address of all multicast routers, for example 224.0.0.2, to TTL
  • the real last hop router R4 in the network segment will receive the modified query message, so that the last hop router can be located.
  • the message is forwarded to the network segment, so that the last hop router is accurately located in the multicast route tracking, which reduces the number of probes for the query mode when the positioning is performed, which greatly improves the success of locating the last hop router.
  • the rate also improves the success rate of multicast route tracking.
  • the TTL of the Query message is modified to limit the number of times the queried message is forwarded. This prevents the last hop from being successfully located.
  • the Query message is also forwarded in the network, thus preventing packet flooding.
  • an embodiment of the present invention further provides a router, including:
  • the receiving module 301 is configured to receive, by the router that performs the multicast route tracking, the unicast to the receiver, and the determining module 302 is configured to determine whether the router is in the network segment to which the receiver address belongs, and does not forward the multicast data stream. If yes, determine whether there is an active multicast member in the network segment;
  • the locating module 303 is configured to: when the determining module 302 determines that there is an active multicast member in the network segment, modify the Query message received by the receiving module 301 and forward the Query message to the network segment.
  • the positioning module 303 may specifically include:
  • a modifying unit configured to: when the determining module 302 determines that there is an active multicast member in the network segment, modify the destination address of the query packet received by the receiving module 301 to the address of all the multicast routers;
  • the forwarding unit is configured to forward the modified query message to the network segment to which the receiver address belongs.
  • the modifying unit is further configured to modify the lifetime of the query message received by the receiving module 301 when the determining module determines that there is an active multicast member in the network segment.
  • the foregoing router may further include:
  • the response module is configured to: when the determining module determines that the router is not in the network segment to which the receiver address belongs, or when there is no active multicast member in the network segment, send a response packet containing the error code to the query packet.
  • the specified response address is configured to: when the determining module determines that the router is not in the network segment to which the receiver address belongs, or when there is no active multicast member in the network segment.
  • the determining module determines whether the router is in the same network segment as the receiver, and does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, the query module modifies the query packet. After being forwarded to the network segment, the multicast routing tracking is used to accurately locate the last hop router, which reduces the number of probes for querying the packet transmission mode, and greatly improves the success rate of multicast route tracking.
  • the TTL of the Query message is modified to limit the number of queried packets. This prevents the last hop from being successfully located.
  • the Query message is also forwarded in the network, thus preventing packet flooding.
  • an embodiment of the present invention further provides a method for multicast route tracking, which specifically includes the following steps: Step 201: A router that performs multicast route tracking unicasts a query message to a multicast receiver.
  • the destination address is the address of the receiver.
  • Step 202 After receiving the query message, the router determines whether it is the last hop router. If yes, step 207 is performed; otherwise, step 203 is performed.
  • Step 203 The router determines whether it is in the network segment to which the multicast receiver address belongs, and does not forward the multicast data stream; if yes, that is, both conditions are met, step 204 is performed; otherwise, step 209 is performed.
  • the foregoing judgment may be specifically: determining whether the interface is directly connected to the network segment to which the multicast receiver address belongs, and the interface is not in the outbound interface list of the multicast forwarding entry.
  • Step 204 Determine whether there is an active multicast member in the network segment. If yes, execute step 205, where the router may be a loser; otherwise, execute step 209.
  • Step 205 Modify the query message received by the router, and then forward the modified query message to the network segment.
  • the modification query message is specifically:
  • the modified query packet can be received by all multicast routers in the network segment.
  • the TTL of the received query message can be modified to prevent the flood of the message.
  • the query packet can be directly forwarded from the interface connected to the network segment by the router.
  • Step 206 The multicast last hop router in the network segment receives the modified query message, so as to locate the last hop router, that is, the location is successful, and the multicast route tracking process begins.
  • Step 207 The last hop router sends a multicast tracking request message (IGMP Tracert Request) to the upstream hop router along the reverse multicast path to the multicast source address. If the previous hop router is not the first to connect to the multicast source, The hop router continues to send the multicast tracking request message to the upstream hop router along the reverse multicast path to the multicast source address.
  • IGMP Tracert Request multicast tracking request message
  • the response data block of the hop (including the interface address of the hop and the packet statistics) may be added to the request packet.
  • Step 208 After receiving the request packet, the first hop router that connects the multicast source sends a multicast tracking response packet (IGMP Tracert Response) to the response address specified in the query packet to complete the multicast route tracking.
  • IGMP Tracert Response multicast tracking response packet
  • the first hop router may also add a response data block of the hop in the request message, and then send the request message.
  • Step 209 The router that receives the query message returns a response message containing the error code (WR0NG_LAST_H0P) to the response address specified in the query message.
  • the router that receives the query message is in the same network segment as the receiver, and does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query report.
  • the message is forwarded to the network segment to accurately locate the last hop router, and then implement multicast route tracking, which improves the accuracy and reliability of multicast route tracking, and reduces the query message when the last hop router is located.
  • the number of probes in the transmission mode greatly improves the success rate of the last hop router, and also improves the success rate of multicast route tracking.
  • the TTL of the Query message is modified to limit the number of times the queried message is forwarded. This prevents the last hop from being successfully located.
  • the Query message is also forwarded in the network, thus preventing packet flooding.
  • the embodiments of the present invention can be implemented by software, and the corresponding software can be stored in a readable storage medium, such as a Flash, a CF card or a hard disk of a router.
  • a readable storage medium such as a Flash, a CF card or a hard disk of a router.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a last-hop positioning router, and a multicast route tracking method and the router. The technical field of this invention is network communication. The positioning method includes the following steps: the router receives the inquiry message, which is sent to the unicast receiver by the multicast route tracking router; the router judges whether it is in the network segment belong to received address, and does not transmit multicast data flow; if it is, judging whether the network segment has a active multicast number; if it is, amending the inquiry message and transmitting to this network segment. The router includes the receiving module, the judging module, and the positioning module. The tracking method includes the following steps: positioning the last-hop router based the method as noted above; transmitting the request message to the upper hop along the reverse path to the source address; transmitting the response message to the pointed address of the inquiry message, after the first hop router connected the multicast source receiving the request message. The invention can exactly locate the last-hop router in multicast router tracking process, and increase the success ratio for positioning the last hop router and multicast router tracking.

Description

定位最后一跳路由器及组播路由跟踪的方法和路由器 技术领域  Method and router for locating last hop router and multicast route tracking

本发明涉及网络通信领域, 特别涉及一种组播路由跟踪中定位最后一跳路由器的方法、 路由器和组播路由跟踪的方法。  The present invention relates to the field of network communications, and in particular, to a method, a router, and a multicast route tracking method for locating a last hop router in multicast route tracking.

 Say

背景技术 Background technique

Mtracert (Multicast Trace Route, 组播路由跟踪) 是一种组播路由协议的故障诊断工具, 它可以实现收集组播路径的流量统计信息、 提供异常节点信息以及收集逐跳的 (S, G)流量 统计信息等功能。 Mtracert 工具的开发遵循一种跟踪组书播数据从组播源到特定目的接收者所 经过的网络路径的机制: 在执行组播路由跟踪的路由器 (或网管主机) 上输入 mtrace命令, 其中指定了源地址、 目的地址和组播组; 该路由器向目的地址的最后一跳路由器 (Last-Hop) 发送 IGMP (Internet Group Management Protocol, 因特网组管理协议) Tracert Query (跟踪查 询) 报文, 最后一跳路由器收到该报文后, 增加本跳的响应数据块 (包含本跳的接口地址和 数据包统计信息)后,沿着到源地址的逆向组播路径向上一跳路由器发送 IGMP Tracert Request (跟踪请求) 报文; 其后每一跳路由器收到该请求报文后, 都增加本跳的响应数据块, 并向 源方向转发该请求报文; 当连接组播源的第一跳路由器收到该请求报文并添加本跳的响应数 据块后,则向查询报文中指定的响应地址(Response Address)发送 IGMP Tracert Response (跟 踪响应) 报文。  Mtracert (Multicast Trace Route) is a fault diagnosis tool for multicast routing protocols. It collects traffic statistics of multicast routes, provides abnormal node information, and collects hop-by-hop (S, G) traffic. Statistics and other functions. The development of the Mtracert tool follows a mechanism for tracking the network path through which a group of books broadcasts data from a multicast source to a specific destination receiver: Enter the mtrace command on the router (or network management host) that performs multicast route tracking, which specifies Source address, destination address, and multicast group; the router sends an IGMP (Internet Group Management Protocol) Tracert Query message to the last hop router (Last-Hop) of the destination address, the last hop After receiving the packet, the router adds the response data block of the hop (including the interface address and packet statistics of the hop), and then sends an IGMP Tracert Request to the upstream hop router along the reverse multicast path to the source address. Request) a message; after each hop router receives the request message, it adds the response data block of the hop and forwards the request message to the source; when the first hop router connected to the multicast source receives After the request message adds the response data block of the hop, it responds to the response address specified in the query message (Response Addr Ess) Sends an IGMP Tracert Response message.

例如, 参见图 1, 利用 Mtracert工具, 在查询者即路由器 Q1上输入 mtrace命令, 指定源 PC1的 IP地址 S、 接收者 PC2的 IP地址 D和组播组地址 G。 路由器 Q1向目的地址 D发送 查询报文, 最后一跳路由器 R4 收到查询报文后, 沿着到源地址的逆向组播路径, 向上一跳 路由器 R2发送请求报文, 并在该报文中加上自己这一跳的信息, R2收到后也加上自己这一 跳的信息, 并继续向上一跳路由器 R1 发送请求报文, 以此类推。 当连接组播源的第一跳路 由器 R1收到请求报文后, 则加上自己这一跳的信息, 然后向查询报文中指定的响应地址(可 能为路由器 Q1 ) 发送响应报文。  For example, see Figure 1. Using the Mtracert tool, enter the mtrace command on the querier, router Q1, specifying the IP address S of the source PC1, the IP address D of the receiver PC2, and the multicast group address G. The router Q1 sends a query message to the destination address D. After receiving the query message, the last hop router R4 sends a request message to the upstream hop router R2 along the reverse multicast path to the source address, and in the message. Adding the information of this hop, R2 also adds its own hop information after receiving it, and continues to send the request message to the upstream hop router R1, and so on. When the first hop router R1 connected to the multicast source receives the request packet, it adds its own hop information, and then sends a response packet to the response address (may be router Q1) specified in the Query message.

在上述组播路由跟踪的过程中,查询者需要向目的地址的最后一跳路由器发送查询报文, 因此如何定位最后一跳路由器就成为组播路由跟踪过程中的关键问题。 现有技术中通常采用 以下方法来定位最后一跳路由器: 执行组播路由跟踪的路由器 (即查询者) 向网络中的路由 器发送查询报文, 接收到查询报文的路由器判断自己是否满足下面两个条件: 至少有一个运 行组播的接口与目的地址属于同一网段; 将来自指定源的组播数据流转发至该网段。 如果同 时满足这两个条件, 则自己就是最后一跳路由器, 否则就不是。 接收到查询报文的路由器如 果发现自己不是最后一跳路由器, 则进一步判断收到的查询报文的类型, 如果查询报文是单 播报文, 则将一个错误码为 WRONG_LAST_HOP 的响应报文发送给查询者, 查询者收到响 应报文后, 更换发送发式后继续发送查询报文, 重新定位最后一跳路由器; 如果查询报文是 组播报文, 则将该查询报文抛弃, 不作进一步处理。 During the multicast route tracking process, the querier needs to send the Query message to the last hop router of the destination address. Therefore, how to locate the last hop router becomes a key issue in the multicast route tracking process. Generally used in the prior art The following method is used to locate the last hop router: The router that performs multicast route tracking (that is, the querier) sends a query message to the router in the network. The router that receives the query message determines whether it meets the following two conditions: At least one The interface running the multicast belongs to the same network segment as the destination address. The multicast data stream from the specified source is forwarded to the network segment. If both conditions are met, then you are the last hop router, otherwise it is not. If the router that receives the Query message finds that it is not the last hop router, it further determines the type of the received Query message. If the Query message is a unicast message, it sends a response message with the error code WRONG_LAST_HOP. After the querier receives the response packet, the querier continues to send the Query message after resending the sender and re-locates the last hop router. If the Query message is a multicast packet, the Query message is discarded. deal with.

其中, 查询者发送查询报文时, 可以采用下面的发送方式:  When the querier sends the Query message, the following sending mode can be used:

当最后一跳路由器未知, 且组播源地址 S、 组播接收者地址 D和组播组地址 G已知时, 查询者单播一个目的地址为 D的查询报文给接收者, 且该查询报文中携带 Router Alert IP选 项, 则查询报文有可能被接收者所在共享网段的最后一跳路由器收到。  When the last hop router is unknown, and the multicast source address S, the multicast receiver address D, and the multicast group address G are known, the querier unicasts a query message with the destination address D to the receiver, and the query If the packet carries the Router Alert IP option, the query packet may be received by the last hop router on the shared network segment where the receiver resides.

在实现本发明的过程中, 发明人发现上述现有技术至少存在以下缺点:  In the process of implementing the present invention, the inventors have found that the above prior art has at least the following disadvantages:

由于单播路径和组播路径可能不相同, 因此无法保证查询报文能够准确地发送到组播最 后一跳路由器。 例如, 参见图 1, 如果从查询者 Q1 到接收者 PC2 的单播路径为: Q1->R3->R5->PC2, 而从组播源 PC1 到 PC2 的组播数据流的实际路径为: PC1->R1->R2->R4->PC2, 即 R5为 PC2的单播最后一跳路 ώ器, R4为 PC2的组播最后一跳 路由器, 因此查询报文会被单播最后一跳路由器 R5收到, R5发现自己不是真正的组播最后 一跳路由器, 则会发送一个错误码为 WR0NG_LAST_H0P 的响应报文给查询者, 而真正的 组播最后一跳路由器 R4没有收到查询报文。 发明内容  The unicast path and the multicast path may be different. Therefore, the Query message cannot be accurately sent to the multicast hop router. For example, referring to FIG. 1, if the unicast path from the querier Q1 to the receiver PC2 is: Q1->R3->R5->PC2, the actual path of the multicast data stream from the multicast source PC1 to PC2 is: PC1->R1->R2->R4->PC2, that is, R5 is the unicast last hop router of PC2, and R4 is the multicast last hop router of PC2, so the query message will be unicast last hop router. R5 receives, R5 finds that it is not the real multicast last hop router, it will send a response message with the error code WR0NG_LAST_H0P to the querier, and the real multicast last hop router R4 does not receive the query message. Summary of the invention

为了实现在组播路由跟踪中准确定位最后一跳路由器, 本发明实施例提供了一种组播路 由跟踪中定位最后一跳路由器的方法和路由器。 所述技术方案如下:  In order to accurately locate the last hop router in the multicast route tracking, the embodiment of the present invention provides a method and a router for locating the last hop router in the multicast route tracking. The technical solution is as follows:

一方面, 一种组播路由跟踪中定位最后一跳路由器的方法, 所述方法包括:  In one aspect, a method for locating a last hop router in multicast route tracking, the method includes:

路由器接收执行组播路由跟踪的路由器单播给接收者的查询报文;  The router receives the query message that the router performing the multicast route tracking unicasts to the receiver;

所述路由器判断是否自己在所述接收者地址所属的网段中, 且不转发组播数据流, 如果 是, 则判断所述网段中是否有活动的组播成员, 如果有, 则修改所述查询报文后将其转发到 所述网段中, 位于所述网段中的最后一跳路由器接收到所述修改后的查询报文。  The router determines whether it is in the network segment to which the receiver address belongs, and does not forward the multicast data stream. If yes, it determines whether there is an active multicast member in the network segment, and if so, the modification The queried message is forwarded to the network segment, and the last hop router located in the network segment receives the modified query message.

另一方面, 一种路由器, 所述路由器包括: 接收模块, 用于接收执行组播路由跟踪的路由器单播给接收者的查询报文; 判断模块, 用于判断是否所述路由器在所述接收者地址所属的网段中, 且不转发组播数 据流, 如果是, 则判断所述网段中是否有活动的组播成员; In another aspect, a router includes: a receiving module, configured to receive a query message that the router performing the multicast route tracking unicasts to the receiver, and a determining module, configured to determine whether the router is in the network segment to which the receiver address belongs, and does not forward the multicast Data stream, if yes, determining whether there is an active multicast member in the network segment;

定位模块, 用于当所述判断模块判断出所述网段中有活动的组播成员时, 修改所述接收 模块收到的查询报文后将其转发到所述网段中。  The locating module is configured to: when the determining module determines that there is an active multicast member in the network segment, modify the Query message received by the receiving module and forward the Query message to the network segment.

为了提高组播路由跟踪的成功率, 本发明实施例还提供了一种组播路由跟踪的方法, 所 述方法包括:  In order to improve the success rate of the multicast route tracking, the embodiment of the present invention further provides a method for multicast route tracking, where the method includes:

执行组播路由跟踪的路由器向接收者单播查询报文;  The router that performs multicast route tracking unicasts the query message to the receiver.

路由器接收到所述查询报文后, 判断是否自己在所述接收者地址所属的网段中, 且不转 发组播数据流, 如果是, 则判断所述网段中是否有活动的组播成员, 如果有, 则修改所述查 询报文后将其转发到所述网段中;  After receiving the query message, the router determines whether it is in the network segment to which the receiver address belongs, and does not forward the multicast data stream. If yes, it determines whether there is an active multicast member in the network segment. If yes, modify the query message and forward it to the network segment;

所述网段中的最后一跳路由器接收到所述修改后的查询报文后, 沿着到组播源地址的逆 向组播路径向上一跳路由器发送组播跟踪的请求报文;  After receiving the modified query message, the last hop router in the network segment sends a multicast tracking request message to the upstream hop router along the reverse multicast path to the multicast source address.

连接组播源的第一跳路由器收到所述请求报文后, 向所述查询报文中指定的响应地址发 送组播跟踪的响应报文。  After receiving the request packet, the first hop router connected to the multicast source sends a multicast tracking response packet to the response address specified in the query packet.

本发明实施例通过判断收到查询报文的路由器是否与接收者在同一网段中, 且不转发组 播数据流, 以及该网段中是否有活动的组播成员, 如果是, 则修改查询报文后转发到该网段 中, 从而实现了组播路由跟踪中准确地定位最后一跳路由器, 减少了定位时对查询报文发送 方式的试探次数, 极大地提高了组播路由跟踪的成功率。 成功定位最后一跳路由器后, 进行 组播路由跟踪, 极大地提高了组播路由跟踪的准确性、 可靠性和成功率。 附图说明  The embodiment of the present invention determines whether the router that receives the query message is in the same network segment as the receiver, does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query. After the packet is forwarded to the network segment, the router can accurately locate the last hop router in the multicast route tracking, which reduces the number of probes sent by the query mode during positioning, which greatly improves the success of multicast route tracking. rate. After the last hop router is successfully located, multicast route tracking is performed, which greatly improves the accuracy, reliability, and success rate of multicast route tracking. DRAWINGS

图 1是现有技术中组播路由跟踪组网示意图;  1 is a schematic diagram of a multicast routing tracking networking in the prior art;

图 2是本发明实施例提供的组播路由跟踪中定位最后一跳路由器的方法的流程图; 图 3是本发明实施例提供的路由器的结构图;  2 is a flowchart of a method for locating a last hop router in multicast route tracking according to an embodiment of the present invention; FIG. 3 is a structural diagram of a router according to an embodiment of the present invention;

图 4是本发明实施例提供的组播路由跟踪的方法的流程图。 具体实施方式  FIG. 4 is a flowchart of a method for multicast route tracking according to an embodiment of the present invention. detailed description

为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式作进 一步地详细描述。 本发明实施例通过判断收到查询报文的路由器是否与接收者在同一网段中, 且不转发组 播数据流, 以及该网段中是否有活动的组播成员, 如果是, 则修改查询报文后转发到该网段 中, 从而实现了组播路由跟踪中准确地定位最后一跳路由器, 减少了定位时对查询报文发送 方式的试探次数, 提高了定位最后一跳路由器的成功率。 The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. The embodiment of the present invention determines whether the router that receives the query message is in the same network segment as the receiver, does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query. After the packet is forwarded to the network segment, the last hop router is accurately located in the multicast route tracking. This reduces the number of probes sent by the query packet during positioning, and improves the success rate of the last hop router. .

参见图 2, 本发明实施例提供了一种组播路由跟踪中定位最后一跳路由器的方法, 具体 包括以下步骤:  Referring to FIG. 2, an embodiment of the present invention provides a method for locating a last hop router in multicast route tracking, which specifically includes the following steps:

步骤 101 : 在组播路由跟踪中, 执行组播路由跟踪的路由器向组播接收者单播查询报文。 在执行组播路由跟踪的路由器上输入 mtrace命令, mtrace命令中指定了组播源地址、 组 播接收者地址和组播组地址, 执行组播路由跟踪的路由器则根据该 mtrace命令按照单播路径 向网络中发送查询报文。  Step 101: In the multicast route tracking, the router performing the multicast route tracking unicasts the query message to the multicast receiver. On the router that performs multicast route tracking, enter the mtrace command. The mtrace command specifies the multicast source address, multicast receiver address, and multicast group address. The router that performs multicast route tracking follows the unicast path according to the mtrace command. Send a query message to the network.

步骤 102: 网络中的路由器接收到上述查询报文, 判断自己是否为最后一跳路由器, 如 果是,则定位成功,开始进行组播路由跟踪过程直至完成组播路由跟踪;否则,执行步骤 103 ; 步骤 103 : 路由器判断是否自己在组播接收者地址所属的网段中, 且不转发组播数据流; 如果是, 即两个条件都满足, 则执行步骤 104; 否则, 执行步骤 107。  Step 102: The router in the network receives the query message to determine whether it is the last hop router. If yes, the location is successful, and the multicast route tracking process is started until the multicast route tracking is completed; otherwise, step 103 is performed; Step 103: The router determines whether it is in the network segment to which the multicast receiver address belongs, and does not forward the multicast data stream; if yes, that is, both conditions are met, step 104 is performed; otherwise, step 107 is performed.

其中, 上述判断可以具体为: 判断自己是否有一个与组播接收者地址所属网段直连的接 口, 且该接口不在组播转发表项的出接口列表中。  The foregoing judgment may be specifically: determining whether the interface is directly connected to the network segment to which the multicast receiver address belongs, and the interface is not in the outbound interface list of the multicast forwarding entry.

步骤 104: 判断上述网段中是否有活动的组播成员, 如果有, 则执行步骤 105, 此时路 ώ 器可能为失败者; 否则, 执行歩骤 107。  Step 104: Determine whether there is an active multicast member in the network segment. If yes, execute step 105. At this time, the router may be a loser; otherwise, execute step 107.

步骤 105 : 修改路由器收到的查询报文, 然后将修改后的查询报文转发到该网段中。 其中, 修改查询报文具体为:  Step 105: Modify the query packet received by the router, and then forward the modified query packet to the network segment. The modification query message is specifically:

将收到的查询报文的 IP头中的目的地址修改为所有组播路由器的地址,则修改后的查询 报文可以被该网段内的所有组播路由器收到。  If the destination address in the IP header of the received query packet is changed to the address of all multicast routers, the modified query packet can be received by all multicast routers in the network segment.

进一步地, 还可以修改收到的查询报文的 TTL ( Time To Live, 生存时间), 限制修改后 的查询报文转发次数,例如将查询报文的 TTL修改为 1,修改后的查询报文只能被转发一次, 该查询报文被该网段的路由器收到后, 不能再被继续转发, 防止最后一跳路由器被成功定位 后, 该查询报文还在网段中被转发, 从而避免了报文泛滥。  Further, the TTL (Time To Live) of the received query message may be modified, and the number of times of the modified query message is limited. For example, the TTL of the query packet is changed to 1, and the modified query message is modified. It can only be forwarded once. After the query packet is received by the router on the network segment, it cannot be forwarded again. After the last hop router is successfully located, the query packet is forwarded in the network segment, thus avoiding The message is flooding.

转发修改后的查询报文时, 可以直接将该查询报文从该路由器与上述网段相连的接口转 发出去。  When the modified query packet is forwarded, the query packet can be directly forwarded from the interface connected to the network segment by the router.

步骤 106: 位于该网段中的组播最后一跳路由器接收到修改后的查询报文, 从而定位出 最后一跳路由器, 则定位成功, 开始进行组播路由跟踪过程直至完成组播路由跟踪。 最后一跳路由器收到修改后的查询报文后, 判断自己是否为最后一跳路由器, 即判断自 己是否至少有一个运行组播的接口与接收者地址属于同一网段, 且将来自指定源的组播数据 流转发至该网段。 如果同时满足这两个条件, 则自己就是最后一跳路由器, 否则就不是最后 一跳路由器。 Step 106: The multicast last hop router in the network segment receives the modified query message, so that the last hop router is located, and the location is successful, and the multicast route tracking process is started until the multicast route tracking is completed. After receiving the modified query message, the last hop router determines whether it is the last hop router, that is, whether it has at least one interface running multicast and the receiver address belong to the same network segment, and will be from the specified source. The multicast data stream is forwarded to the network segment. If both conditions are met, then it is the last hop router, otherwise it is not the last hop router.

步骤 107: 接收到查询报文的路由器返回一个包含错误码 (WRONG_LAST_HOP) 的响 应报文给查询报文中指定的响应地址。  Step 107: The router that receives the query message returns a response message containing the error code (WRONG_LAST_HOP) to the response address specified in the query message.

例如, 参见图 1, 查询者 Q1向组播接收者 PC2单播查询报文, 当路由器 R5收到后, 发 现自己有一个与 PC2地址所属网段直连的接口 IF0, 但该接口不在相应的组播转发表项的出 接口列表中, 即自己不转发组播数据流; 经判断发现该网段中存在活动的组成员后, 则将收 到的查询报文的 IP头中的目的地址改为所有组播路由器的地址, 例如 224.0.0.2, TTL值改为 For example, referring to Figure 1, the querier Q1 unicasts the Query message to the multicast receiver PC2. When the router R5 receives it, it finds that it has an interface IF0 directly connected to the network segment to which the PC2 address belongs, but the interface is not in the corresponding In the outbound interface list of the multicast forwarding entry, the multicast data stream is not forwarded by itself. After the network member is found to have active group members, the destination address in the IP header of the received query packet is changed. Change the address of all multicast routers, for example 224.0.0.2, to TTL

1, 然后从上述接口 IF0转发出去, 则该网段中真正的最后一跳路由器 R4就会收到修改后的 查询报文, 从而可以定位出最后一跳路由器。 1, and then forwarded from the above interface IF0, the real last hop router R4 in the network segment will receive the modified query message, so that the last hop router can be located.

本实施例通过判断收到查询报文的路由器是否与接收者在同一网段中, 且不转发组播数 据流, 以及该网段中是否有活动的组播成员, 如果是, 则修改查询报文后转发到该网段中, 从而实现了组播路由跟踪中准确地定位最后一跳路由器, 减少了定位时对查询报文发送方式 的试探次数, 极大地提高了定位最后一跳路由器的成功率, 同时也提高了组播路由跟踪的成 功率。 修改查询报文中的 TTL, 限制修改后的查询报文转发次数, 防止了最后一跳路 ώ器被 成功定位后, 该查询报文还在网络中被转发, 从而防止了报文泛滥。  In this embodiment, it is determined whether the router that receives the query message is in the same network segment as the receiver, and does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query report. The message is forwarded to the network segment, so that the last hop router is accurately located in the multicast route tracking, which reduces the number of probes for the query mode when the positioning is performed, which greatly improves the success of locating the last hop router. The rate also improves the success rate of multicast route tracking. The TTL of the Query message is modified to limit the number of times the queried message is forwarded. This prevents the last hop from being successfully located. The Query message is also forwarded in the network, thus preventing packet flooding.

参见图 3, 本发明实施例还提供了一种路由器, 具体包括:  Referring to FIG. 3, an embodiment of the present invention further provides a router, including:

接收模块 301, 用于接收执行组播路由跟踪的路由器单播给接收者的查询报文; 判断模块 302, 用于判断是否路由器在接收者地址所属的网段中, 且不转发组播数据流, 如果是, 则判断网段中是否有活动的组播成员;  The receiving module 301 is configured to receive, by the router that performs the multicast route tracking, the unicast to the receiver, and the determining module 302 is configured to determine whether the router is in the network segment to which the receiver address belongs, and does not forward the multicast data stream. If yes, determine whether there is an active multicast member in the network segment;

定位模块 303, 用于当判断模块 302判断出网段中有活动的组播成员时, 修改接收模块 301收到的查询报文后将其转发到网段中。  The locating module 303 is configured to: when the determining module 302 determines that there is an active multicast member in the network segment, modify the Query message received by the receiving module 301 and forward the Query message to the network segment.

其中, 定位模块 303可以具体包括:  The positioning module 303 may specifically include:

修改单元, 用于当判断模块 302判断出网段中有活动的组播成员时, 将接收模块 301收 到的查询报文的目的地址修改为所有组播路由器的地址;  a modifying unit, configured to: when the determining module 302 determines that there is an active multicast member in the network segment, modify the destination address of the query packet received by the receiving module 301 to the address of all the multicast routers;

转发单元, 用于将修改单元修改后的查询报文转发到接收者地址所属的网段中。  The forwarding unit is configured to forward the modified query message to the network segment to which the receiver address belongs.

进一步地, 为了防止报文泛滥, 修改单元还用于当判断模块判断出网段中有活动的组播 成员时, 修改接收模块 301收到的查询报文的生存时间。 另外, 上述路由器还可以包括: Further, in order to prevent the flooding of the message, the modifying unit is further configured to modify the lifetime of the query message received by the receiving module 301 when the determining module determines that there is an active multicast member in the network segment. In addition, the foregoing router may further include:

响应模块, 用于当判断模块判断出上述路由器不在接收者地址所属的网段中时, 或判断 出网段中没有活动的组播成员时,发送包含错误码的响应报文给查询报文中指定的响应地址。  The response module is configured to: when the determining module determines that the router is not in the network segment to which the receiver address belongs, or when there is no active multicast member in the network segment, send a response packet containing the error code to the query packet. The specified response address.

本实施例通过判断模块判断路由器是否与接收者在同一网段中, 且不转发组播数据流, 以及该网段中是否有活动的组播成员, 如果是, 则通过定位模块修改查询报文后转发到该网 段中, 从而实现了组播路由跟踪中准确地定位最后一跳路由器, 减少了定位时对查询报文发 送方式的试探次数, 极大地提高了组播路由跟踪的成功率。 修改查询报文中的 TTL, 限制修 改后的查询报文转发次数, 防止了最后一跳路由器被成功定位后, 该查询报文还在网络中被 转发, 从而防止了报文泛滥。  In this embodiment, the determining module determines whether the router is in the same network segment as the receiver, and does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, the query module modifies the query packet. After being forwarded to the network segment, the multicast routing tracking is used to accurately locate the last hop router, which reduces the number of probes for querying the packet transmission mode, and greatly improves the success rate of multicast route tracking. The TTL of the Query message is modified to limit the number of queried packets. This prevents the last hop from being successfully located. The Query message is also forwarded in the network, thus preventing packet flooding.

参见图 4, 本发明实施例还提供了一种组播路由跟踪的方法, 具体包括以下步骤: 步骤 201 : 执行组播路由跟踪的路由器向组播接收者单播查询报文;  Referring to FIG. 4, an embodiment of the present invention further provides a method for multicast route tracking, which specifically includes the following steps: Step 201: A router that performs multicast route tracking unicasts a query message to a multicast receiver.

可以在执行组播路由跟踪的路由器上输入 mtrace命令, 其中指定了源地址、 目的地址和 组播组, 该目的地址即接收者的地址。  You can enter the mtrace command on the router that performs multicast route tracking, which specifies the source address, destination address, and multicast group. The destination address is the address of the receiver.

步骤 202: 某一个路由器接收到上述查询报文后, 判断自己是否为最后一跳路由器, 如 果是, 则执行步骤 207; 否则, 执行步骤 203。  Step 202: After receiving the query message, the router determines whether it is the last hop router. If yes, step 207 is performed; otherwise, step 203 is performed.

步骤 203 : 该路由器判断是否自己在组播接收者地址所属的网段中, 且不转发组播数据 流; 如果是, 即两个条件都满足, 则执行步骤 204; 否则, 执行步骤 209。  Step 203: The router determines whether it is in the network segment to which the multicast receiver address belongs, and does not forward the multicast data stream; if yes, that is, both conditions are met, step 204 is performed; otherwise, step 209 is performed.

其中, 上述判断可以具体为: 判断自己是否有一个与组播接收者地址所属网段直连的接 口, 且该接口不在组播转发表项的出接口列表中。  The foregoing judgment may be specifically: determining whether the interface is directly connected to the network segment to which the multicast receiver address belongs, and the interface is not in the outbound interface list of the multicast forwarding entry.

步骤 204: 判断上述网段中是否有活动的组播成员, 如果有, 则执行步骤 205, 此时路由 器可能为失败者; 否则, 执行歩骤 209。  Step 204: Determine whether there is an active multicast member in the network segment. If yes, execute step 205, where the router may be a loser; otherwise, execute step 209.

步骤 205: 修改路由器收到的查询报文, 然后将修改后的查询报文转发到上述网段中。 其中, 修改查询报文具体为:  Step 205: Modify the query message received by the router, and then forward the modified query message to the network segment. The modification query message is specifically:

将收到的查询报文的 IP头中的目的地址修改为所有组播路由器的地址,则修改后的查询 报文可以被该网段内的所有组播路由器收到。  If the destination address in the IP header of the received query packet is changed to the address of all multicast routers, the modified query packet can be received by all multicast routers in the network segment.

进一步地, 还可以修改收到的查询报文的 TTL, 防止报文泛滥。  Further, the TTL of the received query message can be modified to prevent the flood of the message.

转发修改后的查询报文时, 可以直接将该查询报文从该路由器与上述网段相连的接口转 发出去。  When the modified query packet is forwarded, the query packet can be directly forwarded from the interface connected to the network segment by the router.

步骤 206: 位于该网段中的组播最后一跳路由器接收到修改后的查询报文, 从而定位出 最后一跳路由器, 即定位成功, 开始进行组播路由跟踪过程。 步骤 207: 最后一跳路由器沿着到组播源地址的逆向组播路径向上一跳路由器发送组播 跟踪的请求报文(IGMP Tracert Request),上一跳路由器如果不是连接组播源的第一跳路由器, 则继续沿着到组播源地址的逆向组播路径向上一跳路由器发送组播跟踪的请求报文; Step 206: The multicast last hop router in the network segment receives the modified query message, so as to locate the last hop router, that is, the location is successful, and the multicast route tracking process begins. Step 207: The last hop router sends a multicast tracking request message (IGMP Tracert Request) to the upstream hop router along the reverse multicast path to the multicast source address. If the previous hop router is not the first to connect to the multicast source, The hop router continues to send the multicast tracking request message to the upstream hop router along the reverse multicast path to the multicast source address.

其中, 最后一跳路由器或其他路由器向上一跳路由器发送请求报文之前, 还可以在请求 报文中增加本跳的响应数据块 (包含本跳的接口地址和数据包统计信息)。  Before the last hop router or other router sends a request packet to the upstream hop router, the response data block of the hop (including the interface address of the hop and the packet statistics) may be added to the request packet.

步骤 208: 连接组播源的第一跳路由器收到请求报文后, 向查询报文中指定的响应地址 发送组播跟踪的响应报文 ( IGMP Tracert Response ), 完成组播路由跟踪。  Step 208: After receiving the request packet, the first hop router that connects the multicast source sends a multicast tracking response packet (IGMP Tracert Response) to the response address specified in the query packet to complete the multicast route tracking.

其中, 第一跳路由器也可以在请求报文中添加本跳的响应数据块, 然后再发送请求报文。 步骤 209: 接收到查询报文的路由器返回一个包含错误码 (WR0NG_LAST_H0P) 的响 应报文给查询报文中指定的响应地址。  The first hop router may also add a response data block of the hop in the request message, and then send the request message. Step 209: The router that receives the query message returns a response message containing the error code (WR0NG_LAST_H0P) to the response address specified in the query message.

本实施例通过判断收到查询报文的路由器是否与接收者在同一网段中, 且不转发组播数 据流, 以及该网段中是否有活动的组播成员, 如果是, 则修改查询报文后转发到该网段中, 从而准确地定位最后一跳路由器, 然后实现组播路由跟踪, 提高了组播路由跟踪的准确性和 可靠性, 减少了定位最后一跳路由器时对查询报文发送方式的试探次数, 极大地提高了定位 最后一跳路由器的成功率, 也提高了组播路由跟踪的成功率。 修改查询报文中的 TTL, 限制 修改后的查询报文转发次数, 防止了最后一跳路由器被成功定位后, 该查询报文还在网络中 被转发, 从而防止了报文泛滥。  In this embodiment, it is determined whether the router that receives the query message is in the same network segment as the receiver, and does not forward the multicast data stream, and whether there is an active multicast member in the network segment. If yes, modify the query report. The message is forwarded to the network segment to accurately locate the last hop router, and then implement multicast route tracking, which improves the accuracy and reliability of multicast route tracking, and reduces the query message when the last hop router is located. The number of probes in the transmission mode greatly improves the success rate of the last hop router, and also improves the success rate of multicast route tracking. The TTL of the Query message is modified to limit the number of times the queried message is forwarded. This prevents the last hop from being successfully located. The Query message is also forwarded in the network, thus preventing packet flooding.

本发明实施例可以通过软件实现, 相应的软件可以存储在可读取的存储介质中, 如路由 器的 Flash、 CF卡或硬盘中。  The embodiments of the present invention can be implemented by software, and the corresponding software can be stored in a readable storage medium, such as a Flash, a CF card or a hard disk of a router.

以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的精神和原则之 内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权 利 要 求 书 Claim 1 . 一种组播路由跟踪中定位最后一跳路由器的方法, 其特征在于, 所述方法包括: 路由器接收执行组播路由跟踪的路由器单播给接收者的查询报文; A method for locating a last hop router in a multicast route tracking, the method comprising: the router receiving a query message that the router performing the multicast route tracking unicasts to the receiver; 若所述路由器在所述接收者地址所属的网段中, 且不转发组播数据流, 则判断所述接收 者地址所属的网段中是否有活动的组播成员, 如果有, 则修改所述查询报文后将其转发到所 述接收者地址所属的网段中, 使所述接收者地址所属的网段中的最后一跳路由器接收到所述 修改后的查询报文。  If the router is in the network segment to which the receiver address belongs, and does not forward the multicast data stream, determine whether there is an active multicast member in the network segment to which the receiver address belongs, and if so, modify the network. After the Query message is forwarded, it is forwarded to the network segment to which the receiver address belongs, so that the last hop router in the network segment to which the receiver address belongs receives the modified query message. 2. 根据权利要求 1所述的组播路由跟踪中定位最后一跳路由器的方法, 其特征在于, 修 改所述查询报文的步骤具体为:  The method for locating the last hop router in the multicast route tracking according to claim 1, wherein the step of modifying the query message is specifically: 将所述查询报文的目的地址修改为所有组播路由器的地址。  Modify the destination address of the query packet to the address of all multicast routers. 3. 根据权利要求 2所述的组播路由跟踪中定位最后一跳路由器的方法, 其特征在于, 修 改所述查询报文的步骤还包括:  The method for locating the last hop router in the multicast route tracking according to claim 2, wherein the step of modifying the query message further comprises: 修改所述查询报文的生存时间, 限制修改后的查询报文转发次数。  The lifetime of the query packet is modified, and the number of times the modified query packet is forwarded is limited. 4. 根据权利要求 1所述的组播路由跟踪中定位最后一跳路由器的方法, 其特征在于, 所 述方法还包括:  The method for locating a last-hop router in the multicast route tracking according to claim 1, wherein the method further includes: 如果所述路由器不在所述接收者地址所属的网段中, 或所述接收者地址所属的网段中没 有活动的组播成员, 则发送包含错误码的响应报文给所述查询报文中指定的响应地址。  If the router is not in the network segment to which the receiver address belongs, or there is no active multicast member in the network segment to which the receiver address belongs, the response packet containing the error code is sent to the query message. The specified response address. 5. 一种路由器, 其特征在于, 所述路由器包括:  A router, characterized in that the router comprises: 接收模块, 用于接收执行组播路由跟踪的路由器单播给接收者的查询报文;  a receiving module, configured to receive, by the router performing multicast routing tracking, a unicast query message to the receiver; 判断模块, 用于判断是否所述路由器在所述接收者地址所属的网段中, 且不转发组播数 据流, 如果是, 则判断所述接收者地址所属的网段中是否有活动的组播成员;  a determining module, configured to determine whether the router is in a network segment to which the receiver address belongs, and does not forward the multicast data stream, and if yes, determine whether there is an active group in the network segment to which the receiver address belongs Broadcast member 定位模块, 用于当所述判断模块判断出所述接收者地址所属的网段中有活动的组播成员 时, 修改所述接收模块收到的所述查询报文后将其转发到所述接收者地址所属的网段中。  a locating module, configured to: when the determining module determines that the active multicast member exists in the network segment to which the receiver address belongs, modify the query message received by the receiving module, and then forward the query message to the The network segment to which the receiver address belongs. 6. 根据权利要求 5所述的路由器, 其特征在于, 所述定位模块具体包括:  The router according to claim 5, wherein the positioning module specifically includes: 修改单元, 用于当所述判断模块判断出所述接收者地址所属的网段中有活动的组播成员 时, 将所述接收模块收到的所述查询报文的目的地址修改为所有组播路由器的地址;  a modifying unit, configured to: when the determining module determines that there is an active multicast member in the network segment to which the receiver address belongs, modify the destination address of the query packet received by the receiving module to all groups Broadcast router address; 转发单元,用于将所述修改单元修改后的查询报文转发到所述接收者地址所属的网段中。 And a forwarding unit, configured to forward the modified query message to the network segment to which the receiver address belongs. 7. 根据权利要求 6所述的路由器, 其特征在于, 所述修改单元还用于当所述判断模块判 断出所述接收者地址所属的网段中有活动的组播成员时, 将所述接收模块收到的所述查询报 文的生存时间修改为 1。 The router according to claim 6, wherein the modifying unit is further configured to: when the determining module determines that there is an active multicast member in a network segment to which the receiver address belongs, Receiving the query report received by the module The lifetime of the text is changed to 1. 8. 根据权利要求 5所述的路由器, 其特征在于, 所述路由器还包括:  The router according to claim 5, wherein the router further comprises: 响应模块,用于当所述判断模块判断出所述路由器不在所述接收者地址所属的网段中时, 或判断出所述接收者地址所属的网段中没有活动的组播成员时, 发送包含错误码的响应报文 给所述查询报文中指定的响应地址。  a response module, configured to: when the determining module determines that the router is not in the network segment to which the receiver address belongs, or when it is determined that there is no active multicast member in the network segment to which the receiver address belongs, A response message containing an error code is sent to the response address specified in the query message. 9. 一种组播路由跟踪的方法, 其特征在于, 所述方法包括:  A method for multicast route tracking, the method comprising: 执行组播路由跟踪的路由器向接收者单播查询报文;  The router that performs multicast route tracking unicasts the query message to the receiver. 路由器接收到所述查询报文, 若所述路由器在所述接收者地址所属的网段中, 且不转发 组播数据流, 则判断所述接收者地址所属的网段中是否有活动的组播成员, 如果有, 则修改 所述查询报文后将其转发到所述接收者地址所属的网段中;  The router receives the query message, and if the router is in the network segment to which the receiver address belongs, and does not forward the multicast data stream, it is determined whether there is an active group in the network segment to which the receiver address belongs. Broadcast member, if yes, modify the query message and forward it to the network segment to which the receiver address belongs; 所述接收者地址所属的网段中的最后一跳路由器接收到所述修改后的查询报文后, 沿着 到组播源地址的逆向组播路径向上一跳路由器发送组播跟踪的请求报文;  After receiving the modified query message, the last hop router in the network segment to which the receiver address belongs sends a multicast tracking request report to the upstream hop router along the reverse multicast path to the multicast source address. Text 连接组播源的第一跳路由器收到所述请求报文后, 向所述查询报文中指定的响应地址发 送组播跟踪的响应报文。  After receiving the request packet, the first hop router connected to the multicast source sends a multicast tracking response packet to the response address specified in the query packet. 10. 根据权利要求 9所述的组播路由跟踪的方法, 其特征在于, 修改所述查询报文的步 骤具体为:  The method for modifying the multicast routing according to claim 9, wherein the step of modifying the query message is specifically: 将所述查询报文的 0的地址修改为所有组播路 ώ器的地址。  The address of 0 of the query message is modified to the address of all multicast routers. 11 . 根据权利要求 10所述的组播路由跟踪的方法, 其特征在于, 修改所述查询报文的步 骤还包括: The method for modifying the multicast routing according to claim 10, wherein the step of modifying the query message further comprises:
Figure imgf000011_0001
Figure imgf000011_0001
12. 根据权利要求 9所述的组播路由跟踪的方法, 其特征在于, 所述方法还包括: 如果所述路由器不在所述接收者地址所属的网段中, 或所述接收者地址所属的网段中没 有活动的组播成员, 则发送包含错误码的响应报文给所述查询报文中指定的响应地址。  The method for multicast route tracking according to claim 9, wherein the method further comprises: if the router is not in a network segment to which the receiver address belongs, or the receiver address belongs to If there is no active multicast member in the network segment, a response packet containing the error code is sent to the response address specified in the query message.
PCT/CN2008/071882 2007-08-07 2008-08-05 Method and router for positioning the last hop router and multicasting routing track Ceased WO2009018770A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710143190.2 2007-08-07
CN200710143190A CN100596116C (en) 2007-08-07 2007-08-07 Method and router for locating last hop router and multicast route tracking

Publications (1)

Publication Number Publication Date
WO2009018770A1 true WO2009018770A1 (en) 2009-02-12

Family

ID=38912903

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/071882 Ceased WO2009018770A1 (en) 2007-08-07 2008-08-05 Method and router for positioning the last hop router and multicasting routing track

Country Status (2)

Country Link
CN (1) CN100596116C (en)
WO (1) WO2009018770A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016451A (en) * 2022-12-26 2023-04-25 江苏怀业信息技术股份有限公司 Multicast transmission method of Mesh network

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100596116C (en) * 2007-08-07 2010-03-24 华为技术有限公司 Method and router for locating last hop router and multicast route tracking
CN101459595B (en) * 2007-12-14 2012-05-23 华为技术有限公司 Method for identifying last hop switch, switch and multicast device
EP2234344B1 (en) 2008-01-09 2013-02-27 Huawei Technologies Co., Ltd. Methods, system and routers for realizing switching between layer-2 and layer-3 multicast route tracing
CN101483582B (en) * 2008-01-09 2012-02-01 华为技术有限公司 Method, system and router for implementing second and third layer multicast trace route
CN102265554B (en) * 2011-06-20 2013-02-13 华为技术有限公司 Method, device and system for layer 2 multicast path tracking
CN102340451B (en) * 2011-09-28 2017-05-24 中兴通讯股份有限公司 Trace route testing method, system, device and equipment
CN102685009B (en) * 2012-05-08 2015-09-09 浙江宇视科技有限公司 A kind of detection method of multicast transmission path and device
CN103259877B (en) * 2013-04-15 2017-03-15 北京百度网讯科技有限公司 The geographic position determination method and system of IP address
CN109862548B (en) * 2019-03-06 2021-01-26 乐鑫信息科技(上海)股份有限公司 Method for processing data packets at a node in a bluetooth Mesh network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020191567A1 (en) * 2001-06-18 2002-12-19 David Famolari Method and system for soft handoff
JP2007037062A (en) * 2005-07-29 2007-02-08 Fujitsu Ltd Multicast trace route system in IP multicast network
CN1925412A (en) * 2005-08-29 2007-03-07 阿尔卡特公司 Multicast host authorization, tracking and accounting
CN101083629A (en) * 2007-08-07 2007-12-05 华为技术有限公司 Method and router for positioning the last jump router and multicasting routing track

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020191567A1 (en) * 2001-06-18 2002-12-19 David Famolari Method and system for soft handoff
JP2007037062A (en) * 2005-07-29 2007-02-08 Fujitsu Ltd Multicast trace route system in IP multicast network
CN1925412A (en) * 2005-08-29 2007-03-07 阿尔卡特公司 Multicast host authorization, tracking and accounting
CN101083629A (en) * 2007-08-07 2007-12-05 华为技术有限公司 Method and router for positioning the last jump router and multicasting routing track

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016451A (en) * 2022-12-26 2023-04-25 江苏怀业信息技术股份有限公司 Multicast transmission method of Mesh network

Also Published As

Publication number Publication date
CN100596116C (en) 2010-03-24
CN101083629A (en) 2007-12-05

Similar Documents

Publication Publication Date Title
WO2009018770A1 (en) Method and router for positioning the last hop router and multicasting routing track
CN101159688B (en) Method and router for multicast route tracking
US7477642B2 (en) MPLS traffic engineering for point-to-multipoint label switched paths
CN102577238B (en) Method and apparatus for tracing a multicast flow
WO2008028413A1 (en) Method and system of mpls multicast node and fault location
US8948023B2 (en) Enhancing mtrace to detect failure in multicast diverse paths
CN102148700B (en) Layer 2 multicast forwarding link failure positioning method and equipment
WO2009000180A1 (en) Method, apparatus and system for protecting head node of point to multipoint label switch path
WO2008037203A1 (en) Method and node device for realizing the network topology discovery
CN101247210B (en) A Method of Realizing Multicast Forwarding Tree Based on Multicast Source Discovery Protocol
US20200220742A1 (en) Methods and router devices for verifying a multicast datapath
WO2013189414A2 (en) Automatic network topology acquisition method and system, and network query and management system
EP1525711B1 (en) Method and apparatus for receivability test and reachability test of explicit multicast
WO2008106892A1 (en) A multicast network system, node and a method for detecting a fault of a multicast network link
WO2011012063A1 (en) Method, system and network device for node configuration and path detection
CN101980473B (en) Multicast path tracking method and system
CN100512164C (en) Originator recognition method and device for tracking the multicast route
CN101483582B (en) Method, system and router for implementing second and third layer multicast trace route
CN111600798B (en) Method and equipment for sending and obtaining assertion message
WO2012103748A1 (en) Multicast control method, routing device and multicast system
WO2007006193A1 (en) A method for preventing the user from obtaining the service provider network information and the equipment as well as the system thereof
CN103546376A (en) Response message transmission method and node
WO2011044729A1 (en) Method and apparatus for checking anycast group configuration in communication network
CN101207560A (en) Establishment method of multicast tree in multi-protocol label switching network
CN113612693B (en) Method and routing system for avoiding PIM routing protocol RPT-SPT path oscillation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08783875

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08783875

Country of ref document: EP

Kind code of ref document: A1