CN112804144A - Information configuration method and network equipment - Google Patents

Information configuration method and network equipment Download PDF

Info

Publication number
CN112804144A
CN112804144A CN201911111851.2A CN201911111851A CN112804144A CN 112804144 A CN112804144 A CN 112804144A CN 201911111851 A CN201911111851 A CN 201911111851A CN 112804144 A CN112804144 A CN 112804144A
Authority
CN
China
Prior art keywords
network device
bgp
information
configuration information
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911111851.2A
Other languages
Chinese (zh)
Other versions
CN112804144B (en
Inventor
杨海俊
唐本亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, Research Institute of China Mobile Communication Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911111851.2A priority Critical patent/CN112804144B/en
Publication of CN112804144A publication Critical patent/CN112804144A/en
Application granted granted Critical
Publication of CN112804144B publication Critical patent/CN112804144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses an information configuration method and network equipment. The method comprises the following steps: a first network device obtaining target Border Gateway Protocol (BGP) configuration information of a second network device; and sending the target BGP configuration information to the second network equipment based on a network configuration protocol (NETCONF) session channel between the second network equipment and the target BGP configuration information, wherein the target BGP configuration information is used for configuring BGP neighbor information by the second network equipment.

Description

一种信息配置方法和网络设备An information configuration method and network device

技术领域technical field

本发明涉及互联网技术领域,具体涉及一种信息配置方法和网络设备。The present invention relates to the field of Internet technologies, in particular to an information configuration method and network equipment.

背景技术Background technique

在实际互联网协议(IP,Internet Protocol)网络,尤其是在规模比较大的企业或运营商网络中,边界网关协议(BGP,Border Gateway Protocol)由于其丰富的路由属性及选路特性,被越来越多的部署应用。受到BGP横向隔离规则规定的限制,即内部边界网关协议(IBGP,Internal Border Gateway Protocol)邻居关系不会将从邻居接点学习到的路由传递给其他的IBGP邻居,导致网络需要在运行BGP的网络设备之间进行全连接的IBGP对等体的配置,则网络中需要配置的IBGP对等体为N*N个BGP邻居关系,这样就加大了实施和后期网络分析的难度,由此产生了路由反射器(RR,Route Reflector)。In actual Internet Protocol (IP, Internet Protocol) networks, especially in relatively large-scale enterprise or operator networks, Border Gateway Protocol (BGP, Border Gateway Protocol) is increasingly used due to its rich routing attributes and routing characteristics. More deployed applications. Restricted by the BGP horizontal isolation rules, that is, the Internal Border Gateway Protocol (IBGP, Internal Border Gateway Protocol) neighbor relationship will not pass the routes learned from neighbor nodes to other IBGP neighbors, so the network needs to run BGP network devices. The configuration of IBGP peers that are fully connected to each other, the IBGP peers that need to be configured in the network are N*N BGP neighbor relationships, which increases the difficulty of implementation and later network analysis, resulting in routing Reflector (RR, Route Reflector).

目前,每台网络设备(包括路由反射器和客户机)的BGP协议及邻居关系的配置主要依赖网络工程师人工进行配置。随着业务的快速发展,网络规模越来越大,即使在网络中配置路由反射器的场景下,网络设备的配置工作量繁琐而巨大。尤其是新建一个大规模的网络时,往往都会涉及大量网络设备的路由协议部署,在如此大规模的网络协议部署情况下,前期的规划准备、配置校对、配置部署工作既繁琐又容易出错。因此,现有依赖人工配置的方式存在效率低下、繁琐易错等缺点。At present, the configuration of the BGP protocol and the neighbor relationship of each network device (including the route reflector and the client) mainly depends on the manual configuration of the network engineer. With the rapid development of services, the network scale is getting larger and larger. Even in the scenario where route reflectors are configured in the network, the configuration workload of network devices is cumbersome and huge. Especially when building a large-scale network, it often involves the deployment of routing protocols for a large number of network devices. In the case of such a large-scale network protocol deployment, the preliminary planning and preparation, configuration proofreading, and configuration deployment are tedious and error-prone. Therefore, the existing methods relying on manual configuration have disadvantages such as low efficiency, tediousness and error-proneness.

发明内容SUMMARY OF THE INVENTION

为解决现有存在的技术问题,本发明实施例提供了一种信息配置方法和网络设备。In order to solve the existing technical problems, the embodiments of the present invention provide an information configuration method and a network device.

为达到上述目的,本发明实施例的技术方案是这样实现的:In order to achieve the above-mentioned purpose, the technical scheme of the embodiment of the present invention is realized as follows:

本发明实施例提供了一种信息配置方法,所述方法包括:An embodiment of the present invention provides an information configuration method, and the method includes:

第一网络设备获得第二网络设备的目标BGP配置信息;The first network device obtains the target BGP configuration information of the second network device;

基于与所述第二网络设备之间的网络配置协议(NETCONF,NetworkConfiguration Protocol)会话通道,向所述第二网络设备发送所述目标BGP配置信息,所述目标BGP配置信息用于所述第二网络设备进行BGP邻居信息的配置。Send the target BGP configuration information to the second network device based on a Network Configuration Protocol (NETCONF, Network Configuration Protocol) session channel with the second network device, where the target BGP configuration information is used for the second network device The network device configures BGP neighbor information.

上述方案中,所述获得所述第二网络设备的目标BGP配置信息,包括:In the above solution, the obtaining the target BGP configuration information of the second network device includes:

所述第一网络设备基于配置的BGP邻居信息,生成所述第二网络设备的第一BGP配置信息;The first network device generates first BGP configuration information of the second network device based on the configured BGP neighbor information;

基于所述NETCONF会话通道,获取所述第二网络设备中已存储的第二BGP配置信息;obtaining the second BGP configuration information stored in the second network device based on the NETCONF session channel;

比较所述第一BGP配置信息和所述第二BGP配置信息,基于比较结果生成所述第二网络设备的目标BGP配置信息。Comparing the first BGP configuration information and the second BGP configuration information, and generating target BGP configuration information of the second network device based on the comparison result.

上述方案中,所述向所述第二网络设备发送所述目标BGP配置信息之前,所述方法还包括:In the above solution, before the sending the target BGP configuration information to the second network device, the method further includes:

所述第一网络设备获得BGP自动配置信息;所述BGP自动配置信息中包括需要自动配置BGP邻居信息的至少一个第二网络设备的信息;The first network device obtains BGP automatic configuration information; the BGP automatic configuration information includes information of at least one second network device that needs to automatically configure BGP neighbor information;

在所述BGP自动配置信息中的所述第二网络设备处于特定状态的情况下,且所述第二网络设备鉴权通过后,所述第一网络设备向所述第二网络设备发起并建立NETCONF会话通道;所述第二网络设备处于特定状态表明所述第二网络设备未成功建立BGP邻居关系。When the second network device in the BGP automatic configuration information is in a specific state, and after the second network device is authenticated, the first network device initiates and establishes a NETCONF session channel; the fact that the second network device is in a specific state indicates that the second network device has not successfully established a BGP neighbor relationship.

上述方案中,所述第二网络设备鉴权通过,包括:所述第一网络设备向处于所述特定状态的第二网络设备发送已配置的第一鉴权信息;In the above solution, passing the authentication of the second network device includes: the first network device sending the configured first authentication information to the second network device in the specific state;

在所述第一鉴权信息与所述第二网络设备中已配置的第二鉴权信息一致的情况下,确定所述第二网络设备鉴权通过。In the case that the first authentication information is consistent with the second authentication information configured in the second network device, it is determined that the authentication of the second network device is passed.

上述方案中,所述第一网络设备建立与第二网络设备之间的NETCONF会话通道之前,所述方法还包括:In the above solution, before the first network device establishes the NETCONF session channel with the second network device, the method further includes:

所述第一网络设备初始化BGP自动配置功能,获得第一鉴权信息。The first network device initializes the BGP automatic configuration function to obtain the first authentication information.

上述方案中,所述方法还包括:所述第一网络设备获得所述第二网络设备的配置成功消息,所述配置成功消息用于表征所述第二网络设备完成BGP邻居信息的配置;In the above solution, the method further includes: obtaining, by the first network device, a configuration success message of the second network device, where the configuration success message is used to indicate that the second network device completes the configuration of BGP neighbor information;

其中,所述第一网络设备为路由反射器设备;所述第二网络设备为客户机设备。Wherein, the first network device is a route reflector device; the second network device is a client device.

本发明实施例还提供了一种网络设备,所述网络设备为第一网络设备,所述网络设备包括:获取单元和配置单元;其中,An embodiment of the present invention further provides a network device, where the network device is a first network device, and the network device includes: an acquisition unit and a configuration unit; wherein,

所述获取单元,用于获得第二网络设备的目标BGP配置信息;the obtaining unit, configured to obtain the target BGP configuration information of the second network device;

所述配置单元,用于基于与所述第二网络设备之间的NETCONF会话通道,向所述第二网络设备发送所述目标BGP配置信息,所述目标BGP配置信息用于所述第二网络设备进行BGP邻居信息的配置。The configuration unit is configured to send the target BGP configuration information to the second network device based on the NETCONF session channel with the second network device, where the target BGP configuration information is used for the second network The device configures BGP neighbor information.

上述方案中,所述获取单元,用于基于配置的BGP邻居信息,生成所述第二网络设备的第一BGP配置信息;基于所述通道建立单元建立的所述NETCONF会话通道,获取所述第二网络设备中已存储的第二BGP配置信息;比较所述第一BGP配置信息和所述第二BGP配置信息,基于比较结果生成所述第二网络设备的目标BGP配置信息。In the above solution, the obtaining unit is configured to generate the first BGP configuration information of the second network device based on the configured BGP neighbor information; obtain the first BGP configuration information based on the NETCONF session channel established by the channel establishment unit. Second BGP configuration information stored in the network device; compare the first BGP configuration information with the second BGP configuration information, and generate target BGP configuration information of the second network device based on the comparison result.

上述方案中,所述网络设备还包括通道建立单元,用于所述配置单元向所述第二网络设备发送所述目标BGP配置信息之前,获得BGP自动配置信息;所述BGP自动配置信息中包括需要自动配置BGP邻居信息的至少一个第二网络设备的信息;在所述BGP自动配置信息中的所述第二网络设备处于特定状态的情况下,且所述第二网络设备鉴权通过后,向所述第二网络设备发起并建立NETCONF会话通道;所述第二网络设备处于特定状态表明所述第二网络设备未成功建立BGP邻居关系。In the above solution, the network device further includes a channel establishment unit for obtaining BGP automatic configuration information before the configuration unit sends the target BGP configuration information to the second network device; the BGP automatic configuration information includes: Information of at least one second network device that needs to automatically configure BGP neighbor information; when the second network device in the BGP automatic configuration information is in a specific state, and after the second network device is authenticated, Initiating and establishing a NETCONF session channel to the second network device; the second network device being in a specific state indicates that the second network device has not successfully established a BGP neighbor relationship.

上述方案中,所述通道建立单元,还用于向处于所述特定状态的第二网络设备发送已配置的第一鉴权信息;在所述第一鉴权信息与所述第二网络设备中已配置的第二鉴权信息一致的情况下,确定所述第二网络设备鉴权通过。In the above solution, the channel establishment unit is further configured to send the configured first authentication information to the second network device in the specific state; between the first authentication information and the second network device If the configured second authentication information is consistent, it is determined that the authentication of the second network device is passed.

上述方案中,所述设备还包括功能初始化单元,用于所述通道建立单元建立与第二网络设备之间的NETCONF会话通道之前,初始化BGP自动配置功能,获得第一鉴权信息。In the above solution, the device further includes a function initialization unit for initializing the BGP automatic configuration function to obtain the first authentication information before the channel establishment unit establishes the NETCONF session channel with the second network device.

上述方案中,所述配置单元,还用于获得所述第二网络设备的配置成功消息,所述配置成功消息用于表征所述第二网络设备完成BGP邻居信息的配置;In the above solution, the configuration unit is further configured to obtain a configuration success message of the second network device, where the configuration success message is used to indicate that the second network device has completed the configuration of BGP neighbor information;

其中,所述第一网络设备为路由反射器设备;所述第二网络设备为客户机设备。Wherein, the first network device is a route reflector device; the second network device is a client device.

本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本发明实施例所述方法的步骤。Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, implements the steps of the methods described in the embodiments of the present invention.

本发明实施例还提供了一种网络设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现本发明实施例所述方法的步骤。An embodiment of the present invention further provides a network device, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the method described in the embodiment of the present invention when the processor executes the program A step of.

本发明实施例提供的信息配置方法和网络设备,所述方法包括:第一网络设备获得第二网络设备的目标BGP配置信息;基于与所述第二网络设备之间的NETCONF会话通道,向所述第二网络设备发送所述目标BGP配置信息,所述目标BGP配置信息用于所述第二网络设备进行BGP邻居信息的配置。采用本发明实施例的技术方案,通过建立第一网络设备与第二网络设备之间的NETCONF会话通道,即通过NETCONF实现了与第一网络设备(即路由反射器)挂接的所有第二网络设备(即客户机)的BGP配置信息的自动配置,用户仅需要管理第一网络设备(即路由反射器)中的BGP配置信息,大大提高了网络设备的配置效率,避免人工配置方式繁琐出错的问题。The information configuration method and network device provided by the embodiments of the present invention include: a first network device obtains target BGP configuration information of a second network device; The second network device sends the target BGP configuration information, where the target BGP configuration information is used for the second network device to configure BGP neighbor information. By adopting the technical solutions of the embodiments of the present invention, by establishing a NETCONF session channel between the first network device and the second network device, that is, all the second networks connected to the first network device (ie, the route reflector) are realized through NETCONF. The automatic configuration of the BGP configuration information of the device (ie the client), the user only needs to manage the BGP configuration information in the first network device (ie the route reflector), which greatly improves the configuration efficiency of the network device and avoids the cumbersome and error-prone manual configuration method. question.

附图说明Description of drawings

图1为本发明实施例的信息配置方法的一种流程示意图;FIG. 1 is a schematic flowchart of an information configuration method according to an embodiment of the present invention;

图2为本发明实施例的信息配置方法的另一种流程示意图;FIG. 2 is another schematic flowchart of an information configuration method according to an embodiment of the present invention;

图3为本发明实施例的信息配置方法的又一种流程示意图;FIG. 3 is another schematic flowchart of an information configuration method according to an embodiment of the present invention;

图4为本发明实施例的网络设备的组成结构示意图一;FIG. 4 is a schematic diagram 1 of a composition structure of a network device according to an embodiment of the present invention;

图5为本发明实施例的网络设备的组成结构示意图二;FIG. 5 is a schematic diagram 2 of a composition structure of a network device according to an embodiment of the present invention;

图6为本发明实施例的网络设备的硬件组成结构示意图。FIG. 6 is a schematic structural diagram of a hardware composition of a network device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图及具体实施例对本发明作进一步详细的说明。The present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

本发明实施例提供了一种信息配置方法。图1为本发明实施例的信息配置方法的一种流程示意图;如图1所示,所述方法包括:The embodiment of the present invention provides an information configuration method. FIG. 1 is a schematic flowchart of an information configuration method according to an embodiment of the present invention; as shown in FIG. 1 , the method includes:

步骤101:第一网络设备获得第二网络设备的目标BGP配置信息;Step 101: the first network device obtains target BGP configuration information of the second network device;

步骤102:基于与所述第二网络设备之间的NETCONF会话通道,向所述第二网络设备发送所述目标BGP配置信息,所述目标BGP配置信息用于所述第二网络设备进行BGP邻居信息的配置。Step 102: Based on the NETCONF session channel with the second network device, send the target BGP configuration information to the second network device, where the target BGP configuration information is used for the second network device to perform BGP neighbor relationships configuration of information.

本实施例的信息配置方法应用于采用BGP的网络中。网络中的网络设备按功能可分为客户机(CLIENT)和路由反射器(RR),本实施例中的第一网络设备可以为路由反射器,第二网络设备可以为客户机。示例性的,网络中可包括多个客户机,本实施例中以一个客户机(即第二网络设备)为例进行说明。The information configuration method in this embodiment is applied to a network using BGP. The network devices in the network can be divided into a client (CLIENT) and a route reflector (RR) according to their functions. The first network device in this embodiment may be a route reflector, and the second network device may be a client. Exemplarily, a network may include multiple clients, and in this embodiment, one client (ie, a second network device) is used as an example for description.

本实施例中,第一网络设备和第二网络设备中均配置有BGP自动配置功能,初始化自身的BGP自动配置功能后,第一网络设备和第二网络设备启动自身的NETCONF功能,即本实施例中,第一网络设备通过NETCONF功能建立与第二网络设备之间的NETCONF会话通道,并基于NETCONF会话通道向第二网络设备发送用于所述第二网络设备进行BGP邻居信息的配置的目标BGP配置信息。In this embodiment, both the first network device and the second network device are configured with a BGP automatic configuration function. After initializing their own BGP automatic configuration function, the first network device and the second network device start their own NETCONF function, that is, this implementation In an example, the first network device establishes a NETCONF session channel with the second network device through the NETCONF function, and sends the second network device based on the NETCONF session channel a target for the second network device to configure BGP neighbor information. BGP configuration information.

在一种可选实施例中,第一网络设备可直接获得用于所述第二网络设备进行BGP邻居信息的配置的目标BGP配置信息,该目标BGP配置信息可通过工程师手动方式配置在所述第一网络设备中。由于网络中仅包括一个第一网络设备,或者网络的每个自治系统(AS)可包括一个第一网络设备,因此本实施例中仅在数量极少的第一网络设备中进行针对第二网络设备的BGP邻居信息的手动配置,大大减少了网络设备中的信息配置的数据量,提高了配置效率。In an optional embodiment, the first network device may directly obtain target BGP configuration information for the second network device to configure BGP neighbor information, and the target BGP configuration information may be manually configured by an engineer in the in the first network device. Since only one first network device is included in the network, or each autonomous system (AS) of the network may include one first network device, in this embodiment, only a very small number of first network devices are used for targeting the second network. The manual configuration of the BGP neighbor information of the device greatly reduces the amount of information configured in the network device and improves the configuration efficiency.

在本发明的一种可选实施例中,所述向所述第二网络设备发送所述目标BGP配置信息之前,所述方法还包括:所述第一网络设备建立与所述第二网络设备之间的NETCONF会话通道。In an optional embodiment of the present invention, before the sending the target BGP configuration information to the second network device, the method further includes: establishing, by the first network device, with the second network device NETCONF session channel between.

需要说明的是,所述第一网络设备建立与所述第二网络设备之间的NETCONF会话通道可在步骤101之前执行,也可以在步骤101之后执行,本实施例中对此不做限定。It should be noted that the establishment of the NETCONF session channel between the first network device and the second network device may be performed before step 101, or may be performed after step 101, which is not limited in this embodiment.

示例性的,以所述第一网络设备建立与所述第二网络设备之间的NETCONF会话通道在步骤101之前执行为例,如图2所示,所述第一网络设备建立与所述第二网络设备之间的NETCONF会话通道可包括:Exemplarily, taking the first network device establishing a NETCONF session channel with the second network device and executing before step 101 as an example, as shown in FIG. A NETCONF session channel between two network devices may include:

步骤1001:第一网络设备获得BGP自动配置信息;所述BGP自动配置信息中包括需要自动配置BGP邻居信息的至少一个第二网络设备的信息;Step 1001: a first network device obtains BGP automatic configuration information; the BGP automatic configuration information includes information of at least one second network device that needs to automatically configure BGP neighbor information;

步骤1002:在所述BGP自动配置信息中的所述第二网络设备处于特定状态的情况下,且所述第二网络设备鉴权通过后,所述第一网络设备向所述第二网络设备发起并建立NETCONF会话通道;所述第二网络设备处于特定状态表明所述第二网络设备未成功建立BGP邻居关系。Step 1002: In the case that the second network device in the BGP automatic configuration information is in a specific state, and after the second network device is authenticated, the first network device sends the second network device to the second network device. Initiating and establishing a NETCONF session channel; the second network device being in a specific state indicates that the second network device has not successfully established a BGP neighbor relationship.

本实施例中,所述BGP自动配置信息包括需要自动配置BGP邻居信息的至少一个第二网络设备的信息,所述至少一个第二网络设备的信息可包括各第二网络设备的IP地址、协议参数、协议状态等关建信息。第一网络设备可基于所述BGP自动配置信息中的各第二电子设备的信息轮询各第二电子设备,基于轮询结果确定各第二电子设备的状态。In this embodiment, the BGP automatic configuration information includes information of at least one second network device that needs to automatically configure BGP neighbor information, and the information of the at least one second network device may include the IP address, protocol of each second network device Parameters, protocol status and other related information. The first network device may poll each second electronic device based on the information of each second electronic device in the BGP automatic configuration information, and determine the state of each second electronic device based on the polling result.

其中,所述第二电子设备的状态包括特定状态,所述第二网络设备处于特定状态表明所述第二网络设备未成功建立BGP邻居关系,所述第二网络设备未成功建立BGP邻居关系可表明所述第二网络设备未所述第一网络设备建立邻居关系。示例性的,第二网络设备的状态机可具有多种状态,其中,所述特定状态可以是状态机处于down状态。作为一种实施方式,第一网络设备可向第二网络设备发送轮询消息,未接收到所述第二网络设备的响应消息的情况下,可确定所述第二网络设备处于特定状态,即down状态。The state of the second electronic device includes a specific state, the second network device being in a specific state indicates that the second network device has not successfully established a BGP neighbor relationship, and the second network device has not successfully established a BGP neighbor relationship may be Indicates that the second network device has established a neighbor relationship with the first network device. Exemplarily, the state machine of the second network device may have multiple states, wherein the specific state may be that the state machine is in a down state. As an implementation manner, the first network device may send a polling message to the second network device, and if no response message is received from the second network device, it may be determined that the second network device is in a specific state, that is, down state.

在本发明的一种可选实施例中,所述第二网络设备鉴权通过,包括:所述第一网络设备向处于所述特定状态的第二网络设备发送已配置的第一鉴权信息;在所述第一鉴权信息与所述第二网络设备中已配置的第二鉴权信息一致的情况下,确定所述第二网络设备鉴权通过。In an optional embodiment of the present invention, passing the authentication of the second network device includes: the first network device sending the configured first authentication information to the second network device in the specific state ; In the case that the first authentication information is consistent with the second authentication information configured in the second network device, determine that the authentication of the second network device has passed.

本实施例中,所述第一网络设备和所述第二网络设备之间可通过安全外壳(SSH,Secure Shell)机制进行鉴权。示例性的,所述第一网络设备和所述第二网络设备预先配置默认鉴权信息,例如,第一网络设备可预先配置第一鉴权信息,第二网络设备可预先配置第二鉴权信息,通过对第一鉴权信息和第二鉴权信息的比对,从而确定鉴权是否通过。其中,所述鉴权信息(包括第一鉴权信息和第二鉴权信息)可包括默认账号及口令。In this embodiment, authentication may be performed between the first network device and the second network device through a secure shell (SSH, Secure Shell) mechanism. Exemplarily, the first network device and the second network device are pre-configured with default authentication information. For example, the first network device may be pre-configured with the first authentication information, and the second network device may be pre-configured with the second authentication information. information, by comparing the first authentication information and the second authentication information to determine whether the authentication is passed. Wherein, the authentication information (including the first authentication information and the second authentication information) may include a default account and a password.

在本发明的一种可选实施例中,所述第一网络设备建立与第二网络设备之间的NETCONF会话通道之前,所述方法还包括:所述第一网络设备初始化BGP自动配置功能,获得第一鉴权信息。In an optional embodiment of the present invention, before the first network device establishes a NETCONF session channel with the second network device, the method further includes: the first network device initializes a BGP automatic configuration function, Obtain the first authentication information.

本实施例中,第一网络设备和第二网络设备初始化自身的BGP自动配置功能时,一方面启动自身的NETCONF功能,另一方面也启动自身的SSH功能。其中,启动自身的SSH功能时,即获得预先配置的鉴权信息,示例性的,第一网络设备启动自身的SSH功能时,可获得预先配置的第一鉴权信息,第二网络设备启动自身的SSH功能时,可获得预先配置的第二鉴权信息。In this embodiment, when the first network device and the second network device initialize their own BGP automatic configuration functions, on the one hand, their own NETCONF functions are activated, and on the other hand, their own SSH functions are also activated. The pre-configured authentication information is obtained when its own SSH function is activated. Exemplarily, when the first network device activates its own SSH function, pre-configured first authentication information is obtained, and the second network device activates its own SSH function. When the SSH function is enabled, pre-configured second authentication information can be obtained.

在本发明的一种可选实施例中,如图2所示,步骤101包括:In an optional embodiment of the present invention, as shown in FIG. 2 , step 101 includes:

步骤1011:所述第一网络设备基于配置的BGP邻居信息,生成所述第二网络设备的第一BGP配置信息;Step 1011: the first network device generates first BGP configuration information of the second network device based on the configured BGP neighbor information;

步骤1012:基于所述NETCONF会话通道,获取所述第二网络设备中已存储的第二BGP配置信息;Step 1012: Based on the NETCONF session channel, obtain the second BGP configuration information that has been stored in the second network device;

步骤1013:比较所述第一BGP配置信息和所述第二BGP配置信息,基于比较结果生成所述第二网络设备的目标BGP配置信息。Step 1013: Compare the first BGP configuration information with the second BGP configuration information, and generate target BGP configuration information of the second network device based on the comparison result.

本实施例中,第一网络设备可通过手动配置方式配置BGP邻居信息,所述BGP邻居信息可包括每个第二网络设备对应的以下信息的至少之一:对等IP(Peer IP)、自治系统数(AS number)、对等(Peer)地址族、地址族下携带的能力及协议团体属性等。则第一网络设备可从BGP邻居信息中获得第二电子设备对应的第一BGP配置信息。In this embodiment, the first network device may configure BGP neighbor information by manual configuration, and the BGP neighbor information may include at least one of the following information corresponding to each second network device: peer IP (Peer IP), autonomous System number (AS number), peer address family, capabilities carried under the address family, and protocol community attributes. Then, the first network device can obtain the first BGP configuration information corresponding to the second electronic device from the BGP neighbor information.

本实施例中,第一网络设备基于所述NETCONF会话通道读取所述第二网络设备中已存储的第二BGP配置信息,所述第二BGP配置信息中包括的信息类型可以与第一BGP配置信息(或BGP邻居信息)中包括的信息类型相同,或者少于第一BGP配置信息(或BGP邻居信息)中包括的信息类型。示例性的,所述第二BGP配置信息可包括的信息内容为空,则第一网络设备从第二网络设备中读取信息内容为空的第二BGP配置信息;或者,第二BGP配置信息包括的信息内容与第一BGP配置信息的信息内容不同,则第一网络设备通过对第一BGP配置信息和第二BGP配置信息进行比较及冲突检测,删除或修改第二网络设备中的BGP配置信息,生成所述第二网络设备的目标BGP配置信息。In this embodiment, the first network device reads the second BGP configuration information stored in the second network device based on the NETCONF session channel, and the information type included in the second BGP configuration information may be the same as that of the first BGP The information types included in the configuration information (or BGP neighbor information) are the same, or less than the information types included in the first BGP configuration information (or BGP neighbor information). Exemplarily, if the information content that the second BGP configuration information may include is empty, the first network device reads the second BGP configuration information whose information content is empty from the second network device; or, the second BGP configuration information The included information content is different from the information content of the first BGP configuration information, and the first network device deletes or modifies the BGP configuration in the second network device by comparing and conflicting the first BGP configuration information and the second BGP configuration information. information to generate target BGP configuration information of the second network device.

作为一种实施方式,若第二BGP配置信息可包括的信息内容为空,则第一网络设备将所述第一BGP配置信息作为所述目标BGP配置信息。作为另一种实施方式,若第二BGP配置信息包括的信息内容与第一BGP配置信息的信息内容不同,则第一网络设备依据第一BGP配置信息对第二BGP配置信息的信息内容进行修改,或者可以对第二BGP配置信息的信息内容进行补充,例如补充对等连接接口(Peer connect-interface)配置信息等,生成目标BGP配置信息。As an implementation manner, if the information content that can be included in the second BGP configuration information is empty, the first network device uses the first BGP configuration information as the target BGP configuration information. As another implementation manner, if the information content included in the second BGP configuration information is different from the information content of the first BGP configuration information, the first network device modifies the information content of the second BGP configuration information according to the first BGP configuration information , or the information content of the second BGP configuration information may be supplemented, for example, by supplementing peer connect-interface (Peer connect-interface) configuration information, etc., to generate target BGP configuration information.

在本发明的一种可选实施例中,所述方法还包括:所述第一网络设备获得所述第二网络设备的配置成功消息,所述配置成功消息用于表征所述第二网络设备完成BGP邻居信息的配置。In an optional embodiment of the present invention, the method further includes: obtaining, by the first network device, a configuration success message of the second network device, where the configuration success message is used to characterize the second network device Complete the configuration of BGP neighbor information.

本实施例中,在第二网络设备基于目标BGP配置信息进行BGP邻居信息配置完成后,第一网络设备获得所述第二网络设备的配置成功消息。可选地,第一网络设备按照预设周期监控所述第二网络设备的状态。In this embodiment, after the second network device completes the configuration of the BGP neighbor information based on the target BGP configuration information, the first network device obtains a configuration success message of the second network device. Optionally, the first network device monitors the state of the second network device according to a preset period.

采用本发明实施例的技术方案,通过建立第一网络设备与第二网络设备之间的NETCONF会话通道,即通过NETCONF实现了与第一网络设备(即路由反射器)挂接的所有第二网络设备(即客户机)的BGP配置信息的自动配置,用户仅需要管理第一网络设备(即路由反射器)中的BGP配置信息,大大提高了网络设备的配置效率,避免人工配置方式繁琐出错的问题。By adopting the technical solutions of the embodiments of the present invention, by establishing a NETCONF session channel between the first network device and the second network device, that is, all the second networks connected to the first network device (ie, the route reflector) are realized through NETCONF. The automatic configuration of the BGP configuration information of the device (ie the client), the user only needs to manage the BGP configuration information in the first network device (ie the route reflector), which greatly improves the configuration efficiency of the network device and avoids the cumbersome and error-prone manual configuration method. question.

下面结合具体的示例对本发明实施例的信息配置方法进行说明,本示例中,第一网络设备具体为路由发射器,第二网络设备具体为客户机。实际应用中,网络中可包括多个客户机,本示例中仅以一个客户机为例进行说明。图3为本发明实施例的信息配置方法的又一种流程示意图;如图3所示,所述方法包括:The information configuration method according to the embodiment of the present invention will be described below with reference to specific examples. In this example, the first network device is specifically a route transmitter, and the second network device is specifically a client. In practical applications, a network may include multiple clients, and in this example, only one client is used as an example for description. FIG. 3 is another schematic flowchart of an information configuration method according to an embodiment of the present invention; as shown in FIG. 3 , the method includes:

步骤201:路由反射器和客户机均初始化BGP自动配置功能;其中,初始化BGP自动配置功能包括初始化自身的NETCONF功能和SSH功能。Step 201: Both the route reflector and the client initialize the BGP automatic configuration function; wherein, initializing the BGP automatic configuration function includes initializing their own NETCONF function and SSH function.

这里,路由反射器和客户机初始化自身的SSH功能,分别获得配置的鉴权信息,即路由反射器获得配置的第一鉴权信息,客户机获得配置的第二鉴权信息。其中,第一鉴权信息和第二鉴权信息均可包括默认账号及口令。Here, the route reflector and the client initialize their own SSH functions and obtain the configured authentication information respectively, that is, the route reflector obtains the configured first authentication information, and the client obtains the configured second authentication information. Wherein, both the first authentication information and the second authentication information may include a default account number and password.

步骤202:路由反射器获得BGP自动配置信息;所述BGP自动配置信息中包括需要自动配置BGP邻居信息的至少一个客户机的信息。Step 202: the route reflector obtains BGP automatic configuration information; the BGP automatic configuration information includes information of at least one client that needs to automatically configure BGP neighbor information.

可选地,BGP自动配置信息还可包括每个客户机的IP地址、协议参数、协议状态等关键信息。Optionally, the BGP automatic configuration information may further include key information such as the IP address, protocol parameters, and protocol status of each client.

步骤203:路由反射器确定BGP自动配置信息中处于特定状态的客户机,向所述客户机发送第一鉴权信息。Step 203: The route reflector determines a client in a specific state in the BGP automatic configuration information, and sends the first authentication information to the client.

本实施例中,路由反射器轮询BGP自动配置信息中的每个客户机,在确定某个客户机未响应时,可确定该客户机处于特定状态(例如down状态),路由反射器处于主动配置状态,向该客户机发送第一鉴权信息。In this embodiment, the route reflector polls each client in the BGP automatic configuration information, and when it is determined that a client does not respond, it can be determined that the client is in a specific state (for example, the down state), and the route reflector is in the active state In the configuration state, the first authentication information is sent to the client.

步骤204:客户机接收到第一鉴权信息,基于自身的第二鉴权信息进行鉴权。鉴权通过后,客户机处于被动响应状态。Step 204: The client receives the first authentication information, and performs authentication based on its own second authentication information. After the authentication is passed, the client is in a passive response state.

这里,客户机鉴权通过后,允许路由反射器后续的BGP自动配置流程。Here, after the client authentication is passed, the subsequent BGP automatic configuration process of the route reflector is allowed.

步骤205:路由反射器向客户机发起并建立NETCONF会话通道。Step 205: The route reflector initiates and establishes a NETCONF session channel to the client.

本实施例中,路由反射器基于NETCONF协议向客户机发起并建立NETCONF会话通道。In this embodiment, the route reflector initiates and establishes a NETCONF session channel to the client based on the NETCONF protocol.

步骤206:路由反射器获得配置的BGP邻居信息,基于所述BGP邻居信息,生成所述客户机的第一BGP配置信息。Step 206: The route reflector obtains the configured BGP neighbor information, and generates first BGP configuration information of the client based on the BGP neighbor information.

本实施例中,所述BGP邻居信息可包括每个客户机对应的以下信息的至少之一:对等IP(Peer IP)、自治系统数(AS number)、对等(Peer)地址族、地址族下携带的能力及协议团体属性等。则路由反射器可从BGP邻居信息中获得该客户机对应的第一BGP配置信息。In this embodiment, the BGP neighbor information may include at least one of the following information corresponding to each client: peer IP (Peer IP), autonomous system number (AS number), peer (Peer) address family, address The ability carried under the clan and the attributes of the agreement group, etc. Then, the route reflector can obtain the first BGP configuration information corresponding to the client from the BGP neighbor information.

步骤207:路由反射器基于已建立的NETCONF会话通道获得所述客户机中已存储的第二BGP配置信息。Step 207: The route reflector obtains the second BGP configuration information stored in the client based on the established NETCONF session channel.

步骤208:路由反射器基于所述第一BGP配置信息和所述第二BGP配置信息进行比较与冲突检测,生成所述客户机的目标BGP配置信息。Step 208: The route reflector performs comparison and conflict detection based on the first BGP configuration information and the second BGP configuration information, and generates target BGP configuration information of the client.

本实施例中,路由反射器通过对第一BGP配置信息和第二BGP配置信息进行比较及冲突检测,删除或修改客户机中的BGP配置信息,生成所述客户机的目标BGP配置信息。In this embodiment, the route reflector compares and detects the conflict between the first BGP configuration information and the second BGP configuration information, deletes or modifies the BGP configuration information in the client, and generates the target BGP configuration information of the client.

例如,若第二BGP配置信息可包括的信息内容为空,则路由反射器将所述第一BGP配置信息作为所述客户机的目标BGP配置信息。又例如,若第二BGP配置信息包括的信息内容与第一BGP配置信息的信息内容不同,则路由反射器依据第一BGP配置信息对第二BGP配置信息的信息内容进行修改,或者可以对第二BGP配置信息的信息内容进行补充,例如补充对等连接接口(Peer connect-interface)配置信息等,生成所述客户机的目标BGP配置信息。For example, if the information content that can be included in the second BGP configuration information is empty, the route reflector uses the first BGP configuration information as the target BGP configuration information of the client. For another example, if the information content included in the second BGP configuration information is different from the information content of the first BGP configuration information, the route reflector modifies the information content of the second BGP configuration information according to the first BGP configuration information, or may modify the information content of the second BGP configuration information. The information content of the BGP configuration information is supplemented, for example, the peer connect interface (Peer connect-interface) configuration information is supplemented, and the target BGP configuration information of the client is generated.

步骤209:路由反射器通过所述NETCONF会话通道发送所述目标BGP配置信息至所述客户机,以使所述客户机自动完成BGP邻居信息的配置。Step 209: The route reflector sends the target BGP configuration information to the client through the NETCONF session channel, so that the client automatically completes the configuration of BGP neighbor information.

由于现网中基本所有大型网络都包含路由反射器,本发明实施例的技术方案在上述步骤成功完成并且均符合预期的情况下,全网网络设备的BGP邻居信息的配置更加简单高效。如在网络中存在网管设备时,网管设备可以仅管理路由反射器的BGP配置,其下挂的所有客户机配置都将基于路由反射器配置自动生成并完成全部配置工作,极大提高了网络设备部署的工作效率。而其它个性化需求导致的少量无法或者很难自动生成的配置(如路由策略(route-policy)等),可以在自动配置完成之后再进行补充。Since basically all large-scale networks in the existing network include route reflectors, the technical solutions of the embodiments of the present invention can configure the BGP neighbor information of network devices in the entire network more simply and efficiently when the above steps are successfully completed and all meet expectations. For example, when there is a network management device in the network, the network management device can only manage the BGP configuration of the route reflector, and all client configurations attached to it will be automatically generated based on the configuration of the route reflector and complete all the configuration work, which greatly improves the network equipment. Deployment productivity. A small amount of configuration that cannot or is difficult to be automatically generated due to other personalized requirements (such as route-policy, etc.) can be supplemented after the automatic configuration is completed.

本发明实施例还提供了一种网络设备,所述网络设备为前述实施例中的第一网络设备。图4为本发明实施例的网络设备的组成结构示意图一;如图4所示,所述网络设备包括:获取单元32和配置单元33;其中,An embodiment of the present invention further provides a network device, where the network device is the first network device in the foregoing embodiments. FIG. 4 is a schematic diagram 1 of the composition structure of a network device according to an embodiment of the present invention; as shown in FIG. 4 , the network device includes: an acquisition unit 32 and a configuration unit 33; wherein,

所述获取单元32,用于获得第二网络设备的目标BGP配置信息;The obtaining unit 32 is configured to obtain the target BGP configuration information of the second network device;

所述配置单元33,用于基于与所述第二网络设备之间的NETCONF会话通道,向所述第二网络设备发送所述目标BGP配置信息,所述目标BGP配置信息用于所述第二网络设备进行BGP邻居信息的配置。The configuration unit 33 is configured to send the target BGP configuration information to the second network device based on the NETCONF session channel with the second network device, where the target BGP configuration information is used for the second network device. The network device configures BGP neighbor information.

在本发明的一种可选实施例中,所述获取单元32,用于基于配置的BGP邻居信息,生成所述第二网络设备的第一BGP配置信息;基于所述通道建立单元31建立的所述NETCONF会话通道,获取所述第二网络设备中已存储的第二BGP配置信息;比较所述第一BGP配置信息和所述第二BGP配置信息,基于比较结果生成所述第二网络设备的目标BGP配置信息。In an optional embodiment of the present invention, the obtaining unit 32 is configured to generate the first BGP configuration information of the second network device based on the configured BGP neighbor information; The NETCONF session channel obtains the second BGP configuration information stored in the second network device; compares the first BGP configuration information and the second BGP configuration information, and generates the second network device based on the comparison result The target BGP configuration information.

在本发明的一种可选实施例中,所述网络设备还包括通道建立单元31,用于所述配置单元33向所述第二网络设备发送所述目标BGP配置信息之前,获得BGP自动配置信息;所述BGP自动配置信息中包括需要自动配置BGP邻居信息的至少一个第二网络设备的信息;在所述BGP自动配置信息中的所述第二网络设备处于特定状态的情况下,且所述第二网络设备鉴权通过后,向所述第二网络设备发起并建立NETCONF会话通道;所述第二网络设备处于特定状态表明所述第二网络设备未成功建立BGP邻居关系。In an optional embodiment of the present invention, the network device further includes a channel establishment unit 31 for obtaining the BGP automatic configuration before the configuration unit 33 sends the target BGP configuration information to the second network device information; the BGP automatic configuration information includes information of at least one second network device that needs to automatically configure BGP neighbor information; in the case that the second network device in the BGP automatic configuration information is in a specific state, and all After the second network device is authenticated, initiate and establish a NETCONF session channel to the second network device; the second network device being in a specific state indicates that the second network device has not successfully established a BGP neighbor relationship.

在本发明的一种可选实施例中,所述通道建立单元31,还用于向处于所述特定状态的第二网络设备发送已配置的第一鉴权信息;在所述第一鉴权信息与所述第二网络设备中已配置的第二鉴权信息一致的情况下,确定所述第二网络设备鉴权通过。In an optional embodiment of the present invention, the channel establishing unit 31 is further configured to send the configured first authentication information to the second network device in the specific state; If the information is consistent with the second authentication information configured in the second network device, it is determined that the authentication of the second network device is passed.

在本发明的一种可选实施例中,如图5所示,所述设备还包括功能初始化单元34,用于所述通道建立单元31建立与第二网络设备之间的NETCONF会话通道之前,初始化BGP自动配置功能,获得第一鉴权信息。In an optional embodiment of the present invention, as shown in FIG. 5 , the device further includes a function initialization unit 34 for, before the channel establishment unit 31 establishes the NETCONF session channel with the second network device, Initialize the BGP automatic configuration function to obtain the first authentication information.

在本发明的一种可选实施例中,所述配置单元33,还用于获得所述第二网络设备的配置成功消息,所述配置成功消息用于表征所述第二网络设备完成BGP邻居信息的配置;In an optional embodiment of the present invention, the configuration unit 33 is further configured to obtain a configuration success message of the second network device, where the configuration success message is used to indicate that the second network device completes a BGP neighbor relationship configuration of information;

其中,所述第一网络设备为路由反射器设备;所述第二网络设备为客户机设备。Wherein, the first network device is a route reflector device; the second network device is a client device.

本发明实施例中,所述网络设备中的通道建立单元31和功能初始化单元34,在实际应用中均可由所述网络设备中的中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现;所述网络设备中的配置单元33,在实际应用中可通过通信模组(包含:基础通信套件、操作系统、通信模块、标准化接口和协议等)及收发天线实现;所述网络设备中的获取单元32,在实际应用中可由所述网络设备中的CPU、DSP、MCU或FPGA结合通信模组(包含:基础通信套件、操作系统、通信模块、标准化接口和协议等)及收发天线实现。In this embodiment of the present invention, the channel establishing unit 31 and the function initializing unit 34 in the network device can both be composed of a central processing unit (CPU, Central Processing Unit) and a digital signal processor (Digital Signal Processor) in the network device in practical applications. DSP, Digital Signal Processor), Microcontroller Unit (MCU, Microcontroller Unit) or Programmable Gate Array (FPGA, Field-Programmable Gate Array); the configuration unit 33 in the network device can be implemented through a communication model in practical applications. group (including: basic communication suite, operating system, communication module, standardized interface and protocol, etc.) and transceiver antenna implementation; the acquisition unit 32 in the network device can be implemented by the CPU, DSP, The MCU or FPGA is implemented in combination with communication modules (including: basic communication suite, operating system, communication modules, standardized interfaces and protocols, etc.) and transceiver antennas.

需要说明的是:上述实施例提供的网络设备在进行信息配置时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将网络设备的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的网络设备与信息配置方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the network device provided in the above embodiment performs information configuration, only the division of the above program modules is used as an example. The internal structure of the network device is divided into different program modules to complete all or part of the processing described above. In addition, the network device and the information configuration method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.

本发明实施例还提供了一种网络设备,所述网络设备为前述实施例中的第一网络设备。图6为本发明实施例的网络设备的硬件组成结构示意图,如图6所示,所述网络设备50包括存储器52、处理器51及存储在存储器52上并可在处理器51上运行的计算机程序,所述处理器51执行所述程序时实现本发明实施例所述方法的步骤。An embodiment of the present invention further provides a network device, where the network device is the first network device in the foregoing embodiments. FIG. 6 is a schematic diagram of a hardware structure of a network device according to an embodiment of the present invention. As shown in FIG. 6 , the network device 50 includes a memory 52 , a processor 51 , and a computer stored in the memory 52 and running on the processor 51 . A program, the processor 51 implements the steps of the method in the embodiment of the present invention when the processor 51 executes the program.

可选地,网络设备50中还包括通讯接口53。网络设备50中的各个组件通过总线系统54耦合在一起。可理解,总线系统54用于实现这些组件之间的连接通信。总线系统54除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图6中将各种总线都标为总线系统54。Optionally, the network device 50 further includes a communication interface 53 . The various components in network device 50 are coupled together by bus system 54 . It will be appreciated that the bus system 54 is used to implement the connection communication between these components. In addition to the data bus, the bus system 54 also includes a power bus, a control bus and a status signal bus. For the sake of clarity, however, the various buses are labeled as bus system 54 in FIG. 6 .

可以理解,存储器52可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random AccessMemory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,SynchronousDynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本发明实施例描述的存储器52旨在包括但不限于这些和任意其它适合类型的存储器。It will be appreciated that the memory 52 may be either volatile memory or non-volatile memory, and may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-only memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD-ROM, or Compact Disc Read-Only Memory (CD-ROM, Compact Disc Read-Only Memory); the magnetic surface memory can be a magnetic disk memory or a tape memory. The volatile memory may be Random Access Memory (RAM), which is used as an external cache memory. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), Synchronous Dynamic Random Access Memory (SDRAM, SynchronousDynamic Random Access Memory), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory) . The memory 52 described in the embodiments of the present invention is intended to include, but not be limited to, these and any other suitable types of memory.

上述本发明实施例揭示的方法可以应用于处理器51中,或者由处理器51实现。处理器51可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器51中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器51可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器51可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器52,处理器51读取存储器52中的信息,结合其硬件完成前述方法的步骤。The methods disclosed in the above embodiments of the present invention may be applied to the processor 51 or implemented by the processor 51 . The processor 51 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in the processor 51 or an instruction in the form of software. The above-mentioned processor 51 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The processor 51 may implement or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in the memory 52, and the processor 51 reads the information in the memory 52, and completes the steps of the foregoing method in combination with its hardware.

在示例性实施例中,网络设备50可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,ProgrammableLogic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、FPGA、通用处理器、控制器、微处理器(Microprocessor)、或其他电子元件实现,用于执行前述方法。In an exemplary embodiment, the network device 50 may be implemented by one or more Application Specific Integrated Circuits (ASIC, Application Specific Integrated Circuits), DSPs, Programmable Logic Devices (PLDs, Programmable Logic Devices), Complex Programmable Logic Devices (CPLDs, Complex Programmable Logic Device), FPGA, general-purpose processor, controller, microprocessor (Microprocessor), or other electronic component implementations for performing the aforementioned method.

在示例性实施例中,本发明实施例还提供了一种计算机可读存储介质,例如包括计算机程序的存储器52,上述计算机程序可由网络设备50的处理器51执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。In an exemplary embodiment, the embodiment of the present invention also provides a computer-readable storage medium, such as a memory 52 including a computer program, and the computer program can be executed by the processor 51 of the network device 50 to complete the steps of the foregoing method. . The computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.

本发明实施例提供的计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本发明实施例所述方法的步骤。The computer-readable storage medium provided by the embodiment of the present invention stores a computer program thereon, and when the program is executed by the processor, implements the steps of the method described in the embodiment of the present invention.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The unit described above as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may all be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integration The unit can be implemented either in the form of hardware or in the form of hardware plus software functional units.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by program instructions related to hardware, the aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, execute It includes the steps of the above method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic disk or an optical disk and other media that can store program codes.

或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art. The computer software products are stored in a storage medium and include several instructions for A computer device (which may be a personal computer, a server, or a network device, etc.) is caused to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic disk or an optical disk and other mediums that can store program codes.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (14)

1. An information configuration method, characterized in that the method comprises:
a first network device obtains the configuration information of a target Border Gateway Protocol (BGP) of a second network device;
and sending the target BGP configuration information to the second network equipment based on a network configuration protocol NETCONF session channel between the second network equipment and the target BGP configuration information, wherein the target BGP configuration information is used for the second network equipment to configure BGP neighbor information.
2. The method of claim 1, wherein obtaining the target BGP configuration information for the second network device comprises:
the first network equipment generates first BGP configuration information of the second network equipment based on the configured BGP neighbor information;
acquiring second BGP configuration information stored in the second network equipment based on the NETCONF session channel;
and comparing the first BGP configuration information with the second BGP configuration information, and generating target BGP configuration information of the second network equipment based on a comparison result.
3. The method of claim 1, wherein prior to said sending the target BGP configuration information to the second network device, the method further comprises:
the first network equipment obtains BGP automatic configuration information; the BGP automatic configuration information comprises information of at least one second network device needing automatic configuration of BGP neighbor information;
under the condition that the second network equipment in the BGP automatic configuration information is in a specific state and the second network equipment passes authentication, the first network equipment initiates and establishes a NETCONF session channel to the second network equipment; the second network device being in a particular state indicates that the second network device has not successfully established a BGP neighbor relationship.
4. The method of claim 3, wherein the second network device authenticates, comprising:
the first network device sends configured first authentication information to a second network device in the specific state;
and determining that the second network equipment passes the authentication under the condition that the first authentication information is consistent with second authentication information configured in the second network equipment.
5. The method of claim 4, wherein before the first network device establishes a NETCONF session channel with a second network device, the method further comprises:
the first network equipment initializes the BGP automatic configuration function and obtains first authentication information.
6. The method according to any one of claims 1 to 5, further comprising:
the first network equipment obtains a configuration success message of the second network equipment, wherein the configuration success message is used for representing that the second network equipment completes configuration of BGP neighbor information;
wherein the first network device is a route reflector device; the second network device is a client device.
7. A network device, the network device being a first network device, the network device comprising: an acquisition unit and a configuration unit; wherein,
the obtaining unit is configured to obtain target BGP configuration information of the second network device;
the configuration unit is configured to send the target BGP configuration information to the second network device based on a NETCONF session channel with the second network device, where the target BGP configuration information is used for configuring BGP neighbor information by the second network device.
8. The network device according to claim 7, wherein the obtaining unit is configured to generate the first BGP configuration information of the second network device based on the configured BGP neighbor information; acquiring second BGP configuration information stored in the second network equipment based on the NETCONF session channel established by the channel establishing unit; and comparing the first BGP configuration information with the second BGP configuration information, and generating target BGP configuration information of the second network equipment based on a comparison result.
9. The network device of claim 7, wherein the network device further comprises a channel establishing unit, configured to obtain BGP auto-configuration information before the configuring unit sends the target BGP configuration information to the second network device; the BGP automatic configuration information comprises information of at least one second network device needing automatic configuration of BGP neighbor information; under the condition that the second network equipment in the BGP automatic configuration information is in a specific state and the second network equipment passes authentication, initiating and establishing a NETCONF session channel to the second network equipment; the second network device being in a particular state indicates that the second network device has not successfully established a BGP neighbor relationship.
10. The network device according to claim 9, wherein the channel establishing unit is further configured to send the configured first authentication information to the second network device in the specific state; and determining that the second network equipment passes the authentication under the condition that the first authentication information is consistent with second authentication information configured in the second network equipment.
11. The network device according to claim 10, wherein the device further comprises a function initialization unit, configured to initialize a BGP auto-configuration function to obtain the first authentication information before the channel establishing unit establishes the NETCONF session channel with the second network device.
12. The network device according to any one of claims 7 to 11, wherein the configuration unit is further configured to obtain a configuration success message of the second network device, where the configuration success message is used to characterize that the second network device completes configuration of BGP neighbor information;
wherein the first network device is a route reflector device; the second network device is a client device.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
14. A network device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented when the processor executes the program.
CN201911111851.2A 2019-11-14 2019-11-14 An information configuration method and network device Active CN112804144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911111851.2A CN112804144B (en) 2019-11-14 2019-11-14 An information configuration method and network device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911111851.2A CN112804144B (en) 2019-11-14 2019-11-14 An information configuration method and network device

Publications (2)

Publication Number Publication Date
CN112804144A true CN112804144A (en) 2021-05-14
CN112804144B CN112804144B (en) 2022-10-21

Family

ID=75803591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911111851.2A Active CN112804144B (en) 2019-11-14 2019-11-14 An information configuration method and network device

Country Status (1)

Country Link
CN (1) CN112804144B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296124A (en) * 2008-06-27 2008-10-29 华为技术有限公司 Method, device and system for acquiring equipment information
US20140136714A1 (en) * 2011-06-10 2014-05-15 Telefonica, S.A. Method for exchanging information about network resources
CN104468368A (en) * 2014-11-10 2015-03-25 杭州华三通信技术有限公司 Method and device for allocating BGP neighbors
CN105991579A (en) * 2015-02-12 2016-10-05 华为技术有限公司 Information transmitting method, related network equipment and system
CN106059922A (en) * 2016-05-26 2016-10-26 杭州华三通信技术有限公司 Route injection method and device
WO2019106259A1 (en) * 2017-11-28 2019-06-06 Orange Configuration method intended to be implemented in a network useing a dynamic routing protocol

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296124A (en) * 2008-06-27 2008-10-29 华为技术有限公司 Method, device and system for acquiring equipment information
US20140136714A1 (en) * 2011-06-10 2014-05-15 Telefonica, S.A. Method for exchanging information about network resources
CN104468368A (en) * 2014-11-10 2015-03-25 杭州华三通信技术有限公司 Method and device for allocating BGP neighbors
CN105991579A (en) * 2015-02-12 2016-10-05 华为技术有限公司 Information transmitting method, related network equipment and system
CN106059922A (en) * 2016-05-26 2016-10-26 杭州华三通信技术有限公司 Route injection method and device
WO2019106259A1 (en) * 2017-11-28 2019-06-06 Orange Configuration method intended to be implemented in a network useing a dynamic routing protocol

Also Published As

Publication number Publication date
CN112804144B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
US10666638B2 (en) Certificate-based dual authentication for openflow enabled switches
CN108667638B (en) Network service configuration method and network management equipment
US10003540B2 (en) Flow forwarding method, device, and system
CN108881308B (en) User terminal and authentication method, system and medium thereof
US11863529B2 (en) Private cloud routing server connection mechanism for use in a private communication architecture
CN107592209A (en) A kind of multi-network card server automatically configures the method and system of IP address information
CN111385180B (en) Communication tunnel construction method, apparatus, device and medium
WO2018024121A1 (en) Network function (nf) management method and nf management device
WO2021218886A1 (en) Vxlan access authentication method and vtep device
WO2018076675A1 (en) Network access method, routing device and terminal, and computer storage medium
WO2016078291A1 (en) Method, apparatus and system for accessing file sharing server
CN112688898B (en) Configuration method and related equipment
CN107113615B (en) Authentication method and system for Access Point (AP) and related equipment
WO2018039901A1 (en) Method, device and system for ip address allocation, and computer program product
CN112804144B (en) An information configuration method and network device
KR20060012285A (en) System and method for programmatically switching network locations of network components
US20120166600A1 (en) Method, remote access server and system for configuring a quality of service parameter
WO2012139463A1 (en) Terminal device initialization method and device
CN114928459B (en) Connection method and computer readable medium for private communication architecture
TWI829487B (en) Private matter gateway connection mechanism for use in a private communication architecture
CN115208603B (en) Connection method and computer readable medium for private communication architecture
CN111355822B (en) Method for identifying communication nodes
TWI829435B (en) Metaverse application gateway connection mechanism for use in a private communication architecture
TWI836974B (en) Private and secure chat connection mechanism for use in a private communication architecture
CN118301787B (en) 5GLAN adaptive networking method, device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant