WO2021254061A1 - 园区网中设备的接口配置方法及网络设备 - Google Patents

园区网中设备的接口配置方法及网络设备 Download PDF

Info

Publication number
WO2021254061A1
WO2021254061A1 PCT/CN2021/094112 CN2021094112W WO2021254061A1 WO 2021254061 A1 WO2021254061 A1 WO 2021254061A1 CN 2021094112 W CN2021094112 W CN 2021094112W WO 2021254061 A1 WO2021254061 A1 WO 2021254061A1
Authority
WO
WIPO (PCT)
Prior art keywords
ospf
role
network
interface
neighbor
Prior art date
Application number
PCT/CN2021/094112
Other languages
English (en)
French (fr)
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 WO2021254061A1 publication Critical patent/WO2021254061A1/zh

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/02Topology update or discovery
    • H04L45/03Topology update or discovery by updating link state protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Definitions

  • This application relates to the field of communication technology, and in particular to a method for configuring an interface of a device in a campus network and a network device.
  • the link state information stored in the link state database (LSDB) of network equipment is also increasing, and storage occupies a large amount of resource space for network equipment, and the burden of data processing on network equipment Aggravate.
  • the interfaces of network devices are artificially added to different open shortest path first (OSPF) areas, and LSDBs are separately configured in different areas to reduce the number of LSDBs in each device. Stored link state information.
  • OSPF open shortest path first
  • this method can reduce the pressure of a large amount of link state information carried by the network device, when configuring the area to which the network device belongs, a large amount of information needs to be configured, such as: each interface of the device, process number, etc.
  • a large amount of information needs to be configured, such as: each interface of the device, process number, etc.
  • the interface of the network device there may be hundreds of thousands.
  • the artificial configuration of the area to which the interface of the network device belongs not only increases the time cost, but also has low configuration efficiency.
  • the present application provides a method for configuring an interface of a device in a campus network and a network device, so as to improve the configuration efficiency of the device interface in the campus network.
  • this application provides an interface configuration method for devices in a campus network.
  • the device role is that the network device of the aggregation device obtains the device role of the OSPF neighbor device connected to each interface of the network device, where the OSPF neighbor device
  • the role of the device includes: access device or core device; after that, the network device adds the interface connected to the OSPF neighbor device whose device role is the core device to the first OSPF area; adds the interface connected to the first OSPF neighbor device to the first OSPF area.
  • the device role of the first OSPF neighbor device is an access device.
  • the network device whose device role is the aggregation device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, the LSDB of each network device can be realized. In addition, the interface of the network device can be automatically added to the designated OSPF area according to the role of the device. This method can improve the configuration efficiency of the device interface in the campus network.
  • the network device may also add the interface connected to the second OSPF neighbor device to the third OSPF area, and the device role of the second OSPF neighbor device is the access device.
  • the interfaces connected to OSPF neighbor devices with multiple device roles as access devices are added to different OSPF areas, which can reduce the link state information stored in the LSDB of the network device.
  • the device role of the OSPF neighbor device also includes an aggregation device; the network device adds the interface connected to the OSPF neighbor device whose device role is the aggregation device to the first OSPF area.
  • the configuration efficiency of the device interface in the campus network can be improved by adding the interface connected to the OSPF neighboring device whose device role is the aggregation device to the first OSPF area.
  • the network device acquiring the device role of the OSPF neighbor device connected to each interface of the network device may include: the network device acquiring the packet sent by the OSPF neighbor device; where the packet is an OSPF protocol packet ;
  • the OSPF protocol message carries a field used to indicate the device role of the OSPF neighbor device; then the network device can obtain the device role of the OSPF neighbor device according to the field used to indicate the device role of the OSPF neighbor device in the message.
  • the network device can obtain the device role of the OSPF neighbor device through the device role field in the message sent by the OSPF neighbor device. After the network device obtains the device role of the OSPF neighbor device, it is convenient to accurately add the interface connected to the OSPF neighbor device to the specified In the area.
  • this application provides a method for configuring interfaces of devices in a campus network.
  • a network device whose device role is a core device obtains the device role of an OSPF neighbor device connected to each interface of the network device.
  • the OSPF neighbor device The role of the device includes: aggregation device or core device; after that, the network device adds the interface connected to the OSPF neighbor device whose device role is the core device to the first OSPF area; adds the interface connected to the first OSPF neighbor device to the second OSPF area.
  • the device role of the first OSPF neighbor device is an aggregation device.
  • the network device whose device role is the core device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, the LSDB of each network device can be realized. According to the device role, the interface of the network device can be automatically added to the designated OSPF area. This method can improve the configuration efficiency of the device interface in the campus network.
  • the network device may also add the interface connected to the second OSPF neighbor device to the third OSPF area, and the device role of the second OSPF neighbor device is the aggregation device.
  • the interfaces of each aggregation device in the campus network can be configured in different areas, which improves the configuration efficiency of device interfaces in the campus network.
  • the network device obtains the device role of the OSPF neighbor device connected to each interface of the network device, which may include the network device obtains a message sent by the OSPF neighbor device; wherein the message is an OSPF protocol message;
  • the OSPF protocol message carries a field used to indicate the device role of the OSPF neighbor device; then, the network device obtains the device role of the OSPF neighbor device according to the field used to indicate the device role of the OSPF neighbor device in the message.
  • the network device can obtain the device role of the OSPF neighbor device through the device role field in the message sent by the OSPF neighbor device. After the network device obtains the device role of the OSPF neighbor device, it is convenient to accurately add the interface connected to the OSPF neighbor device to the specified In the area.
  • this application provides an interface configuration method for devices in a campus network.
  • the device role is that the network device of the access device obtains the device role of the OSPF neighbor device connected to each interface of the network device, wherein the OSPF neighbor
  • the device role of the device includes: access device and aggregation device; if the OSPF neighbor device of the network device includes the OSPF neighbor device whose device role is the access device, the network device will connect with the OSPF neighbor device whose device role is the aggregation device Add to the first OSPF area, and add the interface connected to the OSPF neighbor device whose device role is the access device to the second OSPF area; if the OSPF neighbor device of the network device only includes the OSPF neighbor device whose device role is the aggregation device Device, the network device adds the interface connected to the OSPF neighbor device whose device role is the aggregation device to the second OSPF area.
  • the network device whose device role is the access device can add the interface connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it.
  • each network device can be realized
  • the isolation of information in the LSDB can also automatically add the interface of the network device to the designated OSPF area according to the role of the device. This method can improve the configuration efficiency of the device interface in the campus network.
  • the network device obtains the device role of the OSPF neighbor device connected to each interface of the network device, which may include the network device obtains a message sent by the OSPF neighbor device; wherein the message is an OSPF protocol message;
  • the OSPF protocol message carries a field used to indicate the device role of the OSPF neighbor device; then, the network device obtains the device role of the OSPF neighbor device according to the field used to indicate the device role of the OSPF neighbor device in the message.
  • the network device can obtain the device role of the OSPF neighbor device through the device role field in the message sent by the OSPF neighbor device. After the network device obtains the device role of the OSPF neighbor device, it is convenient to accurately add the interface connected to the OSPF neighbor device to the specified In the area.
  • the present application provides a network device.
  • the device role of the network device is an aggregation device and includes: a communication unit and a processing unit.
  • the communication unit is used to obtain the device roles of the OSPF neighbor devices connected to each interface of the network device.
  • the device roles of the OSPF neighbor devices include: access devices and core devices; The interface connected to the OSPF neighboring device of the device is added to the first OSPF area; and the interface connected to the first OSPF neighboring device is added to the second OSPF area, and the device role of the first OSPF neighboring device is the access device.
  • the network device whose device role is the aggregation device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, the LSDB of each network device can be realized. With the isolation of information in the network, the interface of the network device can be automatically added to the designated OSPF area according to the role of the device. This method improves the configuration efficiency of the device interface in the campus network.
  • the present application provides a network device.
  • the device role of the network device is a core device, including: a communication unit and a processing unit.
  • the communication unit is used to obtain the device role of the OSPF neighbor device connected to each interface of the network device.
  • the device role of the OSPF neighbor device includes: the aggregation device and the core device; the processing unit is used to set the device role as the core device.
  • the interface connected to the OSPF neighboring device is added to the first OSPF area; and the interface connected to the first OSPF neighboring device is added to the second OSPF area, and the device role of the first OSPF neighboring device is the aggregation device.
  • the network device whose device role is the core device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, the LSDB of each network device can be realized. With the isolation of information in the network, the interface of the network device can be automatically added to the designated OSPF area according to the role of the device. This method improves the configuration efficiency of the device interface in the campus network.
  • the present application provides a network device, including: a communication unit and a processing unit.
  • the communication unit is used to obtain the device role of the OSPF neighbor device connected to each interface of the network device.
  • the device role of the OSPF neighbor device includes: the access device and the aggregation device; the processing unit is used to determine the OSPF neighbor device of the network device.
  • the device includes the OSPF neighbor device whose device role is the access device, and the network device adds the interface connected to the OSPF neighbor device whose device role is the aggregation device to the first OSPF area, and adds the OSPF device whose device role is the access device to the first OSPF area.
  • the interface connected by the neighboring device is added to the second OSPF area; and used for if the OSPF neighboring device of the network device only includes the OSPF neighboring device whose device role is the aggregation device, the network device will be the same as the OSPF neighboring device whose device role is the aggregation device
  • the connected interface is added to the second OSPF area.
  • the network device whose device role is the access device can add the interface connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it.
  • each network device can be realized
  • the isolation of information in the LSDB can also automatically add the interface of the network device to the designated OSPF area according to the role of the device. This method improves the configuration efficiency of the device interface in the campus network.
  • 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 first to third aspects described above The method described in any implementation manner of the aspect 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 above-mentioned first From one aspect to the solution described in any implementation manner of the third aspect.
  • this application provides a computer-readable storage medium in which computer-readable instructions are stored.
  • the computer can execute any of the first to third aspects above. The solution described in the first implementation mode.
  • the present application provides a computer program product, which when a computer reads and executes the computer program product, causes the computer to execute the solution described in any one of the implementation manners of the first aspect to the third aspect.
  • Figure 1 shows a schematic diagram of the structure of a campus network
  • FIG. 2 shows a schematic flowchart of a method for configuring an interface of a device in a campus network according to an embodiment of the present application
  • FIG. 3 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application
  • FIG. 5 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application
  • FIG. 6 shows a schematic flowchart of a method for configuring an interface of a device in a campus network according to an embodiment of the present application
  • FIG. 7 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application.
  • FIG. 8 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application
  • FIG. 9 shows a schematic flowchart of a method for configuring an interface of a device in a campus network provided by an embodiment of the present application.
  • FIG. 10 shows a schematic diagram of the interface configuration of a device in an area network provided by an embodiment of the present application
  • FIG. 11 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application.
  • FIG. 12 shows a schematic diagram of the interface configuration of devices in a campus network provided by an embodiment of the present application
  • FIG. 13 shows a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 14 shows a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 15 shows a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 16 shows a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • Fig. 17 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). Other components of the campus network such as 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.
  • the network equipment in the campus network is configured with a link state protocol. Based on the link state protocol, routes can be discovered, routing and forwarding tables can be determined, and message forwarding can be guided.
  • the LSDB of each device stores the link state information of all the devices in the campus network.
  • each interface of the network device configured with the OSPF protocol can be artificially added to the designated OSPF area, and the LSDB can be configured separately in different areas, but This method manually configures each network device interface to be added to the OSPF area, which is time-consuming and labor-intensive.
  • configuration errors can easily occur when a large amount of interface information is configured. Once the configuration is wrong, the area to which the interface belongs is reconfigured, and manual work is under too much pressure.
  • this application proposes a method for configuring interfaces of devices in a campus network to improve the configuration efficiency of device interfaces in the campus network.
  • the device role is also the identity of the network device in the campus network.
  • the identity is used to indicate the position of the network device in the network topology of the campus network.
  • the device Roles include: convergence equipment, core equipment, and access equipment. If the device role is an aggregation device, the network devices connected to it can include core devices, access devices, and aggregation devices; if the device role is a core device, the network devices connected to it can include core devices and aggregation devices; if the device role is Access equipment, the network equipment connected to it may include access equipment and aggregation equipment.
  • OSPF neighbor devices are also network devices that are connected to network devices and support the OSPF protocol, and network devices that can interact with network devices through OSPF messages.
  • OSPF area that is, on the basis of the network equipment supporting the OSPF protocol, each network equipment is divided into multiple areas, and LSDBs are generated independently in different areas.
  • 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.
  • references described in the specification of this application to "one embodiment” or “some embodiments”, etc. mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in conjunction 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.
  • the device roles of network devices in the campus network include aggregation devices, core devices, and access devices.
  • this application explains how each device configures the OSPF area to which the interface belongs from the perspective of different device roles.
  • Figure 2 illustrates the process of describing the interface configuration method of devices in a campus network from the perspective of the device role as the convergence device.
  • the convergence device can first perform step 201 to obtain the device role of the OSPF neighbor device connected to each interface of the network device.
  • the device role of OSPF neighbor devices may include access devices or core devices.
  • Step 202 is then executed, and the convergence device adds the interface connected to the OSPF neighbor device whose device role is the core device to the first OSPF area.
  • Step 203 The aggregation device adds the interface connected to the first OSPF neighbor device to the second OSPF area, and the device role of the first OSPF neighbor device is the access device.
  • 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.
  • the interfaces of the convergence device 1 include interface 1 to interface 12.
  • OSPF neighbor devices include: core device 1, core device 2, access device 1, and access device 2.
  • Convergence device 1 is connected to core device 1 through interface 1 and interface 2; convergence device 1 is connected to core device 2 through interface 3 and interface 4; convergence device 1 is connected to access device 1 through interface 5 and interface 6; convergence device 1 is connected through The interface 7 and the interface 8 are connected to the access device 2.
  • aggregation device 1 can add interface 1, interface 2, interface 3, and interface 4 to OSPF area 1, and can add interface 5, interface 6, interface 7, and interface 8. All are added to OSPF area 2.
  • the aggregation device can automatically add the interface connected to the OSPF neighbor device to the designated area according to the device role of the OSPF neighbor device, without the need to configure the area to which each interface of the network device belongs. Realizing the isolation of information in the network equipment LSDB can also improve the configuration efficiency of the interfaces in the campus network.
  • the network device may also add an interface connected to the second OSPF neighbor device to the third OSPF area, and the device role of the second OSPF neighbor device may be an access device.
  • the interfaces connecting the aggregation device and different access devices can be added to different OSPF areas.
  • the interfaces of the network equipment connected to each access device can be isolated in different OSPF areas, and further Reduce the link state information in the LSDB of the network device.
  • the OSPF neighbor devices based on the convergence device 1 in FIG. 3 include: a core device 1, a core device 2, an access device 1, and an access device 2.
  • the convergence device 1 can also add the interface 5 and interface 6 connecting the convergence device 1 and the access device 1 to the OSPF area 2, and the interface 7 and the interface 8 connecting the convergence device 1 and the access device 2 to the OSPF area 3, as shown in Figure 4.
  • the convergence device 1 also includes the interface 13 and the interface 14, and the convergence device 1 is connected to the access device 3 through the interface 13 and the interface 14, the convergence device 1 can add the interface 13 and the interface 14 to the OSPF area 4, and That is, when the aggregation device is connected to multiple access devices, the interfaces connecting the aggregation device and each access device are added to different OSPF areas.
  • the device role of the OSPF neighbor device may also include an aggregation device; the network device may add an interface connected to the OSPF neighbor device whose device role is the aggregation device to the first OSPF area.
  • the OSPF neighbor devices of the aggregation device 1 may also include the aggregation device 2 and the aggregation device 3.
  • the convergence device 1 is connected to the convergence device 2 through the interface 9 and the interface 10; the convergence device 1 is connected to the convergence device 3 through the interface 11 and the interface 12.
  • Convergence device 1 can add interface 9, interface 10, interface 11, and interface 12 to OSPF area 1.
  • the network device can determine the device role of the OSPF neighbor device of the network device in the following manner:
  • the aggregation device first obtains the message sent by the OSPF neighbor device; among them, the message is the OSPF protocol message; the OSPF protocol message carries the field used to indicate the device role of the OSPF neighbor device; then the aggregation device can follow the message The field used to indicate the device role of the OSPF neighbor device to obtain the device role of the OSPF neighbor device.
  • network devices exchange information with OSPF neighbor devices through OSPF protocol packets.
  • Aggregation devices can receive packets from OSPF neighbor devices and analyze the fields in the packets that indicate the device roles of OSPF neighbor devices.
  • the device role of the OSPF neighbor device can be determined.
  • the aggregation device 1 receives the message 1 sent by the OSPF neighbor device, and the aggregation device 1 analyzes the field used to indicate the device role of the OSPF neighbor device in the message 1.
  • the device that learns the device role of the OSPF neighbor device is the access device, and the aggregation device 1 adds the interface connected to the OSPF neighbor device to the designated OSPF area according to the device role of the OSPF neighbor device.
  • the device role information of the network device needs to be manually configured, and the network device only needs to obtain the packets sent by the OSPF neighboring device
  • the device role field can automatically add its interface to the corresponding OSPF area according to the device role information of the OSPF neighboring device.
  • this application only needs to manually configure the device role information of the network device.
  • this application uses the network device to automatically configure the OSPF area to which the interface belongs, which significantly improves the configuration efficiency of the interface.
  • the possibility of the configuration error of the interface information is reduced.
  • Figure 6 is a schematic diagram of the process of describing the interface configuration method of devices in a campus network from the perspective of the device role as the core device.
  • the core device can first perform step 601 to obtain the device role of the OSPF neighbor device connected to each interface of the network device.
  • the device roles of OSPF neighbor devices may include: aggregation devices and core devices.
  • step 602 is executed, and the core device adds the interface connected to the OSPF neighbor device whose device role is the core device to the first OSPF area.
  • Step 603 The core device adds the interface connected to the first OSPF neighbor device to the second OSPF area, and the device role of the first OSPF neighbor device is the aggregation device.
  • step 602 and step 603 in FIG. 6 are not distinguished in order. They can be performed at the same time, or in the order, step 603 is performed first and then step 602 is performed, or step 602 is performed first, and step 603 is performed, and then the sequence is performed. There are no specific restrictions on the application.
  • the interfaces of the core device 1 include: interface 1 to interface 8.
  • the core device not only includes 8 interfaces, the figure is only an example, and does not limit the number of interfaces of the core device.
  • OSPF neighbor devices include: core device 2, core device 3, aggregation device 1, and aggregation device 2.
  • Core device 1 is connected to core device 2 through interface 1 and interface 2; core device 1 is connected to core device 3 through interface 3 and interface 4; core device 1 is connected to aggregation device 1 through interface 5 and interface 6; core device 1 is connected through interface 7.
  • the interface 8 is connected to the convergence device 2.
  • the core device 1 can add interface 1, interface 2, interface 3, and interface 4 to OSPF area 1, and interface 5, interface 6, interface 7 and interface 8 can be added. All are added to OSPF area 2.
  • the core device can add the interface connected to the OSPF neighbor device to the designated area according to the device role of the OSPF neighbor device, and add the interface connected to the core device to the first OSPF area, which will connect to the access device
  • the interface is added to the second OSPF area to improve the configuration efficiency of the interface in the campus network.
  • the core device may also add an interface connected to the second OSPF neighbor device to the third OSPF area, and the device role of the second OSPF neighbor device is an aggregation device. That is, the interface 5 and interface 6 connected to the convergence device 1 in Figure 7 can be added to the OSPF area 2, and the interface 7 and the interface 8 connected to the convergence device 2 can be added to the OSPF area 3, as shown in Figure 8. That is, when the core device is connected to multiple aggregation devices, the interfaces connecting the core device and each aggregation device are added to different OSPF areas. In this way, the interfaces connecting the aggregation device and each access device can be isolated in different OSPF areas, and the link state information in the LSDB of the network device can be further reduced.
  • the network device can determine the device role of the OSPF neighbor device of the network device in the following manner:
  • the core device first obtains the message sent by the OSPF neighbor device; among them, the message is an OSPF protocol message; the OSPF protocol message carries a field used to indicate the device role of the OSPF neighbor device; then the core device uses the Obtain the device role of the OSPF neighbor device in the field indicating the device role of the OSPF neighbor device.
  • network devices exchange information with OSPF neighbor devices through OSPF protocol packets.
  • Aggregation devices can receive packets from OSPF neighbor devices and analyze the fields in the packets that indicate the device roles of OSPF neighbor devices. To determine the device role of the OSPF neighbor device. For example: core device 1 receives message 2 sent by OSPF neighboring device, aggregation device 1 analyzes the field in message 2 that indicates the device role of the OSPF neighbor device, and learns that the OSPF neighbor device's device role is aggregation Device, the core device 1 adds the interface connected to the OSPF neighbor device to the designated OSPF area according to the device role of the OSPF neighbor device.
  • the device role information of the network device needs to be manually configured, and the network device only needs to obtain the packets sent by the OSPF neighboring device
  • the device role field can automatically add its interface to the corresponding OSPF area according to the device role information of the OSPF neighboring device.
  • this application only needs to manually configure the device role information of the network device.
  • this application uses the network device to automatically configure the OSPF area to which the interface belongs, which significantly improves the configuration efficiency of the interface.
  • the possibility of the configuration error of the interface information is reduced.
  • Figure 9 is a schematic description of the interface configuration method of the devices in the campus network from the perspective of the device role as the access device.
  • the access device can first perform step 901 to obtain the device role of the OSPF neighbor device connected to each interface of the network device.
  • the device role of the OSPF neighbor device may include: an access device and an aggregation device.
  • Step 902 If the OSPF neighbor devices of the network device include the OSPF neighbor device whose device role is the access device, the network device adds the interface connected to the OSPF neighbor device whose device role is the aggregation device into the first OSPF area, and The interface connected to the OSPF neighbor device whose device role is the access device is added to the second OSPF area.
  • Step 903 If the OSPF neighbor devices of the network device only include OSPF neighbor devices whose device role is the aggregation device, the network device adds the interface connected to the OSPF neighbor device whose device role is the aggregation device to the second OSPF area.
  • step 902 and step 903 in FIG. 9 are not distinguished in order. They can be executed at the same time, or in the order, step 903 is executed first, then step 902 is executed, or step 902 is executed first, then step 903 is executed, and then the sequence is executed. There are no specific restrictions on the application.
  • the OSPF neighbor devices of access device 1 only include: aggregation device 1 and aggregation device 2.
  • the access device 1 is connected to the convergence device 1 through the interface 1 and the interface 2; the access device 1 is connected to the convergence device 2 through the interface 3 and the interface 4.
  • Convergence device 1 can add interface 1, interface 2, interface 3, and interface 4 to OSPF area 2.
  • the scale of the campus network continues to expand, and the network topology of the campus network will also change.
  • the access device After the access device is connected to the aggregation device, it can also be connected to the access device. Because the access device is connected to the aggregation device as well as other connections. If the incoming device is connected, the interface connecting the access device and the aggregation device can be moved from OSPF area 2 to OSPF area 1.
  • the LSDB in OSPF area 1 can store more link state information than the LSDB in OSPF area 2. .
  • add the interface connecting the access device and the aggregation device to OSPF area 1 instead of the interface connecting the access device and other access devices They are all configured in OSPF area 2. This method can reduce the link state information stored in the LSDB of each network device in OSPF area 2.
  • the interfaces of the access device 1 include: interface 1 to interface 8.
  • the actual access device not only includes 8 interfaces, the figure is only an example, and does not limit the number of interfaces of the access device.
  • the OSPF neighbor devices of the access device 1 include: convergence device 1, convergence device 2, access device 2, and access device 3.
  • Access device 1 is connected to convergence device 1 through interface 1 and interface 2; access device 1 is connected to convergence device 2 through interface 3 and interface 4; access device 1 is connected to access device 2 through interface 5 and interface 6;
  • the access device 1 is connected to the access device 3 through the interface 7 and the interface 8.
  • aggregation device 1 can add interface 1, interface 2, interface 3, and interface 4 to OSPF area 1, and interface 5, interface 6, interface 7, and interface 8 can be added. All are added to OSPF area 2.
  • interface 5 and interface 6 connecting access device 1 and access device 2 can be added to OSPF area 2
  • interface 7 and interface 8 connecting access device 1 and access device 3 can be added to OSPF area 3.
  • Figure 12 that is, when an access device is connected to multiple access devices, the interfaces connecting the access device and each access device are added to different OSPF areas. In this way, the interfaces of the network device connected to each access device are isolated in different OSPF areas, and the link state information in the LSDB of the network device is further reduced.
  • the network device can determine the device role of the OSPF neighbor device of the network device in the following manner:
  • the access device first obtains the message sent by the OSPF neighbor device; among them, the message is an OSPF protocol message; the OSPF protocol message carries a field used to indicate the device role of the OSPF neighbor device; then the access device according to the message The field used to indicate the device role of the OSPF neighbor device to obtain the device role of the OSPF neighbor device.
  • Network devices in the campus network exchange information with OSPF neighboring devices through OSPF protocol packets.
  • Access devices can receive OSPF neighboring devices' packets, and by checking the fields in the packets that indicate the role of OSPF neighboring devices. Analyze to determine the device role of the OSPF neighbor device. For example, the core device 1 receives the message 3 sent by the OSPF neighbor device, and the access device 1 analyzes the field used to indicate the device role of the OSPF neighbor device in the message 2. It is learned that the device role of the OSPF neighbor device is an aggregation device, and the access device 1 adds the interface connected to the OSPF neighbor device to the designated OSPF area according to the device role of the OSPF neighbor device.
  • the device role information of the network device needs to be manually configured, and the network device only needs to obtain the packets sent by the OSPF neighboring device
  • the device role field can automatically add its interface to the corresponding OSPF area according to the device role information of the OSPF neighboring device.
  • this application only needs to manually configure the device role information of the network device.
  • this application uses the network device to automatically configure the OSPF area to which the interface belongs, which significantly improves the configuration efficiency of the interface.
  • the possibility of the configuration error of the interface information is reduced.
  • an embodiment of the present application also provides a network device, as shown in FIG. 13, including: a communication unit 131 and a processing unit 132.
  • the communication unit 131 is used to obtain the device role of the OSPF neighboring device connected to each interface of the network device.
  • the device role of the OSPF neighboring device includes: access device or core device; the processing unit 132 uses For adding the interface connected to the OSPF neighboring device with the device role as the core device to the first OSPF area; and for adding the interface connected to the first OSPF neighboring device to the second OSPF area, the first OSPF neighboring device
  • the role of the device is an access device.
  • the network device whose device role is the aggregation device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, each network can be realized. Isolation of the information in the device LSDB can automatically add the interface of the network device to the designated OSPF area according to the role of the device. This method improves the configuration efficiency of the device interface in the campus network.
  • the network device adds the interface connected to the second OSPF neighbor device to the third OSPF area, and the device role of the second OSPF neighbor device is the access device.
  • the interfaces connected to OSPF neighbor devices with multiple device roles as access devices are added to different OSPF areas, which can reduce the link state information stored in the LSDB of the network device.
  • the device role of the OSPF neighbor device further includes: an aggregation device; the network device adds an interface connected to the OSPF neighbor device whose device role is the aggregation device to the first OSPF area.
  • the configuration efficiency of the device interface in the campus network can be improved by adding the interface connected to the OSPF neighboring device whose device role is the aggregation device to the first OSPF area.
  • the network device obtains the message sent by the OSPF neighboring device; among them, the message is an OSPF protocol message; the OSPF protocol message carries a field for indicating the device role of the OSPF neighboring device; The network device then obtains the device role of the OSPF neighbor device according to the field used to indicate the device role of the OSPF neighbor device in the message.
  • the network device can obtain the device role of the OSPF neighbor device through the device role field in the message sent by the OSPF neighbor device. After the network device obtains the device role of the OSPF neighbor device, it is convenient to accurately add the interface connected to the OSPF neighbor device to the specified In the area.
  • an embodiment of the present application also provides a network device, as shown in FIG. 14, including: a communication unit 141 and a processing unit 142.
  • the communication unit 141 is used to obtain the device roles of the OSPF neighbor devices connected to each interface of the network device.
  • the device roles of the OSPF neighbor devices include: aggregation devices or core devices; The interface connected to the OSPF neighboring device with the role of the core device is added to the first OSPF area; and the first is used to add the interface connected to the first OSPF neighboring device to the second OSPF area.
  • the device role of the first OSPF neighboring device is Convergence equipment.
  • the network device whose device role is the core device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, each network can be realized. Isolation of the information in the device LSDB can automatically add the interface of the network device to the designated OSPF area according to the role of the device. This method improves the configuration efficiency of the device interface in the campus network.
  • the network device adds the interface connected to the second OSPF neighbor device to the third OSPF area, and the device role of the second OSPF neighbor device is the aggregation device.
  • the network device obtains the message sent by the OSPF neighboring device; among them, the message is an OSPF protocol message; the OSPF protocol message carries a field for indicating the device role of the OSPF neighboring device; After that, the network device obtains the device role of the OSPF neighbor device according to the field used to indicate the device role of the OSPF neighbor device in the message.
  • the network device can obtain the device role of the OSPF neighbor device through the device role field in the message sent by the OSPF neighbor device. After the network device obtains the device role of the OSPF neighbor device, it is convenient to accurately add the interface connected to the OSPF neighbor device to the specified In the area.
  • an embodiment of the present application also provides a network device, as shown in FIG. 15, including: a communication unit 151 and a processing unit 152.
  • the communication unit 151 is used to obtain the device roles of the OSPF neighbor devices connected to the various interfaces of the network device.
  • the device roles of the OSPF neighbor devices include: access devices and aggregation devices; the processing unit 152 is configured to OSPF neighbor devices include OSPF neighbor devices whose device role is an access device, then the network device adds the interface connected to the OSPF neighbor device whose device role is the aggregation device to the first OSPF area, and sets the device role as the access device
  • the interface connected to the OSPF neighboring device of the network device is added to the second OSPF area; and used for if the OSPF neighboring device of the network device only includes the OSPF neighboring device whose device role is the aggregation device, the network device will be the same as the OSPF device whose role is the aggregation device
  • the interface to which the neighboring device is connected is added to the second OSPF area.
  • the network device whose device role is the access device can add the interfaces connected to the OSPF neighbor device to different OSPF areas according to the device role of the OSPF neighbor device connected to it. In this way, each can be realized.
  • the isolation of information in the LSDB of the network device can also automatically add the interface of the network device to the designated OSPF area according to the role of the device. This method improves the configuration efficiency of the device interface in the campus network.
  • the network device obtains the message sent by the OSPF neighboring device; among them, the message is an OSPF protocol message; the OSPF protocol message carries a field for indicating the device role of the OSPF neighboring device; The network device then obtains the device role of the OSPF neighbor device according to the field used to indicate the device role of the OSPF neighbor device in the message.
  • the network device can obtain the device role of the OSPF neighbor device through the device role field in the message sent by the OSPF neighbor device. After the network device obtains the device role of the OSPF neighbor device, it is convenient to accurately add the interface connected to the OSPF neighbor device to the specified In the area.
  • a communication device 1600 is provided for this application.
  • the communication device 1600 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 apparatus 1600 may include at least one processor 1610, and the apparatus 1600 may also include at least one memory 1620 for storing computer programs, program instructions, and/or data.
  • the memory 1620 and the processor 1610 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 1610 may operate in cooperation with the memory 1620.
  • the processor 1610 may execute a computer program stored in the memory 1620.
  • at least one of the at least one memory 1620 may be included in the processor 1610.
  • the communication device 1600 may further include a transceiver 1630, and the communication device 1600 may exchange information with other devices through the transceiver 1630.
  • the transceiver 1630 may be a circuit, a bus, a transceiver, or any other device that can be used for information exchange.
  • the communication apparatus 1600 may be applied to the aforementioned network equipment.
  • the communication apparatus 1600 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 1620 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 1610 can execute the computer program stored in the memory 1620 to complete the method in any of the foregoing embodiments.
  • the specific connection medium between the transceiver 1630, the processor 1610, and the memory 1620 is not limited in the embodiment of the present application.
  • the memory 1620, the processor 1610, and the transceiver 1630 are connected by a bus in FIG. 16.
  • 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 in FIG. 16, 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 1700, including: an interface circuit 1710 and a processor 1720; the interface circuit 1710 is configured to receive code instructions and transmit them to the processor 1720; The processor 1720 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 methods, systems, or computer program products. 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.
  • 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)
  • Computer And Data Communications (AREA)

Abstract

提供一种园区网中设备的接口配置方法及网络设备,涉及通信技术领域。该方法包括:网络设备先获取网络设备的各个接口连接的开放最短路径优先OSPF邻居设备的设备角色,之后网络设备根据OSPF邻居设备的设备角色将网络设备的接口添加至指定的OSPF区域中。该方式根据网络设备的设备角色以及OSPF邻居设备的设备角色自动配置网络设备的接口所属的OSPF区域,相对于人工一一配置网络设备的接口所属的OSPF区域,可以提高设备接口的配置效率。

Description

园区网中设备的接口配置方法及网络设备
相关申请的交叉引用
本申请要求在2020年06月19日提交中国专利局、申请号为202010567176.0、申请名称为“园区网中设备的接口配置方法及网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种园区网中设备的接口配置方法及网络设备。
背景技术
随着园区网规模的扩大,网络设备的链路数据库(link state data base,LSDB)中存储的链路状态信息也不断的增加,存储占据了网络设备大量的资源空间,网络设备的数据处理负担加重。为了降低网络设备的数据处理负担,人为将网络设备的各接口添加到不同的开放最短路径优先(open shortest path first,OSPF)区域中,在不同的区域中单独配置LSDB,来减少各设备LSDB中存储的链路状态信息。
该方式虽然可以减少网络设备承载的大量链路状态信息的压力,但在配置网络设备所属的区域时,需要配置大量的信息,如:设备的各个接口、进程号等。然而,就网络设备的接口而言,可能有成百上千个,人为对网络设备的接口一一配置所属的区域,不仅增加了时间成本,而且配置效率低下。
发明内容
基于此,本申请提供一种园区网中设备的接口配置方法及网络设备,以提高园区网中设备接口的配置效率。
第一方面,本申请提供一种园区网中设备的接口配置方法,该方法中,设备角色为汇聚设备的网络设备获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:接入设备或核心设备;之后网络设备将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为接入设备。
本申请中,设备角色为汇聚设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式可以提高设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备还可以将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,第二OSPF邻居设备的设备角色为接入设备。
通过该方式将与多个设备角色为接入设备的OSPF邻居设备连接的接口,分别添加到不同的OSPF区域,可以减少网络设备的LSDB中存储的链路状态信息。
在一种可能的实现方式中,OSPF邻居设备的设备角色还包括汇聚设备;网络设备将 与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中。
通过将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中可以提高设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备获取网络设备的各个接口连接的OSPF邻居设备的设备角色,可以包括:网络设备获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后网络设备根据报文中用于指示OSPF邻居设备的设备角色的字段,可以获取OSPF邻居设备的设备角色。
通过该方式网络设备可通过OSPF邻居设备发送的报文中设备角色字段获取OSPF邻居设备的设备角色,网络设备获取OSPF邻居设备的设备角色后,便于准确将与OSPF邻居设备连接的接口添加到指定的区域中。
第二方面,本申请提供一种园区网中设备的接口配置方法,该方法中,设备角色为核心设备的网络设备获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:汇聚设备或核心设备;之后网络设备将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为汇聚设备。
本申请中,设备角色为核心设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式可提高设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备还可以将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,第二OSPF邻居设备的设备角色为汇聚设备。
通过将与另一设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第三OSPF区域中,可将园区网中各汇聚设备的接口分区域配置,提高设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备获取网络设备的各个接口连接的OSPF邻居设备的设备角色,可以包括网络设备获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后网络设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
通过该方式网络设备可通过OSPF邻居设备发送的报文中设备角色字段获取OSPF邻居设备的设备角色,网络设备获取OSPF邻居设备的设备角色后,便于准确将与OSPF邻居设备连接的接口添加到指定的区域中。
第三方面,本申请提供一种园区网中设备的接口配置方法,该方法中,设备角色为接入设备的网络设备获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:接入设备以及汇聚设备;如果网络设备的OSPF邻居设备中包括设备角色为接入设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中,并将与设备角色为接入设备的OSPF邻居设备连接的接口添加至第二OSPF区域中;如果网络设备的OSPF邻居设备中仅包括设备角色为汇聚设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第二OSPF区域中。
本申请中,设备角色为接入设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式可以提高设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备获取网络设备的各个接口连接的OSPF邻居设备的设备角色,可以包括网络设备获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后网络设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
通过该方式网络设备可通过OSPF邻居设备发送的报文中设备角色字段获取OSPF邻居设备的设备角色,网络设备获取OSPF邻居设备的设备角色后,便于准确将与OSPF邻居设备连接的接口添加到指定的区域中。
第四方面,本申请提供一种网络设备,网络设备的设备角色为汇聚设备,包括:通信单元以及处理单元。其中,通信单元,用于获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:接入设备以及核心设备;处理单元,用于将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;以及用于将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为接入设备。
本申请中,设备角色为汇聚设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式提高了设备接口在园区网中的配置效率。
第五方面,本申请提供一种网络设备,网络设备的设备角色为核心设备,包括:通信单元以及处理单元。其中,通信单元,用于获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:汇聚设备以及核心设备;处理单元,用于将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;以及用于将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为汇聚设备。
本申请中,设备角色为核心设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式提高了设备接口在园区网中的配置效率。
第六方面,本申请提供一种网络设备,包括:通信单元以及处理单元。其中,通信单元,用于获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:接入设备以及汇聚设备;处理单元,用于如果网络设备的OSPF邻居设备中包括设备角色为接入设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中,并将与设备角色为接入设备的OSPF邻居设备连接的接口添加至第二OSPF区域中;以及用于如果网络设备的OSPF邻居设备中仅包括设备角色为汇聚设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第二OSPF区域中。
本申请中,设备角色为接入设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式提高了设备接口在园区网中的配置效率。
第七方面,本申请提供一种通信装置,包括处理器和存储器;所述存储器存储有计算机程序;所述处理器用于执行所述存储器中存储的计算机程序,以使得上述第一方面至第三方面任一实现方式所述的方法被执行。
第八方面,本申请提供一种通信装置,包括处理器和接口电路;所述接口电路用于接收代码指令并传输至所述处理器;所述处理器用于运行所述代码指令以执行上述第一方面至第三方面任一实现方式所述的方案。
第九方面,本申请提供一种计算机可读存储介质,计算机存储介质中存储有计算机可读指令,当计算机读取并执行计算机可读指令时,使得计算机执行上述第一方面至第三方面任一实现方式所述的方案。
第十方面,本申请提供一种计算机程序产品,当计算机读取并执行计算机程序产品时,使得计算机执行如执行上述第一方面至第三方面任一实现方式所述的方案。
上述第四方面至第十方面可以达到的技术效果,请参照上述第一方面至第三方面中相应可能设计方案可以达到的技术效果说明,本申请这里不再重复赘述。
附图说明
图1示出了一种园区网的结构示意图;
图2示出了本申请实施例提供的园区网中设备的接口配置方法的流程示意图;
图3示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图4示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图5示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图6示出了本申请实施例提供的园区网中设备的接口配置方法的流程示意图;
图7示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图8示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图9示出了本申请实施例提供的园区网中设备的接口配置方法的流程示意图;
图10示出了本申请实施例提供的区网中设备的接口配置的示意图;
图11示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图12示出了本申请实施例提供的园区网中设备的接口配置的示意图;
图13示出了本申请实施例提供的网络设备的结构示意图;
图14示出了本申请实施例提供的网络设备的结构示意图;
图15示出了本申请实施例提供的网络设备的结构示意图;
图16示出了本申请实施例提供的通信装置的结构示意图;
图17示出了本申请实施例提供的通信装置的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图, 对本申请实施例中的技术方案进行详尽描述。
园区网主要包括终端层、接入层、汇聚层以及核心层,如图1所示,其中,终端层包括接入园区网的终端设备,如:智能终端、手机、个人计算机(personal computer,PC)、打印机等。接入层为终端设备提供园区网接入功能,是园区网的边界。接入层包括接入设备,接入设备可与终端设备通讯连接。接入设备与汇聚层的网络设备通过接口连接。汇聚层将接入层和核心层连接起来,汇聚层包括汇聚设备。核心层为园区网的骨干区域,可与汇聚层以及园区网的其他组成部分(如果有的话)连接。园区网的其他组成部分例如数据中心。核心层可以为园区网的出口,核心层包括核心设备。
此外,核心层的网络设备是通过出口区的网络设备与园区外的网络(Internet(互联网)或广域网(wide area network,WAN))建立连接,从而实现数据信息的交互,其中,园区网中各层的网络设备可以为交换机也可以为路由器,在此不做具体限定。
通常园区网中的网络设备配置有链路状态协议,基于链路状态协议可发现路由,确定路由转发表,指导报文的转发。为了使得园区网中的设备能够转发报文信息,通常各设备的LSDB中存储有园区网中所有设备的链路状态信息。如背景技术所述,为了减少各设备LSDB中存储的链路状态信息,可人为将配置有OSPF协议的网络设备的各个接口添加到指定的OSPF区域中,在不同的区域中单独配置LSDB,但是该方式通过人工配置各个网络设备接口添加到OSPF区域中,费时费力。另外,人在疲劳时,配置大量接口信息易出现配置错误,一旦配置错误,重新配置接口所属的区域,人工作业压力过大。
基于此,本申请提出一种园区网中设备的接口配置方法,以提高园区网中设备接口的配置效率。
应理解,本申请实施例中,设备角色也即网络设备在园区网中的身份标识,该身份标识用于指示网络设备在园区网的网络拓扑中所处的位置,针对本申请而言,设备角色包括:汇聚设备、核心设备以及接入设备。若设备角色为汇聚设备,则与其连接的网络设备可包括核心设备、接入设备以及汇聚设备;若设备角色为核心设备,则与其连接的网络设备可包括核心设备以及汇聚设备;若设备角色为接入设备,则与其连接的网络设备可包括接入设备以及汇聚设备。
OSPF邻居设备也即与网络设备连接且支持OSPF协议的网络设备,可与网络设备通过OSPF报文进行信息交互的网络设备。
OSPF区域,也即在网络设备支持OSPF协议的基础上,将各网络设备分成多个区域,在不同的区域中独立生成LSDB。
其中,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,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可以是单个,也可以是多个。单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。以及,除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个 或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
园区网中网络设备的设备角色包括汇聚设备、核心设备以及接入设备,下面本申请分别站在不同设备角色的角度来说明各设备如何配置接口所属的OSPF区域的。
图2为站在设备角色为汇聚设备的角度,示意的描述园区网中设备的接口配置方法的流程,汇聚设备可先执行步骤201,获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色可以包括接入设备或核心设备。
之后执行步骤202,汇聚设备将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中。
步骤203,汇聚设备将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为接入设备。
此外,图2中的步骤202和步骤203可以不区分先后顺序,可同时执行,也可按照次序,先执行步骤203后执行步骤202,亦或者先执行步骤202后执行步骤203,在执行顺序上本申请不作具体的限定。
例如,如图3所示,汇聚设备1的接口包括接口1至接口12。OSPF邻居设备包括:核心设备1、核心设备2、接入设备1以及接入设备2。汇聚设备1通过接口1、接口2与核心设备1连接;汇聚设备1通过接口3、接口4与核心设备2连接;汇聚设备1通过接口5、接口6与接入设备1连接;汇聚设备1通过接口7、接口8与接入设备2连接。根据图2示意的园区网中设备的接口配置方法,汇聚设备1可将接口1、接口2、接口3以及接口4添加到OSPF区域1中,可将接口5、接口6、接口7以及接口8均添加到OSPF区域2中。
通过该方式汇聚设备可根据OSPF邻居设备的设备角色,将其与OSPF邻居设备连接的接口自动添加到指定的区域中,而无需一一配置网络设备的各个接口所属的区域,通过该方式既可实现网络设备LSDB中信息的隔离,又可提高园区网中接口的配置效率。
在一个实施例中,网络设备还可将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,第二OSPF邻居设备的设备角色可以为接入设备。通过该方式可将汇聚设备与不同的接入设备连接的接口,分别添加到不同的OSPF区域,通过该方式将网络设备的与各接入设备连接的接口隔离在不同的OSPF区域中,进一步地减少网络设备LSDB中的链路状态信息。
基于图3中的汇聚设备1的OSPF邻居设备包括:核心设备1、核心设备2、接入设备1以及接入设备2。其中,汇聚设备1还可将汇聚设备1与接入设备1连接的接口5以及接口6添加至OSPF区域2中,将汇聚设备1与接入设备2连接的接口7以及接口8添加至OSPF区域3中,如图4所示。此外,若汇聚设备1还包括接口13以及接口14,且汇聚设备1通过接口13和接口14同接入设备3连接,则汇聚设备1可将接口13以及接口14添加至OSPF区域4中,也即汇聚设备与多个接入设备连接时,则将汇聚设备与各接入设备连接的接口分别添加在不同的OSPF区域中。
在一个实施例中,OSPF邻居设备的设备角色还可以包括汇聚设备;网络设备可将与 设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中。如图5所示,仅在图3的基础上进行的具体示意,汇聚设备1的OSPF邻居设备还可以包括汇聚设备2以及汇聚设备3。其中,汇聚设备1通过接口9、接口10与汇聚设备2连接;汇聚设备1通过接口11、接口12与汇聚设备3连接。汇聚设备1可将接口9、接口10、接口11以及接口12添加到OSPF区域1。通过将设备角色为汇聚设备的OSPF邻居设备添加至第一OSPF区域中可以提高设备接口在园区网中的配置效率。
在一个实施例中,网络设备可通过如下方式确定网络设备的OSPF邻居设备的设备角色:
汇聚设备首先获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后汇聚设备可以根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
园区网中网络设备是通过OSPF协议的报文与OSPF邻居设备来交互信息的,汇聚设备可接收OSPF邻居设备的报文,通过对报文中用于指示OSPF邻居设备的设备角色的字段进行解析,就可以确定OSPF邻居设备的设备角色,如:汇聚设备1接收到OSPF邻居设备发送的报文1,汇聚设备1通过对报文1中用于指示OSPF邻居设备的设备角色的字段进行解析,获悉该OSPF邻居设备的设备角色的为接入设备,汇聚设备1则根据该OSPF邻居设备的设备角色将其与OSPF邻居设备连接的接口添加到指定的OSPF区域中。
本申请与需要人工将网络设备成千上万的接口一一配置所属的OSPF区域的方案相比,仅需人工配置网络设备的设备角色信息,网络设备仅需获取OSPF邻居设备发送的报文中设备角色字段,则可根据OSPF邻居设备的设备角色信息,自动将其接口添加到对应的OSPF区域。相对于需要人工一一配置接口信息,本申请仅需人工配置网络设备的设备角色信息。相对人工一一配置接口所属的OSPF区域,本申请通过网络设备自动配置接口所属的OSPF区域,显著提高了接口的配置效率。此外,由于人工配置成千上万接口信息时出错的可能大,而本申请通过网络设备自动配置接口信息,降低了接口信息的配置错误的可能。
图6为站在设备角色为核心设备的角度,示意的描述园区网中设备的接口配置方法的流程,核心设备可先执行步骤601,获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色可以包括:汇聚设备以及核心设备。
之后执行步骤602,核心设备将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中。
步骤603,核心设备将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为汇聚设备。
此外,图6中的步骤602和步骤603不区分先后顺序,可同时执行,也可按照次序,先执行步骤603后执行步骤602,亦或者先执行步骤602后执行步骤603,再执行顺序上本申请不做具体的限定。
例如,如图7所示,核心设备1的接口包括:接口1至接口8。实际应用时,核心设备不仅包括8个接口,该图仅做例子,并不限定核心设备的接口数量。OSPF邻居设备包括:核心设备2、核心设备3、汇聚设备1以及汇聚设备2。核心设备1通过接口1、接口2与核心设备2连接;核心设备1通过接口3、接口4与核心设备3连接;核心设备1通 过接口5、接口6与汇聚设备1连接;核心设备1通过接口7、接口8与汇聚设备2连接。根据图6示意的园区网中设备的接口配置方法,核心设备1可将接口1、接口2、接口3以及接口4添加到OSPF区域1中,可将接口5、接口6、接口7以及接口8均添加到OSPF区域2中。
通过该方式核心设备可根据OSPF邻居设备的设备角色,将其与OSPF邻居设备连接的接口添加到指定的区域中,将与核心设备连接的接口添加到第一OSPF区域,将与接入设备连接的接口添加到第二OSPF区域,提高园区网中接口的配置效率。
在一个实施例中,核心设备还可将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,第二OSPF邻居设备的设备角色为汇聚设备。也即,可将图7中与汇聚设备1连接的接口5以及接口6添加到OSPF区域2,将与汇聚设备2连接的接口7以及接口8添加到OSPF区域3中如图8所示,也即核心设备与多个汇聚设备连接时,则将核心设备与各汇聚设备连接的接口分别添加在不同的OSPF区域中。通过该方式可将汇聚设备与各接入设备连接的接口隔离在不同的OSPF区域中,进一步地减少网络设备LSDB中的链路状态信息。
在一个实施例中,网络设备可通过如下方式确定网络设备的OSPF邻居设备的设备角色:
核心设备首先获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后核心设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
园区网中网络设备是通过OSPF协议的报文与OSPF邻居设备来交互信息的,汇聚设备可接收OSPF邻居设备的报文,通过对报文中用于指示OSPF邻居设备的设备角色的字段进行解析,确定OSPF邻居设备的设备角色。如:核心设备1接收到OSPF邻居设备发送的报文2,汇聚设备1通过对报文2中用于指示OSPF邻居设备的设备角色的字段进行解析,获悉该OSPF邻居设备的设备角色的为汇聚设备,核心设备1则根据该OSPF邻居设备的设备角色将其与OSPF邻居设备连接的接口添加到指定的OSPF区域中。
本申请与需要人工将网络设备成千上万的接口一一配置所属的OSPF区域的方案相比,仅需人工配置网络设备的设备角色信息,网络设备仅需获取OSPF邻居设备发送的报文中设备角色字段,则可根据OSPF邻居设备的设备角色信息,自动将其接口添加到对应的OSPF区域。相对于需要人工一一配置接口信息,本申请仅需人工配置网络设备的设备角色信息。相对人工一一配置接口所属的OSPF区域,本申请通过网络设备自动配置接口所属的OSPF区域,显著提高了接口的配置效率。此外,由于人工配置成千上万接口信息时出错的可能性较大,而本申请通过网络设备自动配置接口信息,降低了接口信息的配置错误的可能。
图9为站在设备角色为接入设备的角度,示意的描述园区网中设备的接口配置方法,接入设备可先执行步骤901,获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色可以包括:接入设备以及汇聚设备。
步骤902,如果网络设备的OSPF邻居设备中包括设备角色为接入设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中,并将与设备角色为接入设备的OSPF邻居设备连接的接口添加至第二OSPF区域 中。
步骤903,如果网络设备的OSPF邻居设备中仅包括设备角色为汇聚设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第二OSPF区域中。
此外,图9中的步骤902和步骤903不区分先后顺序,可同时执行,也可按照次序,先执行步骤903后执行步骤902,亦或者先执行步骤902后执行步骤903,再执行顺序上本申请不做具体的限定。
例如,如图10所示,接入设备1的OSPF邻居设备仅包括:汇聚设备1以及汇聚设备2。接入设备1通过接口1、接口2与汇聚设备1连接;接入设备1通过接口3、接口4与汇聚设备2连接。汇聚设备1可将接口1、接口2、接口3以及接口4添加到OSPF区域2中。
园区网的规模不断的扩大,园区网的网络拓扑也会发生变化,接入设备在与汇聚设备连接后,其还可与接入设备连接,由于接入设备除了与汇聚设备连接还与其他接入设备连接,则可将该接入设备与汇聚设备连接的接口从OSPF区域2中移动到OSPF区域1中,其中,OSPF区域1的LSDB相对OSPF区域2的LSDB可以存储更多的链路状态信息。在接入设备连接了汇聚设备后还与接入设备连接时,将接入设备与汇聚设备连接的接口添加到OSPF区域1,而非将该接口与接入设备与其他接入设备连接的接口均配置在OSPF区域2,该方式可以减少OSPF区域2中各网络设备LSDB中存储的链路状态信息。
例如,如图11所示,接入设备1的接口包括:接口1至接口8。实际接入设备不仅包括8个接口,该图仅做例子,并不限定接入设备的接口数量。接入设备1的OSPF邻居设备包括:汇聚设备1、汇聚设备2、接入设备2以及接入设备3。接入设备1通过接口1、接口2与汇聚设备1连接;接入设备1通过接口3、接口4与汇聚设备2连接;接入设备1通过接口5、接口6与接入设备2连接;接入设备1通过接口7、接口8与接入设备3连接。根据图9示意的园区网中设备的接口配置方法,汇聚设备1可将接口1、接口2、接口3以及接口4添加到OSPF区域1中,可将接口5、接口6、接口7以及接口8均添加到OSPF区域2中。
另外,还可将接入设备1与接入设备2连接的接口5、接口6添加到OSPF区域2中,将接入设备1与接入设备3连接的接口7、接口8添加到OSPF区域3中如图12所示,也即接入设备与多个接入设备连接时,则将接入设备与各接入设备连接的接口分别添加在不同的OSPF区域中。通过该方式将网络设备的与各接入设备连接的接口隔离在不同的OSPF区域中,进一步地减少网络设备LSDB中的链路状态信息。
在一个实施例中,网络设备可通过如下方式确定网络设备的OSPF邻居设备的设备角色:
接入设备首先获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后接入设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
园区网中网络设备是通过OSPF协议的报文与OSPF邻居设备来交互信息的,接入设备可接收OSPF邻居设备的报文,通过对报文中用于指示OSPF邻居设备的设备角色的字段进行解析,确定OSPF邻居设备的设备角色,如:核心设备1接收到OSPF邻居设备发送的报文3,接入设备1通过对报文2中用于指示OSPF邻居设备的设备角色的字段进行 解析,获悉该OSPF邻居设备的设备角色为汇聚设备,接入设备1则根据该OSPF邻居设备的设备角色将其与OSPF邻居设备连接的接口添加到指定的OSPF区域中。
本申请与需要人工将网络设备成千上万的接口一一配置所属的OSPF区域的方案相比,仅需人工配置网络设备的设备角色信息,网络设备仅需获取OSPF邻居设备发送的报文中设备角色字段,则可根据OSPF邻居设备的设备角色信息,自动将其接口添加到对应的OSPF区域。相对于需要人工一一配置接口信息,本申请仅需人工配置网络设备的设备角色信息。相对人工一一配置接口所属的OSPF区域,本申请通过网络设备自动配置接口所属的OSPF区域,显著提高了接口的配置效率。此外,由于人工配置成千上万接口信息时出错的可能性较大,而本申请通过网络设备自动配置接口信息,降低了接口信息的配置错误的可能。
基于同一技术构思,本申请实施例还提供一种网络设备,如图13所示,包括:通信单元131、处理单元132。
其中,通信单元131,用于获取网络设备的各个接口连接的开放式最短路径优先OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:接入设备或核心设备;处理单元132,用于将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;以及,用于将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为接入设备。
本申请实施例中,设备角色为汇聚设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式提高了设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,第二OSPF邻居设备的设备角色为接入设备。
通过该方式将与多个设备角色为接入设备的OSPF邻居设备连接的接口,分别添加到不同的OSPF区域,可以减少网络设备的LSDB中存储的链路状态信息。
在一种可能的实现方式中,OSPF邻居设备的设备角色还包括:汇聚设备;网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中。
通过将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中可以提高设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后网络设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
通过该方式网络设备可通过OSPF邻居设备发送的报文中设备角色字段获取OSPF邻居设备的设备角色,网络设备获取OSPF邻居设备的设备角色后,便于准确将与OSPF邻居设备连接的接口添加到指定的区域中。
基于同一技术构思,本申请实施例还提供一种网络设备,如图14所示,包括:通信单元141、处理单元142。
其中,其中,通信单元141,用于获取网络设备的各个接口连接的OSPF邻居设备的 设备角色,其中,OSPF邻居设备的设备角色包括:汇聚设备或核心设备;处理单元142,用于将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;第以及用于将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,第一OSPF邻居设备的设备角色为汇聚设备。
本申请实施例中,设备角色为核心设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式提高了设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,第二OSPF邻居设备的设备角色为汇聚设备。
通过将与另一设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第三OSPF区域中,可将园区网中各汇聚设备的接口分区域配置,提高设备接口在园区网中的配置效率。在一种可能的实现方式中,网络设备获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后网络设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
通过该方式网络设备可通过OSPF邻居设备发送的报文中设备角色字段获取OSPF邻居设备的设备角色,网络设备获取OSPF邻居设备的设备角色后,便于准确将与OSPF邻居设备连接的接口添加到指定的区域中。
基于同一技术构思,本申请实施例还提供一种网络设备,如图15所示,包括:通信单元151、处理单元152。
其中,通信单元151,用于获取网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,OSPF邻居设备的设备角色包括:接入设备以及汇聚设备;处理单元152,用于如果网络设备的OSPF邻居设备中包括设备角色为接入设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中,并将与设备角色为接入设备的OSPF邻居设备连接的接口添加至第二OSPF区域中;以及用于如果网络设备的OSPF邻居设备中仅包括设备角色为汇聚设备的OSPF邻居设备,则网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第二OSPF区域中。
本申请实施例中,设备角色为接入设备的网络设备可根据与其连接的OSPF邻居设备的设备角色,将与OSPF邻居设备连接的接口添加到不同的OSPF区域中,通过该方式既可以实现各网络设备LSDB中信息的隔离,又可根据设备角色将网络设备的接口自动添加到指定的OSPF区域中,该方式提高了设备接口在园区网中的配置效率。
在一种可能的实现方式中,网络设备获取OSPF邻居设备发送的报文;其中,报文为OSPF协议的报文;OSPF协议的报文中携带有用于指示OSPF邻居设备的设备角色的字段;之后网络设备根据报文中用于指示OSPF邻居设备的设备角色的字段,获取OSPF邻居设备的设备角色。
通过该方式网络设备可通过OSPF邻居设备发送的报文中设备角色字段获取OSPF邻居设备的设备角色,网络设备获取OSPF邻居设备的设备角色后,便于准确将与OSPF邻居设备连接的接口添加到指定的区域中。
基于相同的构思,如图16所示,为本申请提供的一种通信装置1600。示例性地,通 信装置1600可以是芯片或芯片***。可选的,在本申请实施例中芯片***可以由芯片构成,也可以包含芯片和其他分立器件。
通信装置1600可以包括至少一个处理器1610,装置1600还可以包括至少一个存储器1620,用于存储计算机程序、程序指令和/或数据。存储器1620和处理器1610耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器1610可能和存储器1620协同操作。处理器1610可能执行存储器1620中存储的计算机程序。可选的,所述至少一个存储器1620中的至少一个可以包括于处理器1610中。
通信装置1600中还可以包括收发器1630,通信装置1600可以通过收发器1630和其它设备进行信息交互。收发器1630可以是电路、总线、收发器或者其它任意可以用于进行信息交互的装置。
在一种可能的实施方式中,该通信装置1600可以应用于前述网络设备,具体通信装置1600可以是前述网络设备,也可以是能够支持前述网络设备实施上述任一实施例的装置。存储器1620保存实施上述任一实施例中的网络设备的功能的必要计算机程序、程序指令和/或数据。所述处理器1610可执行所述存储器1620存储的计算机程序,完成上述任一实施例中的方法。
本申请实施例中不限定上述收发器1630、处理器1610以及存储器1620之间的具体连接介质。本申请实施例在图16中以存储器1620、处理器1610以及收发器1630之间通过总线连接,总线在图16中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图16中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实施或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实施存储功能的装置,用于存储计算机程序、程序指令和/或数据。
基于以上实施例,参见图17,本申请实施例还提供另一种通信装置1700,包括:接口电路1710和处理器1720;接口电路1710,用于接收代码指令并传输至所述处理器1720;处理器1720,用于运行所述代码指令以执行上述任一实施例中的方法。
基于以上实施例,本申请实施例还提供一种可读存储介质,该可读存储介质存储有指令,当所述指令被执行时,使上述任一实施例中安全检测设备执行的方法被实施。该可读存储介质可以包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产 品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、装置(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理装置的处理器以产生一个机器,使得通过计算机或其他可编程数据处理装置的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理装置以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理装置上,使得在计算机或其他可编程装置上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程装置上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。

Claims (21)

  1. 一种园区网中设备的接口配置方法,其特征在于,包括:
    设备角色为汇聚设备的网络设备获取所述网络设备的各个接口连接的开放式最短路径优先OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色包括:接入设备或核心设备;
    所述网络设备将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;
    所述网络设备将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,所述第一OSPF邻居设备的设备角色为接入设备。
  2. 根据权利要求1所述的方法,其特征在于,还包括:所述网络设备将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,所述第二OSPF邻居设备的设备角色为接入设备。
  3. 根据权利要求1或2所述的方法,其特征在于,所述OSPF邻居设备的设备角色还包括:汇聚设备;所述方法还包括:
    所述网络设备将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至所述第一OSPF区域中。
  4. 根据权利要求1-3任意一项所述的方法,其特征在于,所述设备角色为汇聚设备的网络设备获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,包括:
    所述网络设备获取所述OSPF邻居设备发送的报文;其中,所述报文为OSPF协议的报文;所述OSPF协议的报文中携带有用于指示所述OSPF邻居设备的设备角色的字段;
    所述网络设备根据所述报文中用于指示所述OSPF邻居设备的设备角色的字段,获取所述OSPF邻居设备的设备角色。
  5. 一种园区网中设备的接口配置方法,其特征在于,包括:
    设备角色为核心设备的网络设备获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色包括:汇聚设备或核心设备;
    所述网络设备将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;
    所述网络设备将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,所述第一OSPF邻居设备的设备角色为汇聚设备。
  6. 根据权利要求5所述的方法,其特征在于,还包括:所述网络设备将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,所述第二OSPF邻居设备的设备角色为汇聚设备。
  7. 根据权利要求5或6所述的方法,其特征在于,所述设备角色为核心设备的网络设备获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,包括:
    所述网络设备获取所述OSPF邻居设备发送的报文;其中,所述报文为OSPF协议的报文;所述OSPF协议的报文中携带有用于指示所述OSPF邻居设备的设备角色的字段;
    所述网络设备根据所述报文中用于指示所述OSPF邻居设备的设备角色的字段,获取所述OSPF邻居设备的设备角色。
  8. 一种园区网中设备的接口配置方法,其特征在于,包括:
    设备角色为接入设备的网络设备获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色包括:接入设备以及汇聚设备;
    如果所述网络设备的OSPF邻居设备中包括设备角色为接入设备的OSPF邻居设备,则所述网络设备将与所述设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中,并将与所述设备角色为接入设备的OSPF邻居设备连接的接口添加至第二OSPF区域中;
    如果所述网络设备的OSPF邻居设备中仅包括设备角色为汇聚设备的OSPF邻居设备,则所述网络设备将与所述设备角色为汇聚设备的OSPF邻居设备连接的接口添加至所述第二OSPF区域中。
  9. 根据权利要求8所述的方法,其特征在于,所述设备角色为接入设备的网络设备获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,包括:
    所述网络设备获取所述OSPF邻居设备发送的报文;其中,所述报文为OSPF协议的报文;所述OSPF协议的报文中携带有用于指示所述OSPF邻居设备的设备角色的字段;
    所述网络设备根据所述报文中用于指示所述OSPF邻居设备的设备角色的字段,获取所述OSPF邻居设备的设备角色。
  10. 一种网络设备,其特征在于,所述网络设备的设备角色为汇聚设备,包括:
    通信单元,用于获取所述网络设备的各个接口连接的开放式最短路径优先OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色包括:接入设备或核心设备;
    处理单元,用于将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;以及用于将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,所述第一OSPF邻居设备的设备角色为接入设备。
  11. 根据权利要求10所述的设备,其特征在于,所述处理单元,还用于将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,所述第二OSPF邻居设备的设备角色为接入设备。
  12. 根据权利要求10或11所述的设备,其特征在于,所述OSPF邻居设备的设备角色还包括汇聚设备;
    所述处理单元,还用于将与设备角色为汇聚设备的OSPF邻居设备连接的接口添加至所述第一OSPF区域中。
  13. 根据权利要求10-12任意一项所述的设备,其特征在于,所述通信单元,具体用于:
    获取所述OSPF邻居设备发送的报文;其中,所述报文为OSPF协议的报文;所述OSPF协议的报文中携带有用于指示所述OSPF邻居设备的设备角色的字段;
    根据所述报文中用于指示所述OSPF邻居设备的设备角色的字段,获取所述OSPF邻居设备的设备角色。
  14. 一种网络设备,其特征在于,所述网络设备的设备角色为核心设备,包括:
    通信单元,用于获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色包括:汇聚设备或核心设备;
    处理单元,用于将与设备角色为核心设备的OSPF邻居设备连接的接口添加至第一OSPF区域中;以及用于将与第一OSPF邻居设备连接的接口添加至第二OSPF区域中,所述第一OSPF邻居设备的设备角色为汇聚设备。
  15. 根据权利要求14所述的设备,其特征在于,所述处理单元,还用于将与第二OSPF邻居设备连接的接口添加至第三OSPF区域中,所述第二OSPF邻居设备的设备角色为汇聚设备。
  16. 根据权利要求14或15所述的设备,其特征在于,所述通信单元,具体用于:
    获取所述OSPF邻居设备发送的报文;其中,所述报文为OSPF协议的报文;所述OSPF协议的报文中携带有用于指示所述OSPF邻居设备的设备角色的字段;
    根据所述报文中用于指示所述OSPF邻居设备的设备角色的字段,获取所述OSPF邻居设备的设备角色。
  17. 一种网络设备,其特征在于,所述网络设备的设备角色为接入设备,包括:
    通信单元,用于获取所述网络设备的各个接口连接的OSPF邻居设备的设备角色,其中,所述OSPF邻居设备的设备角色包括:接入设备以及汇聚设备;
    处理单元,用于如果所述网络设备的OSPF邻居设备中包括设备角色为接入设备的OSPF邻居设备,则所述网络设备将与所述设备角色为汇聚设备的OSPF邻居设备连接的接口添加至第一OSPF区域中,并将与所述设备角色为接入设备的OSPF邻居设备连接的接口添加至第二OSPF区域中;以及用于如果所述网络设备的OSPF邻居设备中仅包括设备角色为汇聚设备的OSPF邻居设备,则所述网络设备将与所述设备角色为汇聚设备的OSPF邻居设备连接的接口添加至所述第二OSPF区域中。
  18. 根据权利要求17所述的设备,其特征在于,所述通信单元,具体用于:
    获取所述OSPF邻居设备发送的报文;其中,所述报文为OSPF协议的报文;所述OSPF协议的报文中携带有用于指示所述OSPF邻居设备的设备角色的字段;
    根据所述报文中用于指示所述OSPF邻居设备的设备角色的字段,获取所述OSPF邻居设备的设备角色。
  19. 一种通信装置,其特征在于,包括:处理器和存储器;
    所述存储器,存储有计算机程序;
    所述处理器,用于执行所述存储器中存储的计算机程序,以使得如权利要求1-9任意一项所述的方法被执行。
  20. 一种通信装置,其特征在于,包括:处理器和接口电路;
    所述接口电路,用于接收代码指令并传输至所述处理器;
    所述处理器用于运行所述代码指令以执行如权利要求1-9任意一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,所述计算机存储介质中存储有计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行如权利要求1-9任意一项所述的方法。
PCT/CN2021/094112 2020-06-19 2021-05-17 园区网中设备的接口配置方法及网络设备 WO2021254061A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010567176.0 2020-06-19
CN202010567176.0A CN113824579B (zh) 2020-06-19 2020-06-19 园区网中设备的接口配置方法及网络设备

Publications (1)

Publication Number Publication Date
WO2021254061A1 true WO2021254061A1 (zh) 2021-12-23

Family

ID=78912056

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094112 WO2021254061A1 (zh) 2020-06-19 2021-05-17 园区网中设备的接口配置方法及网络设备

Country Status (2)

Country Link
CN (1) CN113824579B (zh)
WO (1) WO2021254061A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1283911A (zh) * 1999-08-06 2001-02-14 国际商业机器公司 开放最短路径优先接口
US6681232B1 (en) * 2000-06-07 2004-01-20 Yipes Enterprise Services, Inc. Operations and provisioning systems for service level management in an extended-area data communications network
CN101159604A (zh) * 2007-11-06 2008-04-09 中兴通讯股份有限公司 一种设置开放最短路径优先接口区域号的方法
CN104301219A (zh) * 2013-07-15 2015-01-21 中兴通讯股份有限公司 一种网络拓扑的方法及***

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103178983A (zh) * 2011-12-26 2013-06-26 中兴通讯股份有限公司 最短路径优先协议接口区域标识的配置方法及装置
EP2892188B1 (en) * 2012-09-25 2017-08-30 Huawei Technologies Co., Ltd. Method for determining packet forwarding path, network device and control device
CN203883860U (zh) * 2014-05-16 2014-10-15 北京北控电信通科技发展有限公司 一种校园网的网络通信架构
CN107995111B (zh) * 2016-10-26 2021-08-06 中兴通讯股份有限公司 业务转发、链路变化通告方法、汇聚设备及接入设备
CN109391526B (zh) * 2018-11-27 2020-12-18 锐捷网络股份有限公司 一种网络环路的检测方法及装置
CN110417665B (zh) * 2019-08-05 2021-06-11 浪潮云信息技术股份公司 一种数据中心多Fabric场景的EVPN组网***及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1283911A (zh) * 1999-08-06 2001-02-14 国际商业机器公司 开放最短路径优先接口
US6681232B1 (en) * 2000-06-07 2004-01-20 Yipes Enterprise Services, Inc. Operations and provisioning systems for service level management in an extended-area data communications network
CN101159604A (zh) * 2007-11-06 2008-04-09 中兴通讯股份有限公司 一种设置开放最短路径优先接口区域号的方法
CN104301219A (zh) * 2013-07-15 2015-01-21 中兴通讯股份有限公司 一种网络拓扑的方法及***

Also Published As

Publication number Publication date
CN113824579A (zh) 2021-12-21
CN113824579B (zh) 2022-12-06

Similar Documents

Publication Publication Date Title
CN106664261B (zh) 一种配置流表项的方法、装置和***
US10063470B2 (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
TWI521922B (zh) 擴展網橋之系統及其方法
CN109361606B (zh) 一种报文处理***及网络设备
US7860028B2 (en) Flexible ethernet bridge
CN104780111B (zh) 虚拟化网络中报文转发的方法及装置、虚拟化网络
CN106878194B (zh) 一种报文处理方法和装置
EP2525532A1 (en) Method and apparatus of connectivity discovery between network switch and server based on vlan identifiers
US9825809B2 (en) Dynamically configuring store-and-forward channels and cut-through channels in a network-on-chip
US10218581B2 (en) Generation of network-on-chip layout based on user specified topological constraints
CN101924699B (zh) 报文转发处理方法、***和运营商边缘设备
CN104301230A (zh) 报文转发方法和装置
CN108259304B (zh) 一种转发表项同步方法及装置
US20140301404A1 (en) Expanding member ports of a link aggregation group between clusters
US11398981B2 (en) Path creation method and device for network on chip and electronic apparatus
WO2019101118A1 (zh) 指定转发者选举
CN107547391A (zh) 一种报文传输方法和装置
WO2019085975A1 (zh) 一种网络拓扑显示方法及网络管理设备
US20140040477A1 (en) Connection mesh in mirroring asymmetric clustered multiprocessor systems
WO2016070010A1 (en) Redundancy for port extender chains
WO2021254061A1 (zh) 园区网中设备的接口配置方法及网络设备
CN108092896A (zh) 堆叠***和聚合组建立装置
CN109962846A (zh) 路由协议报文的处理方法及装置
CN106254282B (zh) 链路聚合的实现方法及装置
US20210135903A1 (en) Vxlan multi-tenant inter-networking device packet forwarding system

Legal Events

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

Ref document number: 21827067

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

Country of ref document: EP

Kind code of ref document: A1