WO2008003253A1 - The method and system of routing calculation for the directly connected broadcast link - Google Patents

The method and system of routing calculation for the directly connected broadcast link Download PDF

Info

Publication number
WO2008003253A1
WO2008003253A1 PCT/CN2007/070178 CN2007070178W WO2008003253A1 WO 2008003253 A1 WO2008003253 A1 WO 2008003253A1 CN 2007070178 W CN2007070178 W CN 2007070178W WO 2008003253 A1 WO2008003253 A1 WO 2008003253A1
Authority
WO
WIPO (PCT)
Prior art keywords
prefix
route
address
link
calculated
Prior art date
Application number
PCT/CN2007/070178
Other languages
French (fr)
Chinese (zh)
Inventor
Jiangping Zhang
Chao Fu
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 WO2008003253A1 publication Critical patent/WO2008003253A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/03Topology update or discovery by updating link state protocols

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a method and system for calculating a route on a direct broadcast link.
  • OSPF Open Shortest Path First routing protocol
  • AS Autonomous System
  • OSPF Open Shortest Path First
  • OSPF Open Shortest Path First routing protocol
  • a routing domain or an AS Autonomous System
  • OSPF a collection of networks or routers grouped together according to certain OSPF routing rules is called an area (AREA).
  • the routes in the OSPF routing domain can be classified into two types according to the destination address and the source address of the IP packet. When the destination is in the same area as the source address, it is called intra-area routing, and the destination and source address are in the same area. When different areas are even in different ASs, they are called inter-domain routes.
  • the OSPF routing protocol uses the link state algorithm, that is, each router collects and generates link state information around itself, and forms an LSA (Link State Advertisement) to propagate in the area, so that each router in the area has The same LSA, that is, all the LSAs in the area. All the LSA groups are called link state databases, which are used to describe the network topology information of the area.
  • Each router passes the SPF (Shortest Pass First) according to all received LSAs.
  • the path-first algorithm calculates the routing information and generates a routing table for guiding packet forwarding.
  • the route types can be classified into: intra-area routing, inter-area routing, autonomous system external type 1 routing, autonomous system external type 2 routing, and priority decreasing.
  • the router When the router receives a new LSA, it will be placed in the respective link state database according to the LSA category, and then the topology of the link state database is changed and recalculated according to the SPF algorithm.
  • the routing table can reflect changes in link state information. When the intranet network changes, all routes are recalculated.
  • OSPFv3 Open Shortest Path First v3 is a network protocol that supports IPv6 (Internet Protocol Version 6). A routing protocol that supports broadcast link state information. As shown in Figure 1, the IPV6 forwarding layer downloads OSPFv3 routing information. When the packet passes through the IPV6 forwarding layer, the SPF algorithm calculates the shortest path of the packet to the destination and forwards the packet. The routing information includes a distance to the destination address, a local outbound interface, and a next f-mega address.
  • the direct connection route on the broadcast link is shown in Figure 2, where RTA (Router A, Router A) 21, RTB22 and RTC23 share the broadcast link through interfaces la, lb and Ic.
  • the interface of the RTB and the RTC interface Ic are connected to the interface of the RTA.
  • the RTA is connected to the RTB and the RTC through the interface la.
  • the IPv6 network segment route configured on the interface is a direct route.
  • the routing information of OSPFv3 is obtained by using the SPF algorithm, and the routing information of the relevant address is obtained by calculating the LSA.
  • a network LSA is generated by a DR (Designed Router), and an intra-area prefix LSA referenced by the network LSA is generated.
  • the physical topology in FIG. 2 can be abstracted into the logical topology in FIG. .
  • the network LSA is used to describe which routers exist on the network.
  • the intra-area prefix LSA is used to describe the prefix information connected to the router. Within the area, each router must notify all other routers of the prefix information it is connected to by the intra-area prefix LS A .
  • the intra-area prefix LSA refers to the network LSA, that is, in the process of calculation, only the routing information of the network LS A needs to be obtained, and the intra-area prefix LS A of the network LS A can inherit the routing information of the network LSA. , that is, the routing information of the two is the same.
  • the routing information of the RTA to the network LSA is: The distance from the RTA to the network LSA is equal to the distance of the OSPFv3 configured on the interface la; the outgoing interface of the RTA is the interface la; the next hop is the local configured on the interface la.
  • the link address is either empty.
  • the intra-area prefix configured on the RTA to the RTC interface Ic is the same as the routing information of the RTA to the network LSA.
  • the ND (Neighbor Discovery) protocol of the IPv6 layer functions to find the peer RTC.
  • the one-hop address that is, the local link address on the RTC interface Ic, guides the packet forwarding; but if the prefix Ic in the IPv6 area configured on the RTC interface Ic is different from the prefix la in the IPv6 area configured on the RTA interface la, the ND protocol
  • the RTA cannot find the IPv6 address on the Ic, and the result is as shown in Figure 4.
  • the outgoing interface of the RTA is the interface la, and the next hop is the local link address configured on the interface la or empty.
  • the ND protocol is used to discover the IPv6 address of the IPv6 area. The RTA cannot guide the packet forwarding. On the broadcast link, If the next hop address is the local link address or is empty, the IPv6 forwarding layer cannot forward packets.
  • IPv6 prefix configuration of the direct broadcast link is as follows:
  • RTA The global unicast address is 2001 :1 :1 :1 : 48, and the link-local address is FE80::RTA;
  • RTB The global unicast address is 2002 : 2:2:2 ::/48, and the link-local address is FE80::RTB;
  • RTC The global unicast address is 2003:3:3:3::/48, and the link-local address is FE80::RTC;
  • the routing information of the network LSA is obtained first, and then the area prefix LSA of the network LSA is referred to. And inheriting the routing information of the network LSA, the route from the RTA to the IPv6 prefix 2003:3:3::/48 is 2003:3:3::/48, and the routing information of the RTA to the network LSA is: RTA to the network LSA
  • the distance is equal to 1; the outgoing interface of the RTA is interface la; the next hop is FE80::RTA or is empty. Therefore, the obtained next hop information cannot be forwarded to the prefix address where 2003:3:3:48 is located.
  • the embodiment of the invention provides a method and a system for calculating a route on a direct-connected broadcast link, so that the "3" message can be correctly forwarded if the IPv6 prefix of the peer end and the local prefix are different.
  • the method for calculating a route on a direct-connected broadcast link includes: obtaining an address prefix of a route to be calculated in an intra-area prefix LSA;
  • the route calculation system of the directly connected broadcast link includes: a prefix extraction unit, configured to acquire an address prefix of a route to be calculated in an intra-area prefix LSA; and a first determining unit, configured to determine the Whether the address prefix of the route to be calculated is directly connected to the broadcast link;
  • a second determining unit configured to determine whether the locally configured address prefix includes the address prefix of the to-be-calculated route
  • the route calculation unit, the judgment result of the first judgment unit and the second judgment unit is: When the address prefix of the route to be calculated is on the directly connected broadcast link and is not included in the locally configured address prefix, obtain the link address of the router to which the address prefix of the route to be calculated is attached as the to-be-addressed The next hop of the route that calculates the address prefix of the route.
  • the route calculation system of the direct-connected broadcast link includes: a prefix extracting unit that takes a prefix of the calculated route;
  • a first determining unit determining whether the prefix of the to-be-calculated route is on the direct-connected broadcast link, and determining, by the second determining unit, whether the locally configured prefix includes the prefix of the to-be-calculated route; the information obtaining unit obtains the peer end
  • the local link address is used as the next hop of the route to the prefix of the route to be calculated, and the routing information obtained by obtaining the prefix of the route to be calculated is written into the routing table.
  • the network LSA is directly connected to the local end, and the local link address of the peer end is obtained as the next hop of the route of the prefix. Guided " ⁇ text forwarding.
  • 1 is a schematic diagram of packet forwarding in the prior art
  • FIG. 2 is a schematic diagram of routing on a direct broadcast link in the prior art
  • FIG. 3 is a logical topology diagram of a OSPFv3 protocol for a broadcast link in the prior art
  • FIG. 4 is a schematic diagram of a next hop calculated by the OSPFv3 protocol in the prior art
  • FIG. 5 is a schematic diagram of a next hop of a direct-connected broadcast link according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for calculating a route on a direct-connected broadcast link according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of an IPv6 prefix configuration of a direct-connected broadcast link according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a computing system for routing on a direct broadcast link according to an embodiment of the present invention.
  • FIG. 9 is another schematic structural diagram of a computing system for routing on a direct broadcast link according to an embodiment of the present invention.
  • the reference LSA when the reference LSA is the network LSA and the network LSA is directly connected to the local LSA, it is checked whether the address prefix configured on the router interface to which the prefix is attached in the area is configured. If configured, the current network LSA is used as the reference LSA, and the routing information of the reference network LSA is inherited; if not configured, the corresponding configuration is found.
  • the neighboring router of the address prefix obtains the next hop information of the route of the address prefix by referring to the next hop information of the neighboring router LSA.
  • RTA51, RTB52 and RTC53 share the broadcast link through interfaces la, lb and Ic.
  • the interfaces of the RTB and the RTC interface Ic are connected to the interface of the RTA.
  • the RTA is connected to the RTB and the RTC through the interface la.
  • the IPv6 network segment route configured on the interface is a direct route.
  • the RTA when calculating the routing information of the prefix LSA in the IPv6 area, when the reference LSA is the network LSA, and the referenced network LSA is directly connected to the RTA, that is, the RTA is directly connected to the broadcast link, but the RTA is not configured.
  • the address prefix of the router to which the prefix is attached in the IPv6 area, and the IPv6 address prefix configured on the RTC interface Ic is the same as the address prefix in the prefix LSA of the IPv6 area, and the RTC is configured in the corresponding LSA in the IPv6 area.
  • a neighboring router with an address prefix, so that the next hop information of the route prefix included in the prefix LSA in the IPv6 area is obtained by referring to the next hop information of the LSC router LSA.
  • the route calculation method when the route calculation method provided by the embodiment of the present invention calculates the routing information of the prefix LSA in the area, the method includes the following steps:
  • S601 Determine whether the reference LSA is a network LSA
  • step S602 is performed, and if the reference LSA is not a network LSA, step S603 is performed;
  • step S602 Check whether the referenced network LSA is directly connected to the local device, that is, the router where the address prefix is taken in step 600 is directly connected to the broadcast link. If the referenced network LSA is directly connected to the local device, step S604 is performed. If the referenced network LSA is not directly connected to the local, step S603 is performed;
  • Step S603 The routing information of the address prefix inherits the routing information of the reference LSA, and then, step S609 is performed;
  • Step S604 Take the first child node of the network LSA, that is, the ID of the router LSA, and find the LSA corresponding to the router in the database according to the ID information, and check whether the address prefix is the same as the address prefix configured on the interface of the router. ;
  • step S606 If the address prefix is the same as the address prefix configured on the interface of the router, go to the step. S605, if the address prefix is not the same as the address prefix configured on the router interface, step S606 is performed;
  • step S605 The current network LSA is used as the reference LSA, and the routing information of the reference router LSA node is inherited, and step S603 is performed;
  • step S606 The child node where the address prefix is located is determined to be empty. If the child node where the address prefix is located is empty, step S608 is performed. If the child node where the address prefix is located is not empty, step S607 is performed. ;
  • step S607 The distance from the router LSA to the network LSA is obtained from the router LSA, and the router LSA of the address prefix is used as the reference LSA, and the next hop information of the router LSA is obtained, and step S609 is performed;
  • the routing information of the address prefix includes: a local outbound interface, a next hop information, a cost value, and the like; S610: take the intra-area prefix LSA The next address prefix, step S611;
  • step S601 is returned.
  • IPv6 prefix configuration of the direct broadcast link shown in Figure 7 is as follows:
  • RTA71 The global unicast address is 2001 :1 :1 :1 : 48, and the link-local address is FE80::RTA;
  • RTB72 The global unicast address is 2002:2:2:2: 48, and the local link address is FE80::RTB;
  • RTC73 The global unicast address is 2003:3:3:3:48, and the local link address is FE80::RTC; if the route calculation method on the direct-connected broadcast link provided by the embodiment of the present invention is used, the RTA is calculated.
  • the RTA to IPv6 address prefix is first taken, that is, 2003:3:3::/48, and then the reference LSA is determined to be the network LSA, and the reference network LSA and the local router RTA are used.
  • the address prefix of the RTA to IPv6 is the same as the address prefix configured on the RTA interface la of the router.
  • the address prefix of the router from RTA to IPv6 is 2003:3:3:48.
  • the address prefix configured on the router RTA interface la is 2001:1:1::/48, that is, the address prefix of the router RTA to IPv6 is connected to the router RTA. If the address prefix configured on the LA is different, the neighboring router RTC with the address prefix of the RTA to IPv6 is 2003:3:3:748.
  • the RTC is the router corresponding to the RTA to IPv6 address prefix, and then judges.
  • the next hop information of the route of the address prefix is obtained by referring to the next hop information of the RTC LSA, FE80::RTC, and the route from RTA to IPv6 address prefix 2003:3:3::/48 is 2003 :3 :3: :/48 , then the distance from the network LSA to the network LSA is equal to 1, RTA The outgoing interface is Ia. In this way, the router RTA can use the obtained next hop information FE80::RTC to guide the packet forwarding to the prefix address where 2003:3:3::/48 is located.
  • the present invention also provides a computing system for routing directly on a broadcast link. Referring to FIG. 8 is a structural block diagram of the system of the embodiment of the present invention:
  • a prefix extracting unit 81 a prefix extracting unit 81, a first judging unit 82, a second judging unit 83, and an information obtaining unit 84 are included.
  • the prefix extracting unit 81 takes the prefix of the to-be-calculated route from the intra-area prefix LSA; the first determining unit 82 determines whether the prefix of the to-be-calculated route is on the direct-connected broadcast link;
  • the second determining unit 83 determines whether the locally configured prefix includes the prefix of the to-be-calculated route
  • the prefix obtained by the information obtaining unit 84 on the route to be calculated is on the direct broadcast link, and the locally configured prefix does not include the prefix of the route to be calculated, and the local link address of the peer is obtained as the Calculating the next hop of the route of the prefix of the route, and writing the routing information of the prefix of the route to be calculated into the routing table.
  • the first determining unit 82 includes a reference LSA determining unit 821 and a network LSA determining unit 822;
  • the reference LSA determining unit 821 determines whether the reference LSA of the prefix LSA of the route to be calculated in the area is a network LSA;
  • the network LSA determining unit 822 determines whether the network LSA is locally connected.
  • the prefix of the to-be-calculated route is on the direct broadcast link.
  • the second determining unit 83 includes a prefix determining unit 831, a routing information obtaining unit 832, and Subnode determination unit 833;
  • the prefix determining unit 831 determines whether the locally configured prefix includes the prefix of the to-be-calculated route
  • the routing information obtaining unit 832 uses the network LSA as the reference LSA, and obtains the local link address of the peer by using the neighbor discovery protocol, as the next hop of the route to the prefix of the to-be-calculated route, and obtains the to-be-calculated route. Routing information for the prefix;
  • the child node determining unit 833 determines whether the child node where the prefix of the route to be calculated is located, that is, whether the router LSA node is empty.
  • the information obtaining unit 84 includes a next hop address obtaining unit 841 and a routing distance obtaining unit
  • the next hop address obtaining unit 841 finds a router with the prefix of the route to be calculated from the router included in the network LSA, and obtains the next hop address by using the LSA of the router as the reference LSA.
  • the next hop address is the local link address of the peer.
  • the route distance obtaining unit 842 obtains the distance of the network LSA as the distance to the route of the prefix.
  • the next hop address obtaining unit 841 includes a link searching unit 8411 and a link address obtaining unit 8412;
  • the link searching unit 8411 finds a link LSA with the same address prefix and the prefix of the to-be-calculated route in the link LSA to which the router belongs.
  • the link address obtaining unit 8412 obtains the link-local address of the link LSA as the link-local link address.
  • the prefix extracting unit 81 takes the first address prefix from the intra-area prefix LSA to be calculated, and the reference LSA determining unit 821 determines whether the reference LSA is a network LSA. If the reference LSA is not a network LSA, the routing information obtaining unit 832 inherits the reference. The routing information of the LSA obtains the routing information of the address prefix and writes the routing information to the routing table;
  • the network LSA determining unit 822 checks whether the referenced network LSA is directly connected to the local, that is, whether the router where the address prefix is located is directly connected to the broadcast link, if the referenced network LSA is not locally Directly, the routing information obtaining unit 832 inherits the routing information of the reference LSA, obtains routing information of the address prefix, and writes the routing information to the routing table; If the referenced network LSA is directly connected to the local, the prefix determining unit 831 takes the child node of the first network LSA, that is, the router LSA node, and checks whether the address prefix is the same as the address prefix configured on the router interface, if the The address prefix is the same as the address prefix configured on the interface of the router. The routing information obtaining unit 832 uses the current network LSA as the reference LSA, inherits the routing information of the reference LSA node, and obtains the routing information of the address prefix and writes the routing information to the routing table.
  • the child node determining unit 833 takes the child node where the address prefix is located, that is, the router LSA node, and determines whether it is empty, if the child of the address prefix is located. If the node is empty, the error information is given, and the routing information obtaining unit 832 obtains the routing information of the address prefix and writes the routing information to the routing table;
  • the route distance obtaining unit 842 obtains the distance from the node where the address prefix is located to the LSA node of the router from the network LSA, and the link searching unit 8411 is on the link to which the router belongs.
  • the link LSA with the same address prefix as the prefix of the to-be-calculated route is found, and the link address obtaining unit 8412 obtains the link-local address of the link LSA as the local link address of the peer, and obtains the address prefix. Routing information and write to the routing table.
  • the reference network LSA is directly connected to the local device, so as to obtain the local link address of the peer end as the route to be calculated.
  • the next hop of the route of the address prefix so that the router can guide the packet to forward correctly according to the routing information.
  • FIG. 9 another structural block diagram of the system of the embodiment of the present invention is shown:
  • a prefix extracting unit 91 a prefix extracting unit 91, a first judging unit 92, a second judging unit 93, and a route calculating unit 94 are included. among them,
  • the prefix extracting unit 91 is configured to obtain an address prefix of the route to be calculated in the intra-area prefix LSA.
  • the first determining unit 92 determines whether the address prefix of the to-be-calculated route is on the direct broadcast link.
  • the second determining unit 93 determines the local Whether the prefix of the route to be calculated is included in the configured prefix; the judgment result of the information obtaining unit 94 in the first determining unit 92 and the second determining unit 93 is: the address prefix of the route to be calculated is on the direct broadcast link
  • the local link address of the router to which the address prefix of the route to be calculated is attached is obtained as the next hop of the route to the prefix of the route to be calculated.
  • the first determining unit 92 includes a reference LSA determining unit 921 and a network LSA determining unit 922;
  • the reference LSA determining unit 921 is configured to determine whether the reference LSA of the address prefix LSA of the route to be calculated in the area is a network LSA; and in the case where the reference LSA determining unit 921 determines that the reference LSA is a network LSA, the network LSA determining unit 922 It is determined whether the network LSA is connected to the local. If the reference LSA of the address prefix LSA of the route to be calculated in the area is a network LSA, and the network LSA is locally connected, it may be determined that the address prefix of the to-be-calculated route is on the direct broadcast link.
  • the second judging unit 93 includes a prefix judging unit 931 and a child node judging unit 933.
  • the prefix determining unit 931 is configured to determine whether the locally configured address prefix includes the address prefix of the to-be-calculated route. If the locally configured address prefix does not include the address prefix of the to-be-calculated route, the child node needs to be determined.
  • the unit 933 determines whether the child node where the address prefix of the route to be calculated is located, that is, whether the router LSA node is empty. If it is empty, it indicates that the node does not exist. In this case, the error information can be given by the child node judging unit 933.
  • the route calculation unit 94 includes a next hop address obtaining unit 941 and a route distance obtaining unit 942.
  • the next hop address obtaining unit 941 finds the router with the address prefix of the route to be calculated from the router included in the network LSA, and obtains the next hop address by using the LSA of the router as the reference LSA.
  • the next hop address is used as the link-local address of the router to which the address prefix of the route to be calculated is attached.
  • the route distance obtaining unit 942 obtains the distance of the network LSA as the distance to the route of the router to which the address prefix of the route to be calculated is attached.
  • the next hop address obtaining unit 941 includes a link finding unit 9411 and a link address obtaining unit 9412.
  • the link searching unit 9411 finds the link LSA with the same address prefix and the same address prefix as the route to be calculated in the link LSA to which the router belongs.
  • the link address obtaining unit 9412 obtains the local chain of the link LSA. The way address is the link address of the router to which the address prefix of the route to be calculated is attached.
  • the prefix determining unit 931 determines that the locally configured address prefix includes the address prefix of the to-be-calculated route
  • the local link address of the router to which the address prefix of the to-be-calculated route is attached may be obtained by using the neighbor discovery protocol.
  • the next hop of the route to the address prefix of the route to be calculated is obtained, and the routing information of the address prefix of the route to be calculated is obtained.
  • the routing information obtaining unit 95 connected to the prefix determining unit 931 can also be provided in the embodiment of the system of the present invention to implement the above functions.
  • the prefix extracting unit 91 takes the first address prefix from the intra-area prefix LSA to be calculated, and the reference LSA determining unit 921 determines whether the reference LSA is a network LSA. If the reference LSA is not the network LSA, the routing information obtaining unit 95 inherits the routing information of the reference LSA, obtains the routing information of the address prefix, and writes the routing information to the routing table;
  • the network LSA determining unit 922 checks whether the referenced network LSA is directly connected to the local, that is, whether the router where the address prefix is located is directly connected to the broadcast link. If the referenced network LSA is not directly connected to the local area, the routing information obtaining unit 95 inherits the routing information of the reference LSA, obtains the routing information of the address prefix, and writes the routing information to the routing table;
  • the prefix determining unit 931 takes the child node of the first network LSA, that is, the router LSA node, and checks whether the address prefix is the same as the address prefix configured on the router interface. If the address prefix is the same as the address prefix configured on the interface of the router, the routing information obtaining unit 95 uses the current network LSA as the reference LSA, inherits the routing information of the reference LSA node, obtains the routing information of the address prefix, and writes the route. Table
  • the child node determining unit 933 takes the child node where the address prefix is located, that is, whether the router LSA node is empty. If the child node where the address prefix is located is empty, giving an error message, the routing information obtaining unit 95 obtains the routing information of the address prefix;
  • the route distance obtaining unit 942 obtains the distance from the node where the address prefix is located to the router LSA node from the network LSA, and the link searching unit 9411 is on the link to which the router belongs.
  • the link LSA with the same address prefix as the prefix of the to-be-calculated route is found, and the link address obtaining unit 9412 obtains the link-local address of the link LSA as the local link address of the peer, and obtains the address prefix. Routing information.
  • the routing information writing unit 96 may be further configured to write routing information of the prefix of the to-be-calculated route obtained by the route calculating unit 94 and/or the routing information obtaining unit 95. table.
  • the reference network LSA is directly connected to the local device, so as to obtain the local link address of the peer end as the route to be calculated.
  • the next hop of the route of the address prefix so that the router can guide the packet to forward correctly according to the routing information.

Abstract

A method and system of routing calculation for the directly connected broadcast link are provided. The said method obtains the address prefix to be calculated routing from the intra-area-prefix-LSA. When the said address prefix to be calculated routing is in the directly connected broadcast link and is not included in the local configured address prefixes, the said method obtains the local link address of the router attached by the said address prefix to be calculated routing, and assigns the next hop address of the routing for the said address prefix to be calculated routing to be the said local link address. By employing the said method and system, the forwarding of message can be efficiently guided when the corresponding IPv6 intra-area-prefix is different to the local intra-area-prefix.

Description

直连广播链路上路由计算方法及系统  Route calculation method and system on direct broadcast link
本申请要求于 2006 年 6 月 26 日提交中国专利局、 申请号为 200610061334.5、 发明名称为 "一种在直连广播链路上路由的计算方法及系统,, 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。  This application claims the priority of the Chinese patent application filed on June 26, 2006, the Chinese Patent Office, Application No. 200610061334.5, entitled "A Calculation Method and System for Routing on Direct Broadcast Links" The entire contents are incorporated herein by reference.
技术领域 Technical field
本发明涉及网络技术领域, 具体地说, 涉及一种直连广播链路上路由计算 方法及系统。  The present invention relates to the field of network technologies, and in particular, to a method and system for calculating a route on a direct broadcast link.
背景技术 Background technique
随着网络通信技术的发展, OSPF ( Open Shortest Path First, 开放最短路 径优先)路由协议已经成为网络中应用最广泛的路由协议。 在 OSPF路由协议 的定义中, 可以将一个路由域或者一个 AS ( Autonomous System, 自治系统) 划分为几个区域。 在 OSPF中, 由按照一定的 OSPF路由法则组合在一起的一组 网络或路由器的集合称为区域(AREA ) 。 可以根据 IP数据包的目的地地址及 源地址将 OSPF路由域中的路由分成两类, 当目的地与源地址处于同一个区域 中时, 称之为区域内路由, 当目的地与源地址处于不同的区域甚至处于不同的 AS时, 称之为域间路由。 OSPF路由协议釆用链路状态算法, 即各个路由器收 集生成自己周围的链路状态信息, 形成 LSA ( Link State Advertisement, 链路 状态公告)在区域内传播, 从而使区域内的每个路由器都拥有相同的 LSA, 即 区域内所有的 LSA, 所有的 LSA组称为链路状态数据库, 用于描述区域的网络 拓朴信息, 每个路由器根据收到的所有的 LSA通过 SPF ( Shortest Pass First, 最 短路径优先)算法计算出路由信息, 生成用于指导报文转发的路由表。  With the development of network communication technology, OSPF (Open Shortest Path First) routing protocol has become the most widely used routing protocol in the network. In the definition of an OSPF routing protocol, a routing domain or an AS (Autonomous System) can be divided into several areas. In OSPF, a collection of networks or routers grouped together according to certain OSPF routing rules is called an area (AREA). The routes in the OSPF routing domain can be classified into two types according to the destination address and the source address of the IP packet. When the destination is in the same area as the source address, it is called intra-area routing, and the destination and source address are in the same area. When different areas are even in different ASs, they are called inter-domain routes. The OSPF routing protocol uses the link state algorithm, that is, each router collects and generates link state information around itself, and forms an LSA (Link State Advertisement) to propagate in the area, so that each router in the area has The same LSA, that is, all the LSAs in the area. All the LSA groups are called link state databases, which are used to describe the network topology information of the area. Each router passes the SPF (Shortest Pass First) according to all received LSAs. The path-first algorithm calculates the routing information and generates a routing table for guiding packet forwarding.
不同类型的 LSA标识了不同类型的网络拓朴, 按照优先级, 路由类型可分 为: 区域内路由, 区域间路由, 自治系统外部类型 1路由, 自治系统外部类型 2 路由, 优先级依次降低。 当路由器收到一个新的 LSA时, 将按照 LSA的类别分 别将其放入各自的链路状态数据库中,然后标识该链路状态数据库拓朴发生变 化, 并按照 SPF算法对其进行重新计算, 以更新路由表, 使路由表可以反映出 链路状态信息的变化。当区域内部网络发生变化时,会使所有的路由重新计算。  Different types of LSAs identify different types of network topologies. According to the priority, the route types can be classified into: intra-area routing, inter-area routing, autonomous system external type 1 routing, autonomous system external type 2 routing, and priority decreasing. When the router receives a new LSA, it will be placed in the respective link state database according to the LSA category, and then the topology of the link state database is changed and recalculated according to the SPF algorithm. To update the routing table, the routing table can reflect changes in link state information. When the intranet network changes, all routes are recalculated.
OSPFv3 ( Open Shortest Path First v3 , 开放最短路径优先第三版 )动态路 由协议是一种支持 IPv6 ( Internet Protocol Version 6 , 网际协议第六版 ) 网络的 路由协议, 其支持广播链路状态信息。 如图 1所示, IPV6转发层下载 OSPFv3 路由信息, 当报文经过 IPV6转发层时, 通过 SPF算法计算得到报文到达目的地 的最短路由, 指导报文转发。 所述的路由信息包含到目的地址的距离、 本地的 出接口和下一f兆地址。 OSPFv3 (Open Shortest Path First v3) is a network protocol that supports IPv6 (Internet Protocol Version 6). A routing protocol that supports broadcast link state information. As shown in Figure 1, the IPV6 forwarding layer downloads OSPFv3 routing information. When the packet passes through the IPV6 forwarding layer, the SPF algorithm calculates the shortest path of the packet to the destination and forwards the packet. The routing information includes a distance to the destination address, a local outbound interface, and a next f-mega address.
广播链路上的直连路由如图 2所示, 其中 RTA ( Router A, 路由器 A ) 21, RTB22和 RTC23通过接口 la, lb和 Ic共享广播链路。 RTB的接口 lb和 RTC的接口 Ic都与 RTA的接口 la相连接; 对于 RTA而言, RTA通过接口 la与 RTB和 RTC相 连接, 在接口上配置的 IPv6网段路由就是一种直连路由。  The direct connection route on the broadcast link is shown in Figure 2, where RTA (Router A, Router A) 21, RTB22 and RTC23 share the broadcast link through interfaces la, lb and Ic. The interface of the RTB and the RTC interface Ic are connected to the interface of the RTA. For the RTA, the RTA is connected to the RTB and the RTC through the interface la. The IPv6 network segment route configured on the interface is a direct route.
使用 SPF算法计算得到 OSPFv3的路由信息,通过计算 LSA获得到相关地址 的路由信息。 广播网络上由 DR(Designed Router, 选举路由器)产生一个网络 LSA, 同时产生一个以该网络 LSA为参考的区域内前缀 LSA, 则图 2中的物理 拓朴可以抽象为图 3中的逻辑拓朴。 其中, 网络 LSA用以描述网络上存在哪些 路由器, 区域内前缀 LSA用以描述路由器所连接的前缀信息。 在区域范围内, 每个路由器必须通过区域内前缀 LS A向所有的其他路由器通报自己所连接的 前缀信息。 所述的区域内前缀 LSA参考网络 LSA, 就是在计算的过程中, 只需 要获得到该网络 LS A的路由信息, 参考该网络 LS A的区域内前缀 LS A就可以继 承该网络 LSA的路由信息, 即两者的路由信息是一样的。 如图 3所示, RTA到 网络 LSA的路由信息为: RTA到网络 LSA的距离等于接口 la上配置的 OSPFv3的 距离值; RTA的出接口为接口 la; 下一跳为接口 la上配置的本地链路地址或为 空。 RTA到 RTC接口 Ic上配置的区域内前缀, 其路由信息和 RTA到网络 LSA的 路由信息是一样的。  The routing information of OSPFv3 is obtained by using the SPF algorithm, and the routing information of the relevant address is obtained by calculating the LSA. On the broadcast network, a network LSA is generated by a DR (Designed Router), and an intra-area prefix LSA referenced by the network LSA is generated. The physical topology in FIG. 2 can be abstracted into the logical topology in FIG. . The network LSA is used to describe which routers exist on the network. The intra-area prefix LSA is used to describe the prefix information connected to the router. Within the area, each router must notify all other routers of the prefix information it is connected to by the intra-area prefix LS A . The intra-area prefix LSA refers to the network LSA, that is, in the process of calculation, only the routing information of the network LS A needs to be obtained, and the intra-area prefix LS A of the network LS A can inherit the routing information of the network LSA. , that is, the routing information of the two is the same. As shown in Figure 3, the routing information of the RTA to the network LSA is: The distance from the RTA to the network LSA is equal to the distance of the OSPFv3 configured on the interface la; the outgoing interface of the RTA is the interface la; the next hop is the local configured on the interface la. The link address is either empty. The intra-area prefix configured on the RTA to the RTC interface Ic is the same as the routing information of the RTA to the network LSA.
对于 RTA而言 , 如果 RTC接口 Ic上配置的 IPv6前缀和 RTA接口 la上配置的 IPv6区域内前缀相同, 此时 IPv6层的 ND ( Neighbor Discovery , 邻居发现)协 议发挥作用, 找到对端 RTC的下一跳地址, 即 RTC接口 Ic上的本地链路地址, 指导报文转发; 但如果 RTC接口 Ic上配置的 IPv6区域内前缀 Ic和 RTA接口 la上 配置的 IPv6区域内前缀 la不相同, ND协议无法发挥作用, 则 RTA无法发现 Ic 上的 IPv6地址, 从而产生如图 4所示结果: RTA的出接口为接口 la, 下一跳为 接口 la上配置的本地链路地址或为空, 而且不能通过 ND协议发现与其配置的 IPv6区域内前缀相同的 IPv6地址, 即 RTA无法指导报文转发。 在广播链路上, 如果下一跳地址是本地链路地址或为空,是无法指导 IPv6转发层进行报文转发 的。 For the RTA, if the IPv6 prefix configured on the RTC interface Ic is the same as the IPv6 prefix configured on the RTA interface la, the ND (Neighbor Discovery) protocol of the IPv6 layer functions to find the peer RTC. The one-hop address, that is, the local link address on the RTC interface Ic, guides the packet forwarding; but if the prefix Ic in the IPv6 area configured on the RTC interface Ic is different from the prefix la in the IPv6 area configured on the RTA interface la, the ND protocol The RTA cannot find the IPv6 address on the Ic, and the result is as shown in Figure 4. The outgoing interface of the RTA is the interface la, and the next hop is the local link address configured on the interface la or empty. The ND protocol is used to discover the IPv6 address of the IPv6 area. The RTA cannot guide the packet forwarding. On the broadcast link, If the next hop address is the local link address or is empty, the IPv6 forwarding layer cannot forward packets.
比如, 直连广播链路 IPv6前缀配置如下:  For example, the IPv6 prefix configuration of the direct broadcast link is as follows:
RTA: 全球单播地址为 2001 :1 :1 :1 : 48, 本地链路地址为 FE80::RTA; RTA: The global unicast address is 2001 :1 :1 :1 : 48, and the link-local address is FE80::RTA;
RTB: 全球单播地址为 2002 :2:2:2 ::/48, 本地链路地址为 FE80::RTB; RTB: The global unicast address is 2002 : 2:2:2 ::/48, and the link-local address is FE80::RTB;
RTC: 全球单播地址为 2003:3:3:3::/48, 本地链路地址为 FE80::RTC;  RTC: The global unicast address is 2003:3:3:3::/48, and the link-local address is FE80::RTC;
依照现有的在直连广播链路上的路由计算方法,在计算 RTA到 IPv6区域内 前缀 LSA的路由信息的时候, 首先获得该网络 LSA的路由信息, 然后参考该网 络 LSA的区域前缀 LSA, 并继承该网络 LSA的路由信息, 则 RTA到 IPv6前缀 2003 :3 :3: :/48的路由为 2003 :3 :3: :/48 , RTA到网络 LSA的路由信息为: RTA到网 络 LSA的距离等于 1 ; RTA的出接口为接口 la; 下一跳为 FE80::RTA或为空。 因 此, 所获得的下一跳信息不能指导 ^艮文转发到 2003:3:3: 48所在的前缀地址。  According to the existing route calculation method on the direct broadcast link, when calculating the routing information of the prefix LSA in the RTA to the IPv6 area, the routing information of the network LSA is obtained first, and then the area prefix LSA of the network LSA is referred to. And inheriting the routing information of the network LSA, the route from the RTA to the IPv6 prefix 2003:3:3::/48 is 2003:3:3::/48, and the routing information of the RTA to the network LSA is: RTA to the network LSA The distance is equal to 1; the outgoing interface of the RTA is interface la; the next hop is FE80::RTA or is empty. Therefore, the obtained next hop information cannot be forwarded to the prefix address where 2003:3:3:48 is located.
也就是说, 现有技术在对端的 IPv6 区域内前缀和本地区域内前缀不同的 情况下, 无法指导报文转发。  That is, in the case where the prefix in the IPv6 area of the peer end is different from the prefix in the local area, the packet forwarding cannot be guided.
发明内容 Summary of the invention
本发明实施例提供一种直连广播链路上路由计算方法及系统,以便在对端 的 IPv6前缀和本地前缀不同的情况下仍然能够指导"¾文进行正确转发。  The embodiment of the invention provides a method and a system for calculating a route on a direct-connected broadcast link, so that the "3" message can be correctly forwarded if the IPv6 prefix of the peer end and the local prefix are different.
本发明实施例提供的一种直连广播链路上路由计算方法, 包括: 获取区域内前缀 LSA中的待计算路由的地址前缀;  The method for calculating a route on a direct-connected broadcast link provided by the embodiment of the present invention includes: obtaining an address prefix of a route to be calculated in an intra-area prefix LSA;
如果所述待计算路由的地址前缀在直连广播链路上且不包含在本地配置 的地址前缀中 ,获得所述待计算路由的地址前缀所依附的路由器的本地链路地 址作为到所述待计算路由的地址前缀的路由的下一跳。  If the address prefix of the route to be calculated is on the direct broadcast link and is not included in the locally configured address prefix, obtain the link address of the router to which the address prefix of the route to be calculated is attached as The next hop of the route that calculates the address prefix of the route.
本发明实施例提供的一种直连广播链路上路由计算系统, 包括: 前缀提取单元, 用于获取区域内前缀 LSA中的待计算路由的地址前缀; 第一判断单元,用于判断所述待计算路由的地址前缀是否在直连广播链路 上;  The route calculation system of the directly connected broadcast link provided by the embodiment of the present invention includes: a prefix extraction unit, configured to acquire an address prefix of a route to be calculated in an intra-area prefix LSA; and a first determining unit, configured to determine the Whether the address prefix of the route to be calculated is directly connected to the broadcast link;
第二判断单元,用于判断本地配置的地址前缀中是否包含所述待计算路由 的地址前缀;  a second determining unit, configured to determine whether the locally configured address prefix includes the address prefix of the to-be-calculated route;
路由计算单元, 在所述第一判断单元和所述第二判断单元的判断结果为: 所述待计算路由的地址前缀在直连广播链路上且不包含在本地配置的地址前 缀中时,获得所述待计算路由的地址前缀所依附的路由器的本地链路地址作为 到所述待计算路由的地址前缀的路由的下一跳。 The route calculation unit, the judgment result of the first judgment unit and the second judgment unit is: When the address prefix of the route to be calculated is on the directly connected broadcast link and is not included in the locally configured address prefix, obtain the link address of the router to which the address prefix of the route to be calculated is attached as the to-be-addressed The next hop of the route that calculates the address prefix of the route.
本发明实施例提供的另一种直连广播链路上路由计算系统, 包括: 前缀提取单元, 取待计算路由的前缀;  The route calculation system of the direct-connected broadcast link provided by the embodiment of the present invention includes: a prefix extracting unit that takes a prefix of the calculated route;
第一判断单元, 判断所述待计算路由的前缀是否在直连广播链路上; 第二判断单元, 判断本地配置的前缀中是否包含所述待计算路由的前缀; 信息获得单元,获得对端的本地链路地址作为到所述待计算路由的前缀的 路由的下一跳, 将获得所述待计算路由的前缀的路由信息写入路由表。  a first determining unit, determining whether the prefix of the to-be-calculated route is on the direct-connected broadcast link, and determining, by the second determining unit, whether the locally configured prefix includes the prefix of the to-be-calculated route; the information obtaining unit obtains the peer end The local link address is used as the next hop of the route to the prefix of the route to be calculated, and the routing information obtained by obtaining the prefix of the route to be calculated is written into the routing table.
本发明实施例在对端的 IPv6前缀和本地前缀不同的情况下, 如所参考的 网络 LSA是和本地直连的, 通过获得对端的本地链路地址作为所述前缀的路 由的下一跳, 实现了指导 "^文转发。  In the embodiment of the present invention, when the IPv6 prefix of the peer end is different from the local prefix, the network LSA is directly connected to the local end, and the local link address of the peer end is obtained as the next hop of the route of the prefix. Guided "^ text forwarding.
附图说明 DRAWINGS
图 1为现有技术中报文转发示意图;  1 is a schematic diagram of packet forwarding in the prior art;
图 2为现有技术中直连广播链路上的路由示意图;  2 is a schematic diagram of routing on a direct broadcast link in the prior art;
图 3为现有技术中 OSPFv3协议对广播链路的逻辑拓朴图;  3 is a logical topology diagram of a OSPFv3 protocol for a broadcast link in the prior art;
图 4为现有技术中 OSPFv3协议计算出的下一跳示意图;  4 is a schematic diagram of a next hop calculated by the OSPFv3 protocol in the prior art;
图 5为本发明实施例中直连广播链路的下一跳示意图;  5 is a schematic diagram of a next hop of a direct-connected broadcast link according to an embodiment of the present invention;
图 6为本发明实施例在直连广播链路上路由计算方法的流程图; 图 7为本发明实施例中直连广播链路的 IPv6前缀配置示意图;  6 is a flowchart of a method for calculating a route on a direct-connected broadcast link according to an embodiment of the present invention; FIG. 7 is a schematic diagram of an IPv6 prefix configuration of a direct-connected broadcast link according to an embodiment of the present invention;
图 8为本发明实施例在直连广播链路上路由的计算系统的一种结构示 意图;  FIG. 8 is a schematic structural diagram of a computing system for routing on a direct broadcast link according to an embodiment of the present invention; FIG.
图 9为本发明实施例在直连广播链路上路由的计算系统的另一种结构 示意图。  FIG. 9 is another schematic structural diagram of a computing system for routing on a direct broadcast link according to an embodiment of the present invention.
具体实施方式 detailed description
本发明实施例在计算区域内前缀 LSA的时候,如果参考 LSA是网络 LSA 且该网络 LSA和本地直连, 则检查本地是否配置了到该区域内前缀所依附的 路由器接口上配置的地址前缀, 如果配置了, 以当前网络 LSA为参考 LSA, 继承所述参考网络 LSA的路由信息; 如果没有配置, 则找到对应的配置该地 址前缀的邻居路由器, 参考该邻居路由器 LSA的下一跳信息, 获得该地址前 缀的路由的下一跳信息。 In the embodiment of the present invention, when the reference LSA is the network LSA and the network LSA is directly connected to the local LSA, it is checked whether the address prefix configured on the router interface to which the prefix is attached in the area is configured. If configured, the current network LSA is used as the reference LSA, and the routing information of the reference network LSA is inherited; if not configured, the corresponding configuration is found. The neighboring router of the address prefix obtains the next hop information of the route of the address prefix by referring to the next hop information of the neighboring router LSA.
如图 5所示, RTA51, RTB52和 RTC53通过接口 la, lb和 Ic共享广播链路。 RTB的接口 lb和 RTC的接口 Ic都与 RTA的接口 la相连接; 对于 RTA而言 , RTA通过接口 la与 RTB和 RTC相连接 , 在接口上配置的 IPv6网段路由就是 一种直连路由。  As shown in Figure 5, RTA51, RTB52 and RTC53 share the broadcast link through interfaces la, lb and Ic. The interfaces of the RTB and the RTC interface Ic are connected to the interface of the RTA. For the RTA, the RTA is connected to the RTB and the RTC through the interface la. The IPv6 network segment route configured on the interface is a direct route.
对 RTA而言, 在计算 IPv6区域内前缀 LSA的路由信息的时候, 当参考 LSA是网络 LSA, 并且所参考的网络 LSA与 RTA直连, 即 RTA在直连广播 链路上, 但 RTA没有配置所述 IPv6区域内前缀所依附的路由器的地址前缀, 而 RTC接口 Ic上配置的 IPv6地址前缀和 IPv6区域内前缀 LSA中的地址前缀 相同, 则 RTC为对应的配置了 IPv6区域内前缀 LSA中所含地址前缀的邻居 路由器, 这样, 参考 RTC路由器 LSA的下一跳信息, 获得 IPv6区域内前缀 LSA中所含的地址前缀的路由的下一跳信息。  For the RTA, when calculating the routing information of the prefix LSA in the IPv6 area, when the reference LSA is the network LSA, and the referenced network LSA is directly connected to the RTA, that is, the RTA is directly connected to the broadcast link, but the RTA is not configured. The address prefix of the router to which the prefix is attached in the IPv6 area, and the IPv6 address prefix configured on the RTC interface Ic is the same as the address prefix in the prefix LSA of the IPv6 area, and the RTC is configured in the corresponding LSA in the IPv6 area. A neighboring router with an address prefix, so that the next hop information of the route prefix included in the prefix LSA in the IPv6 area is obtained by referring to the next hop information of the LSC router LSA.
如图 6所示, 本发明实施例提供的路由计算方法在计算区域内前缀 LSA 的路由信息的时候, 具体包括步骤:  As shown in FIG. 6, when the route calculation method provided by the embodiment of the present invention calculates the routing information of the prefix LSA in the area, the method includes the following steps:
S600: 取 IPv6区域内前缀 LSA中的第一个地址前缀, 执行步骤 S601; S600: Take the first address prefix in the prefix LSA in the IPv6 area, and perform step S601;
S601 : 判断参考 LSA是否是网络 LSA; S601: Determine whether the reference LSA is a network LSA;
如果参考 LSA是网络 LSA,执行步骤 S602,如果参考 LSA不是网络 LSA, 执行步骤 S603;  If the reference LSA is a network LSA, step S602 is performed, and if the reference LSA is not a network LSA, step S603 is performed;
S602: 检查所参考的网络 LSA是否与本地直连, 即步骤 600中取的所述 地址前缀所在的路由器是否在直连广播链路上; 如果所参考的网络 LSA与本 地直连, 执行步骤 S604, 如果所参考的网络 LSA不与本地直连, 则执行步骤 S603;  S602: Check whether the referenced network LSA is directly connected to the local device, that is, the router where the address prefix is taken in step 600 is directly connected to the broadcast link. If the referenced network LSA is directly connected to the local device, step S604 is performed. If the referenced network LSA is not directly connected to the local, step S603 is performed;
步骤 S603: 所述地址前缀的路由信息继承参考 LSA的路由信息, 然后, 执行步骤 S609;  Step S603: The routing information of the address prefix inherits the routing information of the reference LSA, and then, step S609 is performed;
步骤 S604: 取网络 LSA的第一个子节点, 即路由器 LSA的 ID, 并根据 该 ID信息在数据库中找到该路由器对应的 LSA, 检查所述地址前缀是否与该 路由器接口上配置的地址前缀相同;  Step S604: Take the first child node of the network LSA, that is, the ID of the router LSA, and find the LSA corresponding to the router in the database according to the ID information, and check whether the address prefix is the same as the address prefix configured on the interface of the router. ;
如果所述地址前缀与该路由器接口上配置的地址前缀相同, 执行步骤 S605 ,如果所述地址前缀与该路由器接口上配置的地址前缀不相同, 则执行步 骤 S606; If the address prefix is the same as the address prefix configured on the interface of the router, go to the step. S605, if the address prefix is not the same as the address prefix configured on the router interface, step S606 is performed;
S605: 以当前网络 LSA为参考 LSA, 继承所参考路由器 LSA节点的路由 信息, 执行步骤 S603;  S605: The current network LSA is used as the reference LSA, and the routing information of the reference router LSA node is inherited, and step S603 is performed;
S606: 取所述地址前缀所在的子节点, 判断是否为空; 如果所述地址前缀 所在的子节点为空, 执行步骤 S608, 如果所述地址前缀所在的子节点不为空, 则执行步骤 S607;  S606: The child node where the address prefix is located is determined to be empty. If the child node where the address prefix is located is empty, step S608 is performed. If the child node where the address prefix is located is not empty, step S607 is performed. ;
S607: 从路由器 LSA中取得路由器 LSA到网络 LSA的距离, 以所述地 址前缀所在的路由器 LSA为参考 LSA, 取得该路由器 LSA的下一跳信息, 执 行步骤 S609;  S607: The distance from the router LSA to the network LSA is obtained from the router LSA, and the router LSA of the address prefix is used as the reference LSA, and the next hop information of the router LSA is obtained, and step S609 is performed;
S608: 给出错误信息, 执行步骤 S609;  S608: giving an error message, performing step S609;
S609: 获得所述地址前缀的路由信息并写入路由表, 执行步骤 S610; 所述地址前缀的路由信息包括: 本地出接口, 下一跳信息, Cost值等; S610: 取区域内前缀 LSA中的下一个地址前缀, 执行步骤 S611;  S609: Obtain the routing information of the address prefix and write the routing information to the routing table, and perform step S610. The routing information of the address prefix includes: a local outbound interface, a next hop information, a cost value, and the like; S610: take the intra-area prefix LSA The next address prefix, step S611;
S611 : 判断下一个地址前缀是否为空;  S611: determining whether the next address prefix is empty;
如果所述下一个地址前缀为空, 流程结束; 如果所述下一个地址前缀不为 空, 则返回执行步骤 S601。  If the next address prefix is empty, the process ends; if the next address prefix is not empty, then step S601 is returned.
下面参照图 7进一步详细说明本发明实施例中路由的计算过程:  The calculation process of the route in the embodiment of the present invention is further described in detail below with reference to FIG. 7:
如图 7所示的直连广播链路 IPv6前缀配置如下:  The IPv6 prefix configuration of the direct broadcast link shown in Figure 7 is as follows:
RTA71 : 全球单播地址为 2001 :1 :1 :1 : 48, 本地链路地址为 FE80::RTA; RTA71: The global unicast address is 2001 :1 :1 :1 : 48, and the link-local address is FE80::RTA;
RTB72: 全球单播地址为 2002:2:2:2: 48, 本地链路地址为 FE80::RTB;RTB72: The global unicast address is 2002:2:2:2: 48, and the local link address is FE80::RTB;
RTC73: 全球单播地址为 2003:3:3:3: 48, 本地链路地址为 FE80::RTC; 如果釆用本发明实施例提供的在直连广播链路上路由计算方法, 在计算 RTA到 IPv6区域内前缀 LSA的路由信息时,首先取 RTA到 IPv6的地址前缀, 即 2003:3:3::/48, 然后在确定参考 LSA是网络 LSA, 且所述参考网络 LSA与 本地路由器 RTA直连后,判断所述 RTA到 IPv6的地址前缀与所述路由器 RTA 接口 la上配置的地址前缀是否相同, 可以看到, 所述路由器 RTA到 IPv6的地 址前缀为 2003:3:3: 48 , 所述路由器 RTA 接口 la 上配置的地址前缀为 2001 :1 :1 : :/48 , 即所述路由器 RTA到 IPv6的地址前缀与所述路由器 RTA接口 la上配置的地址前缀不相同, 则找到配置所述 RTA到 IPv6 的地址前缀为 2003:3:3:748的邻居路由器 RTC,即 RTC是所述 RTA到 IPv6的地址前缀对应 的路由器, 然后判断所述地址前缀 2003:3:3::/48的邻居路由器 RTC是否为空, 确定不为空, 则参考 RTC LSA的下一跳信息, 获得所述地址前缀的路由的下 一跳信息, 为 FE80::RTC, 而 RTA到 IPv6地址前缀 2003:3:3::/48的路由为 2003 :3 :3: :/48 , 则从网络 LSA取得 RTA到网络 LSA的距离, 等于 1 , RTA的 出接口为 Ia。 这样, 路由器 RTA就可以利用获得的下一跳信息 FE80::RTC可 以指导报文转发到 2003:3:3::/48所在的前缀地址。本发明还提供了一种直连广 播链路上路由的计算系统, 参照图 8 所示本发明实施例的系统的一种结构框 图: RTC73: The global unicast address is 2003:3:3:3:48, and the local link address is FE80::RTC; if the route calculation method on the direct-connected broadcast link provided by the embodiment of the present invention is used, the RTA is calculated. When the routing information of the LSA is prefixed in the IPv6 area, the RTA to IPv6 address prefix is first taken, that is, 2003:3:3::/48, and then the reference LSA is determined to be the network LSA, and the reference network LSA and the local router RTA are used. After the direct connection, the address prefix of the RTA to IPv6 is the same as the address prefix configured on the RTA interface la of the router. It can be seen that the address prefix of the router from RTA to IPv6 is 2003:3:3:48. The address prefix configured on the router RTA interface la is 2001:1:1::/48, that is, the address prefix of the router RTA to IPv6 is connected to the router RTA. If the address prefix configured on the LA is different, the neighboring router RTC with the address prefix of the RTA to IPv6 is 2003:3:3:748. The RTC is the router corresponding to the RTA to IPv6 address prefix, and then judges. Whether the neighboring router RTC of the address prefix 2003:3:3::/48 is empty, and if it is determined to be empty, the next hop information of the route of the address prefix is obtained by referring to the next hop information of the RTC LSA, FE80::RTC, and the route from RTA to IPv6 address prefix 2003:3:3::/48 is 2003 :3 :3: :/48 , then the distance from the network LSA to the network LSA is equal to 1, RTA The outgoing interface is Ia. In this way, the router RTA can use the obtained next hop information FE80::RTC to guide the packet forwarding to the prefix address where 2003:3:3::/48 is located. The present invention also provides a computing system for routing directly on a broadcast link. Referring to FIG. 8 is a structural block diagram of the system of the embodiment of the present invention:
在该实施例中, 包括前缀提取单元 81 , 第一判断单元 82, 第二判断单元 83和信息获得单元 84。  In this embodiment, a prefix extracting unit 81, a first judging unit 82, a second judging unit 83, and an information obtaining unit 84 are included.
所述前缀提取单元 81从区域内前缀 LSA中取所述待计算路由的前缀; 所述第一判断单元 82 判断所述待计算路由的前缀是否在直连广播链路 上;  The prefix extracting unit 81 takes the prefix of the to-be-calculated route from the intra-area prefix LSA; the first determining unit 82 determines whether the prefix of the to-be-calculated route is on the direct-connected broadcast link;
所述第二判断单元 83判断本地配置的前缀中是否包含所述待计算路由的 前缀;  The second determining unit 83 determines whether the locally configured prefix includes the prefix of the to-be-calculated route;
所述信息获得单元 84在所述待计算路由的前缀在直连广播链路上, 且本 地配置的前缀中不包含所述待计算路由的前缀,获得对端的本地链路地址作为 到所述待计算路由的前缀的路由的下一跳,将获得所述待计算路由的前缀的路 由信息写入路由表。  The prefix obtained by the information obtaining unit 84 on the route to be calculated is on the direct broadcast link, and the locally configured prefix does not include the prefix of the route to be calculated, and the local link address of the peer is obtained as the Calculating the next hop of the route of the prefix of the route, and writing the routing information of the prefix of the route to be calculated into the routing table.
其中所述第一判断单元 82包括参考 LSA判断单元 821和网络 LSA判断 单元 822;  The first determining unit 82 includes a reference LSA determining unit 821 and a network LSA determining unit 822;
所述参考 LSA判断单元 821判断所述区域内待计算路由的前缀 LSA的参 考 LSA是否是网络 LSA;  The reference LSA determining unit 821 determines whether the reference LSA of the prefix LSA of the route to be calculated in the area is a network LSA;
所述网络 LSA判断单元 822判断所述网络 LSA是否和本地相连。  The network LSA determining unit 822 determines whether the network LSA is locally connected.
如果所述区域内待计算路由的前缀 LSA的参考 LSA是网络 LSA,且所述 网络 LSA与本地相连, 则所述待计算路由的前缀在直连广播链路上。  If the reference LSA of the prefix LSA to be calculated in the area is a network LSA, and the network LSA is locally connected, the prefix of the to-be-calculated route is on the direct broadcast link.
所述第二判断单元 83 包括前缀判断单元 831 , 路由信息获得单元 832和 子节点判断单元 833; The second determining unit 83 includes a prefix determining unit 831, a routing information obtaining unit 832, and Subnode determination unit 833;
所述前缀判断单元 831 判断本地配置的前缀中是否包含所述待计算路由 的前缀;  The prefix determining unit 831 determines whether the locally configured prefix includes the prefix of the to-be-calculated route;
所述路由信息获得单元 832以所述网络 LSA为参考 LSA, 通过邻居发现 协议得到对端的本地链路地址, 作为到所述待计算路由的前缀的路由的下一 跳, 得到所述待计算路由的前缀的路由信息;  The routing information obtaining unit 832 uses the network LSA as the reference LSA, and obtains the local link address of the peer by using the neighbor discovery protocol, as the next hop of the route to the prefix of the to-be-calculated route, and obtains the to-be-calculated route. Routing information for the prefix;
所述子节点判断单元 833判断所述待计算路由的前缀所在的子节点,即路 由器 LSA节点是否为空。  The child node determining unit 833 determines whether the child node where the prefix of the route to be calculated is located, that is, whether the router LSA node is empty.
所述信息获得单元 84包括下一跳地址获得单元 841和路由距离获得单元 The information obtaining unit 84 includes a next hop address obtaining unit 841 and a routing distance obtaining unit
842; 842;
所述下一跳地址获得单元 841从所述网络 LSA包含的路由器中, 找到配 有所述待计算路由的前缀的路由器, 以该路由器的 LSA为参考 LSA, 得到其 下一跳地址, 所述下一跳地址为对端的本地链路地址。  The next hop address obtaining unit 841 finds a router with the prefix of the route to be calculated from the router included in the network LSA, and obtains the next hop address by using the LSA of the router as the reference LSA. The next hop address is the local link address of the peer.
所述路由距离获得单元 842获得所述网络 LSA的距离作为到所述前缀的 路由的距离。  The route distance obtaining unit 842 obtains the distance of the network LSA as the distance to the route of the prefix.
所述下一跳地址获得单元 841 包括链路寻找单元 8411和链路地址获得单 元 8412;  The next hop address obtaining unit 841 includes a link searching unit 8411 and a link address obtaining unit 8412;
所述链路寻找单元 8411在该路由器所属的链路 LSA中, 找到地址前缀与 所述待计算路由的前缀相同的链路 LSA;  The link searching unit 8411 finds a link LSA with the same address prefix and the prefix of the to-be-calculated route in the link LSA to which the router belongs.
所述链路地址获得单元 8412得到所述链路 LSA的本地链路地址作为对端 的本地链路地址。  The link address obtaining unit 8412 obtains the link-local address of the link LSA as the link-local link address.
所述前缀提取单元 81从区域内前缀 LSA中取第一个地址前缀待计算, 参 考 LSA判断单元 821判断参考 LSA是否是网络 LSA, 如果参考 LSA不是网 络 LSA, 路由信息获得单元 832继承所述参考 LSA的路由信息, 获得所述地 址前缀的路由信息并写入路由表;  The prefix extracting unit 81 takes the first address prefix from the intra-area prefix LSA to be calculated, and the reference LSA determining unit 821 determines whether the reference LSA is a network LSA. If the reference LSA is not a network LSA, the routing information obtaining unit 832 inherits the reference. The routing information of the LSA obtains the routing information of the address prefix and writes the routing information to the routing table;
如果参考 LSA是网络 LSA, 网络 LSA判断单元 822检查所参考的网络 LSA是否与本地直连, 即所述地址前缀所在的路由器是否在直连广播链路上, 如果所参考的网络 LSA不与本地直连, 路由信息获得单元 832继承所述参考 LSA的路由信息, 获得所述地址前缀的路由信息并写入路由表; 如果所参考的网络 LSA与本地直连 ,前缀判断单元 831取第一个网络 LSA 的子节点, 即路由器 LSA节点, 检查所述地址前缀是否与该路由器接口上配 置的地址前缀相同, 如果所述地址前缀与该路由器接口上配置的地址前缀相 同, 路由信息获得单元 832以当前网络 LSA为参考 LSA, 继承所参考 LSA节 点的路由信息, 获得所述地址前缀的路由信息并写入路由表; If the reference LSA is a network LSA, the network LSA determining unit 822 checks whether the referenced network LSA is directly connected to the local, that is, whether the router where the address prefix is located is directly connected to the broadcast link, if the referenced network LSA is not locally Directly, the routing information obtaining unit 832 inherits the routing information of the reference LSA, obtains routing information of the address prefix, and writes the routing information to the routing table; If the referenced network LSA is directly connected to the local, the prefix determining unit 831 takes the child node of the first network LSA, that is, the router LSA node, and checks whether the address prefix is the same as the address prefix configured on the router interface, if the The address prefix is the same as the address prefix configured on the interface of the router. The routing information obtaining unit 832 uses the current network LSA as the reference LSA, inherits the routing information of the reference LSA node, and obtains the routing information of the address prefix and writes the routing information to the routing table.
如果所述地址前缀与该路由器接口上配置的地址前缀不相同,子节点判断 单元 833取所述地址前缀所在的子节点, 即路由器 LSA节点, 判断是否为空, 如果所述地址前缀所在的子节点为空, 给出错误信息, 路由信息获得单元 832 获得所述地址前缀的路由信息并写入路由表;  If the address prefix is different from the address prefix configured on the interface of the router, the child node determining unit 833 takes the child node where the address prefix is located, that is, the router LSA node, and determines whether it is empty, if the child of the address prefix is located. If the node is empty, the error information is given, and the routing information obtaining unit 832 obtains the routing information of the address prefix and writes the routing information to the routing table;
如果所述地址前缀所在的子节点不为空, 路由距离获得单元 842 从网络 LSA取得所述地址前缀所在的节点到所述路由器 LSA节点的距离, 链路寻找 单元 8411在该路由器所属的链路 LSA中,找到地址前缀与所述待计算路由的 前缀相同的链路 LSA,链路地址获得单元 8412得到所述链路 LSA的本地链路 地址作为对端的本地链路地址, 获得所述地址前缀的路由信息并写入路由表。  If the child node where the address prefix is located is not empty, the route distance obtaining unit 842 obtains the distance from the node where the address prefix is located to the LSA node of the router from the network LSA, and the link searching unit 8411 is on the link to which the router belongs. In the LSA, the link LSA with the same address prefix as the prefix of the to-be-calculated route is found, and the link address obtaining unit 8412 obtains the link-local address of the link LSA as the local link address of the peer, and obtains the address prefix. Routing information and write to the routing table.
由此可见, 本发明系统实施例在对端的 IPv6地址前缀和本地地址前缀不 同的情况下, 如所参考的网络 LSA是和本地直连的, 以获得对端的本地链路 地址作为待计算路由的地址前缀的路由的下一跳,从而可以使路由器可以根据 该路由信息指导报文正确转发。  It can be seen that, in the embodiment of the system of the present invention, if the IPv6 address prefix and the local address prefix of the peer end are different, the reference network LSA is directly connected to the local device, so as to obtain the local link address of the peer end as the route to be calculated. The next hop of the route of the address prefix, so that the router can guide the packet to forward correctly according to the routing information.
再参照图 9所示本发明实施例的系统的另一种结构框图:  Referring again to FIG. 9, another structural block diagram of the system of the embodiment of the present invention is shown:
在该实施例中, 包括前缀提取单元 91 , 第一判断单元 92, 第二判断单元 93和路由计算单元 94。 其中,  In this embodiment, a prefix extracting unit 91, a first judging unit 92, a second judging unit 93, and a route calculating unit 94 are included. among them,
前缀提取单元 91用于获取区域内前缀 LSA中的待计算路由的地址前缀; 第一判断单元 92判断所述待计算路由的地址前缀是否在直连广播链路上; 第 二判断单元 93判断本地配置的前缀中是否包含所述待计算路由的前缀; 信息 获得单元 94在第一判断单元 92和第二判断单元 93的判断结果为: 所述待计 算路由的地址前缀在直连广播链路上且不包含在本地配置的地址前缀中时,获 得所述待计算路由的地址前缀所依附的路由器的本地链路地址作为到所述待 计算路由的前缀的路由的下一跳。  The prefix extracting unit 91 is configured to obtain an address prefix of the route to be calculated in the intra-area prefix LSA. The first determining unit 92 determines whether the address prefix of the to-be-calculated route is on the direct broadcast link. The second determining unit 93 determines the local Whether the prefix of the route to be calculated is included in the configured prefix; the judgment result of the information obtaining unit 94 in the first determining unit 92 and the second determining unit 93 is: the address prefix of the route to be calculated is on the direct broadcast link When not included in the locally configured address prefix, the local link address of the router to which the address prefix of the route to be calculated is attached is obtained as the next hop of the route to the prefix of the route to be calculated.
第一判断单元 92包括参考 LSA判断单元 921和网络 LSA判断单元 922; 参考 LSA判断单元 921用于判断所述区域内待计算路由的地址前缀 LSA的参 考 LSA是否是网络 LSA; 在参考 LSA判断单元 921确定所述参考 LSA是网 络 LSA的情况下, 网络 LSA判断单元 922判断所述网络 LSA是否和本地相 连。 如果所述区域内待计算路由的地址前缀 LSA的参考 LSA是网络 LSA, 且 所述网络 LSA与本地相连, 则可以确定所述待计算路由的地址前缀在直连广 播链路上。 The first determining unit 92 includes a reference LSA determining unit 921 and a network LSA determining unit 922; The reference LSA determining unit 921 is configured to determine whether the reference LSA of the address prefix LSA of the route to be calculated in the area is a network LSA; and in the case where the reference LSA determining unit 921 determines that the reference LSA is a network LSA, the network LSA determining unit 922 It is determined whether the network LSA is connected to the local. If the reference LSA of the address prefix LSA of the route to be calculated in the area is a network LSA, and the network LSA is locally connected, it may be determined that the address prefix of the to-be-calculated route is on the direct broadcast link.
第二判断单元 93 包括前缀判断单元 931和子节点判断单元 933。 其中, 前缀判断单元 931 用于判断本地配置的地址前缀中是否包含所述待计算路由 的地址前缀; 如果本地配置的地址前缀中不包含所述待计算路由的地址前缀, 则还需要子节点判断单元 933判断所述待计算路由的地址前缀所在的子节点, 即路由器 LSA节点是否为空。 如果为空, 则表明该节点不存在。 在这种情况 下, 可以由子节点判断单元 933给出错误信息。  The second judging unit 93 includes a prefix judging unit 931 and a child node judging unit 933. The prefix determining unit 931 is configured to determine whether the locally configured address prefix includes the address prefix of the to-be-calculated route. If the locally configured address prefix does not include the address prefix of the to-be-calculated route, the child node needs to be determined. The unit 933 determines whether the child node where the address prefix of the route to be calculated is located, that is, whether the router LSA node is empty. If it is empty, it indicates that the node does not exist. In this case, the error information can be given by the child node judging unit 933.
路由计算单元 94包括下一跳地址获得单元 941和路由距离获得单元 942。 其中, 下一跳地址获得单元 941从所述网络 LSA包含的路由器中, 找到配有 所述待计算路由的地址前缀的路由器, 以该路由器的 LSA为参考 LSA, 得到 其下一跳地址,将所述下一跳地址作为所述待计算路由的地址前缀所依附的路 由器的本地链路地址。 路由距离获得单元 942获得所述网络 LSA的距离作为 到所述待计算路由的地址前缀所依附的路由器的路由的距离。  The route calculation unit 94 includes a next hop address obtaining unit 941 and a route distance obtaining unit 942. The next hop address obtaining unit 941 finds the router with the address prefix of the route to be calculated from the router included in the network LSA, and obtains the next hop address by using the LSA of the router as the reference LSA. The next hop address is used as the link-local address of the router to which the address prefix of the route to be calculated is attached. The route distance obtaining unit 942 obtains the distance of the network LSA as the distance to the route of the router to which the address prefix of the route to be calculated is attached.
下一跳地址获得单元 941 包括链路寻找单元 9411 和链路地址获得单元 9412。 其中, 链路寻找单元 9411在该路由器所属的链路 LSA中, 找到地址前 缀与所述待计算路由的地址前缀相同的链路 LSA; 链路地址获得单元 9412得 到所述链路 LSA的本地链路地址作为所述待计算路由的地址前缀所依附的路 由器的本地链路地址。  The next hop address obtaining unit 941 includes a link finding unit 9411 and a link address obtaining unit 9412. The link searching unit 9411 finds the link LSA with the same address prefix and the same address prefix as the route to be calculated in the link LSA to which the router belongs. The link address obtaining unit 9412 obtains the local chain of the link LSA. The way address is the link address of the router to which the address prefix of the route to be calculated is attached.
在前缀判断单元 931 确定本地配置的地址前缀中包含所述待计算路由的 地址前缀的情况下 ,可以通过邻居发现协议得到所述待计算路由的地址前缀所 依附的路由器的本地链路地址,作为到所述待计算路由的地址前缀的路由的下 一跳, 得到所述待计算路由的地址前缀的路由信息。 为此, 本发明系统实施例 中还可以设置与前缀判断单元 931相连的路由信息获得单元 95, 实现上述功 能。 本发明实施例的系统中各单元的工作过程如下: 前缀提取单元 91 从区域内前缀 LSA 中取第一个地址前缀待计算, 参考 LSA判断单元 921判断参考 LSA是否是网络 LSA。 如果参考 LSA不是网络 LSA, 路由信息获得单元 95继承所述参考 LSA的路由信息, 获得所述地址前 缀的路由信息并写入路由表; In the case that the prefix determining unit 931 determines that the locally configured address prefix includes the address prefix of the to-be-calculated route, the local link address of the router to which the address prefix of the to-be-calculated route is attached may be obtained by using the neighbor discovery protocol. The next hop of the route to the address prefix of the route to be calculated is obtained, and the routing information of the address prefix of the route to be calculated is obtained. To this end, the routing information obtaining unit 95 connected to the prefix determining unit 931 can also be provided in the embodiment of the system of the present invention to implement the above functions. The working process of each unit in the system of the embodiment of the present invention is as follows: The prefix extracting unit 91 takes the first address prefix from the intra-area prefix LSA to be calculated, and the reference LSA determining unit 921 determines whether the reference LSA is a network LSA. If the reference LSA is not the network LSA, the routing information obtaining unit 95 inherits the routing information of the reference LSA, obtains the routing information of the address prefix, and writes the routing information to the routing table;
如果参考 LSA是网络 LSA, 网络 LSA判断单元 922检查所参考的网络 LSA是否与本地直连, 即所述地址前缀所在的路由器是否在直连广播链路上。 如果所参考的网络 LSA不与本地直连, 路由信息获得单元 95继承所述参考 LSA的路由信息, 获得所述地址前缀的路由信息并写入路由表;  If the reference LSA is a network LSA, the network LSA determining unit 922 checks whether the referenced network LSA is directly connected to the local, that is, whether the router where the address prefix is located is directly connected to the broadcast link. If the referenced network LSA is not directly connected to the local area, the routing information obtaining unit 95 inherits the routing information of the reference LSA, obtains the routing information of the address prefix, and writes the routing information to the routing table;
如果所参考的网络 LSA与本地直连,前缀判断单元 931取第一个网络 LSA 的子节点, 即路由器 LSA节点, 检查所述地址前缀是否与该路由器接口上配 置的地址前缀相同。 如果所述地址前缀与该路由器接口上配置的地址前缀相 同, 路由信息获得单元 95以当前网络 LSA为参考 LSA, 继承所参考 LSA节 点的路由信息, 获得所述地址前缀的路由信息并写入路由表;  If the referenced network LSA is directly connected to the local, the prefix determining unit 931 takes the child node of the first network LSA, that is, the router LSA node, and checks whether the address prefix is the same as the address prefix configured on the router interface. If the address prefix is the same as the address prefix configured on the interface of the router, the routing information obtaining unit 95 uses the current network LSA as the reference LSA, inherits the routing information of the reference LSA node, obtains the routing information of the address prefix, and writes the route. Table
如果所述地址前缀与该路由器接口上配置的地址前缀不相同,子节点判断 单元 933取所述地址前缀所在的子节点, 即路由器 LSA节点是否为空。 如果 所述地址前缀所在的子节点为空, 给出错误信息, 路由信息获得单元 95获得 所述地址前缀的路由信息;  If the address prefix is different from the address prefix configured on the interface of the router, the child node determining unit 933 takes the child node where the address prefix is located, that is, whether the router LSA node is empty. If the child node where the address prefix is located is empty, giving an error message, the routing information obtaining unit 95 obtains the routing information of the address prefix;
如果所述地址前缀所在的子节点不为空, 路由距离获得单元 942 从网络 LSA取得所述地址前缀所在的节点到所述路由器 LSA节点的距离, 链路寻找 单元 9411在该路由器所属的链路 LSA中,找到地址前缀与所述待计算路由的 前缀相同的链路 LSA,链路地址获得单元 9412得到所述链路 LSA的本地链路 地址作为对端的本地链路地址, 获得所述地址前缀的路由信息。  If the child node where the address prefix is located is not empty, the route distance obtaining unit 942 obtains the distance from the node where the address prefix is located to the router LSA node from the network LSA, and the link searching unit 9411 is on the link to which the router belongs. In the LSA, the link LSA with the same address prefix as the prefix of the to-be-calculated route is found, and the link address obtaining unit 9412 obtains the link-local address of the link LSA as the local link address of the peer, and obtains the address prefix. Routing information.
另外, 在本发明系统实施例中, 还可以设置路由信息写入单元 96, 用于 将路由计算单元 94和 /或路由信息获得单元 95获得的所述待计算路由的前缀 的路由信息写入路由表。  In addition, in the system embodiment of the present invention, the routing information writing unit 96 may be further configured to write routing information of the prefix of the to-be-calculated route obtained by the route calculating unit 94 and/or the routing information obtaining unit 95. table.
由此可见, 本发明系统实施例在对端的 IPv6地址前缀和本地地址前缀不 同的情况下, 如所参考的网络 LSA是和本地直连的, 以获得对端的本地链路 地址作为待计算路由的地址前缀的路由的下一跳,从而可以使路由器可以根据 该路由信息指导报文正确转发。 以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局 限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应该以权利要求的保护范围为准。 It can be seen that, in the embodiment of the system of the present invention, if the IPv6 address prefix and the local address prefix of the peer end are different, the reference network LSA is directly connected to the local device, so as to obtain the local link address of the peer end as the route to be calculated. The next hop of the route of the address prefix, so that the router can guide the packet to forward correctly according to the routing information. The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present invention. Alternatives are intended to be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

权 利 要 求 Rights request
1、 一种直连广播链路上路由计算方法, 其特征在于, 包括:  A method for calculating a route on a direct broadcast link, which is characterized by comprising:
获取区域内前缀链路状态通告中的待计算路由的地址前缀;  Obtain an address prefix of the route to be calculated in the prefix link state advertisement in the area;
如果所述待计算路由的地址前缀在直连广播链路上且不包含在本地配置 的地址前缀中 ,获得所述待计算路由的地址前缀所依附的路由器的本地链路地 址作为到所述待计算路由的地址前缀的路由的下一跳。  If the address prefix of the route to be calculated is on the direct broadcast link and is not included in the locally configured address prefix, obtain the link address of the router to which the address prefix of the route to be calculated is attached as The next hop of the route that calculates the address prefix of the route.
2、 根据权利要求 1所述的方法, 其特征在于, 按照以下步骤确定所述待 计算路由的地址前缀是否在直连广播链路上: 如果所述参考链路状态通告是网络链路状态通告并且所述网络链路状态 通告与本地直连, 则确定所述待计算路由的地址前缀在直连广播链路上。  2. The method according to claim 1, wherein: determining whether the address prefix of the route to be calculated is on a direct broadcast link according to the following steps: if the reference link state advertisement is a network link state advertisement And the network link state advertisement is directly connected to the local, and then determining that the address prefix of the to-be-calculated route is on the direct broadcast link.
3、 根据权利要求 2所述的方法, 其特征在于, 按照以下步骤确定所述网 络链路状态通告是否与本地直连:  3. The method according to claim 2, wherein the following step is performed to determine whether the network link status advertisement is directly connected to the local:
查找所述网络链路状态通告包含的路由器标识,如果存在本地的路由器标 识, 则所述网络链路状态通告和本地直连。  The router identity included in the network link state advertisement is found, and if there is a local router identity, the network link state advertisement and local direct connection.
4、 根据权利要求 2所述的方法, 其特征在于, 所述获得所述待计算路由 的地址前缀所依附的路由器的本地链路地址作为到所述待计算路由的地址前 缀的路由的下一跳的步骤包括:  The method according to claim 2, wherein the obtaining the link-local address of the router to which the address prefix of the route to be calculated is attached is the next route to the address prefix of the route to be calculated. The steps to jump include:
从所述网络链路状态通告包含的路由器中,找到配有所述待计算路由的地 址前缀的路由器;  And finding, from the router included in the network link state advertisement, a router that is equipped with the address prefix of the route to be calculated;
以该路由器的链路状态通告为参考链路状态通告, 得到其下一跳地址; 将所述下一跳地址作为所述待计算路由的地址前缀所依附的路由器的本 地链路地址。  The link state advertisement of the router is used as a reference link state advertisement to obtain its next hop address; the next hop address is used as the local link address of the router to which the address prefix of the route to be calculated is attached.
5、 根据权利要求 4所述的方法, 其特征在于, 所述以该路由器的链路状 态通告为参考链路状态通告, 得到其下一跳地址的步骤包括:  The method according to claim 4, wherein the step of advertising the link state of the router as a reference link state advertisement, and obtaining the next hop address comprises:
在该路由器所属的链路的链路状态通告中,找到地址前缀与所述待计算路 由的地址前缀相同的链路的链路状态通告; 前缀所依附的路由器的本地链路地址。 In the link state advertisement of the link to which the router belongs, the link state advertisement of the link whose address prefix is the same as the address prefix of the to-be-calculated route is found; the link address of the router to which the prefix is attached.
6、 根据权利要求 2所述的方法, 其特征在于, 所述方法还包括步骤: 获得所述网络链路状态通告的距离作为到所述待计算路由的地址前缀的 路由的距离。 The method according to claim 2, wherein the method further comprises the step of: obtaining a distance of the network link state advertisement as a distance to a route of the address prefix of the route to be calculated.
7、 根据权利要求 2所述的方法, 其特征在于, 所述方法还包括步骤: 如果所述参考链路状态通告是网络链路状态通告,并且所述待计算路由的 地址前缀在直连广播链路上且包含在本地配置的地址前缀中 ,以所述网络链路 状态通告为参考链路状态通告, 得到所述待计算路由的地址前缀的路由信息。  The method according to claim 2, wherein the method further comprises the step of: if the reference link state advertisement is a network link state advertisement, and the address prefix of the to-be-calculated route is in direct broadcast The link information is included in the locally configured address prefix, and the network link state advertisement is used as a reference link state advertisement to obtain routing information of the address prefix of the to-be-calculated route.
8、 根据权利要求 7所述的方法, 其特征在于, 所述以所述网络链路状态 通告为参考链路状态通告,得到所述待计算路由的地址前缀的路由信息的步骤 包括:  The method according to claim 7, wherein the step of using the network link state advertisement as a reference link state advertisement to obtain routing information of the address prefix of the to-be-calculated route includes:
通过邻居发现协议得到对端的本地链路地址,作为到所述待计算路由的地 址前缀的路由的下一跳。  The local link address of the peer is obtained through the neighbor discovery protocol as the next hop of the route to the address prefix of the route to be calculated.
9、 一种直连广播链路上路由计算系统, 其特征在于, 包括:  A route calculation system for a direct-connected broadcast link, comprising:
前缀提取单元,用于获取区域内前缀链路状态通告中的待计算路由的地址 前缀;  a prefix extracting unit, configured to acquire an address prefix of the route to be calculated in the prefix link state advertisement in the area;
第一判断单元,用于判断所述待计算路由的地址前缀是否在直连广播链路 上;  a first determining unit, configured to determine whether an address prefix of the to-be-calculated route is on a direct broadcast link;
第二判断单元,用于判断本地配置的地址前缀中是否包含所述待计算路由 的地址前缀;  a second determining unit, configured to determine whether the locally configured address prefix includes the address prefix of the to-be-calculated route;
路由计算单元, 在所述第一判断单元和所述第二判断单元的判断结果为: 所述待计算路由的地址前缀在直连广播链路上且不包含在本地配置的地址前 缀中时,获得所述待计算路由的地址前缀所依附的路由器的本地链路地址作为 到所述待计算路由的地址前缀的路由的下一跳。  The routing calculation unit, when the judgment result of the first determining unit and the second determining unit is: when the address prefix of the to-be-calculated route is on the direct broadcast link and is not included in the locally configured address prefix, Obtaining the link-local address of the router to which the address prefix of the route to be calculated is attached as the next hop of the route to the address prefix of the route to be calculated.
10、 根据权利要求 9所述的系统, 其特征在于, 所述第一判断单元包括: 参考链路状态通告判断单元,用于判断所述待计算路由的地址前缀链路状 网络链路状态通告判断单元,用于在所述参考链路状态通告判断单元确定 所述参考链路状态通告是网络链路状态通告的情况下,判断所述网络链路状态 通告是否和本地相连。 The system according to claim 9, wherein the first determining unit comprises: a reference link state advertisement determining unit, configured to determine an address prefix link network link state advertisement of the to-be-calculated route And a determining unit, configured to determine, in the case that the reference link state advertisement determining unit determines that the reference link state advertisement is a network link state advertisement, whether the network link state advertisement is locally connected.
11、 根据权利要求 9所述的系统, 其特征在于, 所述第二判断单元包括: 前缀判断单元,判断本地配置的地址前缀中是否包含所述待计算路由的地 址前缀; The system according to claim 9, wherein the second determining unit comprises: a prefix determining unit, configured to determine whether the locally configured address prefix includes the address prefix of the route to be calculated;
子节点判断单元,用于判断所述待计算路由的地址前缀所在的子节点是否 为空。  The child node determining unit is configured to determine whether the child node where the address prefix of the route to be calculated is located is empty.
12、 根据权利要求 9所述的系统, 其特征在于, 所述路由计算单元包括: 下一跳地址获得单元, 从所述网络链路状态通告包含的路由器中, 找到配 有所述待计算路由的地址前缀的路由器,以所述路由器的链路状态通告为参链 路状态通告, 得到其下一跳地址, 所述下一跳地址为对端的本地链路地址; 路由距离获得单元,获得所述网络链路状态通告的距离作为到所述待计算 路由的地址前缀所依附的路由器的路由的距离。  The system according to claim 9, wherein the route calculation unit comprises: a next hop address obtaining unit, and finding, from the router included in the network link state advertisement, that the route to be calculated is The router of the address prefix advertises the link state of the router as a reference link state advertisement, obtains its next hop address, and the next hop address is the local link address of the peer end; the route distance obtaining unit obtains The distance of the network link state advertisement is the distance from the route of the router to which the address prefix of the route to be calculated is attached.
13、 根据权利要求 12所述的系统, 其特征在于, 所述下一跳地址获得单 元包括:  The system according to claim 12, wherein the next hop address obtaining unit comprises:
链路寻找单元, 在所述路由器所属的链路的链路状态通告中, 找到其中地 址前缀与所述待计算路由的地址前缀相同的链路的链路状态通告;  a link-finding unit, in a link state advertisement of a link to which the router belongs, find a link state advertisement of a link in which an address prefix is the same as an address prefix of the to-be-calculated route;
链路地址获得单元 ,得到所述链路的链路状态通告的本地链路地址作为所 述待计算路由的地址前缀所依附的路由器的本地链路地址。  The link address obtaining unit obtains the link address of the link state advertisement of the link as the link address of the router to which the address prefix of the route to be calculated is attached.
14、 根据权利要求 9至 13任一项所述的系统, 其特征在于, 所述系统还 包括:  The system according to any one of claims 9 to 13, wherein the system further comprises:
路由信息获得单元,在所述前缀判断单元确定本地配置的地址前缀中包含 所述待计算路由的地址前缀的情况下,通过邻居发现协议得到对端的本地链路 地址,作为到所述待计算路由的地址前缀的路由的下一跳,得到所述待计算路 由的地址前缀的路由信息。  a routing information obtaining unit, where the prefix determining unit determines that the locally configured address prefix includes the address prefix of the to-be-calculated route, obtaining a link-local address of the peer by using a neighbor discovery protocol, as the route to be calculated The next hop of the route of the address prefix obtains the routing information of the address prefix of the route to be calculated.
15、 根据权利要求 14所述的系统, 其特征在于, 所述系统还包括: 路由信息写入单元, 用于将所述路由计算单元和 /或所述路由信息获得单 元获得的所述待计算路由的前缀的路由信息写入路由表。  The system according to claim 14, wherein the system further comprises: a routing information writing unit, configured to calculate the to-be-calculated obtained by the routing computing unit and/or the routing information obtaining unit The routing information of the prefix of the route is written to the routing table.
16、 一种直连广播链路上路由计算系统, 其特征在于, 包括:  16. A route calculation system for a direct-connected broadcast link, comprising:
前缀提取单元, 取待计算路由的前缀;  a prefix extraction unit that takes a prefix for calculating a route;
第一判断单元, 判断所述待计算路由的前缀是否在直连广播链路上; 第二判断单元, 判断本地配置的前缀中是否包含所述待计算路由的前缀; 信息获得单元,获得对端的本地链路地址作为到所述待计算路由的前缀的 路由的下一跳, 将获得所述待计算路由的前缀的路由信息写入路由表。 a first determining unit, determining whether the prefix of the to-be-calculated route is on a direct broadcast link; a second determining unit, determining whether the locally configured prefix includes the prefix of the to-be-calculated route; and obtaining, by the information obtaining unit, the local link address of the peer as the next hop of the route to the prefix of the to-be-calculated route, The routing information of the prefix of the route to be calculated is written into the routing table.
17、 根据权利要求 16所述的系统, 其特征在于, 所述第一判断单元包括: 参考链路状态通告判断单元,判断所述待计算路由的前缀链路状态通告的 参考链路状态通告是否是网络链路状态通告;  The system according to claim 16, wherein the first determining unit comprises: a reference link state advertisement determining unit, determining whether a reference link state advertisement of the prefix link state advertisement of the to-be-calculated route is advertised Is the network link status notification;
网络链路状态通告判断单元, 判断所述网络链路状态通告是否和本地相 连。  The network link state advertisement determining unit determines whether the network link state advertisement is locally connected.
18、 根据权利要求 16所述的系统, 其特征在于, 所述第二判断单元包括: 前缀判断单元, 判断本地配置的前缀中是否包含所述待计算路由的前缀; 路由信息获得单元, 以所述网络链路状态通告为参考链路状态通告, 通过 邻居发现协议得到对端的本地链路地址,作为到所述待计算路由的前缀的路由 的下一跳, 得到所述待计算路由的前缀的路由信息。  The system according to claim 16, wherein the second determining unit comprises: a prefix determining unit, determining whether the locally configured prefix includes the prefix of the to-be-calculated route; The network link state advertisement is a reference link state advertisement, and the local link address of the peer end is obtained by the neighbor discovery protocol, and the next hop of the route to the prefix of the to-be-calculated route is obtained, and the prefix of the to-be-calculated route is obtained. Routing information.
19、 根据权利要求 16所述的系统, 其特征在于, 所述信息获得单元包括: 下一跳地址获得单元, 从所述网络链路状态通告包含的路由器中, 找到配 有所述待计算路由的前缀的路由器,以该路由器的链路状态通告为参考链路状 态通告, 得到其下一跳地址, 所述下一跳地址为对端的本地链路地址。  The system according to claim 16, wherein the information obtaining unit comprises: a next hop address obtaining unit, and finding, from the router included in the network link state advertisement, the route to be calculated The router of the prefix is advertised with the link state of the router as the reference link state advertisement, and the next hop address is obtained, and the next hop address is the local link address of the peer.
20、 根据权利要求 19所述的系统, 其特征在于, 所述下一跳地址获得单 元包括:  The system according to claim 19, wherein the next hop address obtaining unit comprises:
链路寻找单元, 在该路由器所属的链路的链路状态通告中, 找到地址前缀 与所述待计算路由的前缀相同的链路的链路状态通告;  a link-finding unit, in the link state advertisement of the link to which the router belongs, finds a link state advertisement of the link whose address prefix is the same as the prefix of the to-be-calculated route;
链路地址获得单元 ,得到所述链路的链路状态通告的本地链路地址作为对 端的本地链路地址。  The link address obtaining unit obtains the link-local address of the link state advertisement of the link as the link-local link address.
21、 根据权利要求 19所述的系统, 其特征在于, 所述信息获得单元还包 括:  The system according to claim 19, wherein the information obtaining unit further comprises:
路由距离获得单元,获得所述网络链路状态通告的距离作为到所述前缀的 路由的距离。  The route distance obtaining unit obtains the distance of the network link state advertisement as the distance to the route of the prefix.
PCT/CN2007/070178 2006-06-26 2007-06-26 The method and system of routing calculation for the directly connected broadcast link WO2008003253A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200610061334.5 2006-06-26
CN200610061334A CN100591040C (en) 2006-06-26 2006-06-26 Method and system for calculating routing of directly connecting broadcasting link

Publications (1)

Publication Number Publication Date
WO2008003253A1 true WO2008003253A1 (en) 2008-01-10

Family

ID=38808648

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/070178 WO2008003253A1 (en) 2006-06-26 2007-06-26 The method and system of routing calculation for the directly connected broadcast link

Country Status (2)

Country Link
CN (1) CN100591040C (en)
WO (1) WO2008003253A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143066B (en) 2011-02-17 2014-12-24 华为技术有限公司 Method for establishing label switching path, node device and system
CN116996439B (en) * 2023-09-27 2024-03-01 明阳时创(北京)科技有限公司 SDN-based efficient routing addressing method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137974A1 (en) * 2002-01-24 2003-07-24 Connie Kwan Method for distributing aggregate route information
CN1543160A (en) * 2003-04-29 2004-11-03 华为技术有限公司 A method for implementing external route calculation for router

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137974A1 (en) * 2002-01-24 2003-07-24 Connie Kwan Method for distributing aggregate route information
CN1543160A (en) * 2003-04-29 2004-11-03 华为技术有限公司 A method for implementing external route calculation for router

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
COLTUN R. ET AL.: "OSPF for Ipv6", IETF RFC 2740, 31 December 1999 (1999-12-31) *
MOY J.: "OSPF Version 2", IETF RFC 2328, 30 April 1998 (1998-04-30) *

Also Published As

Publication number Publication date
CN100591040C (en) 2010-02-17
CN101043432A (en) 2007-09-26

Similar Documents

Publication Publication Date Title
US10541905B2 (en) Automatic optimal route reflector root address assignment to route reflector clients and fast failover in a network environment
US9503357B2 (en) Method and apparatus for limiting topology and reachability information in an OSPF area
US8174967B2 (en) Method to reduce routing convergence at the edge
Rakheja et al. Performance analysis of RIP, OSPF, IGRP and EIGRP routing protocols in a network
US7969867B2 (en) Backup route generation in border gateway protocol
CN104518972A (en) Dynamic area filtering for link-state routing protocols
CN101455030A (en) Dynamic shared risk node group (srng) membership discovery
JP2006333469A (en) Tracking of traffic engineering topology in autonomous system
KR20090003225A (en) Connecting multi-hop mesh networks using mac bridge
US20100027555A1 (en) Method for processing link state advertisement and routing device
US7957289B2 (en) Method to reduce IGP routing information
WO2013091523A1 (en) Route backup method and device
CN113709033B (en) Segment traceroute for segment routing traffic engineering
WO2016078240A1 (en) Method and device for detecting routing ring formation
US20230116548A1 (en) Route Processing Method and Related Device
US7701875B2 (en) OSPF unidirectional link support for unidirectional return paths
WO2008003253A1 (en) The method and system of routing calculation for the directly connected broadcast link
RU2004117074A (en) ADDRESSING AND ROUTING IN WIRELESS NETWORK NETWORKS
US10735252B2 (en) Outside router fault detection
JP4044007B2 (en) Route information management method and route information management device
Pavani et al. Multi-attached network topology with different routing protocols and stub network resolution in OSPF routing
Nozaki et al. Evaluation of tiered routing protocol in floating cloud tiered internet architecture
KR102506906B1 (en) Method and apparatus for calculating topology independent lfa repair path
Garg et al. EXTENSIVE REVIEWS OF OSPF FOR REDUCING THE CONVERGENCE TIME.
EP3913868A1 (en) Segmented traceroute for segment routing traffic engineering

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: 07721794

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: RU

122 Ep: pct application non-entry in european phase

Ref document number: 07721794

Country of ref document: EP

Kind code of ref document: A1