WO2013159717A1 - Route method and router - Google Patents

Route method and router Download PDF

Info

Publication number
WO2013159717A1
WO2013159717A1 PCT/CN2013/074716 CN2013074716W WO2013159717A1 WO 2013159717 A1 WO2013159717 A1 WO 2013159717A1 CN 2013074716 W CN2013074716 W CN 2013074716W WO 2013159717 A1 WO2013159717 A1 WO 2013159717A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
router
belongs
distribution
distribution group
Prior art date
Application number
PCT/CN2013/074716
Other languages
French (fr)
Chinese (zh)
Inventor
刘远佼
张旭东
滕晓
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2013159717A1 publication Critical patent/WO2013159717A1/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

Definitions

  • the network mainly uses regional division to isolate the network. For example: You can divide one or more routers in a network into one area, or you can divide one or more interfaces of a router into one area. In the prior art, each interface (router) in the area needs to maintain topology information in the entire area and occupy more system resources. Summary of the invention
  • the embodiment of the invention provides a routing method and a router to save system resources.
  • an embodiment of the present invention provides a routing method, including:
  • the first interface of the first router receives the link state broadcast LS A message
  • the first router queries the distribution group to which the first interface belongs, and searches the local database of the first router for the topology information of the distribution group to which the first interface belongs, where the first interface belongs. Having at least two distribution groups, each of the at least two distribution groups including an interface of at least two routers;
  • the first interface according to the topology information of the distribution group to which the first interface belongs,
  • the LSA message is forwarded to all interfaces except the first interface in the distribution group to which the first interface belongs.
  • An embodiment of the present invention provides another routing method, including:
  • the first interface of the second router generates a link state broadcast LS A message;
  • the second router queries the distribution group to which the first interface belongs, and searches the local database of the second router for the topology information of the distribution group, where the first interface belongs.
  • the first interface according to the topology information of the distribution group to which the first interface belongs,
  • the LSA message is forwarded to all interfaces except the first interface in the distribution group to which the first interface belongs.
  • an embodiment of the present invention provides a router, including: a first interface, a local database, and a processing module;
  • the local database is configured to store topology information of the distribution group to which the first interface belongs; the first interface is configured to receive a link state broadcast LSA message;
  • the processing module is configured to query a first distribution group to which the first interface belongs, and search, in the local database, topology information of a distribution group to which the first interface belongs, where the first interface belongs Having at least two distribution groups, each of the at least two distribution groups including an interface of at least two routers;
  • the first interface is further configured to: forward, according to the topology information of the distribution group to which the first interface belongs, the LSA message to the distribution group to which the first interface belongs, except the first interface. All interfaces.
  • An embodiment of the present invention provides another router, including: a first interface, a local database, and a processing module;
  • the local database is configured to store topology information of the distribution group to which the first interface belongs; the first interface is configured to generate a link state broadcast LSA message;
  • the processing module is configured to query a distribution group to which the first interface belongs, and search for the topology information of the distribution group to which the first interface belongs in the local database, where the first interface belongs There are at least two distribution groups, each of the at least two distribution groups including an interface of at least two routers;
  • the first interface is further configured to: forward, according to the topology information of the distribution group to which the first interface belongs, the LSA message to the distribution group to which the first interface belongs, except the first interface. All interfaces.
  • the routing method and the router provided by the embodiment of the present invention divide multiple interfaces of multiple routers in one area into at least two distribution groups, and each distribution group includes at least two routers.
  • the interface of the router sends the received LSA message or the generated LSA message only to the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. Therefore, the local database of the router in the network only needs to be Maintain the topology information of the distribution group to which the interface belongs, thus saving system resources.
  • FIG. 2 is a flowchart of another embodiment of a routing method provided by the present invention.
  • FIG. 3 is a flowchart of another embodiment of a routing method provided by the present invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of a router provided by the present invention.
  • FIG. 5 is a schematic structural diagram of still another embodiment of a router provided by the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • FIG. 1 is a flowchart of an embodiment of a routing method provided by the present invention. As shown in FIG. 1, the method includes:
  • the first interface of the second router generates a link state broadcast (LSA) message.
  • LSA link state broadcast
  • the second router queries the distribution group to which the first interface belongs, and searches for the topology information of the distribution group to which the first interface belongs in the local database of the second router, where at least the area to which the first interface belongs is located.
  • Two distribution groups each of the at least two distribution groups including an interface of at least two routers.
  • the first interface forwards the LSA message to all interfaces except the first interface in the distribution group to which the first interface belongs according to the topology information of the distribution group to which the first interface belongs. .
  • the area involved in the embodiment of the present invention may be an area defined in RFC 2328, that is, Open Shortest Path First (OSPF) allows a connected network (which may include multiple routers). Interfaces are combined with hosts. Such a combination is called an area.
  • OSPF Open Shortest Path First
  • Each area runs an independent basic link state routing algorithm.
  • the routers in each area have a database that stores topology information of the area.
  • the topology information indicates the connection relationship between the router interfaces in the area.
  • the network can be isolated by setting the area. When the topology inside a certain area changes, the routers in other areas do not need to update the topology information of the local area stored in the local database.
  • multiple interfaces of multiple routers in the same area may be divided into at least two distribution groups.
  • Each distribution group may include an interface of at least two routers, where the local database of the router where each interface is located stores topology information of all distribution groups to which the interface belongs, and does not store other distribution groups in the area to which the interface belongs. Topological information.
  • the topology information in the distribution group indicates the connection relationship between the router interfaces in the distribution group.
  • the distribution groups in each area can be divided according to specific requirements. For example: Interface 1 on Router A and Router 1 on Router B in the same area can be divided into one distribution group, or routers in the same area can be used. Multiple interfaces on A and multiple interfaces on Router B are divided into one distribution group.
  • an interface of a router belongs to only one area, but may belong to one or more distribution groups in the area.
  • a distribution group belongs to only one area.
  • the internal interface is divided into at least two distribution groups. In the local database of the router, only the topology information in the distribution group to which the interface belongs is maintained, and the topology of other distribution groups in the area to which the interface belongs is not maintained.
  • the second router involved in the embodiment of the present invention may be any router in the network, and the second router may have one or more interfaces, where the first interface is any interface on the second router, the first An area to which an interface belongs is divided into at least two distribution groups.
  • the first interface may belong to one distribution group or may belong to multiple distribution groups.
  • Second router in the local database The topology information of the distribution group to which the first interface belongs is stored.
  • a Link State Advertisement (LSA) message may include: all links of the router, status information of the link, and all known open shortest path priorities on the link (Open Shortest) Path First, OSPF) Neighbors and other information. Therefore, when the link status of any interface of any router changes, the router will generate an LSA message.
  • the second router when the status of any link of the first interface of the second router changes, the second router generates an LS A message.
  • the second router can find the distribution group to which the first interface belongs. For example: the second router may look up the distribution group to which the first interface belongs in the configuration command of the first interface. Further, the second router may also search for the topology information of the distribution group to which the first interface belongs in the local database.
  • the LSA message generated by the link state change of the first interface is forwarded in each distribution group to which the first interface belongs, and the first interface may be based on the topology information of the distribution group to which the first interface belongs. And sending the LSA message to all interfaces except the first interface in the distribution group to which the first interface belongs.
  • all the interfaces except the first interface in the distribution group to which the first interface belongs may include an interface that belongs to a different router from the first interface, and includes the first interface.
  • the topology information in the distribution group to which each interface on the router belongs belongs is stored in the local database of the router in the network, and the other distribution groups in the area to which each interface belongs are not saved.
  • the topology information is changed. Therefore, the state of an interface in a certain area of the network changes. For example, the status of a link on the interface changes, and only the topology in the distribution group to which the interface belongs is affected.
  • the information of the local database of the router where all the interfaces in the distribution group are located is updated.
  • the topology information in other distribution groups in the area to which the interface belongs is not affected. Therefore, route isolation is performed within the area through the distribution group, which saves the topology information capacity of the router and saves system resources.
  • the default route or the aggregation route may be sent to all interfaces in the area through the central router set in the area.
  • the aggregation route is used to indicate that the data packet whose destination address is not stored in the database stored locally by the second router is not sent to the central router.
  • the first interface of the second router can receive the default route or the aggregated route sent by the central router in the area, and the default route or the aggregated route can be used to indicate that the destination address has no matching route in the local database of the second router.
  • Data message transmission The interface to the central router.
  • the default route is a special static route, which refers to the choice that the router can make when there is no matching entry between the router's local database and the destination address of the data packet. If there is no default route, data packets with no destination address matching the entry will be discarded.
  • the destination route according to the embodiment of the present invention is used to send a data packet to an interface of the central router when the router does not have a matching entry between the local database and the destination address of the data packet. Therefore, the default router can Routing information for the interface to the central router.
  • An aggregated route is a route that combines multiple routes into a single route.
  • the aggregated route can implement the same function as the default route. That is, the router does not have a destination address between the local database and the data packet. When the matching entry is received, it instructs the router to send data packets to the interface of the central router.
  • the second router may query, in the local database, the distribution group in which the first interface belongs The topology information is used to determine whether there is a routing information that matches the destination address of the data packet. If there is no routing information matching the destination address of the data packet, the first interface may forward the data according to the default route or the aggregated route. The message is sent to the interface of the central router.
  • the routing method provided by the embodiment of the present invention divides multiple interfaces of multiple routers in an area into at least two distribution groups, each distribution group includes an interface of at least two routers, and an LS generated by an interface of each router
  • the A message is sent only to the interface of the router in the distribution group to which the interface belongs, and is not sent to the interface of the router in the other distribution group in the area to which the interface belongs. Therefore, the local database of the router in the network only needs to maintain the interface to which the interface belongs. Distribute the topology information of the group to save system resources.
  • FIG. 2 is a flowchart of still another embodiment of a routing method according to the present invention. As shown in FIG. 2, the method includes:
  • the first interface of the first router receives a link state broadcast (LSA) message.
  • LSA link state broadcast
  • the first router queries the distribution group to which the first interface belongs, and searches for the topology information of the distribution group in the local database of the first router, where at least two areas are located in the area to which the first interface belongs.
  • Distribution groups each of the at least two distribution groups comprising an interface of at least two routers.
  • the first interface is configured according to the topology information of the distribution group to which the first interface belongs.
  • the LSA message is forwarded to all interfaces except the first interface in the distribution group to which the first interface belongs.
  • the first router may be any router in the network, and the first interface may be any interface of the first router, and the area to which the first interface belongs may be divided into at least two distribution groups.
  • the first interface may belong to one distribution group or may belong to multiple distribution groups.
  • the local database of the first router stores topology information of the distribution group to which the first interface belongs.
  • the first interface of the first router may search for a distribution group to which the first interface belongs. For example, the first router may search for a distribution group to which the first interface belongs in the configuration command of the first interface. Further, the first router may further query the topology information of the distribution group to which the first interface belongs in the local database.
  • the LSA message received by the first interface is forwarded in each distribution group to which the first interface belongs. For example, the first interface may be according to a distribution group to which the first interface belongs.
  • the topology information is sent to all interfaces except the first interface in the distribution group to which the first interface belongs.
  • all the interfaces except the first interface in the distribution group to which the first interface belongs include an interface that belongs to a different router from the first interface, and includes the same interface as the first interface. Router, the interface on the first router.
  • an interface in an area of the network forwards the LSA message only in the distribution group to which the interface belongs, so that the interface in the distribution group is located.
  • the router's local database updates and maintains the topology information in the distribution group, and the interfaces of the routers in the other distribution groups in the area to which the interface belongs do not receive the LS A message, and thus the topology information in the distribution group does not need to be updated. . Therefore, route isolation is performed within the area through the distribution group, which saves the topology information capacity stored by each router and saves system resources.
  • the first router may configure a command for all routers in the area to which the first interface belongs, and divide the interfaces of all routers in the area to which the first interface belongs. At least two distribution groups.
  • the first router may All interfaces in the area send default routes or aggregate routes.
  • the default route or the aggregated route is used to indicate that the data packet whose destination address has no matching route in the local database of the first router is sent to the interface of the central router.
  • the first router may send a default route or an aggregated route to the interface of all the routers in the area to which the first interface belongs through the first interface, and the default route or the aggregated route is used to indicate that the destination address has no matching route in the local database of the router.
  • the data message is sent to the first interface.
  • the first interface When any interface of the first router, for example, the first interface receives the data packet sent by the other router according to the default route or the aggregated route, since the first router is the central router, the first router is in the local database. Stores topology information of the area to which the first interface belongs. Therefore, the first router can search for the topology information of all the distribution groups in the area to which the first interface belongs in the local database, and obtain the routing information that matches the destination address of the data packet, and further, according to the destination address of the data packet. Matching routing information, sending data packets to the destination address.
  • the method of issuing a default route or an aggregate route through the central router can implement the traffic in each distribution group in the area to be communicated through the central router, so that the interfaces of different distribution groups can communicate normally.
  • multiple interfaces of multiple routers in an area are divided into at least two distribution groups by using a central router, and each distribution group includes an interface of at least two routers, and an interface of each router
  • the LSA message is sent only to the interface in the distribution group to which the interface belongs, and is not sent to the interfaces in other distribution groups in the area. Therefore, the local database of the router in the network only needs to maintain the distribution of its own interface. The topology information of the group, thereby saving system resources.
  • FIG. 3 is a flowchart of another embodiment of the routing method provided by the present invention. As shown in FIG. 3, this embodiment uses a specific implementation scenario as an example to describe a routing method provided by an embodiment of the present invention.
  • the area 1 includes a central router RTA, and further includes routers RTB, RTC, and RTD. Assume that the routers RTB, RTC, and RTD each include an interface for connecting to an interface on the central router RTA.
  • the RTA can divide the routers RTB, RTC, and RTD in Area 1 into three distribution groups by configuring commands to the routers RTB, RTC, and RTD.
  • the router RTB and its interface connected to the RTA are classified as a distribution group 1.
  • the RTC and its interface connected to the RTA are divided into a distribution group 2, and the RTD and its interface connected to the RTA are divided into a distribution group 3.
  • the RTB local database only stores the topology information in the distribution group 1 to which the interface on the RTB belongs, but does not include the distribution group 2 and the distribution group 3 in the area 1 to which it belongs.
  • the topology information therefore, for the LSA message B01 and the LSA message B02 generated by the RTB, the RTB only sends the LSA message B01 and the LSA message B02 to the interface belonging to the distribution group 1 on the central router RTA, and does not send to the different distribution. Group of RTC and RTD.
  • the LSA message C01 and the LSA message C02 generated by the RTC are sent only to the interface belonging to the distribution group 2 on the central router RTA, and the LSA message D01 and the LSA message D02 generated by the RTD are also sent only to the distribution router 3 on the central router RTA. interface.
  • the central router RTA can The default route or the aggregated route is sent to the RTB, the RTC, and the RTD to guide the traffic in the distribution group 1, the distribution group 2, and the distribution group 3 in the area 1, so that the interfaces of the different distribution groups can communicate normally.
  • the RTB local database stores the topology information in the distribution group 1 of the RTB. Therefore, the RTB cannot calculate the routing information to the RTC.
  • the RTB can send the data packet to the interface connected to the RTA through the default route or the aggregated route advertised by the RTA. Since the RTA is the central router, the local database stores the topology information of the area 1, so the RTA can calculate The routing information to the RTC, so that the RTA can forward the data packet to the RTC.
  • the area 1 has a central router RTA, and the distribution group to which the interface on the RTA belongs includes all distribution groups in the area 1. Therefore, the RTA has all distribution groups in the area 1. , including topology information of distribution group 1, distribution group 2, and distribution group 3. It can be understood that, in the implementation scenario where there are multiple central routers in the area 1, the distribution group to which the interface on each central router belongs may only include some distribution groups in the area 1.
  • the interface on the central router belongs to The distribution group only includes the distribution group 1 and the distribution group 2, but in this implementation scenario, the topology information in the area 1 is still stored on the central router, that is, all the distribution groups in the area 1 are stored, including the distribution group 3 The topology information, so that data packets can be forwarded between interfaces of routers belonging to different distribution groups.
  • the routing method provided in this embodiment divides multiple interfaces of multiple routers in an area into at least two distribution groups, and each distribution group includes an interface of at least two routers, and the interface of the router receives the LSA message or the generated interface.
  • the LSA message only sends the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area.
  • the local database of the router in the network maintains the topology information of the distribution group to which the interface belongs, thereby saving system resources. .
  • Pass The central router advertises the default route or the aggregated route. The central router can be used to guide the traffic in each distribution group in the area to ensure normal communication between interfaces of different distribution groups.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the above-described method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • FIG. 4 is a schematic structural diagram of an embodiment of a router provided by the present invention. As shown in FIG. 4, the method includes: a first interface 11, a processing module 12, and a local database 13;
  • the local database 13 is configured to store topology information of the distribution group to which the first interface 11 belongs;
  • the first interface 11 is configured to receive a link state broadcast LS A message
  • the processing module 12 is configured to query the first distribution group to which the first interface 11 belongs, and search for the topology information of the distribution group to which the first interface 11 belongs in the local database 13, the first At least two distribution groups are disposed in the area to which the interface 11 belongs, and each of the at least two distribution groups includes an interface of at least two routers;
  • the first interface 11 is further configured to forward the LSA message to the distribution group to which the first interface 11 belongs according to the topology information of the distribution group to which the first interface 11 belongs, except the first interface. All interfaces except 11.
  • the router may be a central router, and the local database 13 may store topology information of an area to which the first interface 11 belongs.
  • the processing module 12 is further configured to: configure an interface configuration command for all routers in the area to which the first interface 11 belongs, and divide the interfaces of all routers in the area to which the first interface 11 belongs to at least Two distribution groups.
  • the first interface 11 is further configured to: send a default route or an aggregated route to an interface of all routers in the area to which the first interface 11 belongs, where the default route or the aggregated route is used to indicate that The data packet whose destination address does not have a matching route in the local database of the router is sent to the first interface 11.
  • the first interface 11 is further configured to receive a data packet sent according to the default route or the aggregated route.
  • the processing module 12 is further configured to: search for the local database 13 The topology information of the area to which the first interface 11 is stored is obtained, and the routing information matching the destination address of the data packet is obtained;
  • the first interface 11 is further configured to send the data packet to the destination address according to the routing information that matches the destination address of the data packet.
  • the router provided by the embodiment of the present invention divides multiple interfaces of multiple routers in an area into at least two distribution groups, each distribution group includes an interface of at least two routers, and each interface of the router receives an LSA message or The generated LSA message only sends the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. Therefore, the local database of the router in the network only needs to maintain the topology information of the distribution group to which the interface belongs. , thus saving system resources.
  • the router includes: a first interface 21, a processing module 22, and a local database 23;
  • the local database 23 is configured to store topology information of the distribution group to which the first interface 21 belongs;
  • the first interface 21 is configured to generate a link state broadcast LSA message.
  • the processing module 22 is configured to query the distribution group to which the first interface 21 belongs, and search the local database 23 for the topology information of the distribution group to which the first interface 21 belongs, where the first interface belongs.
  • At least two distribution groups are provided in the area, and each of the at least two distribution groups includes an interface of at least two routers;
  • the first interface 21 is further configured to: forward, according to the topology information of the distribution group to which the first interface 21 belongs, the LSA message to the distribution group to which the first interface 21 belongs, except the first interface. All interfaces except 21.
  • the first interface 21 is further configured to: receive a default route or an aggregated route sent by the central router, where the default route or the aggregated route is used to indicate that the destination address has no matching route data in the local database 23.
  • the packet is sent to the interface of the central router.
  • the first interface 21 is further configured to receive a data packet.
  • the processing module 22 is further configured to query, in the local database 23, the topology information of the distribution group to which the first interface 21 belongs, and determine whether there is a route matching the destination address pointed by the data packet.
  • the first interface 21 may be further configured to: if the processing module 22 determines that there is no routing information that matches a destination address pointed by the data packet, according to the default route or the The aggregated route sends the data message to the interface of the central router.
  • the router provided by the embodiment of the present invention divides multiple interfaces of multiple routers in an area into at least two distribution groups, each distribution group includes an interface of at least two routers, and each interface of the router receives an LSA message or The generated LSA message only sends the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. Therefore, the local database of the router in the network only needs to maintain the topology information of the distribution group to which the interface belongs. , thus saving system resources.
  • the central router can be used to advertise the traffic in each distribution group in the area to ensure normal communication between interfaces of different distribution groups.
  • the router provided by the embodiment of the present invention is an apparatus for executing the routing method provided by the present invention.

Abstract

The embodiments of the present invention provide a route method and a router. A route method comprises that: the first interface of a first router receives an LSA (Link-State Advertisement) message; the first router queries for a distribution group the first interface belongs to, and searches the local database of the first router for topological information of said distribution group the first interface belongs to, at least two distribution groups are arranged in the area the first interface belongs to, each of said at least two distribution groups includes at least two router interfaces, and in the local database of each router with the interface, the topological information of the distribution groups all the interfaces of said router belong to is stored; according to the topological information of the distribute group the first interface belongs to, the first interface forwards the LSA message to all the interfaces in the distribution group the first interface belongs to except the first interface. The solution of the embodiments of the present invention can enable the system resource to be saved.

Description

路由方法和路由器 本申请要求于 2012 年 4 月 28 日提交中国专利局、 申请号为 201210132785.9、 发明名称为 "一种路由方法和路由器" 的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及信息技术, 尤其涉及一种路由方法和路由器。  Routing Method and Router This application claims priority to Chinese Patent Application No. 201210132785.9, entitled "A Routing Method and Router", filed on April 28, 2012, the entire contents of which are incorporated by reference. In this application. TECHNICAL FIELD The present invention relates to information technology, and in particular, to a routing method and a router.
背景技术 Background technique
目前, 网络主要釆用区域划分的方式来隔离网络。 例如: 可以将网络 中的一个或多个路由器划分为一个区域, 或者, 也可以将路由器的一个或 多个接口划分为一个区域。 现有技术中, 区域内部的各个接口 (路由器) , 需要维护整个区域内 的拓朴信息, 占用较多的系统资源。 发明内容  At present, the network mainly uses regional division to isolate the network. For example: You can divide one or more routers in a network into one area, or you can divide one or more interfaces of a router into one area. In the prior art, each interface (router) in the area needs to maintain topology information in the entire area and occupy more system resources. Summary of the invention
本发明实施例提供一种路由方法和路由器, 以节约系统资源。  The embodiment of the invention provides a routing method and a router to save system resources.
一方面, 本发明实施例提供一种路由方法, 包括:  In one aspect, an embodiment of the present invention provides a routing method, including:
第一路由器的第一接口接收链路状态广播 LS A消息;  The first interface of the first router receives the link state broadcast LS A message;
所述第一路由器查询所述第一接口所属的分发组, 并在所述第一路由 器的本地数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一 接口所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分 发组中包括至少两个路由器的接口;  The first router queries the distribution group to which the first interface belongs, and searches the local database of the first router for the topology information of the distribution group to which the first interface belongs, where the first interface belongs. Having at least two distribution groups, each of the at least two distribution groups including an interface of at least two routers;
所述第一接口根据所述第一接口所属的分发组的拓朴信息, 将所述 The first interface according to the topology information of the distribution group to which the first interface belongs,
LSA 消息转发给所述第一接口所属的分发组内除所述第一接口之外的所有 接口。 The LSA message is forwarded to all interfaces except the first interface in the distribution group to which the first interface belongs.
本发明实施例提供另一种路由方法, 包括:  An embodiment of the present invention provides another routing method, including:
第二路由器的第一接口产生链路状态广播 LS A消息; 所述第二路由器查询所述第一接口所属的分发组, 并在所述第二路由 器的本地数据库中查找所述第一接口所述的分发组的拓朴信息, 所述第一 接口所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分 发组中包括至少两个路由器的接口; The first interface of the second router generates a link state broadcast LS A message; The second router queries the distribution group to which the first interface belongs, and searches the local database of the second router for the topology information of the distribution group, where the first interface belongs. There are at least two distribution groups in the area, and each of the at least two distribution groups includes an interface of at least two routers;
所述第一接口根据所述第一接口所属的分发组的拓朴信息, 将所述 The first interface according to the topology information of the distribution group to which the first interface belongs,
LSA 消息转发给所述第一接口所属的分发组内除所述第一接口之外的所有 接口。 The LSA message is forwarded to all interfaces except the first interface in the distribution group to which the first interface belongs.
另一方面, 本发明实施例提供一种路由器, 包括: 第一接口、 本地数 据库和处理模块;  In another aspect, an embodiment of the present invention provides a router, including: a first interface, a local database, and a processing module;
所述本地数据库, 用于存储所述第一接口所属的分发组的拓朴信息; 所述第一接口, 用于接收链路状态广播 LSA消息;  The local database is configured to store topology information of the distribution group to which the first interface belongs; the first interface is configured to receive a link state broadcast LSA message;
所述处理模块, 用于查询所述第一接口所属的第一分发组, 并在所述 本地数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一接口 所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分发组 包括至少两个路由器的接口;  The processing module is configured to query a first distribution group to which the first interface belongs, and search, in the local database, topology information of a distribution group to which the first interface belongs, where the first interface belongs Having at least two distribution groups, each of the at least two distribution groups including an interface of at least two routers;
所述第一接口, 还用于根据所述第一接口所属的分发组的拓朴信息, 将所述 LSA消息转发给所述第一接口所属的分发组内除所述第一接口之外 的所有接口。  The first interface is further configured to: forward, according to the topology information of the distribution group to which the first interface belongs, the LSA message to the distribution group to which the first interface belongs, except the first interface. All interfaces.
本发明实施例提供另一种路由器, 包括: 第一接口、 本地数据库和处 理模块;  An embodiment of the present invention provides another router, including: a first interface, a local database, and a processing module;
所述本地数据库, 用于存储所述第一接口所属的分发组的拓朴信息; 所述第一接口, 用于产生链路状态广播 LSA消息;  The local database is configured to store topology information of the distribution group to which the first interface belongs; the first interface is configured to generate a link state broadcast LSA message;
所述处理模块, 用于查询所述第一接口所属的分发组, 并在所述本地 数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一接口所属 的区域内设有至少两个分发组, 所述至少两个分发组中的每个分发组包括 至少两个路由器的接口;  The processing module is configured to query a distribution group to which the first interface belongs, and search for the topology information of the distribution group to which the first interface belongs in the local database, where the first interface belongs There are at least two distribution groups, each of the at least two distribution groups including an interface of at least two routers;
所述第一接口, 还用于根据所述第一接口所属的分发组的拓朴信息, 将所述 LSA消息转发给所述第一接口所属的分发组内除所述第一接口之外 的所有接口。  The first interface is further configured to: forward, according to the topology information of the distribution group to which the first interface belongs, the LSA message to the distribution group to which the first interface belongs, except the first interface. All interfaces.
本发明实施例提供的路由方法和路由器, 将一个区域内的多个路由器 的多个接口划分为至少两个分发组, 每个分发组内包括至少两个路由器的 接口,路由器的接口将接收的 LSA消息或产生的 LSA消息只发送该接口所 属分发组内的接口, 而不发送给所属区域内其他分发组内的接口, 从而使 网络中路由器的本地数据库只需要维护自身接口所属的分发组的拓朴信 息, 从而实现节省系统资源。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 图 1为本发明提供的路由方法一个实施例的流程图; The routing method and the router provided by the embodiment of the present invention divide multiple interfaces of multiple routers in one area into at least two distribution groups, and each distribution group includes at least two routers. The interface of the router sends the received LSA message or the generated LSA message only to the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. Therefore, the local database of the router in the network only needs to be Maintain the topology information of the distribution group to which the interface belongs, thus saving system resources. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below, and obviously, in the following description The drawings are some embodiments of the present invention, and other drawings may be obtained from those of ordinary skill in the art without departing from the scope of the invention. 1 is a flowchart of an embodiment of a routing method provided by the present invention;
图 2为本发明提供的路由方法另一个实施例的流程图;  2 is a flowchart of another embodiment of a routing method provided by the present invention;
图 3为本发明提供的路由方法另一个实施例的流程图;  3 is a flowchart of another embodiment of a routing method provided by the present invention;
图 4为本发明提供的路由器一个实施例的结构示意图;  4 is a schematic structural diagram of an embodiment of a router provided by the present invention;
图 5为本发明提供的路由器又一个实施例的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。  FIG. 5 is a schematic structural diagram of still another embodiment of a router provided by the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 1为本发明提供的路由方法一个实施例的流程图, 如图 1所述, 该 方法包括:  FIG. 1 is a flowchart of an embodiment of a routing method provided by the present invention. As shown in FIG. 1, the method includes:
5101、 第二路由器的第一接口产生链路状态广播(LSA ) 消息。  5101. The first interface of the second router generates a link state broadcast (LSA) message.
5102、 第二路由器查询第一接口所属的分发组, 并在第二路由器的本 地数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一接口所 属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分发组包 括至少两个路由器的接口。 S103、 所述第一接口根据所述第一接口所属的分发组的拓朴信息, 将 所述 LSA消息转发给所述第一接口所属的分发组内除所述第一接口之外的 所有接口。 The second router queries the distribution group to which the first interface belongs, and searches for the topology information of the distribution group to which the first interface belongs in the local database of the second router, where at least the area to which the first interface belongs is located. Two distribution groups, each of the at least two distribution groups including an interface of at least two routers. S103. The first interface forwards the LSA message to all interfaces except the first interface in the distribution group to which the first interface belongs according to the topology information of the distribution group to which the first interface belongs. .
举例来说, 本发明实施例中涉及的区域, 可以是 RFC2328中所定义的 区域, 即, 开放式最短路径优先( Open Shortest Path First, OSPF )允许连 通的网络(其中可以包括多个路由器的多个接口)和主机组合在一起, 这 样的组合称为一个区域, 每个区域运行一份独立的基本链路状态路由算法 , 每个区域中的路由器具有存储本区域的拓朴信息的数据库, 该拓朴信息表 示了本区域内各个路由器接口之间的连接关系。 网络中可以通过设置区域 的方式来隔离网络, 使得某一区域内部的拓朴结构发生变化时, 其他区域 内的路由器不必更新本地数据库中存储的本区域的拓朴信息。  For example, the area involved in the embodiment of the present invention may be an area defined in RFC 2328, that is, Open Shortest Path First (OSPF) allows a connected network (which may include multiple routers). Interfaces are combined with hosts. Such a combination is called an area. Each area runs an independent basic link state routing algorithm. The routers in each area have a database that stores topology information of the area. The topology information indicates the connection relationship between the router interfaces in the area. In the network, the network can be isolated by setting the area. When the topology inside a certain area changes, the routers in other areas do not need to update the topology information of the local area stored in the local database.
本发明实施例中, 同一区域内的多个路由器的多个接口, 可以划分成 至少两个分发组。 每个分发组中可以包括至少两个路由器的接口, 其中每 个接口所在的路由器的本地数据库中, 存储该接口所属的所有分发组的拓 朴信息, 而不存储该接口所属区域内其他分发组的拓朴信息。 分发组内的 拓朴信息表示了该分发组内各个路由器接口之间的连接关系。  In the embodiment of the present invention, multiple interfaces of multiple routers in the same area may be divided into at least two distribution groups. Each distribution group may include an interface of at least two routers, where the local database of the router where each interface is located stores topology information of all distribution groups to which the interface belongs, and does not store other distribution groups in the area to which the interface belongs. Topological information. The topology information in the distribution group indicates the connection relationship between the router interfaces in the distribution group.
每个区域内的分发组可以按照具体需求进行划分, 例如: 可以将同一 区域内的路由器 A上的接口 1和路由器 B上的接口 1划分为一个分发组, 或者, 还可以将同一区域内路由器 A上的多个接口和路由器 B上的多个接 口划分为一个分发组。  The distribution groups in each area can be divided according to specific requirements. For example: Interface 1 on Router A and Router 1 on Router B in the same area can be divided into one distribution group, or routers in the same area can be used. Multiple interfaces on A and multiple interfaces on Router B are divided into one distribution group.
需要说明的是, 某个路由器的一个接口, 只属于一个区域, 但可以属 于该区域内的一个或多个分发组。 一个分发组只属于一个区域。  It should be noted that an interface of a router belongs to only one area, but may belong to one or more distribution groups in the area. A distribution group belongs to only one area.
举例来说, 可以通过区域内的一个或多个中心路由器对该区域内的所 有接口进行配置, 例如: 可以对该区域内的所有接口配置命令, 通过不同 的接口配置不同的命令将将该区域内的接口划分为至少两个分发组。 路由 器的本地数据库中仅维护该接口所属的分发组内的拓朴信息, 而并不维护 该接口所属区域内其他分发组的拓朴结构。  For example, you can configure all the interfaces in the area through one or more central routers in the area. For example: You can configure commands for all interfaces in the area, and configure different commands through different interfaces. The internal interface is divided into at least two distribution groups. In the local database of the router, only the topology information in the distribution group to which the interface belongs is maintained, and the topology of other distribution groups in the area to which the interface belongs is not maintained.
本发明实施例中涉及的第二路由器, 可以为网络中的任一路由器, 该 第二路由器上可以具有一个或多个接口, 其中, 第一接口为第二路由器上 的任一接口, 该第一接口所属的区域内划分为至少两个分发组, 第一接口 可以属于一个分发组, 也可以属于多个分发组。 第二路由器本地数据库中 存储有第一接口所属的分发组的拓朴信息。 The second router involved in the embodiment of the present invention may be any router in the network, and the second router may have one or more interfaces, where the first interface is any interface on the second router, the first An area to which an interface belongs is divided into at least two distribution groups. The first interface may belong to one distribution group or may belong to multiple distribution groups. Second router in the local database The topology information of the distribution group to which the first interface belongs is stored.
举例来说, 链路状态广播(Link State Advertisement, LSA ) 消息中可 以包括: 该路由器的所有的链路, 链路的状态信息, 该链路上所有已知的 开放式最短路径优先(Open Shortest Path First, OSPF )邻居等信息。 因此, 任一路由器的任一接口的链路状态发生变化时, 该路由器都会产生 LSA消 息。 本发明实施例中, 第二路由器的第一接口的任一链路状态发生变化时, 第二路由器会产生 LS A消息。 第二路由器可以查找该第一接口所属的分发 组。 例如: 第二路由器可以在该第一接口的配置命令中查找该第一接口所 属的分发组。 进一步的, 第二路由器还可以在本地数据库中查找所述第一 接口所属的分发组的拓朴信息。 从而将由第一接口的链路状态变化而产生 的 LSA消息在所述第一接口所属的每个分发组内转发, 所述第一接口可以 根据所述第一接口所属的分发组的拓朴信息, 将该 LSA消息发送给第一接 口所属的分发组内除第一接口之外的所有接口。  For example, a Link State Advertisement (LSA) message may include: all links of the router, status information of the link, and all known open shortest path priorities on the link (Open Shortest) Path First, OSPF) Neighbors and other information. Therefore, when the link status of any interface of any router changes, the router will generate an LSA message. In the embodiment of the present invention, when the status of any link of the first interface of the second router changes, the second router generates an LS A message. The second router can find the distribution group to which the first interface belongs. For example: the second router may look up the distribution group to which the first interface belongs in the configuration command of the first interface. Further, the second router may also search for the topology information of the distribution group to which the first interface belongs in the local database. The LSA message generated by the link state change of the first interface is forwarded in each distribution group to which the first interface belongs, and the first interface may be based on the topology information of the distribution group to which the first interface belongs. And sending the LSA message to all interfaces except the first interface in the distribution group to which the first interface belongs.
需要说明的是, 所述第一接口所属的分发组内除第一接口之外的所有 接口中, 既可以包括与所述第一接口属于不同路由器的接口, 也包括与所 述第一接口属于同一路由器, 即所述第二路由器上的其他接口。  It should be noted that all the interfaces except the first interface in the distribution group to which the first interface belongs may include an interface that belongs to a different router from the first interface, and includes the first interface. The same router, that is, other interfaces on the second router.
可以看出, 本发明实施例中, 网络中路由器的本地数据库中仅保存该 路由器上每个接口所属的分发组内的拓朴信息, 而并不保存每个接口所属 区域内其他分发组内的拓朴信息, 因此, 网络中某一区域中的某一接口状 态发生变化, 例如: 接口的某一链路状态发生变化, 仅影响该接口所属的 分发组内的拓朴结构, 该接口所属的分发组内的所有接口所在的路由器的 本地数据库的信息会更新。 而该接口所属区域中的其他分发组内的拓朴信 息并不受影响。 因此, 在区域内部通过分发组进行路由隔离, 可以节省路 由器存储的拓朴信息容量, 节省系统资源。  It can be seen that, in the embodiment of the present invention, only the topology information in the distribution group to which each interface on the router belongs belongs is stored in the local database of the router in the network, and the other distribution groups in the area to which each interface belongs are not saved. The topology information is changed. Therefore, the state of an interface in a certain area of the network changes. For example, the status of a link on the interface changes, and only the topology in the distribution group to which the interface belongs is affected. The information of the local database of the router where all the interfaces in the distribution group are located is updated. The topology information in other distribution groups in the area to which the interface belongs is not affected. Therefore, route isolation is performed within the area through the distribution group, which saves the topology information capacity of the router and saves system resources.
为了保证区域内部不同分发组的接口之间的正常通信, 可选的, 本发 明实施例中, 可以通过区域内设置的中心路由器向该区域内的所有接口发 送默认路由或者聚合路由, 该默认路由或聚合路由用于指示将目的地址在 所述第二路由器本地存储的数据库中没有匹配路由的数据报文发送给中心 路由器的接口。 例如: 第二路由器的第一接口可以接收所属区域内的中心 路由器发送的默认路由或者聚合路由, 该默认路由或聚合路由可以用于指 示将目的地址在第二路由器的本地数据库中没有匹配路由的数据报文发送 给中心路由器的接口。 In order to ensure normal communication between the interfaces of the different distribution groups in the area, in the embodiment of the present invention, the default route or the aggregation route may be sent to all interfaces in the area through the central router set in the area. Or the aggregation route is used to indicate that the data packet whose destination address is not stored in the database stored locally by the second router is not sent to the central router. For example, the first interface of the second router can receive the default route or the aggregated route sent by the central router in the area, and the default route or the aggregated route can be used to indicate that the destination address has no matching route in the local database of the second router. Data message transmission The interface to the central router.
需要说明的是, 默认路由是一种特殊的静态路由, 是指当路由器本地 数据库中与数据报文的目的地址之间没有匹配的表项时, 路由器能够做出 的选择。 如果没有默认路由, 那么没有匹配表项的目的地址的数据报文将 被丟弃。 而本发明实施例涉及的目的路由, 用于路由器在本地数据库中与 数据报文的目的地址之间没有匹配的表项时, 将数据报文发送至中心路由 器的接口, 因此, 该默认路由器可以为到中心路由器的接口的路由信息。  It should be noted that the default route is a special static route, which refers to the choice that the router can make when there is no matching entry between the router's local database and the destination address of the data packet. If there is no default route, data packets with no destination address matching the entry will be discarded. The destination route according to the embodiment of the present invention is used to send a data packet to an interface of the central router when the router does not have a matching entry between the local database and the destination address of the data packet. Therefore, the default router can Routing information for the interface to the central router.
聚合路由是将多条路由合并成一条路由后, 该一条路由的路由信息, 聚合路由可以实现与默认路由相同的功能, 即, 用于路由器在本地数据库 中与数据报文的目的地址之间没有匹配的表项时, 指示路由器将数据报文 发送至中心路由器的接口。  An aggregated route is a route that combines multiple routes into a single route. The aggregated route can implement the same function as the default route. That is, the router does not have a destination address between the local database and the data packet. When the matching entry is received, it instructs the router to send data packets to the interface of the central router.
对于所述第二路由器的一个接口, 例如: 所述第一接口, 在接收到数 据报文之后, 所述第二路由器可以在所述本地数据库中查询所述第一接口 所属的分发组内的拓朴信息, 判断是否存在与数据报文的目的地址相匹配 的路由信息, 如果不存在与数据报文的目的地址相匹配的路由信息, 则该 第一接口可以根据默认路由或聚合路由将数据报文发送至所述中心路由器 的接口。  For an interface of the second router, for example, the first interface, after receiving the data packet, the second router may query, in the local database, the distribution group in which the first interface belongs The topology information is used to determine whether there is a routing information that matches the destination address of the data packet. If there is no routing information matching the destination address of the data packet, the first interface may forward the data according to the default route or the aggregated route. The message is sent to the interface of the central router.
本发明实施例提供的路由方法, 将一个区域内的多个路由器的多个接 口划分为至少两个分发组, 每个分发组内包括至少两个路由器的接口, 每 个路由器的接口产生的 LS A消息只发送给该接口所属的分发组内的路由器 的接口, 而不发送给该接口所属区域内其他分发组内的路由器的接口, 从 而使网络中路由器的本地数据库只需要维护自身接口所属的分发组的拓朴 信息, 从而实现节省系统资源。  The routing method provided by the embodiment of the present invention divides multiple interfaces of multiple routers in an area into at least two distribution groups, each distribution group includes an interface of at least two routers, and an LS generated by an interface of each router The A message is sent only to the interface of the router in the distribution group to which the interface belongs, and is not sent to the interface of the router in the other distribution group in the area to which the interface belongs. Therefore, the local database of the router in the network only needs to maintain the interface to which the interface belongs. Distribute the topology information of the group to save system resources.
图 2为本发明提供的路由方法又一个实施例的流程图, 如图 2所示, 该方法包括:  FIG. 2 is a flowchart of still another embodiment of a routing method according to the present invention. As shown in FIG. 2, the method includes:
5201、 第一路由器的第一接口接收链路状态广播(LSA ) 消息。  5201. The first interface of the first router receives a link state broadcast (LSA) message.
5202、 所述第一路由器查询所述第一接口所属的分发组, 并在第一路 由器的本地数据库中查找所述分发组的拓朴信息, 所述第一接口所属的区 域内设有至少两个分发组, 所述至少两个分发组中的每个分发组包括至少 两个路由器的接口。  The first router queries the distribution group to which the first interface belongs, and searches for the topology information of the distribution group in the local database of the first router, where at least two areas are located in the area to which the first interface belongs. Distribution groups, each of the at least two distribution groups comprising an interface of at least two routers.
5203、 所述第一接口根据所述第一接口所属的分发组的拓朴信息, 将 所述 LSA消息转发给所述第一接口所属的分发组内除第一接口之外的所有 接口。 The first interface is configured according to the topology information of the distribution group to which the first interface belongs. The LSA message is forwarded to all interfaces except the first interface in the distribution group to which the first interface belongs.
其中, 所述第一路由器可以为网络中的任一路由器, 所述第一接口可 以为所述第一路由器的任一接口, 该第一接口所属的区域内可以划分为至 少两个分发组, 该第一接口可以属于一个分发组, 也可以属于多个分发组。 所述第一路由器的本地数据库中存储有所述第一接口所属的分发组的拓朴 信息。  The first router may be any router in the network, and the first interface may be any interface of the first router, and the area to which the first interface belongs may be divided into at least two distribution groups. The first interface may belong to one distribution group or may belong to multiple distribution groups. The local database of the first router stores topology information of the distribution group to which the first interface belongs.
举例来说, 所述第一路由器的所述第一接口接收到所述 LS A消息后, 可以查找该第一接口所属的分发组。 例如: 所述第一路由器可以在该第一 接口的配置命令中查找该第一接口所属的分发组。 进一步的, 所述第一路 由器还可以在本地数据库中查询到所述第一接口所属的分发组的拓朴信 息。 从而将所述第一接口接收到的所述 LSA消息在所述第一接口所属的每 个分发组内转发, 举例来说, 所述第一接口可以根据所述第一接口所属的 分发组的拓朴信息, 将接收到的该 LSA消息发送给所述第一接口所属的分 发组内除所述第一接口之外的所有接口。  For example, after receiving the LS A message, the first interface of the first router may search for a distribution group to which the first interface belongs. For example, the first router may search for a distribution group to which the first interface belongs in the configuration command of the first interface. Further, the first router may further query the topology information of the distribution group to which the first interface belongs in the local database. The LSA message received by the first interface is forwarded in each distribution group to which the first interface belongs. For example, the first interface may be according to a distribution group to which the first interface belongs. The topology information is sent to all interfaces except the first interface in the distribution group to which the first interface belongs.
需要说明的是, 所述第一接口所属的分发组内除第一接口之外的所有 接口中, 即包括与所述第一接口属于不同路由器的接口, 也包括与所述第 一接口属于同一路由器, 即第一路由器上的接口。  It should be noted that all the interfaces except the first interface in the distribution group to which the first interface belongs include an interface that belongs to a different router from the first interface, and includes the same interface as the first interface. Router, the interface on the first router.
对于网络中的任一区域而言, 网络中某一区域中的某一接口接收到 LSA消息后, 仅在该接口所属的分发组内转发该 LSA消息, 以使该分发组 内的接口所在的路由器的本地数据库中更新维护该分发组内的拓朴信息, 而该接口所属区域中的其他分发组内的路由器的接口不接收该 LS A消息, 进而无需对本分发组内的拓朴信息进行更新。 因此, 在区域内部通过分发 组进行路由隔离, 可以节省每个路由器存储的拓朴信息容量, 节省系统资 源。  For any area in the network, an interface in an area of the network forwards the LSA message only in the distribution group to which the interface belongs, so that the interface in the distribution group is located. The router's local database updates and maintains the topology information in the distribution group, and the interfaces of the routers in the other distribution groups in the area to which the interface belongs do not receive the LS A message, and thus the topology information in the distribution group does not need to be updated. . Therefore, route isolation is performed within the area through the distribution group, which saves the topology information capacity stored by each router and saves system resources.
可选的, 在第一路由器为中心路由器的实施场景下, 该第一路由器可 以对第一接口所属区域内的所有路由器的接口配置命令, 将第一接口所属 区域内的所有路由器的接口划分成至少两个分发组。  Optionally, in the implementation scenario that the first router is the central router, the first router may configure a command for all routers in the area to which the first interface belongs, and divide the interfaces of all routers in the area to which the first interface belongs. At least two distribution groups.
举例来说, 为了保证同一区域内部不同分发组的接口之间的正常通信, 可选的, 本发明实施例中, 在第一路由器为中心路由器的实施场景下, 可 以通过该第一路由器向该区域内的所有接口发送默认路由或者聚合路由, 该默认路由或聚合路由用于指示将目的地址在第一路由器的本地数据库中 没有匹配路由的数据报文发送给中心路由器的接口。 例如: 第一路由器可 以通过第一接口向第一接口所属区域内的所有路由器的接口发送默认路由 或者聚合路由, 通过默认路由或聚合路由用于指示将目的地址在路由器的 本地数据库中没有匹配路由的数据报文发送至第一接口。 For example, in order to ensure normal communication between the interfaces of different distribution groups in the same area, in the embodiment of the present invention, in the implementation scenario that the first router is the central router, the first router may All interfaces in the area send default routes or aggregate routes. The default route or the aggregated route is used to indicate that the data packet whose destination address has no matching route in the local database of the first router is sent to the interface of the central router. For example, the first router may send a default route or an aggregated route to the interface of all the routers in the area to which the first interface belongs through the first interface, and the default route or the aggregated route is used to indicate that the destination address has no matching route in the local database of the router. The data message is sent to the first interface.
当第一路由器的任一接口, 例如: 第一接口接收到其他路由器根据默 认路由或聚合路由发送的数据报文后, 由于该第一路由器为中心路由器, 因此, 该第一路由器的本地数据库中存储第一接口所属区域的拓朴信息。 因此, 第一路由器可以查找本地数据库中存储的第一接口所属区域内所有 分发组的拓朴信息, 获取与数据报文的目的地址相匹配的路由信息, 进而 可以根据与数据报文的目的地址相匹配的路由信息, 将数据报文发送至所 述目的地址。 通过上述的中心路由器发布默认路由或聚合路由的方法, 可 以实现通过中心路由器来引导所属区域内各分发组内的流量, 使不同分发 组的接口之间的正常通信。  When any interface of the first router, for example, the first interface receives the data packet sent by the other router according to the default route or the aggregated route, since the first router is the central router, the first router is in the local database. Stores topology information of the area to which the first interface belongs. Therefore, the first router can search for the topology information of all the distribution groups in the area to which the first interface belongs in the local database, and obtain the routing information that matches the destination address of the data packet, and further, according to the destination address of the data packet. Matching routing information, sending data packets to the destination address. The method of issuing a default route or an aggregate route through the central router can implement the traffic in each distribution group in the area to be communicated through the central router, so that the interfaces of different distribution groups can communicate normally.
本发明实施例提供的路由方法, 通过中心路由器将一个区域内的多个 路由器的多个接口划分为至少两个分发组, 每个分发组内包括至少两个路 由器的接口,每个路由器的接口接收 LSA消息后, 只将接收到 LSA消息发 送该接口所属分发组内的接口, 而不发送给所属区域内其他分发组内的接 口, 从而使网络中路由器的本地数据库只需要维护自身接口所属分发组的 拓朴信息, 从而实现节省系统资源。  According to the routing method provided by the embodiment of the present invention, multiple interfaces of multiple routers in an area are divided into at least two distribution groups by using a central router, and each distribution group includes an interface of at least two routers, and an interface of each router After receiving the LSA message, the LSA message is sent only to the interface in the distribution group to which the interface belongs, and is not sent to the interfaces in other distribution groups in the area. Therefore, the local database of the router in the network only needs to maintain the distribution of its own interface. The topology information of the group, thereby saving system resources.
图 3为本发明提供的路由方法另一个实施例的流程图, 如图 3所示, 本实施例以一个具体的实施场景为例, 对本发明实施例提供的路由方法进 行说明。本实施例中, 区域 1中包括中心路由器 RTA,还包括路由器 RTB、 RTC和 RTD。 假设路由器 RTB、 RTC和 RTD上各包括一个接口, 分别用 于与中心路由器 RTA上的一个接口连接。  FIG. 3 is a flowchart of another embodiment of the routing method provided by the present invention. As shown in FIG. 3, this embodiment uses a specific implementation scenario as an example to describe a routing method provided by an embodiment of the present invention. In this embodiment, the area 1 includes a central router RTA, and further includes routers RTB, RTC, and RTD. Assume that the routers RTB, RTC, and RTD each include an interface for connecting to an interface on the central router RTA.
在该实施场景下, RTA可以通过对路由器 RTB、 RTC和 RTD配置命 令, 将区域 1内的路由器 RTB、 RTC和 RTD划分成 3个分发组。 其中, 路 由器 RTB及其与 RTA连接的接口划为分发组 1、 RTC及其与 RTA连接的 接口划分为分发组 2 , RTD及其与 RTA连接的接口划分为分发组 3。  In this implementation scenario, the RTA can divide the routers RTB, RTC, and RTD in Area 1 into three distribution groups by configuring commands to the routers RTB, RTC, and RTD. The router RTB and its interface connected to the RTA are classified as a distribution group 1. The RTC and its interface connected to the RTA are divided into a distribution group 2, and the RTD and its interface connected to the RTA are divided into a distribution group 3.
以 RTB为例, 由于 RTB本地数据库中仅保存有 RTB上的接口所属的 分发组 1 内的拓朴信息, 而并不包括所属的区域 1 内分发组 2和分发组 3 的拓朴信息, 因此, 对于 RTB产生的 LSA消息 B01和 LSA消息 B02, RTB仅将 LSA消息 B01和 LSA消息 B02发送给中心路由器 RTA上属于 分发组 1的接口,而并不发送给属于不同分发组的 RTC和 RTD。同样, RTC 产生的 LSA消息 C01和 LSA消息 C02仅发送给中心路由器 RTA上属于分 发组 2的接口, 以及 RTD产生的 LSA消息 D01和 LSA消息 D02也仅发 送给中心路由器 RTA上属于分发组 3的接口。 Taking the RTB as an example, the RTB local database only stores the topology information in the distribution group 1 to which the interface on the RTB belongs, but does not include the distribution group 2 and the distribution group 3 in the area 1 to which it belongs. The topology information, therefore, for the LSA message B01 and the LSA message B02 generated by the RTB, the RTB only sends the LSA message B01 and the LSA message B02 to the interface belonging to the distribution group 1 on the central router RTA, and does not send to the different distribution. Group of RTC and RTD. Similarly, the LSA message C01 and the LSA message C02 generated by the RTC are sent only to the interface belonging to the distribution group 2 on the central router RTA, and the LSA message D01 and the LSA message D02 generated by the RTD are also sent only to the distribution router 3 on the central router RTA. interface.
由于 RTB、 RTC和 RTD各自本地数据库中分别仅存储分发组 1、 分发 组 2和分发组 3的拓朴信息, 因此, RTB、 RTC和 RTD彼此之间不具有路 由信息, 因此, 中心路由器 RTA可以分别向 RTB、 RTC和 RTD发送默认 路由或聚合路由,来引导区域 1内分发组 1、分发组 2和分发组 3内的流量, 使不同分发组的接口之间可以正常通信。例如: 当 RTB需要向 RTC发送数 据报文时, 由于 RTB本地数据库中存储的拓朴信息中为 RTB所属分发组 1 内的拓朴信息, 因此, RTB并不能计算出到 RTC的路由信息。 因此, RTB 可以通过 RTA发布的默认路由或聚合路由将该数据报文发送给与 RTA连 接的接口, 由于 RTA为中心路由器, 其本地数据库中存储区域 1的拓朴信 息, 因此, RTA能够计算出到 RTC的路由信息, 从而 RTA可以将该数据 报文转发给 RTC。  Since the RTB, RTC, and RTD respectively store only the topology information of the distribution group 1, the distribution group 2, and the distribution group 3 in the local database, the RTB, the RTC, and the RTD do not have routing information with each other, and therefore, the central router RTA can The default route or the aggregated route is sent to the RTB, the RTC, and the RTD to guide the traffic in the distribution group 1, the distribution group 2, and the distribution group 3 in the area 1, so that the interfaces of the different distribution groups can communicate normally. For example, when the RTB needs to send data packets to the RTC, the RTB local database stores the topology information in the distribution group 1 of the RTB. Therefore, the RTB cannot calculate the routing information to the RTC. Therefore, the RTB can send the data packet to the interface connected to the RTA through the default route or the aggregated route advertised by the RTA. Since the RTA is the central router, the local database stores the topology information of the area 1, so the RTA can calculate The routing information to the RTC, so that the RTA can forward the data packet to the RTC.
需要说明的是, 本发明实施例中, 区域 1内具有一个中心路由器 RTA, 该 RTA上的接口所属的分发组包括了区域 1内的所有分发组, 因此, RTA 具有区域 1内中所有分发组, 包括分发组 1、分发组 2和分发组 3的拓朴信 息。 而可以理解的是, 在区域 1 中具有多个中心路由器的实施场景下, 每 个中心路由器上的接口所属的分发组可能仅包括区域 1 内的部分分发组, 例如: 中心路由器上的接口所属的分发组仅包括分发组 1和分发组 2,但在 这种实施场景下, 中心路由器上仍然存储有区域 1 中的拓朴信息, 即, 存 储有区域 1 内所有分发组, 包括分发组 3的拓朴信息, 从而能够在属于不 同分发组的路由器的接口之间转发数据报文。  It should be noted that, in the embodiment of the present invention, the area 1 has a central router RTA, and the distribution group to which the interface on the RTA belongs includes all distribution groups in the area 1. Therefore, the RTA has all distribution groups in the area 1. , including topology information of distribution group 1, distribution group 2, and distribution group 3. It can be understood that, in the implementation scenario where there are multiple central routers in the area 1, the distribution group to which the interface on each central router belongs may only include some distribution groups in the area 1. For example, the interface on the central router belongs to The distribution group only includes the distribution group 1 and the distribution group 2, but in this implementation scenario, the topology information in the area 1 is still stored on the central router, that is, all the distribution groups in the area 1 are stored, including the distribution group 3 The topology information, so that data packets can be forwarded between interfaces of routers belonging to different distribution groups.
本实施例提供的路由方法, 将一个区域内的多个路由器的多个接口划 分为至少两个分发组, 每个分发组内包括至少两个路由器的接口, 路由器 的接口接收 LSA消息或产生的 LSA消息只发送该接口所属分发组内的接 口, 而不发送给所属区域内其他分发组内的接口, 网络中路由器的本地数 据库维护自身接口所属的分发组的拓朴信息, 从而实现节省系统资源。 通 过中心路由器发布默认路由或聚合路由, 可以实现通过中心路由器来引导 所属区域内各分发组内的流量, 使不同分发组的接口之间的正常通信。 The routing method provided in this embodiment divides multiple interfaces of multiple routers in an area into at least two distribution groups, and each distribution group includes an interface of at least two routers, and the interface of the router receives the LSA message or the generated interface. The LSA message only sends the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. The local database of the router in the network maintains the topology information of the distribution group to which the interface belongs, thereby saving system resources. . Pass The central router advertises the default route or the aggregated route. The central router can be used to guide the traffic in each distribution group in the area to ensure normal communication between interfaces of different distribution groups.
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分 步骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算 机可读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步 骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储 程序代码的介质。  One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above can be accomplished by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the above-described method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
图 4为本发明提供的路由器一个实施例的结构示意图, 如图 4所示, 包括: 第一接口 11、 处理模块 12和本地数据库 13;  4 is a schematic structural diagram of an embodiment of a router provided by the present invention. As shown in FIG. 4, the method includes: a first interface 11, a processing module 12, and a local database 13;
所述本地数据库 13 ,用于存储所述第一接口 11所属的分发组的拓朴信 息;  The local database 13 is configured to store topology information of the distribution group to which the first interface 11 belongs;
所述第一接口 11 , 用于接收链路状态广播 LS A消息;  The first interface 11 is configured to receive a link state broadcast LS A message;
所述处理模块 12, 用于查询所述第一接口 11所属的第一分发组, 并在 所述本地数据库 13 中查找所述第一接口 11所属的分发组的拓朴信息, 所 述第一接口 11所属的区域内设有至少两个分发组, 所述至少两个分发组中 的每个分发组包括至少两个路由器的接口;  The processing module 12 is configured to query the first distribution group to which the first interface 11 belongs, and search for the topology information of the distribution group to which the first interface 11 belongs in the local database 13, the first At least two distribution groups are disposed in the area to which the interface 11 belongs, and each of the at least two distribution groups includes an interface of at least two routers;
所述第一接口 11 ,还用于根据所述第一接口 11所属的分发组的拓朴信 息,将所述 LSA消息转发给所述第一接口 11所属的分发组内除所述第一接 口 11之外的所有接口。  The first interface 11 is further configured to forward the LSA message to the distribution group to which the first interface 11 belongs according to the topology information of the distribution group to which the first interface 11 belongs, except the first interface. All interfaces except 11.
可选的, 所述路由器可以为中心路由器, 所述本地数据库 13中可以存 储所述第一接口 11所属的区域的拓朴信息。  Optionally, the router may be a central router, and the local database 13 may store topology information of an area to which the first interface 11 belongs.
可选的, 所述处理模块 12还可以用于: 对所述第一接口 11所属区域 内的所有路由器的接口配置命令, 将所述第一接口 11所属区域内的所有路 由器的接口划分成至少两个分发组。  Optionally, the processing module 12 is further configured to: configure an interface configuration command for all routers in the area to which the first interface 11 belongs, and divide the interfaces of all routers in the area to which the first interface 11 belongs to at least Two distribution groups.
可选的, 所述第一接口 11还可以用于: 向所述第一接口 11所属区域 内的所有路由器的接口发送默认路由或者聚合路由, 所述默认路由或所述 聚合路由用于指示将目的地址在路由器的本地数据库中没有匹配路由的数 据报文发送至所述第一接口 11。  Optionally, the first interface 11 is further configured to: send a default route or an aggregated route to an interface of all routers in the area to which the first interface 11 belongs, where the default route or the aggregated route is used to indicate that The data packet whose destination address does not have a matching route in the local database of the router is sent to the first interface 11.
可选的, 所述第一接口 11 , 还可以用于接收根据所述默认路由或所述 聚合路由发送的数据报文;  Optionally, the first interface 11 is further configured to receive a data packet sent according to the default route or the aggregated route.
相应的, 所述处理模块 12还可以用于: 查找所述本地数据库 13 中存 储的第一接口 11所属区域的拓朴信息, 获取与数据报文的目的地址相匹配 的路由信息; Correspondingly, the processing module 12 is further configured to: search for the local database 13 The topology information of the area to which the first interface 11 is stored is obtained, and the routing information matching the destination address of the data packet is obtained;
所述第一接口 11 , 还可以用于根据与数据报文的目的地址相匹配的路 由信息, 将所述数据报文发送至所述目的地址。  The first interface 11 is further configured to send the data packet to the destination address according to the routing information that matches the destination address of the data packet.
本发明实施例提供的路由器, 将一个区域内的多个路由器的多个接口 划分为至少两个分发组, 每个分发组内包括至少两个路由器的接口, 每个 路由器的接口接收 LSA消息或产生的 LSA消息只发送该接口所属分发组内 的接口, 而不发送给所属区域内其他分发组内的接口, 从而使网络中路由 器的本地数据库只需要维护自身接口所属的分发组的拓朴信息, 从而实现 节省系统资源。  The router provided by the embodiment of the present invention divides multiple interfaces of multiple routers in an area into at least two distribution groups, each distribution group includes an interface of at least two routers, and each interface of the router receives an LSA message or The generated LSA message only sends the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. Therefore, the local database of the router in the network only needs to maintain the topology information of the distribution group to which the interface belongs. , thus saving system resources.
图 5为本发明提供的路由器一个实施例的结构示意图, 如图 5所示, 该路由器包括: 第一接口 21、 处理模块 22和本地数据库 23;  5 is a schematic structural diagram of an embodiment of a router provided by the present invention. As shown in FIG. 5, the router includes: a first interface 21, a processing module 22, and a local database 23;
所述本地数据库 23 ,用于存储所述第一接口 21所属的分发组的拓朴信 息;  The local database 23 is configured to store topology information of the distribution group to which the first interface 21 belongs;
所述第一接口 21 , 用于产生链路状态广播 LSA消息;  The first interface 21 is configured to generate a link state broadcast LSA message.
所述处理模块 22, 用于查询所述第一接口 21所属的分发组, 并在所述 本地数据库 23中查找所述第一接口 21所属的分发组的拓朴信息, 所述第 一接口所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个 分发组包括至少两个路由器的接口;  The processing module 22 is configured to query the distribution group to which the first interface 21 belongs, and search the local database 23 for the topology information of the distribution group to which the first interface 21 belongs, where the first interface belongs. At least two distribution groups are provided in the area, and each of the at least two distribution groups includes an interface of at least two routers;
所述第一接口 21 ,还用于根据所述第一接口 21所属的分发组的拓朴信 息,将所述 LSA消息转发给所述第一接口 21所属的分发组内除所述第一接 口 21之外的所有接口。  The first interface 21 is further configured to: forward, according to the topology information of the distribution group to which the first interface 21 belongs, the LSA message to the distribution group to which the first interface 21 belongs, except the first interface. All interfaces except 21.
可选的, 所述第一接口 21 , 还可以用于: 接收中心路由器发送的默认 路由或者聚合路由, 默认路由或聚合路由用于指示将目的地址在所述本地 数据库 23中没有匹配路由的数据报文发送给所述中心路由器的接口。  Optionally, the first interface 21 is further configured to: receive a default route or an aggregated route sent by the central router, where the default route or the aggregated route is used to indicate that the destination address has no matching route data in the local database 23. The packet is sent to the interface of the central router.
可选的, 所述第一接口 21 , 还可以用于接收数据报文;  Optionally, the first interface 21 is further configured to receive a data packet.
所述处理模块 22 ,还可以用于在所述本地数据库 23中查询所述第一接 口 21所属的分发组的拓朴信息, 判断是否存在与所述数据报文指向的目的 地址相匹配的路由信息;  The processing module 22 is further configured to query, in the local database 23, the topology information of the distribution group to which the first interface 21 belongs, and determine whether there is a route matching the destination address pointed by the data packet. Information
所述第一接口 21 ,还可以用于若所述处理模块 22判断出不存在与所述 数据报文指向的目的地址相匹配的路由信息, 则根据所述默认路由或所述 聚合路由将所述数据报文发送至所述中心路由器的接口。 The first interface 21 may be further configured to: if the processing module 22 determines that there is no routing information that matches a destination address pointed by the data packet, according to the default route or the The aggregated route sends the data message to the interface of the central router.
本发明实施例提供的路由器, 将一个区域内的多个路由器的多个接口 划分为至少两个分发组, 每个分发组内包括至少两个路由器的接口, 每个 路由器的接口接收 LSA消息或产生的 LSA消息只发送该接口所属分发组内 的接口, 而不发送给所属区域内其他分发组内的接口, 从而使网络中路由 器的本地数据库只需要维护自身接口所属的分发组的拓朴信息, 从而实现 节省系统资源。 通过中心路由器发布默认路由或聚合路由, 可以实现通过 中心路由器来引导所属区域内各分发组内的流量, 使不同分发组的接口之 间的正常通信。  The router provided by the embodiment of the present invention divides multiple interfaces of multiple routers in an area into at least two distribution groups, each distribution group includes an interface of at least two routers, and each interface of the router receives an LSA message or The generated LSA message only sends the interface in the distribution group to which the interface belongs, and does not send the interface to other distribution groups in the area. Therefore, the local database of the router in the network only needs to maintain the topology information of the distribution group to which the interface belongs. , thus saving system resources. The central router can be used to advertise the traffic in each distribution group in the area to ensure normal communication between interfaces of different distribution groups.
本发明实施例提供的路由器, 为本发明提供的路由方法的执行设备, 其执行路由方法的具体过程可参见本发明提供的方法实施例, 在此不再赘 述。  The router provided by the embodiment of the present invention is an apparatus for executing the routing method provided by the present invention. For the specific process of performing the routing method, refer to the method embodiment provided by the present invention, which is not described herein.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非 对其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的 普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进 行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或 者替换, 并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。  It should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权利要求 Rights request
1、 一种路由方法, 其特征在于, 包括: 第一路由器的第一接口接收链路状态广播 LS A消息;  A routing method, comprising: receiving, by a first interface of a first router, a link state broadcast LS A message;
所述第一路由器查询所述第一接口所属的分发组, 并在所述第一路由 器的本地数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一 接口所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分 发组中包括至少两个接口, 所述至少两个接口属于不同路由器;  The first router queries the distribution group to which the first interface belongs, and searches the local database of the first router for the topology information of the distribution group to which the first interface belongs, where the first interface belongs. Having at least two distribution groups, each of the at least two distribution groups includes at least two interfaces, and the at least two interfaces belong to different routers;
所述第一接口根据所述第一接口所属的分发组的拓朴信息, 将所述 LSA 消息转发给所述第一接口所属的分发组内除所述第一接口之外的所有 接口。  The first interface forwards the LSA message to all interfaces except the first interface in the distribution group to which the first interface belongs according to the topology information of the distribution group to which the first interface belongs.
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一路由器为中心路 由器, 所述第一路由器的本地数据库中存储所述第一接口所属的区域的拓朴 信息。  The method according to claim 1, wherein the first router is a central router, and the local database of the first router stores topology information of an area to which the first interface belongs.
3、 根据权利要求 2所述的方法, 其特征在于, 所述第一路由器的第一 接口接收链路状态广播 LSA消息之前, 还包括:  The method according to claim 2, wherein before the first interface of the first router receives the link state broadcast LSA message, the method further includes:
所述第一路由器对所述第一接口所属区域内的所有路由器的接口配置 命令, 将所述第一接口所属区域内的所有路由器的接口划分成至少两个分 发组。  The first router configures an interface of all the routers in the area to which the first interface belongs, and divides the interfaces of all the routers in the area to which the first interface belongs into at least two distribution groups.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 还包括: 所述第一接口向所述第一接口所属区域内的所有路由器的接口发送默 认路由或者聚合路由, 所述默认路由或所述聚合路由用于指示将目的地址 在路由器的本地数据库中没有匹配路由的数据报文发送至所述第一接口。  The method according to claim 2 or 3, further comprising: the first interface sending a default route or an aggregated route to an interface of all routers in the area to which the first interface belongs, the default route Or the aggregation route is used to send a data packet that has no matching route in the local database of the router to the first interface.
5、 根据权利要求 4所述的方法, 其特征在于, 还包括: 文;  5. The method according to claim 4, further comprising: a text;
所述第一路由器查找本地数据库中存储的所述第一接口所属区域的拓 朴信息, 获取与所述数据报文的目的地址相匹配的路由信息;  The first router searches for the topology information of the area to which the first interface belongs in the local database, and obtains routing information that matches the destination address of the data packet;
所述第一接口根据与所述数据报文的目的地址相匹配的路由信息, 将 所述数据报文发送至所述目的地址。  The first interface sends the data packet to the destination address according to the routing information that matches the destination address of the data packet.
6、 一种路由方法, 其特征在于, 包括: 第二路由器的第一接口产生链路状态广播 LS A消息; 6. A routing method, comprising: The first interface of the second router generates a link state broadcast LS A message;
所述第二路由器查询所述第一接口所属的分发组, 并在所述第二路由 器的本地数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一 接口所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分 发组包括至少两个接口, 所述至少两个接口属于不同路由器;  The second router queries the distribution group to which the first interface belongs, and searches the local database of the second router for the topology information of the distribution group to which the first interface belongs, where the first interface belongs. Having at least two distribution groups, each of the at least two distribution groups including at least two interfaces, the at least two interfaces belonging to different routers;
所述第一接口根据所述第一接口所属的分发组的拓朴信息, 将所述 LSA 消息转发给所述第一接口所属的分发组内除所述第一接口之外的所有 接口。  The first interface forwards the LSA message to all interfaces except the first interface in the distribution group to which the first interface belongs according to the topology information of the distribution group to which the first interface belongs.
7、 根据权利要求 6所述的方法, 其特征在于, 还包括:  7. The method according to claim 6, further comprising:
所述第一接口接收中心路由器发送的默认路由或者聚合路由, 所述默 认路由或所述聚合路由用于指示将目的地址在所述第二路由器的本地数据 库中没有匹配路由的数据报文发送给所述中心路由器的接口。  The first interface receives a default route or an aggregated route sent by the central router, where the default route or the aggregated route is used to send a data packet that has no matching route in the local database of the second router to the destination address. The interface of the central router.
8、 根据权利要求 7所述的方法, 其特征在于, 还包括:  8. The method according to claim 7, further comprising:
所述第一接口接收到数据报文;  Receiving, by the first interface, a data packet;
所述第二路由器在本地数据库中查询所述第一接口所属的分发组的拓 朴信息, 判断是否存在与所述数据报文指向的目的地址相匹配的路由信息; 若不存在与所述数据报文指向的目的地址相匹配的路由信息, 则所述 心路由器的接口。  The second router queries the local database for the topology information of the distribution group to which the first interface belongs, and determines whether there is routing information that matches the destination address pointed to by the data packet; if the data does not exist The routing information that the destination address of the packet matches, and the interface of the heart router.
9、 一种路由器, 其特征在于, 包括: 第一接口、 本地数据库和处理模 块;  A router, comprising: a first interface, a local database, and a processing module;
所述本地数据库, 用于存储所述第一接口所属的分发组的拓朴信息; 所述第一接口, 用于接收链路状态广播 LSA消息;  The local database is configured to store topology information of the distribution group to which the first interface belongs; the first interface is configured to receive a link state broadcast LSA message;
所述处理模块, 用于查询所述第一接口所属的第一分发组, 并在所述 本地数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一接口 所属的区域内设有至少两个分发组, 所述至少两个分发组中的每个分发组 包括至少两个接口, 所述至少两个接口属于不同路由器;  The processing module is configured to query a first distribution group to which the first interface belongs, and search, in the local database, topology information of a distribution group to which the first interface belongs, where the first interface belongs Having at least two distribution groups, each of the at least two distribution groups including at least two interfaces, the at least two interfaces belonging to different routers;
所述第一接口, 还用于根据所述第一接口所属的分发组的拓朴信息, 将所述 LSA消息转发给所述第一接口所属的分发组内除所述第一接口之外 的所有接口。  The first interface is further configured to: forward, according to the topology information of the distribution group to which the first interface belongs, the LSA message to the distribution group to which the first interface belongs, except the first interface. All interfaces.
10、 根据权利要求 9所述的路由器, 其特征在于, 所述路由器为中心 路由器, 所述本地数据库中存储所述第一接口所属的区域的拓朴信息。10. The router according to claim 9, wherein the router is centered a router, where the local database stores topology information of an area to which the first interface belongs.
11、 根据权利要求 10所述的路由器, 其特征在于, 所述处理模块还用 于: 对所述第一接口所属区域内的所有路由器的接口配置命令, 将所述第 一接口所属区域内的所有路由器的接口划分成至少两个分发组。 The router according to claim 10, wherein the processing module is further configured to: configure an interface configuration command for all routers in the area to which the first interface belongs, and The interfaces of all routers are divided into at least two distribution groups.
12、 根据权利要求 10或 11所述的路由器, 其特征在于, 所述第一接 口还用于: 向所述第一接口所属区域内的所有路由器的接口发送默认路由 或者聚合路由, 所述默认路由或所述聚合路由用于指示将目的地址在路由 器的本地数据库中没有匹配路由的数据报文发送至所述第一接口。  The router according to claim 10 or 11, wherein the first interface is further configured to: send a default route or an aggregated route to an interface of all routers in the area to which the first interface belongs, the default The route or the aggregated route is used to indicate that a data packet with a destination address that does not have a matching route in the local database of the router is sent to the first interface.
13、 根据权利要求 12所述的路由器, 其特征在于, 所述第一接口, 还 所述处理模块还用于: 查找所述本地数据库中存储的所述第一接口所 属区域的拓朴信息, 获取与所述数据报文的目的地址相匹配的路由信息; 所述第一接口, 还用于根据与所述数据报文的目的地址相匹配的路由 信息, 将所述数据报文发送至所述目的地址。  The router according to claim 12, wherein the processing module is further configured to: search for topology information of an area to which the first interface belongs stored in the local database, Obtaining routing information that matches the destination address of the data packet; the first interface is further configured to send the data packet to the location according to the routing information that matches the destination address of the data packet Describe the destination address.
14、 一种路由器, 其特征在于, 包括: 第一接口、 本地数据库和处理模 块;  A router, comprising: a first interface, a local database, and a processing module;
所述本地数据库, 用于存储所述第一接口所属的分发组的拓朴信息; 所述第一接口, 用于产生链路状态广播 LSA消息;  The local database is configured to store topology information of the distribution group to which the first interface belongs; the first interface is configured to generate a link state broadcast LSA message;
所述处理模块, 用于查询所述第一接口所属的分发组, 并在所述本地 数据库中查找所述第一接口所属的分发组的拓朴信息, 所述第一接口所属 的区域内设有至少两个分发组, 所述至少两个分发组中的每个分发组包括 至少两个接口, 所述至少两个接口属于不同路由器;  The processing module is configured to query a distribution group to which the first interface belongs, and search for the topology information of the distribution group to which the first interface belongs in the local database, where the first interface belongs There are at least two distribution groups, each of the at least two distribution groups includes at least two interfaces, and the at least two interfaces belong to different routers;
所述第一接口, 还用于根据所述第一接口所属的分发组的拓朴信息, 将所述 LSA消息转发给所述第一接口所属的分发组内除所述第一接口之外 的所有接口。  The first interface is further configured to: forward, according to the topology information of the distribution group to which the first interface belongs, the LSA message to the distribution group to which the first interface belongs, except the first interface. All interfaces.
15、 根据权利要求 14所述的路由器, 其特征在于, 所述第一接口, 还 用于接收中心路由器发送的默认路由或者聚合路由, 所述默认路由或所述 聚合路由用于指示将目的地址在所述本地数据库中没有匹配路由的数据报 文发送给所述中心路由器的接口。  The router according to claim 14, wherein the first interface is further configured to receive a default route or an aggregated route sent by the central router, where the default route or the aggregated route is used to indicate a destination address. A data packet with no matching route is sent to the interface of the central router in the local database.
16、 根据权利要求 15所述的路由器, 其特征在于, 所述第一接口, 还 用于接收数据报文; 所述处理模块, 用于在本地数据库中查询所述第一接口所属的分发组 的拓朴信息, 判断是否存在与所述数据报文指向的目的地址相匹配的路由 信息; The router according to claim 15, wherein the first interface is further configured to receive a data packet; The processing module is configured to query, in the local database, the topology information of the distribution group to which the first interface belongs, and determine whether there is routing information that matches the destination address pointed to by the data packet;
所述第一接口, 还用于若所述处理模块判断出不存在与所述数据报文 指向的目的地址相匹配的路由信息, 则根据所述默认路由或所述聚合路由 将所述数据报文发送至所述中心路由器的接口。  The first interface is further configured to: if the processing module determines that there is no routing information that matches a destination address that the data packet points to, the data packet is sent according to the default route or the aggregated route. The text is sent to the interface of the central router.
PCT/CN2013/074716 2012-04-28 2013-04-25 Route method and router WO2013159717A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210132785.9 2012-04-28
CN201210132785.9A CN102685005B (en) 2012-04-28 2012-04-28 Method for routing and router

Publications (1)

Publication Number Publication Date
WO2013159717A1 true WO2013159717A1 (en) 2013-10-31

Family

ID=46816390

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/074716 WO2013159717A1 (en) 2012-04-28 2013-04-25 Route method and router

Country Status (2)

Country Link
CN (1) CN102685005B (en)
WO (1) WO2013159717A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108206792A (en) * 2016-12-16 2018-06-26 北京神州泰岳软件股份有限公司 The topology discovery method and device of interchanger

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685005B (en) * 2012-04-28 2016-03-30 华为技术有限公司 Method for routing and router

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6928483B1 (en) * 1999-12-10 2005-08-09 Nortel Networks Limited Fast path forwarding of link state advertisements
CN101316229A (en) * 2007-06-01 2008-12-03 华为技术有限公司 Method and router for synchronizing link state advertisement
CN101599893A (en) * 2008-06-02 2009-12-09 华为技术有限公司 A kind of minute territory network and obtain the method for branch territory network of network topological diagram
CN102685005A (en) * 2012-04-28 2012-09-19 华为技术有限公司 Routing method and router

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7929524B2 (en) * 2006-09-29 2011-04-19 Cisco Technology, Inc. Apparatus and method to hide transit only multi-access networks in OSPF
US8018873B1 (en) * 2007-11-08 2011-09-13 Juniper Networks, Inc. Enhanced link state protocol for identifying broadcast networks
CN101272393B (en) * 2008-05-14 2010-11-03 杭州华三通信技术有限公司 Routing computing method and network node based on link condition routing protocol
CN101588303B (en) * 2009-06-22 2011-11-09 福建星网锐捷网络有限公司 Link status notice information interaction method and OSPF device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6928483B1 (en) * 1999-12-10 2005-08-09 Nortel Networks Limited Fast path forwarding of link state advertisements
CN101316229A (en) * 2007-06-01 2008-12-03 华为技术有限公司 Method and router for synchronizing link state advertisement
CN101599893A (en) * 2008-06-02 2009-12-09 华为技术有限公司 A kind of minute territory network and obtain the method for branch territory network of network topological diagram
CN102685005A (en) * 2012-04-28 2012-09-19 华为技术有限公司 Routing method and router

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108206792A (en) * 2016-12-16 2018-06-26 北京神州泰岳软件股份有限公司 The topology discovery method and device of interchanger

Also Published As

Publication number Publication date
CN102685005B (en) 2016-03-30
CN102685005A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN111510379B (en) EVPN message processing method, device and system
JP6369698B2 (en) Traffic switching method, device, and system
EP3200402B1 (en) Segment routing information obtainment method and segment routing network establishment method
CN112448900B (en) Data transmission method and device
WO2016015497A1 (en) Method, device and system for forwarding packet
JP5488979B2 (en) Computer system, controller, switch, and communication method
JP6544401B2 (en) PACKET TRANSFER DEVICE, CONTROL DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM
WO2015043327A1 (en) Routing method, device and system
WO2012071906A1 (en) Method and apparatus for realizing multicasting flow load sharing based on equal-cost multi-path route
JP5656137B2 (en) Method and system for updating border gateway protocol route
WO2011120459A2 (en) Message forwarding method, equipment and network device
EP2963867B1 (en) Method, system, and device for establishing pseudo wire
CN105721321B (en) A kind of the outgoing interface update method and device of equal cost multipath
WO2017096564A1 (en) Content-based centralized routing architecture mccn
WO2017107814A1 (en) Method, apparatus and system for propagating qos policies
WO2015024408A1 (en) Tunnel switching method, device and switch
WO2017054770A1 (en) Cluster communication
CN106656793B (en) Data interaction method for SDN network and IP network
CN107181691B (en) Method, equipment and system for realizing message routing in network
WO2017084448A1 (en) Network system and network operating method
US8396988B2 (en) Method and system for survival of data plane through a total control plane failure
CN103326915A (en) Method, device and system for achieving three-layer VPN
CN105745882A (en) Realization method for flat networks routing based on network
WO2014183657A1 (en) Method and device for determining next hop and distributing routing information
WO2013010435A1 (en) Routing table management method and system

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13781984

Country of ref document: EP

Kind code of ref document: A1