Interface configuration information switching method, device, equipment and storage medium

文档序号:1641605 发布日期:2019-12-20 浏览:29次 中文

阅读说明:本技术 一种接口配置信息切换方法、装置、设备及存储介质 (Interface configuration information switching method, device, equipment and storage medium ) 是由 王小军 张亮 石励 张凯 于 2019-09-17 设计创作,主要内容包括:本发明实施例公开了一种接口配置信息切换方法、装置、设备及存储介质,其中,方法包括:接收OSPF协议报文;其中,所述OSPF协议报文包括第一区域ID;如果确定所述第一区域ID与本地记录的第二区域ID不相符,且当前网络设备在第一区域满足自动切换条件,则根据所述第一区域的接口配置信息切换本地记录的接口配置信息。本发明实施例的技术方案能够实现自动切换网络设备的接口配置信息,以降低网络设备的维护成本,并提高网络设备接入网络的速度。(The embodiment of the invention discloses a method, a device, equipment and a storage medium for switching interface configuration information, wherein the method comprises the following steps: receiving an OSPF protocol message; wherein, the OSPF protocol message includes a first area ID; and if the first area ID is determined not to be consistent with the second area ID of the local record and the current network equipment meets the automatic switching condition in the first area, switching the interface configuration information of the local record according to the interface configuration information of the first area. The technical scheme of the embodiment of the invention can realize automatic switching of the interface configuration information of the network equipment so as to reduce the maintenance cost of the network equipment and improve the speed of the network equipment accessing the network.)

1. A method for switching interface configuration information is characterized by comprising the following steps:

receiving an OSPF protocol message; wherein, the OSPF protocol message includes a first area ID;

and if the first area ID is determined not to be consistent with the second area ID of the local record and the current network equipment meets the automatic switching condition in the first area, switching the interface configuration information of the local record according to the interface configuration information of the first area.

2. The method of claim 1, wherein the interface configuration information includes an interface IP and an interface area;

the switching the locally recorded interface configuration information according to the interface configuration information of the first area includes:

replacing the interface IP of the local record with the IP of the network segment in which the first area is located;

and replacing the interface area of the local record with the interface area of the first area.

3. The method according to claim 1, before switching the interface configuration information recorded locally according to the interface configuration information of the first area, comprising:

classifying the OSPF protocol message according to the first area ID;

and storing the OSPF protocol messages with the same first area ID according to the classification result.

4. The method of claim 3, further comprising:

and counting and storing the quantity of source IPs of the OSPF protocol messages with the same first area ID and the receiving time of the OSPF protocol messages.

5. The method of claim 4, wherein the automatic switching condition comprises:

the number of source IPs of the OSPF protocol messages with the same first area ID is greater than or equal to a first preset threshold.

6. The method of claim 5, further comprising:

and if the time difference between the receiving time of the OSPF protocol messages with the same first area ID and the current time is greater than or equal to a second preset threshold value, and the number of the source IPs of the OSPF protocol messages with the same first area ID does not meet the automatic switching condition, deleting all information recorded corresponding to the first area ID.

7. The method according to claim 4, wherein after the switching the locally recorded interface configuration information according to the interface configuration information of the first area, the method comprises:

all stored information is deleted.

8. An interface configuration information switching apparatus, comprising:

the message receiving module is used for receiving an OSPF protocol message; wherein, the OSPF protocol message includes a first area ID;

and the information switching module is used for switching the interface configuration information of the local record according to the interface configuration information of the first area if the first area ID is determined not to be consistent with the second area ID of the local record and the device meets the automatic switching condition in the first area.

9. An apparatus, characterized in that the apparatus comprises:

one or more processors;

storage means for storing one or more programs;

when executed by the one or more processors, cause the one or more processors to implement the interface configuration information switching method of any one of claims 1-7.

10. A computer storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the interface configuration information switching method according to any one of claims 1 to 7.

Technical Field

The embodiment of the invention relates to the technical field of communication, in particular to a method, a device, equipment and a storage medium for switching interface configuration information.

Background

OSPF (Open Shortest Path First) is a dynamic routing protocol in the autonomous system based on link state, and the protocol forms a link state database by exchanging link state information between three layers of switches, and then generates a routing table by using Shortest Path First algorithm based on the database.

The OSPF protocol supports networks of various sizes, up to several hundred three-layer switches. OSPF can send link state update packets immediately after a change in the routing topology of a network. In the existing application environment, the networking environment is generally fixed, and therefore, configuration information about OSPF is also unchanged for the switching device. Because a certain interface belongs to a certain area and is planned in advance, when the networking environment changes and the network topology changes, the interface configuration information of the OSPF can be modified manually.

In the process of implementing the invention, the inventor finds that the prior art has the following defects:

for a flexible network, such as a vehicle-mounted switching device, when a vehicle enters an unknown area from one area, if the interface configuration information of the OSPF is manually modified each time, a problem of high maintenance cost is caused. Meanwhile, the interface configuration information of the OSPF is modified manually, which is easy to make mistakes, thereby causing the network to be disconnected and being difficult to ensure that the switching equipment can access the network quickly.

Disclosure of Invention

The embodiment of the invention provides an interface configuration information switching method, an interface configuration information switching device, interface configuration information switching equipment and a storage medium, which are used for automatically switching interface configuration information of network equipment so as to reduce the maintenance cost of the network equipment and improve the network access speed of the network equipment.

In a first aspect, an embodiment of the present invention provides a method for switching interface configuration information, where the method includes:

receiving an OSPF protocol message; wherein, the OSPF protocol packet includes a first area ID (identity document, identity card identification number);

and if the first area ID is determined not to be consistent with the second area ID of the local record and the current network equipment meets the automatic switching condition in the first area, switching the interface configuration information of the local record according to the interface configuration information of the first area.

In a second aspect, an embodiment of the present invention further provides an interface configuration information switching apparatus, including:

the message receiving module is used for receiving an OSPF protocol message; wherein, the OSPF protocol message includes a first area ID;

and the information switching module is used for switching the interface configuration information of the local record according to the interface configuration information of the first area if the first area ID is determined not to be consistent with the second area ID of the local record and the device meets the automatic switching condition in the first area.

In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:

one or more processors;

storage means for storing one or more programs;

when the one or more programs are executed by the one or more processors, the one or more processors implement the interface configuration information switching method provided by any embodiment of the present invention.

In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the interface configuration information switching method provided in any embodiment of the present invention.

In the embodiment of the present invention, when the first area ID in the OSPF protocol message received by the current network device does not match the second area ID recorded locally, it may be determined that the current network device may move to a new area, that is, the first area, in this case, if the current network device determines that the automatic handover condition is satisfied in the new area, it may be determined that the current network device has moved to the new area, and the current network device is triggered to switch the interface configuration information recorded locally, so that the current network device is quickly accessed to the new area. Therefore, the invention solves the problems of high maintenance cost, low efficiency and the like of the prior manual switching of the interface configuration information of the network equipment, realizes the purpose of automatically switching the interface configuration information of the network equipment to access a new area after the network equipment moves to the new network environment area, reduces the maintenance cost of the network equipment and improves the network access speed of the network equipment.

Drawings

Fig. 1 is a flowchart of a method for switching interface configuration information according to an embodiment of the present invention;

fig. 2a is a flowchart of a method for switching interface configuration information according to a second embodiment of the present invention;

fig. 2b is a schematic structural diagram of a vehicle-mounted network domain according to a second embodiment of the present invention;

fig. 2c is a schematic structural diagram of a vehicle-mounted network domain according to a second embodiment of the present invention;

fig. 2d is a schematic diagram illustrating a flow of interface configuration information switching according to a second embodiment of the present invention;

fig. 3 is a schematic diagram of an interface configuration information switching apparatus according to a third embodiment of the present invention;

fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.

It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种支持外设控制移动终端设备的路由器、控制方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!