CN110572278A - Method and device for positioning information of three-layer gateway of metropolitan area network - Google Patents

Method and device for positioning information of three-layer gateway of metropolitan area network Download PDF

Info

Publication number
CN110572278A
CN110572278A CN201910763506.0A CN201910763506A CN110572278A CN 110572278 A CN110572278 A CN 110572278A CN 201910763506 A CN201910763506 A CN 201910763506A CN 110572278 A CN110572278 A CN 110572278A
Authority
CN
China
Prior art keywords
configuration data
address
interface
gateway
keywords
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
CN201910763506.0A
Other languages
Chinese (zh)
Other versions
CN110572278B (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.)
Unihub China Information Technology Co Ltd
Original Assignee
Unihub China Information Technology 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 Unihub China Information Technology Co Ltd filed Critical Unihub China Information Technology Co Ltd
Priority to CN201910763506.0A priority Critical patent/CN110572278B/en
Publication of CN110572278A publication Critical patent/CN110572278A/en
Application granted granted Critical
Publication of CN110572278B publication Critical patent/CN110572278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2852Metropolitan area networks
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method and a device for positioning information of a three-layer gateway of a metropolitan area network, wherein the method comprises the following steps: acquiring global configuration data of three layers of gateways in a metropolitan area network; determining an IP address keyword and corresponding IP address configuration data and determining an interface keyword and corresponding interface configuration data according to global configuration data of a three-layer gateway in a metropolitan area network; and determining interface configuration data corresponding to the IP address of the two-layer equipment according to the IP address configuration data and the corresponding interface configuration data. Determining an IP address keyword and corresponding IP address configuration data, an interface keyword and corresponding interface configuration data through global configuration data of a three-layer gateway; and then according to the IP address configuration data and the corresponding interface configuration data, a three-layer gateway interface corresponding to the IP address of the two-layer equipment is positioned, and the efficiency and the accuracy of positioning the interface in the three-layer gateway information can be improved.

Description

method and device for positioning information of three-layer gateway of metropolitan area network
Technical Field
The invention relates to the technical field of information communication, in particular to a method and a device for positioning information of a three-layer gateway of a metropolitan area network.
Background
this section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
metropolitan Area Networks (MAN) are computer communication networks established in a city, and belong to the category of broadband local Area networks. The local area network technology with active exchange elements is adopted, the network transmission delay is small, the transmission medium is mainly an optical cable, and the transmission rate is generally more than 100 Mbit/s. The transformation of the two-layer equipment of the metropolitan area network is an important aspect of the construction of the metropolitan area network.
in the process of transforming the two-layer device of the metropolitan area network, three-layer gateway information corresponding to the two-layer device needs to be collected and positioned. Currently, the modification work of the corresponding two-layer equipment can be performed only by manually collecting and positioning the required three-layer gateway information. On one hand, if a large number of slave IP addresses exist in the three-layer gateway information, the efficiency of collecting and positioning the three-layer gateway information is greatly reduced. For example, a common metro network device contains at least 1 ten thousand rows of global configuration data, and it may take at least 60 minutes to 90 minutes, or even longer, to manually gather and locate all eligible three-tier gateway information, resulting in very inefficient location of three-tier gateway information. On the other hand, after a large amount of data is processed, due to fatigue and other reasons caused by long-time operation, part of three-layer gateway information may be omitted in the positioning process, or wrong three-layer gateway information may be positioned, so that the positioned three-layer gateway information is inaccurate, and further modification or migration errors of corresponding two-layer equipment may be caused.
therefore, the existing manual positioning three-layer gateway information has the problems of low efficiency and low accuracy.
disclosure of Invention
The embodiment of the invention provides a method for positioning information of a three-layer gateway of a metropolitan area network, which is used for improving the efficiency and the accuracy of positioning the information of the three-layer gateway and comprises the following steps:
Acquiring global configuration data of three layers of gateways in a metropolitan area network;
determining gateway configuration keywords and configuration data corresponding to the gateway configuration keywords according to global configuration data of three layers of gateways in a metropolitan area network; the gateway configuration keywords comprise interface keywords and IP address keywords, and the configuration data corresponding to the gateway configuration keywords comprise IP address configuration data corresponding to the IP address keywords and interface configuration data corresponding to the interface keywords;
And determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
the embodiment of the invention also provides a device for positioning the information of the three-layer gateway of the metropolitan area network, which is used for improving the efficiency and the accuracy of positioning the information of the three-layer gateway and comprises the following components:
the acquisition module is used for acquiring global configuration data of a three-layer gateway in a metropolitan area network;
The determining module is used for determining gateway configuration keywords and configuration data corresponding to the gateway configuration keywords according to the global configuration data of the three layers of gateways in the metropolitan area network; the gateway configuration keywords comprise interface keywords and IP address keywords, and the configuration data corresponding to the gateway configuration keywords comprise IP address configuration data corresponding to the IP address keywords and interface configuration data corresponding to the interface keywords;
and the positioning module is used for determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the three-layer gateway information positioning method of the metropolitan area network when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the metro network three-layer gateway information positioning method.
in the embodiment of the invention, IP address keywords and IP address configuration data corresponding to the IP address keywords are determined and interface keywords and interface configuration data corresponding to the interface keywords are determined through global configuration data of a three-layer gateway in a metropolitan area network; and then automatically positioning the interface configuration data in the three-layer gateway information corresponding to the IP address of the two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
Drawings
in order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
Fig. 1 is a flowchart of an implementation of a metro network three-layer gateway information positioning method according to an embodiment of the present invention;
Fig. 2 is a flowchart illustrating an implementation of step 103 in a method for locating information of a metro network three-layer gateway according to an embodiment of the present invention;
fig. 3 is a flowchart of another implementation of a method for locating information of a metro network three-layer gateway according to an embodiment of the present invention;
fig. 4 is a functional block diagram of a metro network three-layer gateway information positioning apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of a positioning module 403 in a metro network three-layer gateway information positioning apparatus according to an embodiment of the present invention;
Fig. 6 is another functional block diagram of a metro network three-layer gateway information positioning apparatus according to an embodiment of the present invention;
Detailed Description
in order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 shows an implementation flow of a metro network three-layer gateway information positioning method provided in an embodiment of the present invention, and for convenience of description, only parts related to the embodiment of the present invention are shown, which are detailed as follows:
as shown in fig. 1, the method for locating information of a metro network three-layer gateway includes:
step 101, acquiring global configuration data of a three-layer gateway in a metropolitan area network;
102, determining gateway configuration keywords and configuration data corresponding to the gateway configuration keywords according to global configuration data of three layers of gateways in a metropolitan area network; the gateway configuration keywords comprise interface keywords and IP address keywords, and the configuration data corresponding to the gateway configuration keywords comprise IP address configuration data corresponding to the IP address keywords and interface configuration data corresponding to the interface keywords;
And 103, determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
in the embodiment of the present invention, the global configuration data of the three-tier gateway is generally stored in the text file in the form of software code. Therefore, when the global configuration data of the three-layer gateway is obtained, all the configuration data of the three-layer gateway in the metro network, namely the full-bright configuration data of the three-layer gateway, can be obtained by directly reading the code content of the text file containing the configuration data of the three-layer gateway.
After the global configuration data of the three-layer gateway in the metropolitan area network is obtained, screening is carried out through the gateway configuration keywords according to the global configuration data of the three-layer gateway in the metropolitan area network, and the gateway configuration keywords and the configuration data corresponding to the gateway configuration keywords are selected. The gateway configuration key words uniquely identify the configuration data corresponding to the gateway configuration key words in the gateway configuration data, and the gateway configuration key words and the configuration data corresponding to the gateway configuration key words are in the same row of codes. For example, by identifying and screening the gateway configuration key, a code line including the gateway configuration key and the configuration data corresponding to the gateway configuration key is extracted.
In the embodiment of the present invention, the gateway configuration keywords at least include interface keywords (e.g., interface and the like) and IP address keywords (e.g., IP address and the like). Therefore, the configuration data corresponding to the interface keyword is interface configuration data, and the interface configuration data reflects interface information; the configuration data corresponding to the IP address keywords are IP address configuration data, and the IP address configuration data reflects IP address information.
Further, since the code line including the interface key and the interface configuration data corresponding to the interface key is followed by the code line including the IP address key and the IP address configuration data corresponding to the IP address key, it can be said that the interface configuration data and the IP address configuration data have a specific correspondence relationship. That is, according to the code line including the interface keyword and the interface configuration data corresponding to the interface keyword, and the code line following the code line and including the IP address keyword and the IP address configuration data corresponding to the IP address keyword, the corresponding relationship between the interface configuration data and the IP address configuration data can be determined.
For example, assume that the filtered gateway configuration keywords and the configuration data corresponding to the gateway configuration keywords are in the following form:
It can be determined accordingly that the IP address configuration information b1 and the interface configuration information a1 have a corresponding relationship, and the IP address configuration information c1 and the interface configuration information a1 also have a corresponding relationship. In addition, it can also be determined that there is a correspondence relationship between the IP address configuration information b2 and the interface configuration information a 2.
Screening all code lines containing the gateway configuration keywords and the configuration data corresponding to the gateway configuration keywords through the step of utilizing the gateway configuration keywords, and carrying out primary screening and matching on the global configuration data of the three-layer gateway.
because the IP address of the two-layer device and the IP address configuration data in the global configuration data of the three-layer gateway have a corresponding relation, the IP address configuration data obtained by screening can be compared with the IP address of the two-layer device to be modified for screening, the IP address configuration data corresponding to the IP address of the two-layer device is determined, and then the interface configuration data corresponding to the IP address of the two-layer device is positioned according to the corresponding relation between the IP address configuration data and the interface configuration data.
wherein, the IP address of the two-layer device to be modified is known, and there may be one or more two-layer devices to be modified. In most cases, there are a plurality of two-layer devices to be modified. Then, a layer two device corresponds to a known layer two device IP address, and a layer two device IP address can locate an interface configuration data corresponding thereto. The plurality of two-layer device IP addresses can form a two-layer device IP address management list, so that interface configuration data corresponding to each two-layer device IP address of the two-layer device IP address management list in a one-to-one mode is obtained through the method steps.
In the embodiment of the invention, the global configuration data of the three-layer gateway in the metro network is obtained, the gateway configuration key words and the configuration data corresponding to the gateway configuration key words are determined according to the global configuration data of the three-layer gateway, namely, the interface key words and the interface configuration information corresponding to the interface key words, and the IP address key words and the IP address configuration information corresponding to the IP address key words are determined, and further, based on the screened IP address configuration data, the interface configuration data corresponding to the known IP address of the two-layer device is determined (positioned) according to the corresponding relation between the IP address configuration data and the interface configuration data, compared with the traditional method of utilizing a manual positioning interface, the efficiency of positioning the interface configuration data in the three-layer gateway can be greatly improved, and the problem of positioning wrong interface configuration data caused by manual fatigue can be avoided, the accuracy of positioning the interface configuration data in the three-layer gateway is improved.
through research and measurement, according to configuration data of ten thousand rows of three-layer gateways and nearly 400 two-layer devices to be modified (each two-layer device corresponds to one IP address), the interface of the three-layer gateway corresponding to the IP addresses of the 400 two-layer devices can be accurately positioned only in one minute at most, the efficiency of positioning the interface configuration data in the three-layer gateway is greatly improved, and meanwhile, the accuracy of positioning the interface configuration data in the three-layer gateway can be improved.
fig. 2 shows an implementation flow of step 103 in the metro network three-layer gateway information positioning method provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which is detailed as follows:
in an embodiment of the present invention, as shown in fig. 2, step 103, determining interface configuration data corresponding to an IP address of at least one layer two device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data, includes:
step 201, converting a standard mode mask of IP address configuration data into a digital mode mask;
Step 202, determining IP address configuration data corresponding to at least one IP address of the two-layer device by performing IP address subnet division on the IP address configuration data containing the digital mode mask;
step 203, determining interface configuration data corresponding to the IP address of the at least one layer two device according to the interface configuration data corresponding to the IP address configuration data.
In the embodiment of the present invention, the IP address configuration data includes a mask, and the mask of the screened IP address configuration data is a standard format mask. Standard format masks, i.e., masks in the form of, for example, 255.255.255.192, 255.255.255.0, etc.
Specifically, when interface configuration data corresponding to the IP address of the second-tier device is determined, in order to screen and compare the IP address configuration data in the third-tier gateway configuration data with the IP address of the second-tier device, a standard format mask included in the IP address configuration data is converted into a digital mode mask. The digital pattern mask is a mask of the form/24/,/15, and/10, etc. For example, the standard format mask 255.255.255.0 is converted to a digital pattern mask/24, the standard format mask 255.255.255.192 is converted to a digital pattern mask/26, and so on. The conversion of the standard format mask into the digital pattern mask is well known in the art and will not be described in detail herein.
After the standard mode mask of the IP address configuration data is converted into the digital mode mask, the IP address configuration data comprises the converted digital mode mask, and then IP address subnet division is carried out on the IP address configuration data comprising the digital mode mask. The IP address subnet division refers to dividing IP address configuration data according to a certain rule. For example, certain IP address configuration data 123.123.46./26 is divided into 123.123.46./1, 123.123.46./2, 123.123.46./3. 123.123.46./62, and 123.123.46./63 by IP address subnet partitioning. IP address subnet partitioning is well known in the art and will not be described in detail herein.
After IP address subnet division is carried out on the IP address configuration data, the result of the IP address subnet division is compared with the known IP address of the two-layer device, the IP address subnet division result which is consistent with the IP address of the two-layer device is screened out from the result of the IP address subnet division, and then the IP address configuration data corresponding to the IP address of the two-layer device is determined according to the consistent IP address subnet division result. And after determining the IP address configuration data corresponding to the IP address of the two-layer equipment, further determining the interface configuration data corresponding to the IP address of the two-layer equipment according to the interface configuration data corresponding to the IP address configuration data.
In the embodiment of the invention, the standard mode mask of the IP address configuration data is converted into the digital mode mask, the IP address subnet division is carried out on the IP address configuration data containing the digital mode mask, the IP address configuration data corresponding to the IP address of the at least one two-layer device is determined, and then the interface configuration data corresponding to the IP address of the at least one two-layer device is determined according to the interface configuration data corresponding to the IP address configuration data, so that the efficiency and the accuracy of positioning the interface configuration data in the three-layer gateway can be further improved.
In an embodiment of the present invention, the IP address configuration data includes a master IP address and a slave IP address, and the corresponding relationship between the IP address configuration data and the interface configuration data is determined as follows:
And respectively determining the corresponding relation between the master IP address and the interface configuration data and the corresponding relation between the slave IP address and the interface configuration data.
In the embodiment of the invention, the IP address configuration data mainly comprises a master IP address and a slave IP address. Specifically, the master IP address and the slave IP address may be determined and distinguished by the following form:
The IP address d1 in the 2 nd line code is the master IP address, and the IP addresses e1 and f1 with the identifiers sub in the 3 rd line code and the 4 th line code are the slave IP addresses.
based on the above, when the corresponding relationship between the IP address configuration data and the interface configuration data is determined, the corresponding relationship between the master IP address and the interface configuration data and the corresponding relationship between the slave IP address and the interface configuration data are determined respectively. It can be seen that the code line 1 containing the interface key and the interface configuration data corresponding to the interface key, the interface configuration data corresponding to the IP address d1 in the code line 2 at the bottom, the interface configuration data corresponding to the slave IP address e1 in the code line 3, and the interface configuration data corresponding to the slave IP address f1 in the code line 4 are the same interface configuration data a 1.
in addition, when the correspondence between the slave IP address and the interface configuration data is determined, the code line including the interface key and the interface configuration data corresponding thereto may be inserted before each code line including the IP address key and the slave IP address corresponding to the IP address key, the interface key in the inserted code line may be deleted, the interface configuration information may be retained, the IP address key in the code line including the IP address key and the slave IP address corresponding to the IP address key may be deleted, the slave IP address may be retained, and the correspondence between the retained interface configuration information and the slave IP address may be determined.
For example, determining the correspondence between the slave IP address and the interface configuration information is illustrated by the following configuration data:
deleting the interface key a1 in the code line 1, reserving the interface configuration information a1, deleting the IP address key in the code line 2, reserving the slave IP address e1, and thus determining the correspondence between the slave IP address e1 and the interface configuration information a 1.
In addition, when the correspondence between the slave IP address and the interface configuration information is determined, the correspondence between the slave IP address e1 and the interface configuration information a1 may be determined by directly identifying or extracting the interface configuration information a1 and the slave IP address e 1.
Fig. 3 shows another implementation flow of the metro network three-layer gateway information positioning method according to the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which is detailed as follows:
in an embodiment of the present invention, the gateway configuration keyword further includes a third configuration keyword, and the configuration data corresponding to the third configuration keyword is third configuration data. As shown in fig. 3, on the basis of the steps of the method shown in fig. 1, the method for locating information of a metro network three-layer gateway further includes:
Step 301, determining a corresponding relationship between the third configuration data and the interface configuration data;
step 302, determining third configuration data corresponding to the IP address of the at least one layer two device according to the corresponding relationship between the third configuration data and the interface configuration data.
the applicant has found in research that, besides the interface configuration data in the three-layer gateway, other configuration data under the interface in the three-layer gateway can be located. Here, other configuration data under the interface in the three-layer gateway may be referred to as third configuration data, and a key corresponding to the third configuration data may be referred to as a third configuration key.
In an embodiment of the present invention, the third configuration key at least includes a stream policy key (e.g., traffic policy) and an encapsulation type key (e.g., vlan type). The configuration data corresponding to the flow policy key is the flow policy configuration data, and the configuration data corresponding to the encapsulation type key is the encapsulation type configuration data. It will be understood by those skilled in the art that the third configuration key may further include other configuration keys besides the flow policy key and the encapsulation type key, and the third configuration data corresponding to the third configuration key may further include other configuration data besides the flow policy configuration data and the encapsulation type configuration data, which is not limited in particular by the embodiment of the present invention.
When the configuration data of the three-layer gateway is screened by using the gateway configuration keyword, the third configuration keyword and third configuration data corresponding to the third configuration keyword can be screened out. The code line including the third configuration key and the third configuration data corresponding to the third configuration key is generally below the corresponding code line including the interface key and the interface configuration data corresponding to the interface key, and is represented by the following expression:
when determining the corresponding relationship between the third configuration data and the interface configuration data a1, the principle of determining the corresponding relationship between the IP address configuration data and the interface configuration data in the above embodiment is similar, and for details, reference is made to the corresponding description of determining the corresponding relationship between the IP address configuration data and the interface configuration data, which is not described herein in detail.
After the corresponding relation between the third configuration data and the interface configuration data is determined, the third configuration data corresponding to the IP address of the second layer device can be obtained according to the previously determined interface configuration data corresponding to the IP address of the second layer device, so that the positioning of other configuration data except the interface in the third layer gateway is realized, and the function of positioning the configuration data in the third layer gateway is further enriched and expanded.
In the embodiment of the invention, the corresponding relation between the third configuration data and the interface configuration data is determined, and then the third configuration data corresponding to the IP address of the at least one two-layer device is determined according to the corresponding relation between the third configuration data and the interface configuration data, so that other configuration data except the interface in the three-layer gateway can be positioned, and the function of positioning the configuration data in the three-layer gateway is enriched and expanded.
The embodiment of the invention also provides a device for positioning the information of the three-layer gateway of the metropolitan area network, which is described in the following embodiment. Because the principle of solving the problems of the devices is similar to the method for positioning the information of the three-layer gateway of the metropolitan area network, the implementation of the devices can refer to the implementation of the method, and repeated details are not repeated.
Fig. 4 shows functional modules of a metro network three-layer gateway information positioning apparatus provided in an embodiment of the present invention, and for convenience of description, only parts related to the embodiment of the present invention are shown, which are detailed as follows:
Referring to fig. 4, each module included in the metro network three-layer gateway information positioning apparatus is configured to perform each step in the embodiment corresponding to fig. 1, specifically please refer to fig. 1 and the related description in the embodiment corresponding to fig. 1, which is not described herein again. In the embodiment of the present invention, the metro network three-layer gateway information positioning apparatus includes an obtaining module 401, a determining module 402, and a positioning module 403.
the obtaining module 401 is configured to obtain global configuration data of a three-layer gateway in a metropolitan area network.
a determining module 402, configured to determine a gateway configuration keyword and configuration data corresponding to the gateway configuration keyword according to global configuration data of a three-layer gateway in a metro network; the gateway configuration keywords comprise interface keywords and IP address keywords, and the configuration data corresponding to the gateway configuration keywords comprise IP address configuration data corresponding to the IP address keywords and interface configuration data corresponding to the interface keywords.
The positioning module 403 is configured to determine interface configuration data corresponding to the IP address of the at least one layer two device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
in the embodiment of the present invention, the obtaining module 401 obtains global configuration data of a three-layer gateway in a metro network, the determining module 402 determines a gateway configuration keyword and configuration data corresponding to the gateway configuration keyword according to the global configuration data of the three-layer gateway, that is, determines an interface keyword and interface configuration information corresponding to the interface keyword, and an IP address keyword and IP address configuration information corresponding to the IP address keyword, and the positioning module 403 determines (positions) interface configuration data corresponding to an IP address of a known two-layer device according to a corresponding relationship between the IP address configuration data and the interface configuration data based on the screened IP address configuration data, so that compared with a conventional method using an artificial manual positioning interface, the efficiency of positioning interface configuration data in the three-layer gateway can be greatly improved, and meanwhile, the problem of positioning wrong interface configuration data due to artificial fatigue can be avoided, the accuracy of positioning the interface configuration data in the three-layer gateway is improved.
Fig. 5 shows a schematic structure of a positioning module 403 in a metro network three-layer gateway information positioning apparatus according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which are detailed as follows:
in an embodiment of the present invention, referring to fig. 5, each unit included in the positioning module 403 is configured to execute each step in the embodiment corresponding to fig. 2, specifically refer to fig. 2 and the related description in the embodiment corresponding to fig. 2, and are not described herein again. In the embodiment of the present invention, the positioning module 403 includes a conversion unit 501, an IP address subnet dividing unit 502, and a positioning unit 503.
A converting unit 501, configured to convert the standard pattern mask of the IP address configuration data into a digital pattern mask.
the IP address subnet dividing unit 502 is configured to determine IP address configuration data corresponding to at least one IP address of the two-layer device by performing IP address subnet division on the IP address configuration data containing the digital pattern mask.
The positioning unit 503 is configured to determine interface configuration data corresponding to the IP address of the at least one layer two device according to the interface configuration data corresponding to the IP address configuration data.
In the embodiment of the present invention, the conversion unit 501 converts the standard mode mask of the IP address configuration data into the digital mode mask, the IP address subnet division unit 502 determines the IP address configuration data corresponding to the IP address of the at least one two-layer device by performing IP address subnet division on the IP address configuration data containing the digital mode mask, and the positioning unit 503 determines the interface configuration data corresponding to the IP address of the at least one two-layer device according to the interface configuration data corresponding to the IP address configuration data, so that the efficiency and accuracy of positioning the interface configuration data in the three-layer gateway can be further improved.
In an embodiment of the present invention, the IP address configuration data includes a master IP address and a slave IP address, and on the basis of the above module structure, the metro network three-layer gateway information positioning apparatus further includes a first corresponding relationship determining module (not shown in the figure).
And the first corresponding relation determining module is used for respectively determining the corresponding relation between the master IP address and the interface configuration data and the corresponding relation between the slave IP address and the interface configuration data.
Fig. 6 shows another module structure of the metro network three-layer gateway information positioning apparatus according to the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
In an embodiment of the present invention, the gateway configuration keyword further includes a third configuration keyword, and the configuration data corresponding to the third configuration keyword is third configuration data.
Referring to fig. 6, each unit included in the metro network three-layer gateway information positioning apparatus is configured to execute each step in the embodiment corresponding to fig. 3, and please refer to fig. 3 and the related description in the embodiment corresponding to fig. 3 specifically, which is not described herein again. In this embodiment of the present invention, on the basis of the module structure shown in fig. 4, the metro network three-layer gateway information positioning apparatus further includes a second corresponding relationship determining module 601 and a third configuration data determining module 602.
a second corresponding relationship determining module 601, configured to determine a corresponding relationship between the third configuration data and the interface configuration data;
A third configuration data determining module 602, configured to determine third configuration data corresponding to the IP address of the at least one layer two device according to a corresponding relationship between the third configuration data and the interface configuration data.
In the embodiment of the present invention, the second corresponding relationship determining module 601 determines the corresponding relationship between the third configuration data and the interface configuration data, and further, the third configuration data determining module 602 determines the third configuration data corresponding to the IP address of the at least one layer two device according to the corresponding relationship between the third configuration data and the interface configuration data, so that other configuration data except the interface in the layer three gateway can be located, and the function of locating the configuration data in the layer three gateway is enriched and expanded.
the working principle and function of the present invention are briefly described by the following specific examples:
assuming that the text file containing the global configuration data of the three-tier gateway is demo.txt, the global configuration data stored in the demo.txt text file (for convenience of description, only partial configuration data is taken as an example, the content of the global configuration data is more than that of the partial configuration data shown below) is as follows:
sysname MAN.NE40E
#
info-center source default channel 0log state off
info-center source default channel 4log level informational
info-center loghost source LoopBack0
info-center logbuffer size 1024
#
interface GigabitEthernet4/0/2.901
ip address 123.123.46.1 255.255.255.192
ip address 123.123.129.1 255.255.255.224 sub
ip address 123.123.77.1 255.255.255.192 sub
vlan-type dot1q 4000
traffic-policy qos_tpDefault inbound
trust upstream SN-QOS-1
#
interface GigabitEthernet4/0/2.987
ip address 11.86.206.1 255.255.254.0
After the configuration data is obtained, the configuration data is screened through an interface keyword interface and an IP address keyword IP address (a third configuration keyword, such as traffic-policy and vlan-type, is similar to the principle of the interface keyword interface and the IP address keyword IP address, and is only explained by the interface keyword interface and the IP address keyword IP address here), and a code line including the interface keyword interface and the IP address keyword IP address is screened out to obtain the following data information:
interface GigabitEthernet4/0/2.901
ip address 123.123.46.1 255.255.255.192
ip address 123.123.129.1 255.255.255.224 sub
ip address 123.123.77.1 255.255.255.192 sub
interface GigabitEthernet4/0/2.987
ip address 11.86.206.1 255.255.254.0
the screened data information comprises an interface key word interface, and interface configuration data GigabitEthernet4/0/2.901 and GigabitEthernet4/0/2.987 corresponding to the interface key word interface.
The screened data information also comprises interface configuration data below GigabitEthernet 4/0/2.901:
IP address key IP address, the master IP address 123.123.46.1255.255.255.192 corresponding to the IP address key IP address, the slave IP address 123.123.129.1255.255.255.224, and the slave IP address 123.123.77.1255.255.255.192.
accordingly, it can be determined that the interface configuration data GigabitEthernet4/0/2.901 has a corresponding relationship with the master IP address 123.123.46.1255.255.255.192, and the slave IP address 123.123.129.1255.255.255.224 and the slave IP address 123.123.77.1255.255.255.192, respectively.
The screened data information also comprises interface configuration data below GigabitEthernet 4/0/2.987:
IP address key IP address, and a primary IP address 11.86.206.1255.255.254.0 corresponding to the IP address key IP address.
accordingly, it can be determined that the interface configuration data GigabitEthernet4/0/2.987 has a correspondence with the primary IP address 11.86.206.1255.255.254.0.
and then, further modifying the data information, and inserting a code line where interface configuration data corresponding to the master IP is located before each code line containing the slave IP address, namely the modified data information is as follows:
interface GigabitEthernet4/0/2.901
ip address 123.123.46.1 255.255.255.192
interface GigabitEthernet4/0/2.901
ip address 123.123.129.1 255.255.255.224 sub
interface GigabitEthernet4/0/2.901
ip address 123.123.77.1 255.255.255.192 sub
interface GigabitEthernet4/0/2.987
ip address 11.86.206.1 255.255.254.0
After inserting the code line where the interface configuration data corresponding to the master IP is located before each code line containing the slave IP address, further modifying the obtained data information, deleting the interface keyword interface and the IP address keyword IP address therein, and reserving interface configuration data gigabit Ethernet4/0/2.901, gigabit Ethernet4/0/2.987, the master IP address 123.123.46.1255.255.255.192 and the slave IP addresses 123.123.129.1255.255.255.224 and 123.123.77.1255.255.255.192, so that the interface configuration data gigabit Ethernet4/0/2.901 and the corresponding master IP address 123.123.46.1255.255.255.192, or the slave IP addresses 123.123.129.1255.255.255.224 and 123.123.77.1255.255.255.192 are in the same line; the interface configuration data GigabitEthernet4/0/2.987 and the primary IP address 11.86.206.1255.255.254.0 are reserved so that the interface configuration data GigabitEthernet4/0/2.987 is in the same row as the primary IP address 11.86.206.1255.255.254.0.
In addition, in this step, the mask in the IP interface configuration data is also converted, and the standard format mask therein is converted into a digital pattern mask. For example, the standard format mask 255.255.255.0 is converted to a digital pattern mask/24, the standard format mask 255.255.255.192 is converted to a digital pattern mask/26, and the standard format mask 255.255.255.224 is converted to a digital pattern mask/27.
The data information obtained after further modification is as follows:
GigabitEthernet4/0/2.901 123.123.46.1/26
GigabitEthernet4/0/2.901 123.123.129.1/27
GigabitEthernet4/0/2.901 123.123.77.1/26
GigabitEthernet4/0/2.987 11.86.206.1/24
And after the modified data information is obtained, carrying out IP address subnet division on the IP address containing the digital mode mask. The IP address subnet division of the IP address is described herein with the IP address 123.123.46.1/26 as an example. The IP address 123.123.46.1/26 is divided into 123.123.46.1, 123.123.46.2 through 123.123.46.63 when IP address subnet division is performed.
The results 123.123.46.1, 123.123.46.2 through 123.123.46.63 after the IP address subnet division are compared with the known IP address of the two-tier device. Assuming that the IP address of the two-layer device contains 123.123.46.2 and is consistent with 123.123.46.2 in the IP address subnet division result, the corresponding IP address configuration data 123.123.46.1/26 is determined through 123.123.46.2 in the IP address subnet division result, and further the interface configuration data GigabitEthernet4/0/2.901 corresponding to the IP address configuration data 123.123.46.1/26 is determined. Thus, the positioning of the interface configuration data in the three-layer gateway is realized.
The method is used for positioning the interface configuration data in the three-layer gateway, the interface positioning in the three-layer gateway of about 400 two-layer equipment can be realized by measuring and calculating for at most one minute, and the efficiency of positioning the interface in the three-layer gateway can be greatly improved.
the embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the three-layer gateway information positioning method of the metropolitan area network when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the metro network three-layer gateway information positioning method.
in summary, in the embodiments of the present invention, the IP address keywords and the corresponding IP address configuration data are determined and the interface keywords and the corresponding interface configuration data are determined according to the global configuration data of the three-layer gateway in the metro network; and then automatically positioning the interface configuration data in the three-layer gateway information corresponding to the IP address of the two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for positioning information of a three-layer gateway of a metropolitan area network is characterized by comprising the following steps:
Acquiring global configuration data of three layers of gateways in a metropolitan area network;
Determining gateway configuration keywords and configuration data corresponding to the gateway configuration keywords according to global configuration data of three layers of gateways in a metropolitan area network; the gateway configuration keywords comprise interface keywords and IP address keywords, and the configuration data corresponding to the gateway configuration keywords comprise IP address configuration data corresponding to the IP address keywords and interface configuration data corresponding to the interface keywords;
And determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
2. the method of claim 1, wherein determining interface configuration data corresponding to the IP address of the at least one layer two device based on the IP address configuration data and interface configuration data corresponding to the IP address configuration data comprises:
Converting the standard mode mask of the IP address configuration data into a digital mode mask;
Determining IP address configuration data corresponding to at least one IP address of the two-layer device by dividing an IP address subnet of the IP address configuration data containing the digital mode mask;
And determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the interface configuration data corresponding to the IP address configuration data.
3. The method of claim 1, wherein the IP address configuration data comprises a master IP address and a slave IP address, and the correspondence between the IP address configuration data and the interface configuration data is determined by:
And respectively determining the corresponding relation between the master IP address and the interface configuration data and the corresponding relation between the slave IP address and the interface configuration data.
4. the method of claim 1, wherein the gateway configuration key further comprises a third configuration key, and the configuration data corresponding to the third configuration key is third configuration data, further comprising:
Determining the corresponding relation between the third configuration data and the interface configuration data;
and determining third configuration data corresponding to the IP address of the at least one second-layer device according to the corresponding relation between the third configuration data and the interface configuration data.
5. A metropolitan area network three-layer gateway information positioning device is characterized by comprising:
The acquisition module is used for acquiring global configuration data of a three-layer gateway in a metropolitan area network;
the determining module is used for determining gateway configuration keywords and configuration data corresponding to the gateway configuration keywords according to the global configuration data of the three layers of gateways in the metropolitan area network; the gateway configuration keywords comprise interface keywords and IP address keywords, and the configuration data corresponding to the gateway configuration keywords comprise IP address configuration data corresponding to the IP address keywords and interface configuration data corresponding to the interface keywords;
And the positioning module is used for determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the IP address configuration data and the interface configuration data corresponding to the IP address configuration data.
6. The apparatus of claim 5, wherein the positioning module comprises:
A conversion unit for converting a standard pattern mask of the IP address configuration data into a digital pattern mask;
The IP address subnet dividing unit is used for determining IP address configuration data corresponding to the IP address of the at least one two-layer device by carrying out IP address subnet division on the IP address configuration data containing the digital mode mask;
And the positioning unit is used for determining interface configuration data corresponding to the IP address of the at least one two-layer device according to the interface configuration data corresponding to the IP address configuration data.
7. The apparatus of claim 5, wherein the IP address configuration data comprises a master IP address and a slave IP address, further comprising:
And the first corresponding relation determining module is used for respectively determining the corresponding relation between the master IP address and the interface configuration data and the corresponding relation between the slave IP address and the interface configuration data.
8. The apparatus of claim 5, wherein the gateway configuration key further comprises a third configuration key, and the configuration data corresponding to the third configuration key is third configuration data, further comprising:
The second corresponding relation determining module is used for determining the corresponding relation between the third configuration data and the interface configuration data;
and the third configuration data determining module is used for determining third configuration data corresponding to the IP address of the at least one second-layer device according to the corresponding relation between the third configuration data and the interface configuration data.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when executing the computer program.
10. a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN201910763506.0A 2019-08-19 2019-08-19 Method and device for positioning information of three-layer gateway of metropolitan area network Active CN110572278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910763506.0A CN110572278B (en) 2019-08-19 2019-08-19 Method and device for positioning information of three-layer gateway of metropolitan area network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910763506.0A CN110572278B (en) 2019-08-19 2019-08-19 Method and device for positioning information of three-layer gateway of metropolitan area network

Publications (2)

Publication Number Publication Date
CN110572278A true CN110572278A (en) 2019-12-13
CN110572278B CN110572278B (en) 2023-02-21

Family

ID=68773919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910763506.0A Active CN110572278B (en) 2019-08-19 2019-08-19 Method and device for positioning information of three-layer gateway of metropolitan area network

Country Status (1)

Country Link
CN (1) CN110572278B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901159A (en) * 2020-07-15 2020-11-06 中盈优创资讯科技有限公司 Method and device for replacing equipment configuration ports in batches
CN111901452A (en) * 2020-07-20 2020-11-06 中盈优创资讯科技有限公司 Method and device for automatically adapting and adding IPV6 information for equipment interface

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978808A (en) * 2016-05-06 2016-09-28 上海上讯信息技术股份有限公司 Method and device for calculating bi-layer network link
CN108282362A (en) * 2017-12-29 2018-07-13 武汉璞华大数据技术有限公司 A kind of network topology generation method, device and equipment
CN109412955A (en) * 2018-12-06 2019-03-01 中盈优创资讯科技有限公司 IPRAN LA Management Room linking relationship determines method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978808A (en) * 2016-05-06 2016-09-28 上海上讯信息技术股份有限公司 Method and device for calculating bi-layer network link
CN108282362A (en) * 2017-12-29 2018-07-13 武汉璞华大数据技术有限公司 A kind of network topology generation method, device and equipment
CN109412955A (en) * 2018-12-06 2019-03-01 中盈优创资讯科技有限公司 IPRAN LA Management Room linking relationship determines method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901159A (en) * 2020-07-15 2020-11-06 中盈优创资讯科技有限公司 Method and device for replacing equipment configuration ports in batches
CN111901159B (en) * 2020-07-15 2023-04-07 中盈优创资讯科技有限公司 Method and device for replacing equipment configuration ports in batches
CN111901452A (en) * 2020-07-20 2020-11-06 中盈优创资讯科技有限公司 Method and device for automatically adapting and adding IPV6 information for equipment interface
CN111901452B (en) * 2020-07-20 2023-04-21 中盈优创资讯科技有限公司 Method and device for automatically adapting and adding IPV6 information through equipment interface

Also Published As

Publication number Publication date
CN110572278B (en) 2023-02-21

Similar Documents

Publication Publication Date Title
CN109033471B (en) Information asset identification method and device
US10491453B2 (en) Correlating computing network events
CN106789912B (en) Router data plane abnormal behavior detection method based on classification regression decision tree
CN110572278B (en) Method and device for positioning information of three-layer gateway of metropolitan area network
CN108282362B (en) Network topology generation method, device and equipment
CN102231107B (en) Method for automatically generating communication data format of electric control unit based on AUTOSAR (Automotive Open System Architecture)
CN108733698A (en) A kind of processing method and background service system of log information
CN114900430A (en) Container network optimization method and device, computer equipment and storage medium
CN114422385A (en) Method and system for generating network system test case
CN113157904A (en) Sensitive word filtering method and system based on DFA algorithm
CN104683148A (en) Uniform port model and method for accessing logical port thereof
CN101917282A (en) Method, device and system for processing alarm shielding rules
CN115361296B (en) Network topology calculation method based on manual intervention in operation and maintenance system
CN109410077B (en) Method and device for defining rule flow, computer storage medium and electronic equipment
CN110166295B (en) Method for judging whether network topology supports Byzantine fault tolerance or not
CN114448990A (en) Resource scheduling method, device and equipment based on fusion CDN
CN110391934A (en) Network equipment mask method and device
CN108415930A (en) Data analysis method and device
WO2016070551A1 (en) Route computing method and device
US10798227B2 (en) Centralized chromatic pluralizing of internet of things (IOT) communication
CN114844784B (en) Topology modeling method of reconfigurable scanning network
CN115914075B (en) Network topology node generation method, device, medium and system based on routing table
CN114050966B (en) Method, device and equipment for generating service template and storage medium
CN112532521B (en) Outflow node information identification method for NetFlow flow
CN115250278B (en) Method and device for synchronizing multi-cloud management platform and cloud service provider resources

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
CP02 Change in the address of a patent holder

Address after: Room 702-2, No. 4811, Cao'an Highway, Jiading District, Shanghai

Patentee after: CHINA UNITECHS

Address before: 100872 5th floor, Renmin culture building, 59 Zhongguancun Street, Haidian District, Beijing

Patentee before: CHINA UNITECHS

CP02 Change in the address of a patent holder