WO2021254079A1 - Method for issuing route in campus network, and network device - Google Patents

Method for issuing route in campus network, and network device Download PDF

Info

Publication number
WO2021254079A1
WO2021254079A1 PCT/CN2021/094673 CN2021094673W WO2021254079A1 WO 2021254079 A1 WO2021254079 A1 WO 2021254079A1 CN 2021094673 W CN2021094673 W CN 2021094673W WO 2021254079 A1 WO2021254079 A1 WO 2021254079A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
network
route
neighbor
level
Prior art date
Application number
PCT/CN2021/094673
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 WO2021254079A1 publication Critical patent/WO2021254079A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/06Deflection routing, e.g. hot-potato routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • This application relates to the field of communication technology, and in particular, to a method and network equipment for issuing routes in a campus network.
  • the network equipment in the campus network is configured with a link state protocol so that the network equipment in the park can learn the routes issued by other network devices in the campus network based on the link state protocol, determine the route forwarding table, and guide the forwarding of packets.
  • the network topology is constantly changing, and the routing information that network devices have to learn continues to increase. Because the performance of different network devices in the campus network is not the same, some network devices have low performance. Learn all the routing information advertised by the network devices in the campus network. Therefore, the forwarding of packets in the campus network is affected.
  • the present application provides a method and network device for issuing routes in a campus network, which reduces the number of routes issued by network devices in the campus network without affecting message forwarding.
  • this application provides a route release method in a campus network.
  • a network device advertises an aggregated route to neighbor devices connected to the network device at a higher level; and to neighbors at a lower level connected to the network device.
  • the device advertises a default route; among them, the level indicates the position of each device in the campus network in the network topology; the aggregation route is the aggregation of the detailed routes received by the network device from the next-level neighbor devices connected to the network device; among them,
  • the default route instructs the next-level neighboring device to forward the packet to the specified address corresponding to the default route when it fails to obtain the route corresponding to the destination address.
  • the network device advertises the aggregation route to the neighbor device of the upper level connected to it, and sends the default route to the neighbor device of the next level connected to it.
  • This method avoids the need for network devices in the campus network to learn from the campus network.
  • network devices In the case of detailed routing issued by all network devices at all levels, network devices only need to learn the routing information issued by network devices at adjacent levels to forward packets in the entire network.
  • This method reduces the routing of network devices on the one hand.
  • the number of releases on the other hand, also reduces the number of routing learning for network devices in the campus network. In this way, network devices do not need to obtain detailed routing information of each device, which further saves the storage space of network devices and helps improve network device performance. Processing efficiency.
  • the network device advertises the detailed route and the aggregation route of the network device to neighbor devices of the same level connected to the network device.
  • the network device can publish the detailed route of the network device and the aggregated aggregation route of the detailed route of the next-level neighbor device to the neighbor devices of the same level, so that the neighbor devices of the same level can forward packets, and Neighbor devices of the same level can forward packets to neighbor devices of the next level.
  • the network device obtains the message sent by the neighboring device; among them, the message is an open shortest path first (OSPF) protocol message or an intermediate system to an intermediate system (intermedia system- Intermedia system (IS-IS) protocol message; the message carries a field used to indicate the level of the neighboring device; and according to the field used to indicate the device level of the neighboring device in the message, the level of the neighboring device is obtained.
  • OSPF open shortest path first
  • IS-IS intermediate system- Intermedia system
  • the network device can obtain the tier to which the neighbor device belongs based on the message information sent by the neighbor device, so that the network device can send corresponding routing information to the neighbor device based on the neighbor device's tier information, so as to reduce the number of routes advertised by the network device.
  • the network device stores the default route published by the neighboring device of the upper level connected to the network device in the first link state database (LSDB); it will be connected to the network device
  • the detailed route advertised by the neighboring device of the next level is stored in the second LSDB; the detailed route advertised by the neighboring device of the same level connected to the network device is stored in the first LSDB.
  • the network device By storing the routing information advertised by the neighboring device received by the network device in the LSDB, it is convenient for the network device to determine the packet forwarding path according to the routing information.
  • the present application provides a network device, including: a processing unit; wherein the processing unit is used to publish an aggregation route to neighbor devices connected to the network device at a higher level; and to the next network device connected to the network device.
  • Hierarchical neighbor devices advertise default routes; among them, the hierarchy indicates the position of each device in the campus network in the network topology; aggregation routing is the aggregation of detailed routes received by the network device from the next-level neighbor devices connected to the network device ; Among them, the next-level neighbor device forwards the message to the designated address corresponding to the default route when it fails to obtain the route corresponding to the destination address.
  • the present application provides a communication device, including: a processor and a memory;
  • the memory stores a computer program; the processor is configured to execute the computer program stored in the memory, so that the method described in any one of the above-mentioned first aspects is executed.
  • the present application provides a communication device, including: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute The solution described in any one of the first aspect above.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer executes any of the above-mentioned aspects of the first aspect. plan.
  • this application provides a computer program product, which when a computer reads and executes the computer program product, causes the computer to execute any of the solutions described in the first aspect above.
  • Figure 1 shows a schematic diagram of the structure of a campus network
  • FIG. 2 shows a schematic flowchart of a route publishing method in a campus network provided by an embodiment of the present application
  • FIG. 3 shows a schematic diagram of route advertisement in a campus network provided by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of route advertisement in a campus network provided by an embodiment of the present application
  • FIG. 5 shows a schematic diagram of route advertisement in a campus network provided by an embodiment of the present application
  • Figure 6 shows a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 7 shows a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • Fig. 8 shows a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the campus network mainly includes the terminal layer, access layer, convergence layer, and core layer, as shown in Figure 1.
  • the terminal layer includes terminal devices connected to the campus network, such as smart terminals, mobile phones, and personal computers (PCs). ), printers, etc.
  • the access layer provides the campus network access function for terminal devices and is the boundary of the campus network.
  • the access layer includes access devices, which can communicate with terminal devices.
  • the access device is connected with the network device of the convergence layer through an interface.
  • the convergence layer connects the access layer and the core layer, and the convergence layer includes convergence equipment.
  • the core layer is the backbone area of the campus network, which can be connected to the aggregation layer and other components of the campus network (if any).
  • the other component of the campus network is, for example, the data center.
  • the core layer can be the exit of the campus network, and the core layer includes core equipment.
  • the network equipment at the core layer establishes a connection with the network outside the park (Internet (Internet) or wide area network (WAN)) through the network equipment in the exit zone, so as to realize the interaction of data information.
  • the network device of the layer can be a switch or a router, which is not specifically limited here.
  • network devices in a campus network generally need to learn routing information issued by all network devices in the campus network, which occupies a large amount of storage space of the network devices.
  • network equipment In order to prevent network equipment from learning the routes of the network equipment of the entire network, divide the network equipment into multiple areas. For example, when the network equipment configured with the OSPF protocol is divided into areas, the interfaces of the equipment can be added to the backbone area or non-backbone area. , Area 0 is the backbone area, Area 2 and Area 3 are non-backbone areas.
  • Area 0 is the backbone area
  • the LSDB of the network equipment in Area 0 carries the routes advertised by all network equipment in the campus network
  • Area 2 and Area 3 are In non-backbone areas, the LSDB of the network equipment only carries the routes advertised by the network equipment in the area directly connected to the area. Therefore, direct communication between area 2 and area 3 cannot be carried out, and the forwarding of network equipment in area 0 is required. Communication.
  • network devices in different areas only need to learn the routes advertised by the network devices in the area directly connected to the area to which they belong, instead of learning the routes of the entire network, which reduces the number of route learning for network devices.
  • the regional configuration of network equipment cannot reflect the actual network topology level of the network equipment, and cannot meet the actual topology requirements of the network equipment.
  • this application provides a route announcement method in a campus network, which reduces the number of routes issued by network devices in the campus network without affecting message forwarding, and can also reflect the actual topology of the network devices.
  • the network device needs to support the functions of routing forwarding and advertising routes.
  • the network device may be a router or a layer 3 switch, which is not specifically limited here. Any network device that meets the requirements is applicable to the network device. Apply.
  • the network equipment may include at least one of a core switch, an aggregation switch, and an access switch.
  • the neighbor device is also the device directly connected to the network device.
  • the network device is the core switch
  • the device directly connected to the core switch is the aggregation switch
  • the aggregation switch is the neighbor device of the core switch.
  • the aggregation switch is also a neighboring device of the core switch.
  • the level is used to indicate the location of the network equipment in the campus network.
  • the level can be identified by number/letter coding, such as: L1 represents the core layer, L2 represents the convergence layer, L3 represents the access layer, L4 represents the next layer of the access layer, where the network device of the L1 layer is the neighbor device of the upper level of the network device of the L2 layer; the network device of the L3 layer is the neighbor device of the next level of the network device of the L2 layer; The network device of the L2 layer is the neighbor device of the upper level of the network device of the L3 layer, and the network device of the L4 layer is the neighbor device of the lower level of the network device of the L3 layer.
  • Detailed routes are also routes that have not been summarized.
  • network device 1 advertises a detailed route with a destination address of 192.168.0.1, that is, other devices can find network device 1 through the address 192.168.0.1.
  • Aggregated routes are summarized routes.
  • the detailed routes with the destination address of 192.168.0.0-192.168.0.255 received by network device 1 and the detailed routes received by network device 1 belong to the subnet mask 255.255.255.0, so Network device 1 can aggregate the received detailed routes into one route, that is, 192.168.0.0/24, but in actual applications, it can also aggregate detailed routes into multiple routes based on the mask length information, for example, the destination address
  • the detailed routes for 192.168.0.0-192.168.0.31 are aggregated into one route 192.168.0.0/27; the detailed routes for the destination address 192.168.0.32-192.168.0.63 are aggregated into one route 192.168.0.32/27; the destination address is aggregated
  • the detailed routes of 192.168.0.64-192.168.0.95 are aggregated into a route 192.168.0.64/27; the detailed routes of the destination address of 192.168.0.96-192.168.0.127 are aggregated into a route of
  • detailed routes corresponding to destination addresses with different subnet masks cannot be aggregated.
  • detailed route 1 with a destination address of 192.168.0.1 has a subnet mask of 255.255.255.224 and a detailed route with destination address of 192.168.0.1.
  • the subnet mask of 2 is 255.255.255.0. Because the detailed route 1 and the detailed route 2 do not belong to the same subnet mask, they cannot be aggregated. If the network device 1 receives the routes advertised by the next-level neighbor devices including detailed routes and aggregation routes, or both are aggregation routes, the network device 1 may further aggregate the routes including the aggregation route.
  • the default route that is, when the network device cannot find the route corresponding to the destination address when forwarding the message, the message is sent to a specified address, such as: network device 1 forwards the message to network device 2, but network device 1 If the route of the network device 2 is not obtained, the network device 1 can forward the message to the specified address (that is, the address of the default route).
  • the neighbor device of the upper level of network device 1 is network device 2
  • the neighbor device of the next level is network device 3
  • network device 1 will Network device 2 sends the aggregate information of the detailed routing of the next-level neighbor devices, that is, the aggregate route, and advertises default routing information to network device 3, that is, if network device 3 forwards a message to network device 2, it cannot obtain network device 2
  • the message can be forwarded to the designated address, and the message can be forwarded to the network device 2 through the designated address.
  • At least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
  • the singular expressions "a”, “an”, “said”, “above”, “the” and “this” are intended to also include expressions such as “one or more” unless the context clearly indicates The ground has the opposite direction.
  • the ordinal numbers such as “first” and “second” mentioned in the embodiments of this application are used to distinguish multiple objects, and are not used to limit the order, timing, priority, or order of multiple objects. Importance.
  • FIG. 2 for a schematic flow chart of a method for issuing routes in a campus network according to an embodiment of this application.
  • the method is executed on the side of the network device.
  • the device advertises the aggregation route; among them, the level indicates the position of each device in the campus network in the network topology; the aggregation route is the aggregation of the detailed routes received by the network device from the next-level neighbor devices connected to the network device.
  • Step 202 The network device advertises a default route to the neighboring device of the next level connected to the network device, where the default route instructs the neighboring device of the next level to forward the message to when it fails to obtain the route corresponding to the destination address The specified address corresponding to the default route.
  • step 202 and step 203 in FIG. 2 can be performed in no particular order, and can be performed at the same time, or in order, step 203 is performed first and then step 202 is performed, or step 202 is performed first and then step 203 is performed. In the order of execution This application does not make specific limitations.
  • network devices will also publish their detailed routes to neighboring devices at the next higher level and neighboring devices at the next level, so that the network equipment can communicate with neighboring devices at the next higher level. Direct information exchange.
  • the location of the network equipment is planned in advance.
  • the network equipment of the L1 layer is located in the core layer including the core equipment, and the network equipment of this layer can be connected with the aggregation equipment and the core equipment.
  • the network of the L2 layer Devices located at the convergence layer include convergence devices, and network devices at this layer can be connected to convergence devices, core devices, and access devices.
  • the network device 1 is located at the L2 layer, the neighbor devices of the upper layer include network device 2 and network device 3, and the neighbor devices of the next layer include network device 4 and network Equipment 5.
  • Network device 1 can publish to network device 2 and network device 3 its detailed route route 1, and the aggregate route route 6 of network device 4 and network device 5's detailed route.
  • the destination address corresponding to route 1 is address 1.
  • This route The destination address corresponding to 6 is address 6, so that network device 2 and network device 3 can forward packets to network device 1 through address 1.
  • the message is forwarded to the network device 4 or the network device 5 through the address 6.
  • Network device 1 can also advertise route 1 and default route route 0 to network device 4 and network device 5, so that network device 4 and network device 5 can forward packets to network device 1 through address 1, and send the message through address 0 Forward to network device 2 or network device 3, where the designated address corresponding to the default route route 0 is address 0. Since campus networks usually have a tree structure, network devices either forward packets to the leaf direction or forward packets to the root direction. Therefore, the default route can be used to instruct the network device to forward all packets that have not found a route to the root direction.
  • the network device advertises the aggregation route to the neighbor devices of the upper level connected to it, and advertises the default route to the neighbor devices of the next level connected to it.
  • This method prevents the network devices in the campus network from learning the campus network. In the case of detailed routing issued by all network devices at all levels in the network, network devices only need to learn the routing information issued by adjacent network devices to forward messages across the entire network. This method reduces The number of route announcements for network devices on the other hand also reduces the number of route learning for network devices in the campus network. In this way, network devices do not need to obtain detailed routes for each device, which further saves the storage space of network devices and helps Improve the processing efficiency of network equipment.
  • the network device advertises detailed routes and aggregation routes of the network device to neighbor devices of the same level connected to the network device.
  • Network equipment advertises detailed routes to neighboring devices at the same level, so that neighboring devices at the same level can forward packets, and advertises aggregation routes to neighboring devices at the same level so that neighboring devices at the same level can be connected to neighboring devices at the next level Forward the message.
  • Fig. 4 is a schematic diagram based on Fig. 3.
  • the neighboring devices of network device 1 also include neighboring devices of the same level, network device 6 and network device 7, and network device 1 can report to network device 6 and The network device 7 advertises route 1 and route 6 so that the network device 6 or the network device 7 can forward the message to the network device 1 through the address 1, and can forward the message to the network device 4 or the network device 5 through the address 6.
  • the neighbor devices of the network device can be determined in the following ways:
  • the network device obtains the message sent by the neighboring device; among them, the message is an OSPF protocol message or an IS-IS protocol message; the message carries a field used to indicate the level of the neighboring device; according to the message used to indicate The field of the device level of the neighboring device is used to obtain the level of the neighboring device. For example, if the level of the network device is L3, it can receive the OSPF protocol message 1 sent by the neighboring device. The network device can learn the neighbor device's level by analyzing the field used to indicate the level of the neighboring device in the message 1. The level is L4, so it can be known that the neighbor device of the network device is the network device of the next level.
  • the LSDB of the network equipment can store the routing information published by neighboring equipment, and store the default route advertised by the neighboring equipment connected to the network equipment in the first link database.
  • LSDB store the detailed routes advertised by the next-level neighbor devices connected to the network device in the second link database
  • LSDB store the detailed routes advertised by the neighbor devices of the same level connected to the network device in the first link
  • the database LSDB stores the detailed routes advertised by the neighbor devices of the same level connected to the network device in the first link.
  • the network device 1 in the figure is at the L3 layer
  • the neighbor devices of the upper layer include network device 2 and network device 3
  • the neighbor devices of the next layer include network device 4 and network device 5
  • neighboring devices at the same level include network device 6 and network device 7.
  • Network device 2 publishes detailed routing route 2 of network device 2 to network device 1, so that network device 1 forwards the message to network device 2 according to address 2, where the destination address corresponding to route 2 is address 2
  • network device 3 sends to the network device 1 Publish the detailed routing route 3 of network device 3 so that network device 1 forwards the message to network device 2 according to address 3.
  • the destination address corresponding to route 3 is address 3; in addition, network device 2 and network device 3 are both forwarded to the network Device 1 advertises the default route route 0.
  • the designated address corresponding to this route 0 is address 0.
  • This address 0 is used to instruct network device 1 to forward packets to network devices that cannot be routed clearly through address 0; network devices 4-7 Then, all the detailed routes are released to the network device 1 as route 4, route 5, route 6, and route 7.
  • the network device 1 may store Route 0, Route 2, Route 3, Route 6, and Route 7 in the first LSDB, and store Route 4 and Route 5 in the second LSDB.
  • the first LSDB of network device 1 stores the default route route 0 advertised by the neighboring device of the upper level, detailed routes route 2 and route 3 advertised by the neighboring device of the upper level, and neighbors of the same level.
  • the second LSDB stores detailed routing routes 4 and 5 published by neighboring devices of the next level. It is also possible to store route 0 and route 2 to route 7 in the first LSDB, and store route 4 and route 5 in the second LSDB, as shown in Table 2, in this way to avoid flooding of devices at the next level. Affect the forwarding of packets.
  • the network device By storing different routing information in the first LSDB and the second LSDB, the network device directly searches for the routing information in the corresponding LSDB to forward the packet when forwarding the packet, thereby improving the efficiency of packet forwarding.
  • an embodiment of the present application also provides a network device, as shown in FIG. 6, including: a processing unit 61.
  • the processing unit 61 is used to publish the aggregation route to the neighbor devices of the upper level connected to the network device; and is used to publish the default route to the neighbor devices of the next level connected to the network device; where the level indicates the campus network The position of each device in the network topology; the aggregation route is the aggregation of the detailed routes received by the network device from the neighboring device of the next level connected to the network device.
  • the default route indicates that the neighboring device of the next level is unsuccessful.
  • the packet is forwarded to the designated address corresponding to the default route.
  • the network device advertises the aggregation route to the neighbor device of the upper level connected to it, and sends the default route to the neighbor device of the next level connected to it.
  • This method prevents the network device in the campus network from learning about the campus.
  • network devices In the case of detailed routing issued by all network devices at all levels in the network, network devices only need to learn the routing information issued by network devices at adjacent levels to forward messages across the entire network.
  • This method reduces It also reduces the number of route announcements of network equipment, and on the other hand, it reduces the number of route learning of network equipment in the campus network. In this way, the network equipment does not need to obtain detailed routing information of each equipment, which further saves the storage space of network equipment. Helps improve the processing efficiency of network equipment.
  • the processor is also used to publish detailed routes and aggregation routes of the network device to neighboring devices of the same level connected to the network device.
  • the network device can publish the detailed route of the network device and the aggregated aggregation route of the detailed route of the next-level neighbor device to the neighbor devices of the same level, so that the neighbor devices of the same level can forward packets, and Neighbor devices of the same level can forward packets to neighbor devices of the next level.
  • the device further includes: a communication unit; wherein the communication unit is used to obtain a message sent by a neighboring device; wherein the message is an OSPF protocol message or a route from the intermediate system to the intermediate system ISIS Protocol message; the message carries a field used to indicate the level of the neighboring device; according to the field used to indicate the device level of the neighboring device in the message, the level of the neighboring device is obtained.
  • a communication unit wherein the communication unit is used to obtain a message sent by a neighboring device; wherein the message is an OSPF protocol message or a route from the intermediate system to the intermediate system ISIS Protocol message; the message carries a field used to indicate the level of the neighboring device; according to the field used to indicate the device level of the neighboring device in the message, the level of the neighboring device is obtained.
  • the network device can obtain the tier to which the neighbor device belongs based on the message information sent by the neighbor device, so that the network device can send corresponding routing information to the neighbor device based on the neighbor device's tier information, so as to reduce the number of routes advertised by the network device.
  • the device further includes: a storage unit; wherein the storage unit is configured to store the default route issued by the neighboring device connected to the network device in the first LSDB; The detailed route advertised by the neighboring device of the next level connected to the device is stored in the second LSDB; the detailed route advertised by the neighboring device of the same level connected to the network device is stored in the first LSDB.
  • the network device By storing the routing information advertised by the neighboring device received by the network device in the LSDB, it is convenient for the network device to determine the packet forwarding path according to the routing information.
  • the communication device 700 may be a chip or a chip system.
  • the chip system in the embodiments of the present application may be composed of chips, or may include chips and other discrete devices.
  • the communication device 700 may include at least one processor 710, and the device 700 may also include at least one memory 720 for storing computer programs, program instructions, and/or data.
  • the memory 720 and the processor 710 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 710 may operate in cooperation with the memory 720.
  • the processor 710 may execute a computer program stored in the memory 720.
  • at least one of the at least one memory 720 may be included in the processor 710.
  • the communication device 700 may further include a transceiver 730, and the communication device 700 may exchange information with other devices through the transceiver 730.
  • the transceiver 730 may be a circuit, a bus, a transceiver, or any other device that can be used for information exchange.
  • the communication device 700 may be applied to the aforementioned network equipment, and the specific communication device 700 may be the aforementioned network equipment, or a device capable of supporting the aforementioned network equipment to implement any of the foregoing embodiments.
  • the memory 720 stores necessary computer programs, program instructions, and/or data to implement the functions of the network device in any of the foregoing embodiments.
  • the processor 710 can execute the computer program stored in the memory 720 to complete the method in any of the foregoing embodiments.
  • the specific connection medium between the foregoing transceiver 730, the processor 710, and the memory 720 is not limited in the embodiment of the present application.
  • the memory 720, the processor 710, and the transceiver 730 are connected by a bus in FIG. 7.
  • the bus is represented by a thick line in FIG. It is not limited.
  • the bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used to represent in FIG. 7, but it does not mean that there is only one bus or one type of bus.
  • the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or Perform the methods, steps, and logical block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), for example Random-access memory (random-access memory, RAM).
  • the memory may also be any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing computer programs, program instructions and/or data.
  • an embodiment of the present application also provides another communication device 800, including: an interface circuit 810 and a processor 820;
  • the interface circuit 810 is configured to receive code instructions and transmit them to the processor 820;
  • the processor 820 is configured to run the code instructions to execute the method in any of the foregoing embodiments.
  • the embodiments of the present application also provide a readable storage medium that stores instructions, and when the instructions are executed, the method executed by the security detection device in any of the above embodiments is implemented .
  • the readable storage medium may include: U disk, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
  • this application can be provided as a method, a system, or a computer program product. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce computer-implemented processing, so as to execute on the computer or other programmable device.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Landscapes

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

Abstract

Provided are a method for issuing a route in a campus network, and a network device, which relate to the technical field of communications. The method comprises: a network device issuing aggregation routes to neighbor devices at a previous level which are connected to the network device, and issuing default routes to neighbor devices at a next level which are connected to the network device, wherein the levels indicate the positions, in a network topology, of devices in a campus network; the aggregation route is the aggregation of detailed routes received by the network device from the neighbor devices at the next level which are connected to the network device, and the default routes instruct the neighbor devices at the next level to forward messages to designated addresses corresponding to the default routes when routes corresponding to destination addresses are not successfully acquired. On the basis of a level at which a network device is located in a campus network, the network device issues aggregation routes to neighbor devices at a previous level of the network device, and issues default routes to neighbor devices at a next level of the network device, such that the network device issues different routes to neighbor devices at different levels, thereby reducing the number of issued routes of the network device in the campus network.

Description

园区网中路由发布方法及网络设备Route publishing method and network equipment in campus network
相关申请的交叉引用Cross-references to related applications
本申请要求在2020年06月19日提交中国专利局、申请号为202010566336.X、申请名称为“园区网中路由发布方法及网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 202010566336.X, and the application name is "The method and network equipment for routing and publishing in the campus network" on June 19, 2020, the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种园区网中路由发布方法及网络设备。This application relates to the field of communication technology, and in particular, to a method and network equipment for issuing routes in a campus network.
背景技术Background technique
通常园区网中的网络设备配置有链路状态协议以使园区中的网络设备可基于链路状态协议来学习园区网中其他网络设备发布的路由,确定路由转发表,指导报文的转发。然而,随着园区网络规模的扩大,网络拓扑也不断变化,网络设备要学习的路由信息不断增加,由于园区网中不同的网络设备的性能不尽相同,某些网络设备的性能较低,不能将园区网中所述网络设备发布的路由信息都学习到。故而,影响园区网中报文的转发。Generally, the network equipment in the campus network is configured with a link state protocol so that the network equipment in the park can learn the routes issued by other network devices in the campus network based on the link state protocol, determine the route forwarding table, and guide the forwarding of packets. However, as the scale of the campus network expands, the network topology is constantly changing, and the routing information that network devices have to learn continues to increase. Because the performance of different network devices in the campus network is not the same, some network devices have low performance. Learn all the routing information advertised by the network devices in the campus network. Therefore, the forwarding of packets in the campus network is affected.
发明内容Summary of the invention
基于此,本申请提供一种园区网中路由发布方法及网络设备,在不影响报文转发的情况下,减少园区网中网络设备的路由发布数量。Based on this, the present application provides a method and network device for issuing routes in a campus network, which reduces the number of routes issued by network devices in the campus network without affecting message forwarding.
第一方面,本申请提供一种园区网中路由发布方法,该方法中,网络设备向与网络设备连接的上一层级的邻居设备发布汇聚路由;并向与网络设备连接的下一层级的邻居设备发布缺省路由;其中,层级指示园区网中各设备在网络拓扑中的位置;汇聚路由是对网络设备从与网络设备连接的下一层级的邻居设备接收到的明细路由的聚合;其中,缺省路由指示下一层级的邻居设备在未成功获取目的地址对应的路由时,将报文转发至缺省路由对应的指定地址。In the first aspect, this application provides a route release method in a campus network. In this method, a network device advertises an aggregated route to neighbor devices connected to the network device at a higher level; and to neighbors at a lower level connected to the network device. The device advertises a default route; among them, the level indicates the position of each device in the campus network in the network topology; the aggregation route is the aggregation of the detailed routes received by the network device from the next-level neighbor devices connected to the network device; among them, The default route instructs the next-level neighboring device to forward the packet to the specified address corresponding to the default route when it fails to obtain the route corresponding to the destination address.
本申请中,网络设备向与其连接的上一层级的邻居设备发布汇聚路由,向与其连接的下一层级的邻居设备发送缺省路由,该方式避免了在园区网中的网络设备学习园区网中所有层级网络设备发布的明细路由的情况,网络设备仅需学习相邻层级的网络设备发布的路由信息,即可在全网中进行报文的转发,通过该方式一方面降低了网络设备的路由发布数量,另一方面也减少了园区网中网络设备的路由学习数量,由于该方式中网络设备无需获取各个设备的明细路由信息,进一步节省了网络设备的存储空间,有助于提高网络设备的处理效率。In this application, the network device advertises the aggregation route to the neighbor device of the upper level connected to it, and sends the default route to the neighbor device of the next level connected to it. This method avoids the need for network devices in the campus network to learn from the campus network. In the case of detailed routing issued by all network devices at all levels, network devices only need to learn the routing information issued by network devices at adjacent levels to forward packets in the entire network. This method reduces the routing of network devices on the one hand. The number of releases, on the other hand, also reduces the number of routing learning for network devices in the campus network. In this way, network devices do not need to obtain detailed routing information of each device, which further saves the storage space of network devices and helps improve network device performance. Processing efficiency.
在一种可能的实现方式中,网络设备向与网络设备连接的同一层级的邻居设备发布网络设备的明细路由以及汇聚路由。In a possible implementation manner, the network device advertises the detailed route and the aggregation route of the network device to neighbor devices of the same level connected to the network device.
通过该方式网络设备可向同一层级的邻居设备发布网络设备的明细路由以及下一层级邻居设备的明细路由的聚合后的汇聚路由,以便同一层级的邻居设备之间可以进行报文的转发,以及同一层级的邻居设备可向下一层级的邻居设备转发报文。In this way, the network device can publish the detailed route of the network device and the aggregated aggregation route of the detailed route of the next-level neighbor device to the neighbor devices of the same level, so that the neighbor devices of the same level can forward packets, and Neighbor devices of the same level can forward packets to neighbor devices of the next level.
在一种可能的实现方式中,网络设备获取邻居设备发送的报文;其中,报文为开放最短路径优先(open shortest path first,OSPF)协议的报文或中间系统到中间系统(intermedia system-intermedia system,IS-IS)协议的报文;报文中携带有用于指示邻居设备的层级的字段;并根据报文中用于指示邻居设备的设备层级的字段,获取邻居设备的层级。In one possible implementation, the network device obtains the message sent by the neighboring device; among them, the message is an open shortest path first (OSPF) protocol message or an intermediate system to an intermediate system (intermedia system- Intermedia system (IS-IS) protocol message; the message carries a field used to indicate the level of the neighboring device; and according to the field used to indicate the device level of the neighboring device in the message, the level of the neighboring device is obtained.
通过网络设备可根据邻居设备发送的报文信息,获取邻居设备所属的层级,以便网络设备可根据邻居设备的层级信息,向邻居设备发送对应的路由信息,以便减少网络设备发布的路由数量。The network device can obtain the tier to which the neighbor device belongs based on the message information sent by the neighbor device, so that the network device can send corresponding routing information to the neighbor device based on the neighbor device's tier information, so as to reduce the number of routes advertised by the network device.
在一种可能的实现方式中,网络设备将与网络设备连接的上一层级的邻居设备发布的缺省路由存储在第一链路状态数据库(link state database,LSDB)中;将与网络设备连接的下一层级的邻居设备发布的明细路由存储在第二LSDB中;将与网络设备连接的同一层级的邻居设备发布的明细路由存储在第一LSDB中。In a possible implementation, the network device stores the default route published by the neighboring device of the upper level connected to the network device in the first link state database (LSDB); it will be connected to the network device The detailed route advertised by the neighboring device of the next level is stored in the second LSDB; the detailed route advertised by the neighboring device of the same level connected to the network device is stored in the first LSDB.
通过将网络设备接收到的邻居设备发布的路由信息存储在LSDB中,便于网络设备根据该路由信息确定报文的转发途径。By storing the routing information advertised by the neighboring device received by the network device in the LSDB, it is convenient for the network device to determine the packet forwarding path according to the routing information.
第二方面,本申请提供一种网络设备,包括:处理单元;其中,处理单元用于向与网络设备连接的上一层级的邻居设备发布汇聚路由;以及用于向与网络设备连接的下一层级的邻居设备发布缺省路由;其中,层级指示园区网中各设备在网络拓扑中的位置;汇聚路由是对网络设备从与网络设备连接的下一层级的邻居设备接收到的明细路由的聚合;其中,下一层级的邻居设备在未成功获取目的地址对应的路由时,将报文转发至缺省路由对应的指定地址。In a second aspect, the present application provides a network device, including: a processing unit; wherein the processing unit is used to publish an aggregation route to neighbor devices connected to the network device at a higher level; and to the next network device connected to the network device. Hierarchical neighbor devices advertise default routes; among them, the hierarchy indicates the position of each device in the campus network in the network topology; aggregation routing is the aggregation of detailed routes received by the network device from the next-level neighbor devices connected to the network device ; Among them, the next-level neighbor device forwards the message to the designated address corresponding to the default route when it fails to obtain the route corresponding to the destination address.
第三方面,本申请提供一种通信装置,包括:处理器和存储器;In a third aspect, the present application provides a communication device, including: a processor and a memory;
所述存储器,存储有计算机程序;所述处理器,用于执行所述存储器中存储的计算机程序,以使得上述第一方面任一所述的方法被执行。The memory stores a computer program; the processor is configured to execute the computer program stored in the memory, so that the method described in any one of the above-mentioned first aspects is executed.
第四方面,本申请提供一种通信装置,包括:处理器和接口电路;所述接口电路,用于接收代码指令并传输至所述处理器;所述处理器用于运行所述代码指令以执行上述第一方面任一所述的方案。In a fourth aspect, the present application provides a communication device, including: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute The solution described in any one of the first aspect above.
第五方面,本申请提供一种计算机可读存储介质,计算机存储介质中存储有计算机可读指令,当计算机读取并执行计算机可读指令时,使得计算机执行上述第一方面任一所述的方案。In a fifth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores computer-readable instructions. When the computer reads and executes the computer-readable instructions, the computer executes any of the above-mentioned aspects of the first aspect. plan.
第六方面,本申请提供一种计算机程序产品,当计算机读取并执行计算机程序产品时,使得计算机执行如执行上述第一方面任一所述的方案。In a sixth aspect, this application provides a computer program product, which when a computer reads and executes the computer program product, causes the computer to execute any of the solutions described in the first aspect above.
上述第二方面至第六方面可以达到的技术效果,请参照上述第一方面中相应可能设计方案可以达到的技术效果说明,本申请这里不再重复赘述。For the technical effects that can be achieved from the second aspect to the sixth aspect described above, please refer to the description of the technical effects that can be achieved by the corresponding possible design solutions in the first aspect described above, which will not be repeated here in this application.
附图说明Description of the drawings
图1示出了一种园区网的结构示意图;Figure 1 shows a schematic diagram of the structure of a campus network;
图2示出了本申请实施例提供的园区网中路由发布方法的流程示意图;FIG. 2 shows a schematic flowchart of a route publishing method in a campus network provided by an embodiment of the present application;
图3示出了本申请实施例提供的园区网中路由发布的示意图;FIG. 3 shows a schematic diagram of route advertisement in a campus network provided by an embodiment of the present application;
图4示出了本申请实施例提供的园区网中路由发布的示意图;FIG. 4 shows a schematic diagram of route advertisement in a campus network provided by an embodiment of the present application;
图5示出了本申请实施例提供的园区网中路由发布的示意图;FIG. 5 shows a schematic diagram of route advertisement in a campus network provided by an embodiment of the present application;
图6示出了本申请实施例提供的网络设备的结构示意图;Figure 6 shows a schematic structural diagram of a network device provided by an embodiment of the present application;
图7示出了本申请实施例提供的通信装置的结构示意图;FIG. 7 shows a schematic structural diagram of a communication device provided by an embodiment of the present application;
图8示出了本申请实施例提供的通信装置的结构示意图。Fig. 8 shows a schematic structural diagram of a communication device provided by an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行详尽描述。In order to make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
园区网主要包括终端层、接入层、汇聚层以及核心层,如图1所示,其中,终端层包括接入园区网的终端设备,如:智能终端、手机、个人计算机(personal computer,PC)、打印机等。接入层为终端设备提供园区网接入功能,是园区网的边界。接入层包括接入设备,接入设备可与终端设备通讯连接。接入设备与汇聚层的网络设备通过接口连接。汇聚层将接入层和核心层连接起来,汇聚层包括汇聚设备。核心层为园区网的骨干区域,可与汇聚层以及园区网的其他组成部分(如果有的话)连接。园区网的其他组成部分例如为数据中心。核心层可以为园区网的出口,核心层包括核心设备。The campus network mainly includes the terminal layer, access layer, convergence layer, and core layer, as shown in Figure 1. The terminal layer includes terminal devices connected to the campus network, such as smart terminals, mobile phones, and personal computers (PCs). ), printers, etc. The access layer provides the campus network access function for terminal devices and is the boundary of the campus network. The access layer includes access devices, which can communicate with terminal devices. The access device is connected with the network device of the convergence layer through an interface. The convergence layer connects the access layer and the core layer, and the convergence layer includes convergence equipment. The core layer is the backbone area of the campus network, which can be connected to the aggregation layer and other components of the campus network (if any). The other component of the campus network is, for example, the data center. The core layer can be the exit of the campus network, and the core layer includes core equipment.
此外,核心层的网络设备是通过出口区的网络设备与园区外的网络(Internet(互联网)或广域网(wide area network,WAN))建立连接,从而实现数据信息的交互,其中,园区网中各层的网络设备可以为交换机也可以为路由器,在此不做具体限定。In addition, the network equipment at the core layer establishes a connection with the network outside the park (Internet (Internet) or wide area network (WAN)) through the network equipment in the exit zone, so as to realize the interaction of data information. The network device of the layer can be a switch or a router, which is not specifically limited here.
如背景技术所述,为了使得报文转发,通常园区网中的网络设备需要学习园区网中所有网络设备发布的路由信息,故而占用了网络设备大量的存储空间。为了避免网络设备学习全网的网络设备的路由,将网络设备分成多个区域,如对配置有OSPF协议的网络设备分区域时,可将设备的接口添加到骨干区域或非骨干区域中,其中,区域0为骨干区域,区域2和区域3为非骨干区域,由于区域0为骨干区域,区域0的网络设备的LSDB中承载有园区网中所有网络设备发布的路由,区域2和区域3为非骨干区域,网络设备的LSDB中仅承载与该区域直接连接的区域的网络设备发布的路由,故而,区域2和区域3之间不能直接进行通信,需要借助区域0中网络设备的转发才能进行通信。As described in the background art, in order to forward messages, network devices in a campus network generally need to learn routing information issued by all network devices in the campus network, which occupies a large amount of storage space of the network devices. In order to prevent network equipment from learning the routes of the network equipment of the entire network, divide the network equipment into multiple areas. For example, when the network equipment configured with the OSPF protocol is divided into areas, the interfaces of the equipment can be added to the backbone area or non-backbone area. , Area 0 is the backbone area, Area 2 and Area 3 are non-backbone areas. Since Area 0 is the backbone area, the LSDB of the network equipment in Area 0 carries the routes advertised by all network equipment in the campus network, and Area 2 and Area 3 are In non-backbone areas, the LSDB of the network equipment only carries the routes advertised by the network equipment in the area directly connected to the area. Therefore, direct communication between area 2 and area 3 cannot be carried out, and the forwarding of network equipment in area 0 is required. Communication.
故而,可知不同区域的网络设备仅需学习与其所属区域直接连接的区域的网络设备所发布的路由即可,而无需学习全网的路由,该方式减少了网络设备的路由学习数量。但是,网络设备的接口可能有成百上千个,将设备的接口一一添加到对应的区域中,费时费力,还有可能出现失误。此外,网络设备分区域配置也不能体现网络设备实际的网络拓扑层级,不能满足网络设备的实际拓扑需求。Therefore, it can be known that network devices in different areas only need to learn the routes advertised by the network devices in the area directly connected to the area to which they belong, instead of learning the routes of the entire network, which reduces the number of route learning for network devices. However, there may be hundreds of interfaces of network equipment. Adding the interfaces of the equipment to the corresponding areas one by one is time-consuming and laborious, and mistakes may also occur. In addition, the regional configuration of network equipment cannot reflect the actual network topology level of the network equipment, and cannot meet the actual topology requirements of the network equipment.
基于此,本申请提供一种园区网中路由发布方法,在不影响报文转发的情况下,减少园区网中网络设备的路由发布数量,且还可体现网络设备的实际拓扑层级。Based on this, this application provides a route announcement method in a campus network, which reduces the number of routes issued by network devices in the campus network without affecting message forwarding, and can also reflect the actual topology of the network devices.
应理解,本申请实施例中,网络设备需支持路由转发以及发布路由的功能,该网络设备可以为路由器也可以为三层交换机,在此不作具体限定,凡是满足需求的网络设备均适用于本申请。在本申请中,网络设备可以包括:核心交换机、汇聚交换机以及接入交换机中的至少一种。It should be understood that, in the embodiments of the present application, the network device needs to support the functions of routing forwarding and advertising routes. The network device may be a router or a layer 3 switch, which is not specifically limited here. Any network device that meets the requirements is applicable to the network device. Apply. In this application, the network equipment may include at least one of a core switch, an aggregation switch, and an access switch.
邻居设备也即与网络设备直接相连的设备,如:网络设备为核心交换机,与核心交换机直接连接的设备为汇聚交换机,那么汇聚交换机则为核心交换机的邻居设备,若与核心交换机直接连接的还包括汇聚交换机,那么汇聚交换机也为核心交换机的邻居设备。The neighbor device is also the device directly connected to the network device. For example, the network device is the core switch, and the device directly connected to the core switch is the aggregation switch, then the aggregation switch is the neighbor device of the core switch. Including the aggregation switch, the aggregation switch is also a neighboring device of the core switch.
层级是用于指示园区网中网络设备在园区网中所处的位置,该层级可通过数字/字母编 码后进行标识,如:通过L1表示核心层、L2表示汇聚层、L3表示接入层、L4表示接入层的下一层,其中,L1层的网络设备为L2层的网络设备的上一层级的邻居设备;L3层的网络设备为L2层的网络设备的下一层级的邻居设备;L2层的网络设备为L3层的网络设备的上一层级的邻居设备,L4层的网络设备为L3层的网络设备的下一层级的邻居设备。The level is used to indicate the location of the network equipment in the campus network. The level can be identified by number/letter coding, such as: L1 represents the core layer, L2 represents the convergence layer, L3 represents the access layer, L4 represents the next layer of the access layer, where the network device of the L1 layer is the neighbor device of the upper level of the network device of the L2 layer; the network device of the L3 layer is the neighbor device of the next level of the network device of the L2 layer; The network device of the L2 layer is the neighbor device of the upper level of the network device of the L3 layer, and the network device of the L4 layer is the neighbor device of the lower level of the network device of the L3 layer.
明细路由也即未经过汇总的路由,如网络设备1发布目的地址为192.168.0.1的明细路由,也即其他设备可通过地址192.168.0.1找到网络设备1。Detailed routes are also routes that have not been summarized. For example, network device 1 advertises a detailed route with a destination address of 192.168.0.1, that is, other devices can find network device 1 through the address 192.168.0.1.
汇聚路由也即经过汇总的路由,如网络设备1接收到的目的地址为192.168.0.0-192.168.0.255的明细路由,且网络设备1接收到的明细路由均属于子网掩码255.255.255.0,故网络设备1可将接收到明细路由汇聚成1条路由,也即192.168.0.0/24,但是在实际应用时,也可根据掩码长度信息将明细路由汇聚成多条路由,如,将目的地址为192.168.0.0-192.168.0.31的明细路由汇聚成1条路由192.168.0.0/27;将目的地址为192.168.0.32-192.168.0.63的明细路由汇聚成1条路由192.168.0.32/27;将目的地址为192.168.0.64-192.168.0.95的明细路由汇聚成1条路由192.168.0.64/27;将目的地址为192.168.0.96-192.168.0.127的明细路由汇聚成1条路由192.168.0.96/27;将目的地址为192.168.0.128-192.168.0.159的明细路由汇聚成1条路由192.168.0.128/27;将目的地址为192.168.0.160-192.168.0.191的明细路由汇聚成1条路由192.168.0.160/27;将目的地址为192.168.0.192-192.168.0.223的明细路由汇聚成1条路由192.168.0.192/27;将目的地址为192.168.0.224-192.168.0.255的明细路由汇聚成1条路由192.168.0.224/27。此外,属于不同子网掩码的目的地址对应的明细路由不能进行汇聚,如:目的地址为192.168.0.1的明细路由1的子网掩码为255.255.255.224与目的地址为192.168.0.1的明细路由2的子网掩码为255.255.255.0,由于明细路由1与明细路由2不属于同一子网掩码故而无法进行汇聚。如果网络设备1收到下一层级的邻居设备发布的路由包括明细路由和汇聚路由,或者都是汇聚路由,网络设备1可以将包括汇聚路由在内的路由进一步汇聚。Aggregated routes are summarized routes. For example, the detailed routes with the destination address of 192.168.0.0-192.168.0.255 received by network device 1 and the detailed routes received by network device 1 belong to the subnet mask 255.255.255.0, so Network device 1 can aggregate the received detailed routes into one route, that is, 192.168.0.0/24, but in actual applications, it can also aggregate detailed routes into multiple routes based on the mask length information, for example, the destination address The detailed routes for 192.168.0.0-192.168.0.31 are aggregated into one route 192.168.0.0/27; the detailed routes for the destination address 192.168.0.32-192.168.0.63 are aggregated into one route 192.168.0.32/27; the destination address is aggregated The detailed routes of 192.168.0.64-192.168.0.95 are aggregated into a route 192.168.0.64/27; the detailed routes of the destination address of 192.168.0.96-192.168.0.127 are aggregated into a route of 192.168.0.96/27; the destination address is aggregated The detailed routes of 192.168.0.128-192.168.0.159 are aggregated into one route 192.168.0.128/27; the detailed routes of the destination address 192.168.0.160-192.168.0.191 are aggregated into one route 192.168.0.160/27; the destination address The detailed routes of 192.168.0.192-192.168.0.223 are aggregated into one route 192.168.0.192/27; the detailed routes of the destination address 192.168.0.224-192.168.0.255 are aggregated into one route 192.168.0.224/27. In addition, detailed routes corresponding to destination addresses with different subnet masks cannot be aggregated. For example, detailed route 1 with a destination address of 192.168.0.1 has a subnet mask of 255.255.255.224 and a detailed route with destination address of 192.168.0.1. The subnet mask of 2 is 255.255.255.0. Because the detailed route 1 and the detailed route 2 do not belong to the same subnet mask, they cannot be aggregated. If the network device 1 receives the routes advertised by the next-level neighbor devices including detailed routes and aggregation routes, or both are aggregation routes, the network device 1 may further aggregate the routes including the aggregation route.
缺省路由,也即网络设备转发报文时找不到目的地址对应的路由时,则将报文发送到一个指定地址,如:网络设备1向网络设备2转发报文,但是,网络设备1并未获取网络设备2的路由,那么网络设备1则可将报文转发到指定地址(也即缺省路由的地址)。为了更加清楚地说明本申请中的缺省路由,可通过如下示例说明:网络设备1的上一层级的邻居设备为网络设备2,下一层级的邻居设备为网络设备3,网络设备1会向网络设备2发送下一层级的邻居设备的明细路由的聚合信息,也即汇聚路由,向网络设备3发布缺省路由信息,也即若网络设备3向网络设备2转发报文无法获取网络设备2的路由时,可将报文转发至指定地址,通过指定地址将报文转发至网络设备2。The default route, that is, when the network device cannot find the route corresponding to the destination address when forwarding the message, the message is sent to a specified address, such as: network device 1 forwards the message to network device 2, but network device 1 If the route of the network device 2 is not obtained, the network device 1 can forward the message to the specified address (that is, the address of the default route). In order to illustrate the default route in this application more clearly, the following example can be used to illustrate: the neighbor device of the upper level of network device 1 is network device 2, the neighbor device of the next level is network device 3, and network device 1 will Network device 2 sends the aggregate information of the detailed routing of the next-level neighbor devices, that is, the aggregate route, and advertises default routing information to network device 3, that is, if network device 3 forwards a message to network device 2, it cannot obtain network device 2 When routing, the message can be forwarded to the designated address, and the message can be forwarded to the network device 2 through the designated address.
本申请中,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。以及,除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。In this application, "and/or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone , Where A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship. "The following at least one item (a)" or similar expressions refers to any combination of these items, including any combination of a single item (a) or a plurality of items (a). For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple. The singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include expressions such as "one or more" unless the context clearly indicates The ground has the opposite direction. And, unless otherwise stated, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects, and are not used to limit the order, timing, priority, or order of multiple objects. Importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。The reference to "one embodiment" or "some embodiments" described in the specification of this application means that one or more embodiments of this application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the sentences "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "including", "having" and their variations all mean "including but not limited to" unless otherwise specifically emphasized.
参阅图2为本申请实施例提供的一种园区网中路由发布方法的流程示意图,该方法是在网络设备侧执行,网络设备可先执行步骤201,向与网络设备连接的上一层级的邻居设备发布汇聚路由;其中,层级指示园区网中各设备在网络拓扑中的位置;汇聚路由是对网络设备从与网络设备连接的下一层级的邻居设备接收到的明细路由的聚合。Refer to Figure 2 for a schematic flow chart of a method for issuing routes in a campus network according to an embodiment of this application. The method is executed on the side of the network device. The device advertises the aggregation route; among them, the level indicates the position of each device in the campus network in the network topology; the aggregation route is the aggregation of the detailed routes received by the network device from the next-level neighbor devices connected to the network device.
步骤202,网络设备向与网络设备连接的下一层级的邻居设备发布缺省路由,其中,缺省路由指示下一层级的邻居设备在未成功获取目的地址对应的路由时,将报文转发至缺省路由对应的指定地址。Step 202: The network device advertises a default route to the neighboring device of the next level connected to the network device, where the default route instructs the neighboring device of the next level to forward the message to when it fails to obtain the route corresponding to the destination address The specified address corresponding to the default route.
此外,图2中的步骤202和步骤203可以不区分先后顺序,可同时执行,也可按照次序,先执行步骤203后执行步骤202,亦或者先执行步骤202后执行步骤203,在执行顺序上本申请不作具体的限定。In addition, step 202 and step 203 in FIG. 2 can be performed in no particular order, and can be performed at the same time, or in order, step 203 is performed first and then step 202 is performed, or step 202 is performed first and then step 203 is performed. In the order of execution This application does not make specific limitations.
另外,为了保证相邻层级的邻居设备可向网络设备转发报文,网络设备还会向上一层级的邻居设备以及下一层级的邻居设备发布其明细路由,以便网络设备与上一层级的邻居设备直接进行信息的交互。In addition, in order to ensure that neighboring devices at adjacent levels can forward packets to network devices, network devices will also publish their detailed routes to neighboring devices at the next higher level and neighboring devices at the next level, so that the network equipment can communicate with neighboring devices at the next higher level. Direct information exchange.
园区网在组网时,对网络设备所处的位置进行了提前规划,如L1层的网络设备位于核心层包括核心设备,该层的网络设备可与汇聚设备以及核心设备连接,L2层的网络设备位于汇聚层包括汇聚设备,该层的网络设备可与汇聚设备、核心设备以及接入设备连接。示意性说明,如图3所示,网络设备1所处的层级为L2层,其上一层的邻居设备包括网络设备2以及网络设备3,其下一层的邻居设备包括网络设备4以及网络设备5。网络设备1可向网络设备2以及网络设备3发布其明细路由路由1,以及网络设备4以及网络设备5的明细路由的汇聚路由路由6,该路由1对应的目的地地址为地址1,该路由6对应的目的地址为地址6,以便网络设备2以及网络设备3可通过地址1将报文转发至网络设备1。通过地址6将报文转发至网络设备4或网络设备5。网络设备1还可向网络设备4以及网络设备5发布路由1以及缺省路由路由0,以便网络设备4以及网络设备5可通过地址1将报文转发至网络设备1,通过地址0将报文转发至网络设备2或网络设备3,其中,缺省路由路由0对应的指定地址为地址0。由于园区网通常为树状结构,网络设备不是向叶子方向转发报文就是向根方向转发报文,因此可以用缺省路由指示网络设备将所有没有查找到路由的报文向根方向转发。When the campus network is networked, the location of the network equipment is planned in advance. For example, the network equipment of the L1 layer is located in the core layer including the core equipment, and the network equipment of this layer can be connected with the aggregation equipment and the core equipment. The network of the L2 layer Devices located at the convergence layer include convergence devices, and network devices at this layer can be connected to convergence devices, core devices, and access devices. Schematically, as shown in Figure 3, the network device 1 is located at the L2 layer, the neighbor devices of the upper layer include network device 2 and network device 3, and the neighbor devices of the next layer include network device 4 and network Equipment 5. Network device 1 can publish to network device 2 and network device 3 its detailed route route 1, and the aggregate route route 6 of network device 4 and network device 5's detailed route. The destination address corresponding to route 1 is address 1. This route The destination address corresponding to 6 is address 6, so that network device 2 and network device 3 can forward packets to network device 1 through address 1. The message is forwarded to the network device 4 or the network device 5 through the address 6. Network device 1 can also advertise route 1 and default route route 0 to network device 4 and network device 5, so that network device 4 and network device 5 can forward packets to network device 1 through address 1, and send the message through address 0 Forward to network device 2 or network device 3, where the designated address corresponding to the default route route 0 is address 0. Since campus networks usually have a tree structure, network devices either forward packets to the leaf direction or forward packets to the root direction. Therefore, the default route can be used to instruct the network device to forward all packets that have not found a route to the root direction.
本申请实施例中,网络设备向与其连接的上一层级的邻居设备发布汇聚路由,向与其连接的下一层级的邻居设备发布缺省路由,该方式避免在园区网中的网络设备学习园区网中所有层级网络设备发布的明细路由的情况,网络设备仅需要学习相邻层级的网络设备发布的路由信息,即可将报文在全网中进行报文的转发,通过该方式一方面降低了网络设备的路由发布数量,另一方面也减少了园区网中网络设备的路由学习数量,由于该方式中网络设备无需获取各个设备的明细路由,也进一步节省了网络设备的存储空间,有助于提高网络设备的处理效率。In the embodiment of this application, the network device advertises the aggregation route to the neighbor devices of the upper level connected to it, and advertises the default route to the neighbor devices of the next level connected to it. This method prevents the network devices in the campus network from learning the campus network. In the case of detailed routing issued by all network devices at all levels in the network, network devices only need to learn the routing information issued by adjacent network devices to forward messages across the entire network. This method reduces The number of route announcements for network devices on the other hand also reduces the number of route learning for network devices in the campus network. In this way, network devices do not need to obtain detailed routes for each device, which further saves the storage space of network devices and helps Improve the processing efficiency of network equipment.
在一个实施例中,网络设备向与网络设备连接的同一层级的邻居设备发布网络设备的明细路由以及汇聚路由。网络设备向同一层级的邻居设备发布明细路由,以便同一层级的邻居设备之间可以进行报文的转发,向同一层级的邻居设备发布汇聚由以便同一层级的邻居设备可向下一层级的邻居设备转发报文。如图4所示,图4是在图3的基础上进行示意的,网络设备1的邻居设备还包括同一层级的邻居设备网络设备6以及网络设备7,网络设备1则可向网络设备6以及网络设备7发布路由1以及路由6,以便网络设备6或网络设备7可通过地址1将报文转发给网络设备1,可通过地址6将报文转发给网络设备4或网络设备5。In one embodiment, the network device advertises detailed routes and aggregation routes of the network device to neighbor devices of the same level connected to the network device. Network equipment advertises detailed routes to neighboring devices at the same level, so that neighboring devices at the same level can forward packets, and advertises aggregation routes to neighboring devices at the same level so that neighboring devices at the same level can be connected to neighboring devices at the next level Forward the message. As shown in Fig. 4, Fig. 4 is a schematic diagram based on Fig. 3. The neighboring devices of network device 1 also include neighboring devices of the same level, network device 6 and network device 7, and network device 1 can report to network device 6 and The network device 7 advertises route 1 and route 6 so that the network device 6 or the network device 7 can forward the message to the network device 1 through the address 1, and can forward the message to the network device 4 or the network device 5 through the address 6.
此外,还要说明的是,网络设备的邻居设备可通过如下方式确定:In addition, it should be noted that the neighbor devices of the network device can be determined in the following ways:
网络设备获取邻居设备发送的报文;其中,报文为OSPF协议的报文或IS-IS协议的报文;报文中携带有用于指示邻居设备的层级的字段;根据报文中用于指示邻居设备的设备层级的字段,获取邻居设备的层级。如:网络设备所属的层级若为L3,可接收邻居设备发送的OSPF协议的报文1,网络设备通过对报文1中用于指示邻居设备的层级的字段进行解析,可获悉该邻居设备的层级的为L4,故而可知网络设备的邻居设备为其下一层级的网络设备。The network device obtains the message sent by the neighboring device; among them, the message is an OSPF protocol message or an IS-IS protocol message; the message carries a field used to indicate the level of the neighboring device; according to the message used to indicate The field of the device level of the neighboring device is used to obtain the level of the neighboring device. For example, if the level of the network device is L3, it can receive the OSPF protocol message 1 sent by the neighboring device. The network device can learn the neighbor device's level by analyzing the field used to indicate the level of the neighboring device in the message 1. The level is L4, so it can be known that the neighbor device of the network device is the network device of the next level.
为了使网络设备更好地转发报文信息,网络设备的LSDB中可存储邻居设备发布的路由信息,将与网络设备连接的上一层级的邻居设备发布的缺省路由存储在第一链路数据库LSDB中;将与网络设备连接的下一层级的邻居设备发布的明细路由存储在第二链路数据库LSDB中;将与网络设备连接的同一层级的邻居设备发布的明细路由存储在第一链路数据库LSDB中。In order to enable network equipment to better forward message information, the LSDB of the network equipment can store the routing information published by neighboring equipment, and store the default route advertised by the neighboring equipment connected to the network equipment in the first link database. In LSDB; store the detailed routes advertised by the next-level neighbor devices connected to the network device in the second link database LSDB; store the detailed routes advertised by the neighbor devices of the same level connected to the network device in the first link The database LSDB.
示意性说明,如图5所示,该图中网络设备1所处的层级为L3层,其上一层的邻居设备包括网络设备2以及网络设备3,其下一层的邻居设备包括网络设备4以及网络设备5,同一层级的邻居设备包括网络设备6以及网络设备7。网络设备2向网络设备1发布网络设备2的明细路由路由2,以便网络设备1根据地址2将报文转发至网络设备2,其中路由2对应的目的地址为地址2;网络设备3向网络设备1发布网络设备3的明细路由路由3,以便网络设备1根据地址3将报文转发至网络设备2,其中路由3对应的目的地址为地址3;此外,网络设备2以及网络设备3均向网络设备1发布缺省路由路由0,该路由0对应的指定地址为地址0,该地址0用于指示网络设备1可通过地址0将报文转发至不能明确路由的网络设备;网络设备4-7则均向网络设备1发布各自的明细路由分别为路由4、路由5、路由6以及路由7。网络设备1可将路由0、路由2、路由3、路由6以及路由7存储在第一LSDB中,将路由4、路由5存储在第二LSDB中。如表1所示,网络设备1的第一LSDB中存储有上一层级的邻居设备发布的缺省路由路由0、上一层级的邻居设备发布的明细路由路由2以及路由3以及同一层级的邻居设备发布的明细路由路由6以及路由7。第二LSDB中存储有下一层级的邻居设备发布的明细路由路由4以及路由5。也可如表2所示,将路由0、路由2-路由7均存储在第一LSDB中,将路由4以及路由5存储在第二LSDB中,通过该方式避免下一层级设备的泛洪,影响报文的转发。Schematically, as shown in Figure 5, the network device 1 in the figure is at the L3 layer, the neighbor devices of the upper layer include network device 2 and network device 3, and the neighbor devices of the next layer include network device 4 and network device 5, neighboring devices at the same level include network device 6 and network device 7. Network device 2 publishes detailed routing route 2 of network device 2 to network device 1, so that network device 1 forwards the message to network device 2 according to address 2, where the destination address corresponding to route 2 is address 2; network device 3 sends to the network device 1 Publish the detailed routing route 3 of network device 3 so that network device 1 forwards the message to network device 2 according to address 3. The destination address corresponding to route 3 is address 3; in addition, network device 2 and network device 3 are both forwarded to the network Device 1 advertises the default route route 0. The designated address corresponding to this route 0 is address 0. This address 0 is used to instruct network device 1 to forward packets to network devices that cannot be routed clearly through address 0; network devices 4-7 Then, all the detailed routes are released to the network device 1 as route 4, route 5, route 6, and route 7. The network device 1 may store Route 0, Route 2, Route 3, Route 6, and Route 7 in the first LSDB, and store Route 4 and Route 5 in the second LSDB. As shown in Table 1, the first LSDB of network device 1 stores the default route route 0 advertised by the neighboring device of the upper level, detailed routes route 2 and route 3 advertised by the neighboring device of the upper level, and neighbors of the same level. The detailed route route 6 and route 7 advertised by the device. The second LSDB stores detailed routing routes 4 and 5 published by neighboring devices of the next level. It is also possible to store route 0 and route 2 to route 7 in the first LSDB, and store route 4 and route 5 in the second LSDB, as shown in Table 2, in this way to avoid flooding of devices at the next level. Affect the forwarding of packets.
表1Table 1
网络设备1Network equipment 1 第一LSDBFirst LSDB 第二LSDBSecond LSDB
 To 路由0、路由2、路由3、路由6、路由7Route 0, Route 2, Route 3, Route 6, Route 7 路由4、路由5Route 4, Route 5
表2Table 2
Figure PCTCN2021094673-appb-000001
Figure PCTCN2021094673-appb-000001
通过在第一LSDB以及第二LSDB中存储不同的路由信息以便网络设备在转发报文时,直接查找对应的LSDB中的路由信息转发报文,从而提高报文的转发效率。By storing different routing information in the first LSDB and the second LSDB, the network device directly searches for the routing information in the corresponding LSDB to forward the packet when forwarding the packet, thereby improving the efficiency of packet forwarding.
基于同一技术构思,本申请实施例还提供一种网络设备,如图6所示,包括:处理单元61。Based on the same technical concept, an embodiment of the present application also provides a network device, as shown in FIG. 6, including: a processing unit 61.
其中,处理单元61用于向与网络设备连接的上一层级的邻居设备发布汇聚路由;以及用于向与网络设备连接的下一层级的邻居设备发布缺省路由;其中,层级指示园区网中各设备在网络拓扑中的位置;汇聚路由是对网络设备从与网络设备连接的下一层级的邻居设备接收到的明细路由的聚合,其中,缺省路由指示下一层级的邻居设备在未成功获取目的地址对应的路由时,将报文转发至缺省路由对应的指定地址。Among them, the processing unit 61 is used to publish the aggregation route to the neighbor devices of the upper level connected to the network device; and is used to publish the default route to the neighbor devices of the next level connected to the network device; where the level indicates the campus network The position of each device in the network topology; the aggregation route is the aggregation of the detailed routes received by the network device from the neighboring device of the next level connected to the network device. The default route indicates that the neighboring device of the next level is unsuccessful. When obtaining the route corresponding to the destination address, the packet is forwarded to the designated address corresponding to the default route.
本申请实施例中,网络设备向与其连接的上一层级的邻居设备发布汇聚路由,向与其连接的下一层级的邻居设备发送缺省路由,该方式避免了在园区网中的网络设备学习园区网中所有层级网络设备发布的明细路由的情况,网络设备仅需要学习相邻层级的网络设备发布的路由信息,即可将报文在全网中进行报文的转发,通过该方式一方面降低了网络设备的路由发布数量,另一方面也减少了园区网中网络设备的路由学习数量,由于该方式中网络设备无需获取各个设备的明细路由信息,也进一步节省了网络设备的存储空间,有助于提高网络设备的处理效率。In the embodiment of this application, the network device advertises the aggregation route to the neighbor device of the upper level connected to it, and sends the default route to the neighbor device of the next level connected to it. This method prevents the network device in the campus network from learning about the campus. In the case of detailed routing issued by all network devices at all levels in the network, network devices only need to learn the routing information issued by network devices at adjacent levels to forward messages across the entire network. This method reduces It also reduces the number of route announcements of network equipment, and on the other hand, it reduces the number of route learning of network equipment in the campus network. In this way, the network equipment does not need to obtain detailed routing information of each equipment, which further saves the storage space of network equipment. Helps improve the processing efficiency of network equipment.
在一种可能的实现方式中,处理器还用于向与网络设备连接的同一层级的邻居设备发布网络设备的明细路由以及汇聚路由。In a possible implementation manner, the processor is also used to publish detailed routes and aggregation routes of the network device to neighboring devices of the same level connected to the network device.
通过该方式网络设备可向同一层级的邻居设备发布网络设备的明细路由以及下一层级邻居设备的明细路由的聚合后的汇聚路由,以便同一层级的邻居设备之间可以进行报文的转发,以及同一层级的邻居设备可向下一层级的邻居设备转发报文。In this way, the network device can publish the detailed route of the network device and the aggregated aggregation route of the detailed route of the next-level neighbor device to the neighbor devices of the same level, so that the neighbor devices of the same level can forward packets, and Neighbor devices of the same level can forward packets to neighbor devices of the next level.
在一种可能的实现方式中,设备还包括:通信单元;其中,通信单元,用于获取邻居设备发送的报文;其中,报文为OSPF协议的报文或中间系统到中间系统的路由ISIS协议的报文;报文中携带有用于指示邻居设备的层级的字段;根据报文中用于指示邻居设备的设备层级的字段,获取邻居设备的层级。In a possible implementation manner, the device further includes: a communication unit; wherein the communication unit is used to obtain a message sent by a neighboring device; wherein the message is an OSPF protocol message or a route from the intermediate system to the intermediate system ISIS Protocol message; the message carries a field used to indicate the level of the neighboring device; according to the field used to indicate the device level of the neighboring device in the message, the level of the neighboring device is obtained.
通过网络设备可根据邻居设备发送的报文信息,获取邻居设备所属的层级,以便网络设备可根据邻居设备的层级信息,向邻居设备发送对应的路由信息,以便减少网络设备发布的路由数量。The network device can obtain the tier to which the neighbor device belongs based on the message information sent by the neighbor device, so that the network device can send corresponding routing information to the neighbor device based on the neighbor device's tier information, so as to reduce the number of routes advertised by the network device.
在一种可能的实现方式中,设备还包括:存储单元;其中,存储单元,用于将与网络设备连接的上一层级的邻居设备发布的缺省路由存储在第一LSDB中;将与网络设备连接的下一层级的邻居设备发布的明细路由存储在第二LSDB中;将与网络设备连接的同一层级的邻居设备发布的明细路由存储在第一LSDB中。In a possible implementation manner, the device further includes: a storage unit; wherein the storage unit is configured to store the default route issued by the neighboring device connected to the network device in the first LSDB; The detailed route advertised by the neighboring device of the next level connected to the device is stored in the second LSDB; the detailed route advertised by the neighboring device of the same level connected to the network device is stored in the first LSDB.
通过将网络设备接收到的邻居设备发布的路由信息存储在LSDB中,便于网络设备根据该路由信息确定报文的转发途径。By storing the routing information advertised by the neighboring device received by the network device in the LSDB, it is convenient for the network device to determine the packet forwarding path according to the routing information.
基于相同的构思,如图7所示,为本申请提供的一种通信装置700。示例性地,通信 装置700可以是芯片或芯片系统。可选的,在本申请实施例中芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。Based on the same concept, as shown in FIG. 7, a communication device 700 provided for this application. Exemplarily, the communication device 700 may be a chip or a chip system. Optionally, the chip system in the embodiments of the present application may be composed of chips, or may include chips and other discrete devices.
通信装置700可以包括至少一个处理器710,装置700还可以包括至少一个存储器720,用于存储计算机程序、程序指令和/或数据。存储器720和处理器710耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器710可能和存储器720协同操作。处理器710可能执行存储器720中存储的计算机程序。可选的,所述至少一个存储器720中的至少一个可以包括于处理器710中。The communication device 700 may include at least one processor 710, and the device 700 may also include at least one memory 720 for storing computer programs, program instructions, and/or data. The memory 720 and the processor 710 are coupled. The coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 710 may operate in cooperation with the memory 720. The processor 710 may execute a computer program stored in the memory 720. Optionally, at least one of the at least one memory 720 may be included in the processor 710.
通信装置700中还可以包括收发器730,通信装置700可以通过收发器730和其它设备进行信息交互。收发器730可以是电路、总线、收发器或者其它任意可以用于进行信息交互的装置。The communication device 700 may further include a transceiver 730, and the communication device 700 may exchange information with other devices through the transceiver 730. The transceiver 730 may be a circuit, a bus, a transceiver, or any other device that can be used for information exchange.
在一种可能的实施方式中,该通信装置700可以应用于前述网络设备,具体通信装置700可以是前述网络设备,也可以是能够支持前述网络设备实施上述任一实施例的装置。存储器720保存实施上述任一实施例中的网络设备的功能的必要计算机程序、程序指令和/或数据。所述处理器710可执行所述存储器720存储的计算机程序,完成上述任一实施例中的方法。In a possible implementation manner, the communication device 700 may be applied to the aforementioned network equipment, and the specific communication device 700 may be the aforementioned network equipment, or a device capable of supporting the aforementioned network equipment to implement any of the foregoing embodiments. The memory 720 stores necessary computer programs, program instructions, and/or data to implement the functions of the network device in any of the foregoing embodiments. The processor 710 can execute the computer program stored in the memory 720 to complete the method in any of the foregoing embodiments.
本申请实施例中不限定上述收发器730、处理器710以及存储器720之间的具体连接介质。本申请实施例在图7中以存储器720、处理器710以及收发器730之间通过总线连接,总线在图7中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The specific connection medium between the foregoing transceiver 730, the processor 710, and the memory 720 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 720, the processor 710, and the transceiver 730 are connected by a bus in FIG. 7. The bus is represented by a thick line in FIG. It is not limited. The bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used to represent in FIG. 7, but it does not mean that there is only one bus or one type of bus.
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实施或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or Perform the methods, steps, and logical block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实施存储功能的装置,用于存储计算机程序、程序指令和/或数据。In the embodiment of the present application, the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), for example Random-access memory (random-access memory, RAM). The memory may also be any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing computer programs, program instructions and/or data.
基于以上实施例,参见图8,本申请实施例还提供另一种通信装置800,包括:接口电路810和处理器820;Based on the above embodiment, referring to FIG. 8, an embodiment of the present application also provides another communication device 800, including: an interface circuit 810 and a processor 820;
接口电路810,用于接收代码指令并传输至所述处理器820;The interface circuit 810 is configured to receive code instructions and transmit them to the processor 820;
处理器820,用于运行所述代码指令以执行上述任一实施例中的方法。The processor 820 is configured to run the code instructions to execute the method in any of the foregoing embodiments.
基于以上实施例,本申请实施例还提供一种可读存储介质,该可读存储介质存储有指令,当所述指令被执行时,使上述任一实施例中安全检测设备执行的方法被实施。该可读存储介质可以包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。Based on the above embodiments, the embodiments of the present application also provide a readable storage medium that stores instructions, and when the instructions are executed, the method executed by the security detection device in any of the above embodiments is implemented . The readable storage medium may include: U disk, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理装置的处理器以产生一个机器,使得通过计算机或其他可编程数据处理装置的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device are generated for use It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理装置以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理装置上,使得在计算机或其他可编程装置上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程装置上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce computer-implemented processing, so as to execute on the computer or other programmable device. The instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application also intends to include these modifications and variations.

Claims (11)

  1. 一种园区网中路由发布方法,其特征在于,包括:A method for issuing routes in a campus network is characterized in that it includes:
    网络设备向与所述网络设备连接的上一层级的邻居设备发布汇聚路由;其中,所述层级指示所述园区网中各设备在网络拓扑中的位置;所述汇聚路由是对所述网络设备从与所述网络设备连接的下一层级的邻居设备接收到的明细路由的聚合;The network device advertises the aggregation route to the neighbor devices of the upper level connected to the network device; wherein the level indicates the position of each device in the campus network in the network topology; the aggregation route is for the network device Aggregation of detailed routes received from neighbor devices of the next level connected to the network device;
    所述网络设备向与所述网络设备连接的下一层级的邻居设备发布缺省路由,其中,所述缺省路由指示所述下一层级的邻居设备在未成功获取目的地址对应的路由时,将报文转发至所述缺省路由对应的指定地址。The network device advertises a default route to a neighbor device of the next level connected to the network device, wherein the default route instructs the neighbor device of the next level to successfully obtain the route corresponding to the destination address, The message is forwarded to the designated address corresponding to the default route.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    所述网络设备向与所述网络设备连接的同一层级的邻居设备发布所述网络设备的明细路由以及所述汇聚路由。The network device publishes the detailed route of the network device and the aggregation route to neighbor devices of the same level connected to the network device.
  3. 根据权利要求2所述的方法,其特征在于,所述网络设备的邻居设备是通过如下方式确定的:The method according to claim 2, wherein the neighbor devices of the network device are determined in the following manner:
    所述网络设备获取所述邻居设备发送的报文;其中,所述报文为开放最短路径优先OSPF协议的报文或中间系统到中间系统IS-IS协议的报文;所述报文中携带有用于指示所述邻居设备的层级的字段;The network device obtains the message sent by the neighbor device; wherein, the message is an Open Shortest Path First OSPF protocol message or an intermediate system to intermediate system IS-IS protocol message; the message carries There is a field for indicating the level of the neighboring device;
    所述网络设备根据所述报文中用于指示所述邻居设备的设备层级的字段,获取所述邻居设备的层级。The network device obtains the level of the neighbor device according to the field used to indicate the device level of the neighbor device in the message.
  4. 根据权利要求2或3所述的方法,其特征在于,所述方法还包括:The method according to claim 2 or 3, wherein the method further comprises:
    所述网络设备将与所述网络设备连接的上一层级的邻居设备发布的缺省路由存储在第一链路数据库LSDB中;The network device stores the default route advertised by the neighbor device of the upper level connected to the network device in the first link database LSDB;
    所述网络设备将与所述网络设备连接的下一层级的邻居设备发布的明细路由存储在第二链路数据库LSDB中;The network device stores the detailed routes issued by the next-level neighbor devices connected to the network device in the second link database LSDB;
    所述网络设备将与所述网络设备连接的同一层级的邻居设备发布的明细路由存储在第一链路数据库LSDB中。The network device stores the detailed routes issued by neighbor devices of the same level connected to the network device in the first link database LSDB.
  5. 一种网络设备,其特征在于,包括:A network device, characterized in that it comprises:
    处理单元,用于向与所述网络设备连接的上一层级的邻居设备发布汇聚路由;其中,所述层级指示所述园区网中各设备在网络拓扑中的位置;所述汇聚路由是对所述网络设备从与所述网络设备连接的下一层级的邻居设备接收到的明细路由的聚合;以及用于向与所述网络设备连接的下一层级的邻居设备发布缺省路由,其中,所述缺省路由指示所述下一层级的邻居设备在未成功获取目的地址对应的路由时,将报文转发至所述缺省路由对应的指定地址。The processing unit is configured to issue an aggregation route to the neighbor devices of the upper level connected to the network device; wherein the level indicates the position of each device in the campus network in the network topology; the aggregation route is for all The aggregation of detailed routes received by the network device from the neighbor devices of the next level connected to the network device; and is used to publish the default route to the neighbor devices of the next level connected to the network device, where all The default route instructs the next-level neighbor device to forward the message to the designated address corresponding to the default route when it fails to obtain the route corresponding to the destination address.
  6. 根据权利要求5所述的设备,其特征在于,所述处理单元还用于向与所述网络设备连接的同一层级的邻居设备发布所述网络设备的明细路由以及所述汇聚路由。The device according to claim 5, wherein the processing unit is further configured to publish the detailed route of the network device and the aggregation route to neighbor devices of the same level connected to the network device.
  7. 根据权利要求6所述的设备,其特征在于,所述设备还包括:The device according to claim 6, wherein the device further comprises:
    通信单元,用于获取所述邻居设备发送的报文;其中,所述报文为OSPF协议的报文或中间系统到中间系统IS-IS协议的报文;所述报文中携带有用于指示所述邻居设备的层级的字段;The communication unit is configured to obtain a message sent by the neighboring device; wherein the message is an OSPF protocol message or an intermediate system-to-intermediate system IS-IS protocol message; the message carries a message for indicating The field of the level of the neighboring device;
    根据所述报文中用于指示所述邻居设备的设备层级的字段,获取所述邻居设备的层级。Acquire the hierarchy of the neighboring device according to the field used to indicate the device hierarchy of the neighboring device in the message.
  8. 根据权利要求6或7所述的设备,其特征在于,所述设备还包括:The device according to claim 6 or 7, wherein the device further comprises:
    存储单元,用于将与所述网络设备连接的上一层级的邻居设备发布的缺省路由存储在第一链路数据库LSDB中;The storage unit is configured to store the default route published by the neighbor device of the upper level connected to the network device in the first link database LSDB;
    将与所述网络设备连接的下一层级的邻居设备发布的明细路由存储在第二链路数据库LSDB中;Store the detailed routes issued by the neighbor devices of the next level connected to the network device in the second link database LSDB;
    将与所述网络设备连接的同一层级的邻居设备发布的明细路由存储在第一链路数据库LSDB中。The detailed routes issued by neighboring devices of the same level connected to the network device are stored in the first link database LSDB.
  9. 一种通信装置,其特征在于,包括:处理器和存储器;A communication device, characterized by comprising: a processor and a memory;
    所述存储器,存储有计算机程序;The memory stores a computer program;
    所述处理器,用于执行所述存储器中存储的计算机程序,以使得如权利要求1-4任意一项所述的方法被执行。The processor is configured to execute a computer program stored in the memory, so that the method according to any one of claims 1 to 4 is executed.
  10. 一种通信装置,其特征在于,包括:处理器和接口电路;A communication device, characterized by comprising: a processor and an interface circuit;
    所述接口电路,用于接收代码指令并传输至所述处理器;The interface circuit is used to receive code instructions and transmit them to the processor;
    所述处理器用于运行所述代码指令以执行如权利要求1-4任意一项所述的方法。The processor is configured to run the code instructions to execute the method according to any one of claims 1-4.
  11. 一种计算机可读存储介质,其特征在于,所述计算机存储介质中存储有计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行如权利要求1-4任意一项所述的方法。A computer-readable storage medium, characterized in that, computer-readable instructions are stored in the computer storage medium, and when the computer reads and executes the computer-readable instructions, the computer executes any one of claims 1-4 The method described in the item.
PCT/CN2021/094673 2020-06-19 2021-05-19 Method for issuing route in campus network, and network device WO2021254079A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010566336.X 2020-06-19
CN202010566336.XA CN113824633B (en) 2020-06-19 2020-06-19 Method for releasing route in campus network and network equipment

Publications (1)

Publication Number Publication Date
WO2021254079A1 true WO2021254079A1 (en) 2021-12-23

Family

ID=78912009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094673 WO2021254079A1 (en) 2020-06-19 2021-05-19 Method for issuing route in campus network, and network device

Country Status (2)

Country Link
CN (1) CN113824633B (en)
WO (1) WO2021254079A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114554566A (en) * 2022-01-27 2022-05-27 哈尔滨海能达科技有限公司 Routing method and device of wireless link, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080151893A1 (en) * 2006-12-20 2008-06-26 Sun Microsystems, Inc. Method and system for virtual routing using containers
CN101404621A (en) * 2008-11-24 2009-04-08 杭州华三通信技术有限公司 Method and routing device for implementing VRRP load balance
CN106455135A (en) * 2016-10-31 2017-02-22 吉林大学 Distributed node seismometer network communication method
CN109729190A (en) * 2019-03-15 2019-05-07 深圳前海微众银行股份有限公司 Network Access Method, system, equipment and computer readable storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7020718B2 (en) * 2000-05-15 2006-03-28 Hewlett-Packard Development Company, L.P. System and method of aggregating discontiguous address ranges into addresses and masks using a plurality of repeating address blocks
EP1331793A1 (en) * 2002-01-24 2003-07-30 Alcatel Canada Inc. Method for distributing aggregate route information
US8737406B1 (en) * 2002-08-01 2014-05-27 Cisco Technology, Inc. Method for transmitting IP routes to prioritize convergence
CN100428736C (en) * 2005-02-02 2008-10-22 华为技术有限公司 Topology method of one-time route computing to realize hierarchical route
CN100596107C (en) * 2007-02-09 2010-03-24 华为技术有限公司 Packet forwarding method and border router of autonomous system
JP4885819B2 (en) * 2007-10-22 2012-02-29 富士通株式会社 Communication device
CN100596117C (en) * 2007-11-09 2010-03-24 杭州华三通信技术有限公司 A route information spreading method and router
US8208377B2 (en) * 2009-03-26 2012-06-26 Force10 Networks, Inc. MAC-address based virtual route aggregation
US8625424B2 (en) * 2011-02-23 2014-01-07 Hp Ventures A/S Method and system for routing information in a network
CN106789664B (en) * 2016-03-29 2021-05-28 新华三技术有限公司 Route aggregation method and device
CN107547374B (en) * 2017-06-01 2020-04-28 新华三技术有限公司 Aggregation route processing method and device
CN107770069B (en) * 2017-10-31 2020-04-03 杭州迪普科技股份有限公司 LSA (location-based advertisement) method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080151893A1 (en) * 2006-12-20 2008-06-26 Sun Microsystems, Inc. Method and system for virtual routing using containers
CN101404621A (en) * 2008-11-24 2009-04-08 杭州华三通信技术有限公司 Method and routing device for implementing VRRP load balance
CN106455135A (en) * 2016-10-31 2017-02-22 吉林大学 Distributed node seismometer network communication method
CN109729190A (en) * 2019-03-15 2019-05-07 深圳前海微众银行股份有限公司 Network Access Method, system, equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114554566A (en) * 2022-01-27 2022-05-27 哈尔滨海能达科技有限公司 Routing method and device of wireless link, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113824633A (en) 2021-12-21
CN113824633B (en) 2022-12-13

Similar Documents

Publication Publication Date Title
US7936764B1 (en) Method for optimizing IP route table size through IP route aggregation
CN108259347B (en) Message transmission method and device
US11140069B2 (en) Optimizing information related to a route and/or a next hop for multicast traffic
CN103141060A (en) Content router forwarding plane architecture
WO2020156090A1 (en) Method, device, and system for establishing cross-domain forwarding path
US11558280B2 (en) System and method of processing in-place adjacency updates
CN108259304B (en) Forwarding table item synchronization method and device
WO2017190559A1 (en) Routing searching method, device, allocation node, searching node, and ingress node
US11146480B2 (en) Apparatus, method of determining transmission path and computer-readable storage medium
CN111026324B (en) Updating method and device of forwarding table entry
CN107547364A (en) Route sending-down method, device and the network equipment
CN107040393A (en) A kind of route management method and equipment
WO2021057530A1 (en) Method, apparatus and system for determining mapping relationship between routing prefix and segment identification
WO2021254079A1 (en) Method for issuing route in campus network, and network device
CN108322376B (en) Route synchronization method, device and machine-readable storage medium
US10855572B2 (en) Area abstraction extensions to routing protocols
WO2021000619A1 (en) Method and device for packet forwarding
CN109768909B (en) Message forwarding method and device
WO2021169297A1 (en) Method, device and system for transmitting node identity
EP4109824A1 (en) Traffic monitoring method, related device and system
CN107566302A (en) Message forwarding method and device
JP7289303B2 (en) Network communication method and apparatus
CN112019417A (en) Method and equipment for transmitting message
WO2023088226A1 (en) Packet forwarding method and related device
WO2022033341A1 (en) Path restoring method and device

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

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

Country of ref document: EP

Kind code of ref document: A1