Method and device for verifying address
Through PPPOE+ information, OLT equipment information and district and county address planning tables, the IPV6 address obtained by the user terminal is consistent with the district and county where the user is located, solving the problem of inefficient manual verification in the existing technology, and achieving efficient IPV6 district and county address verification and BRAS equipment data auditing.
Patent Information
- Application Number
- CN202110872641.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-07-30
AI Technical Summary
The lack of automation tools in the prior art to check the IPV6 district and county address of user terminals, resulting in low efficiency of manual verification, inability to complete the entire network user verification, and the inability to verify offline user terminal information.
By using the Ethernet point-to-point protocol PPPOE+ information, optical line terminal OLT equipment information and district and county address planning table, the first address segment that the OLT should be configured is determined, and compared with the second address segment determined by the broadband access server BRAS configuration script, it automatically checks whether the IPV6 address obtained by the user terminal is consistent with the district and county where the user is located.
It has realized automated IPV6 district and county address verification, improved verification efficiency, filled the gap in IPV6 district and county address verification on current network users, and has the ability to audit basic data of BRAS equipment.
Smart Images

Figure CN115701065B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of IP and data network technology, and in particular to a method and device for verifying an address. Background Art
[0002] There is currently no automatic verification tool for verifying the IPV6 district and county addresses of user terminals, and the verification work requires manual comparison.
[0003] However, manual verification requires simultaneous querying of the integrated resource management system, the district and county address planning table, logging into the BRAS to query user terminal information through instructions, and then manually querying and comparing. It takes at least 10 minutes to complete a user verification. If the number of household wired broadband users in a region is 2 million, it will take at least 330,000 hours to complete the user verification in the region, which basically makes it impossible to complete the user verification of the entire network.
[0004] In addition, users are not online 24 hours a day, and offline user terminal information cannot be queried on the BRAS, making manual comparison impossible. Summary of the Invention
[0005] The present invention provides a method and device for verifying an address, which are used to solve the technical problem of how to automatically verify whether the IPv6 address obtained by a user is consistent with the district or county where the user is located.
[0006] In a first aspect, the present invention provides a method for verifying an address, comprising:
[0007] Determine the first address segment to be configured for the OLT based on Ethernet point-to-point protocol PPPOE+ information, optical line terminal (OLT) device information, and the district and county address planning table;
[0008] Determine the second address segment actually configured by the OLT according to the broadband access server BRAS configuration script;
[0009] Compare the first address segment with the second address segment to check whether the second address segment is configured correctly.
[0010] In one embodiment, determining the first address segment to be configured for the OLT based on the PPPOE+ information, the OLT device information, and the district and county address planning table includes:
[0011] Determine the OLT management IP address based on the PPPOE+ information;
[0012] Determine the district or county where the OLT is located based on the OLT management IP and the OLT device information;
[0013] According to the district or county where the OLT is located and the district or county address planning table, a first address segment that the OLT should be configured with is determined.
[0014] In one embodiment, determining the OLT management IP address based on the PPPOE+ information includes:
[0015] According to the PPPOE+ information, first information is acquired, where the format of the first information is: BRAS management IP / downlink OLT port / OLT management IP.
[0016] In one embodiment, determining the district or county where the OLT is located based on the OLT management IP and the OLT device information includes:
[0017] According to the OLT device information, second information is obtained, where the format of the second information is: OLT management IP / district and county where the OLT is located;
[0018] Associating and merging the first information with the second information according to the OLT management IP in the first information and the OLT management IP in the second information to determine third information;
[0019] The format of the third information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located.
[0020] In one embodiment, determining the first address segment to be configured for the OLT based on the district or county where the OLT is located and the district or county address planning table includes:
[0021] According to the district and county address planning table, fourth information is obtained, where the format of the fourth information is: district and county / IPV6 address;
[0022] According to the district and county where the OLT in the third information is located and the district and county in the fourth information, the third information and the fourth information are associated and merged to determine fifth information;
[0023] The format of the fifth information is: BRAS management IP / downlink OLT port / OLT management IP / county where the OLT is located / IPV6 address;
[0024] The IPV6 address in the fifth information is the first address segment.
[0025] In one embodiment, determining the second address segment actually configured by the OLT according to the BRAS configuration script includes:
[0026] According to the BRAS configuration script, sixth information is obtained, where the format of the sixth information is: BRAS management IP / downlink OLT port / OLT management IP / IPv6 address segment;
[0027] The IPV6 address segment in the sixth information is the second address segment.
[0028] In one embodiment, comparing the first address segment with the second address segment to verify whether the second address segment is correct includes:
[0029] If the second address segment is included in the range of the first address segment, the second address segment is configured correctly;
[0030] If the second address segment is not included in the range of the first address segment, the second address segment is incorrectly configured.
[0031] In a second aspect, the present invention provides a device for verifying an address, comprising:
[0032] A first determining module is used to determine a first address segment that the OLT should be configured with based on PPPOE+ information, OLT device information, and a district and county address planning table;
[0033] A second determining module is used to determine the second address segment actually configured by the OLT according to the BRAS configuration script;
[0034] The verification module is used to compare the first address segment with the second address segment to verify whether the second address segment is configured correctly.
[0035] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for verifying addresses described in the first aspect when executing the computer program.
[0036] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for verifying an address in the first aspect.
[0037] The method, device, electronic device and storage medium for address verification provided by the present invention automatically verify whether the IPV6 address obtained by the user terminal is consistent with the user's district and county by utilizing the existing network PPPOE+ information, OLT equipment information, district and county address planning table and BRAS configuration script, thus filling the gap in the field of IP and data network technology in performing IPV6 district and county address verification on existing network users, and having the ability to audit the basic data of BRAS equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 1 is a flow chart of the method for verifying an address provided by the present invention;
[0040] Figure 2 This is a schematic diagram of a PPPOE+ protocol message provided by an embodiment of the present invention;
[0041] Figure 3 1. PPPOE+ information format diagram provided by one embodiment of the present invention;
[0042] Figure 4 It is a structural diagram of the device for verifying an address provided by the present invention;
[0043] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0044] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0045] The terminal involved in the embodiments of the present application may refer to a device that provides voice and / or data connectivity to a user, a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem. In different systems, the name of the terminal device may also be different. For example, in a 5G system, the terminal device may be called a user equipment (UE).
[0046] Figure 1 This is a flow chart of the method for verifying an address provided by the present invention. Figure 1 The method for verifying an address provided by the present invention may include:
[0047] S110, determining a first address segment to be configured for the OLT based on Ethernet Point-to-Point Protocol PPPOE+ information, optical line terminal (OLT) device information, and a district and county address planning table;
[0048] S120: Determine the second address segment actually configured by the OLT according to the broadband access server BRAS configuration script;
[0049] S130: Compare the first address segment with the second address segment to check whether the second address segment is configured correctly.
[0050] It should be noted that the execution subject of the method for verifying an address provided by the present invention can be an electronic device, a component of an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the present invention does not make specific limitations.
[0051] Specifically, in step S110, the first address segment that the OLT should be configured with is determined based on the PPPOE+ information, the OLT device information, and the district and county address planning table.
[0052] PPPOE+, also known as PPPOE Intermediate Agent, expands PPPOE protocol packets. Access-layer devices intercept PPPOE discovery phase packets, insert user physical location information in upstream traffic, and remove this information in downstream traffic before forwarding the packets. When PPPOE+ is enabled on the BRAS and OLT in an existing network, the OLT inserts user physical location information into the PPPOE packets and then forwards them to the BRAS. Figure 2 This is a schematic diagram of the PPPOE+ protocol message, refer to Figure 2 The user location information inserted by the OLT is in the standard option 82 format, where:
[0053] CID: Circuit ID, generally used to identify the attribute information (global information) of the device.
[0054] For ATM type ports, the format is "device name atm frame number / slot number / subslot / port number:vpi.vci";
[0055] For VDSL / LAN access, the format is "device name eth frame number / slot number / subslot / port number: user's VLAN ID".
[0056] RID: Remote ID, generally used to identify the user's access information (local information), usually in a custom format.
[0057] The BRAS interface is configured to trust Option 82 in the standard telecommunications format. The nas-port-id attribute reported by the BRAS to the RADIUS server is in the following format:
[0058] Trunk slot number / subslot number / port number: outer VLAN number, inner VLAN number + PPPoE+ information sent by the Layer 2 device.
[0059] By enabling the PPPoE+ protocol on PON (passive optical network) devices and BRAS devices, when the user dials up, the SN code (serial number) of the ONU (optical network unit) device to which the user account belongs, the port number of the ONU connected to the OLT, the OLT management IP, the user's inner and outer VLAN (virtual local area network) information, the port number of the OLT connected to the BRAS, the BRAS management IP and other information are automatically reported to Radius. Radius summarizes this information and transmits it to the integrated resource management system. The integrated resource management system supports batch export of PPPOE+ data for all users, as well as information on the district and county where the OLT is located.
[0060] How to export PPPOE+ information: Enter the Comprehensive Resource Management System - Resource Audit - CID Resource Comparison Table, select a city, click Query, query by branch, or click "Batch Query" to query all PPPOE+ information, click "Export Data", and save the PPPOE+ information in the specified directory.
[0061] How to export OLT device information: Enter the integrated resource management system - customer resource management - OLT management, click "batch query", query the full amount of OLT information, click "export data", and save the OLT information in the specified directory.
[0062] The district and county address planning table is published in a unified plan.
[0063] Understandably, the PPPOE+ information can be used to obtain information such as the BRAS management IP address, the downstream OLT port, and the OLT management IP address. The OLT device information can be used to obtain information such as the OLT management IP address and the county to which it belongs. The county and IPv6 address information can be obtained from the county and district address planning table. In other words, the IPv6 address can be determined based on the PPPOE+ information, the OLT device information, and the county and district address planning table. The IPv6 address is the first address segment.
[0064] Specifically, in step S120, the second address segment actually configured by the OLT is determined according to the broadband access server BRAS configuration script.
[0065] BRAS configuration scripts can be exported in batches using a variety of methods, including configuration management systems, professional network management systems, unified data collection systems, traffic visualization systems, data network management systems, and inspection tools. Select a system based on your needs. If batch export isn't possible, manual data collection is also possible. By querying the corresponding information based on the BRAS configuration script, you can obtain the actual second address segment configured on the OLT.
[0066] Specifically, in step S130, the first address segment is compared with the second address segment to check whether the second address segment is configured correctly. The first address segment that the OLT should configure is compared with the second address segment actually configured by the OLT to check whether the second address segment actually configured by the OLT is correct.
[0067] The address verification method provided by the present invention automatically verifies whether the IPV6 address obtained by the user terminal is consistent with the user's district and county by utilizing the existing network PPPOE+ information, OLT equipment information, district and county address planning table and BRAS configuration script, thereby filling the gap in the field of IP and data network technology in performing IPV6 district and county address verification on existing network users, and having the ability to audit the basic data of BRAS equipment.
[0068] In one embodiment, determining the first address segment to be configured for the OLT based on PPPOE+ information, OLT device information, and a district / county address planning table may include:
[0069] Determine the OLT management IP address based on PPPOE+ information;
[0070] Determine the district or county where the OLT is located based on the OLT management IP and OLT device information;
[0071] Determine the first address segment that the OLT should be configured with based on the district or county where the OLT is located and the district or county address planning table.
[0072] Specifically, the device supports three types of PPPOE+: standard type (stardard), manufacturer type and self-defined (self-defined). The default is standard type. Figure 3 This is a diagram of the PPPOE+ information format, refer to Figure 3 The OLT management IP address can be determined from the PPPOE+ information.
[0073] Since the OLT management IP is unique, you can query the OLT device information based on the OLT management IP to determine the district or county where the OLT is located;
[0074] Since the district and county names are unique, the first address segment that the OLT should be configured with is determined by querying the district and county address planning table based on the district and county where the OLT is located.
[0075] The address verification method provided by the present invention ensures the accuracy of obtaining the first address segment that the OLT should be configured with by utilizing the existing network PPPOE+ information, OLT equipment information and the district and county address planning table, thereby improving the accuracy of automatically verifying whether the IPV6 address obtained by the user terminal is consistent with the district and county where the user is located.
[0076] In one embodiment, determining the OLT management IP address based on PPPOE+ information may include:
[0077] According to the PPPOE+ information, the first information is obtained, where the format of the first information is: BRAS management IP / downlink OLT port / OLT management IP.
[0078] Specifically, if Figure 3 As shown, the PPPOE+ information contains multiple information, and some information can be extracted from it as the first information. The content of the first information includes: BRAS management IP, downstream OLT port and OLT management IP. The format of the first information is set to: BRAS management IP / downstream OLT port / OLT management IP.
[0079] For example, export the PPPOE+ original call record, save it as Notepad, select the first record as an example, and extract the first information in the format of "BRAS management IP / downlink OLT port / OLT management IP". The first information is: 120.193.128.165 / trunk6 / 1 / 3 / 10.1.249.210.
[0080] The method for verifying addresses provided by the present invention can determine the OLT management IP by extracting information in the format of BRAS management IP / downlink OLT port / OLT management IP from the existing network PPPOE+ information. At the same time, this information format also facilitates address verification.
[0081] In one embodiment, determining the district or county where the OLT is located based on the OLT management IP address and OLT device information may include:
[0082] According to the OLT device information, the second information is obtained. The format of the second information is: OLT management IP / district and county where the OLT is located;
[0083] According to the OLT management IP in the first information and the OLT management IP in the second information, the first information and the second information are associated and merged to determine the third information;
[0084] The format of the third information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located.
[0085] Specifically, the OLT device information includes the OLT management IP address, the region to which it belongs, and the OLT name. Some information can be extracted from this information as the second information. The second information includes the OLT management IP address and the region to which it belongs. The format of the second information is set as: OLT management IP address / district and county where the OLT is located. Since the OLT management IP address is unique, the first and second information can be associated and merged using the OLT management IP address to obtain the third information. The third information includes the BRAS management IP address, the downstream OLT port, the OLT management IP address, and the district and county where the OLT is located. The format of the third information is: BRAS management IP address / downlink OLT port / OLT management IP address / district and county where the OLT is located.
[0086] For example, export the OLT device information, save it in Excel, find out that the OLT with the management IP address 10.1.249.210 belongs to District D of a certain city, and obtain the second information: 10.1.249.210 / District D.
[0087] The first information and the second information are associated and merged through the OLT management IP to obtain third information. The third information is: 120.193.128.165 / trunk6 / 1 / 3 / 10.1.249.210 / zone D.
[0088] The method for verifying addresses provided by the present invention extracts information in the format of: OLT management IP / district and county where the OLT is located from the OLT device information, associates and merges the two information through the OLT management IP, and obtains information in the format of: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located. This method can determine the district and county where the OLT is located, and at the same time, this information format also facilitates address verification.
[0089] In one embodiment, determining the first address segment to be configured for the OLT based on the district or county where the OLT is located and the district or county address planning table may include:
[0090] According to the district and county address planning table, obtain the fourth information, the format of the fourth information is: district and county / IPV6 address;
[0091] According to the district and county where the OLT is located in the third information and the district and county in the fourth information, the third information and the fourth information are correlated and merged to determine the fifth information;
[0092] The format of the fifth information is: BRAS management IP / downlink OLT port / OLT management IP / OLT district / IPV6 address;
[0093] The IPV6 address in the fifth information is the first address segment.
[0094] Specifically, the district and county address planning table includes information such as city information, district and county information, and the hexadecimal code range of the district and county addresses. The 33rd to 40th bits of the user address in the IPV6 address planning of a certain operator are the district and county identifiers, from which some information can be extracted as the fourth information. The content of the fourth information includes: district and county and IPV6 address, and the format of the fourth information is set to: district and county / IPV6 address. Since the district and county names are unique, the third information and the fourth information can be associated and merged through the district and county to obtain the fifth information. The content of the fifth information includes: BRAS management IP, downstream OLT port, OLT management IP, the district and county where the OLT is located, and IPV6 address. The format of the fifth information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located / IPV6 address.
[0095] For example, Table 1 is a certain city, district and county address planning table. Referring to Table 1, in the district and county address planning table, the hexadecimal code range of the IPV6 district and county address of District D is 06~07. The 33rd-40th bits of the user address of the IPV6 address planning of a certain operator are the district and county identifiers, and the fourth information is obtained. The fourth information is: District D / IPV6 address 33rd-40th bits range 06~07.
[0096] Table 1 Address planning table of a certain city, district and county
[0097]
[0098]
[0099] Based on the district and county where the OLT is located in the third information and the district and county in the fourth information, the third and fourth information are associated and merged to obtain the fifth information. The fifth information is: 120.193.128.165 / trunk6 / 1 / 3 / 10.1.249.210 / area D / IPV6 address bits 33-40 range 06-07. The IPV6 address bits 33-40 range 06-07 is the first address segment.
[0100] The method for verifying addresses provided by the present invention extracts information in the format of: district / county / IPV6 address from the district / county address planning table, associates and merges the two information through the district / county, and obtains information in the format of: BRAS management IP / downlink OLT port / OLT management IP / district / county where the OLT is located / IPV6 address, thereby ensuring the accuracy of obtaining the first address segment that the OLT should be configured, thereby improving the accuracy of automatically verifying whether the IPV6 address obtained by the user terminal is consistent with the district / county where the user is located.
[0101] In one embodiment, determining the second address segment actually configured by the OLT according to the BRAS configuration script may include:
[0102] According to the BRAS configuration script, the sixth information is obtained. The format of the sixth information is: BRAS management IP / downlink OLT port / OLT management IP / IPv6 address segment;
[0103] The IPV6 address segment in the sixth information is the second address segment.
[0104] Specifically, import the BRAS configuration script, search for the OLT management IP configured on the BRAS downlink port, the bound PPPoE domain, and the IP pool associated with the PPPoE domain, and then obtain the IPV6 address actually configured on the port of the BRAS downlink OLT, and obtain the sixth information: BRAS management IP / downlink OLT port / OLT management IP / IPV6 address segment. The IPV6 address segment in the sixth information is the IPV6 address segment configured on the existing BRAS, that is, the second address segment.
[0105] For example, export the BRAS configuration script and find the BRAS device with a management IP address of 120.193.128.165. Port 6 / 1 / 3 is associated with the eth-trunk34 virtual interface. The domain bound to the eth-trunk34.1 sub-interface is "pppoe_xinchengqu." The IP pool PD address prefix associated with the domain is 2409:8A10:70:: / 44, where bits 33-40 are 00. The sixth information is: 120.193.128.165 / trunk6 / 1 / 3 / 10.1.249.210 / IPV6 address, where bits 33-40 are 00. Bits 33-40 of the IPv6 address are 00, indicating the second address segment.
[0106] The address verification method provided by the present invention ensures the accuracy of obtaining the second address segment actually configured by the OLT by utilizing the BRAS configuration script, thereby improving the accuracy of automatically verifying whether the IPV6 address obtained by the user terminal is consistent with the district or county where the user is located.
[0107] In one embodiment, comparing the first address segment with the second address segment to verify whether the second address segment is correct may include:
[0108] If the second address segment is included in the range of the first address segment, the second address segment is configured correctly;
[0109] If the second address segment is not included in the range of the first address segment, the second address segment is incorrectly configured.
[0110] For example, comparing the first address segment with the second address segment, the first address segment is: the 33rd-40th bits of the IPV6 address are in the range of 06 to 07, and the second address segment is: the 33rd-40th bits of the IPV6 address are 00, which does not fall within the range of 06 to 07, indicating that the IPV6 address district obtained by the user is incorrect.
[0111] The following describes an apparatus for verifying an address provided by the present invention. The apparatus for verifying an address described below and the method for verifying an address described above can be referenced to each other.
[0112] Figure 4 A schematic diagram of the structure of the address verification device provided by the present invention is shown as follows: Figure 4 As shown, the device may include
[0113] A first determining module 410 is configured to determine a first address segment to be configured for the OLT based on PPPOE+ information, OLT device information, and a district and county address planning table;
[0114] A second determining module 420 is configured to determine the second address segment actually configured by the OLT according to the BRAS configuration script;
[0115] The verification module 430 is configured to compare the first address segment with the second address segment to verify whether the second address segment is configured correctly.
[0116] The address verification device provided by the present invention automatically verifies whether the IPV6 address obtained by the user terminal is consistent with the user's district and county by utilizing the existing network PPPOE+ information, OLT equipment information, district and county address planning table and BRAS configuration script, filling the gap in the field of IP and data network technology in performing IPV6 district and county address verification on existing network users, and having the ability to audit the basic data of BRAS equipment.
[0117] In one embodiment, the first determining module 410 includes:
[0118] A first determining unit (not shown in the figure) is used to determine the OLT management IP according to the PPPOE+ information;
[0119] A second determining unit (not shown in the figure) is used to determine the district or county where the OLT is located based on the OLT management IP and OLT device information;
[0120] The third determining unit (not shown in the figure) is used to determine the first address segment that the OLT should be configured with according to the district or county where the OLT is located and the district or county address planning table.
[0121] In one embodiment, the first determining unit is specifically configured to:
[0122] According to the PPPOE+ information, the first information is obtained, where the format of the first information is: BRAS management IP / downlink OLT port / OLT management IP.
[0123] In one embodiment, the second determining unit is specifically configured to:
[0124] According to the OLT device information, the second information is obtained. The format of the second information is: OLT management IP / district and county where the OLT is located;
[0125] According to the OLT management IP in the first information and the OLT management IP in the second information, the first information and the second information are associated and merged to determine the third information;
[0126] The format of the third information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located.
[0127] In one embodiment, the third determining unit is specifically configured to:
[0128] According to the district and county address planning table, obtain the fourth information, the format of the fourth information is: district and county / IPV6 address;
[0129] According to the district and county where the OLT is located in the third information and the district and county in the fourth information, the third information and the fourth information are correlated and merged to determine the fifth information;
[0130] The format of the fifth information is: BRAS management IP / downlink OLT port / OLT management IP / OLT district / IPV6 address;
[0131] The IPV6 address in the fifth information is the first address segment.
[0132] In one embodiment, the second determining module 420 is specifically configured to:
[0133] According to the BRAS configuration script, the sixth information is obtained. The format of the sixth information is: BRAS management IP / downlink OLT port / OLT management IP / IPv6 address segment;
[0134] The IPV6 address segment in the sixth information is the second address segment.
[0135] In one embodiment, the verification module 430 is specifically configured to:
[0136] If the second address segment is included in the range of the first address segment, the second address segment is configured correctly;
[0137] If the second address segment is not included in the range of the first address segment, the second address segment is incorrectly configured.
[0138] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for verifying an address are implemented.
[0139] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the method for verifying an address, for example, including:
[0140] Determine the first address segment to be configured for the OLT based on Ethernet point-to-point protocol PPPOE+ information, optical line terminal (OLT) device information, and the district and county address planning table;
[0141] Determine the second address segment actually configured by the OLT according to the broadband access server BRAS configuration script;
[0142] Compare the first address segment with the second address segment to check whether the second address segment is configured correctly.
[0143] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0144] On the other hand, the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can perform the steps of the address verification method provided by the above methods, for example, including:
[0145] Determine the first address segment to be configured for the OLT based on Ethernet point-to-point protocol PPPOE+ information, optical line terminal (OLT) device information, and the district and county address planning table;
[0146] Determine the second address segment actually configured by the OLT according to the broadband access server BRAS configuration script;
[0147] Compare the first address segment with the second address segment to check whether the second address segment is configured correctly.
[0148] On the other hand, an embodiment of the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being configured to cause a processor to execute the steps of the address verification method provided in the above embodiments, for example, including:
[0149] Determine the first address segment to be configured for the OLT based on Ethernet point-to-point protocol PPPOE+ information, optical line terminal (OLT) device information, and the district and county address planning table;
[0150] Determine the second address segment actually configured by the OLT according to the broadband access server BRAS configuration script;
[0151] Compare the first address segment with the second address segment to check whether the second address segment is configured correctly.
[0152] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs)), etc.
[0153] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0154] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for verifying an address, characterized in that: include: Determine the first address segment to be configured for the OLT based on Ethernet point-to-point protocol PPPOE+ information, optical line terminal (OLT) device information, and the district and county address planning table; Determine the second address segment actually configured by the OLT according to the broadband access server BRAS configuration script; Comparing the first address segment with the second address segment to verify whether the second address segment is configured correctly; The determining, based on the PPPOE+ information, the OLT device information, and the district and county address planning table, of the first address segment to be configured by the OLT includes: Determine the OLT management IP address based on the PPPOE+ information; Determine the district or county where the OLT is located based on the OLT management IP and the OLT device information; Determining a first address segment to be configured for the OLT according to the district or county where the OLT is located and the district or county address planning table; The determining the OLT management IP address according to the PPPOE+ information includes: Acquire first information according to the PPPOE+ information, where the format of the first information is: BRAS management IP / downlink OLT port / OLT management IP; The determining, based on the OLT management IP address and the OLT device information, of the district or county where the OLT is located includes: According to the OLT device information, second information is obtained, where the format of the second information is: OLT management IP / district and county where the OLT is located; Associating and merging the first information with the second information according to the OLT management IP in the first information and the OLT management IP in the second information to determine third information; The format of the third information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located; The determining, based on the district or county where the OLT is located and the district or county address planning table, a first address segment to be configured for the OLT includes: According to the district and county address planning table, fourth information is obtained, where the format of the fourth information is: district and county / IPV6 address; According to the district and county where the OLT in the third information is located and the district and county in the fourth information, the third information and the fourth information are associated and merged to determine fifth information; The format of the fifth information is: BRAS management IP / downlink OLT port / OLT management IP / county where the OLT is located / IPV6 address; The IPV6 address in the fifth information is the first address segment; Comparing the first address segment with the second address segment to verify whether the second address segment is correct includes: If the second address segment is included in the range of the first address segment, the second address segment is configured correctly; If the second address segment is not included in the range of the first address segment, the second address segment is incorrectly configured.
2. The method for verifying an address according to claim 1, wherein: The determining, according to the BRAS configuration script, the second address segment actually configured by the OLT includes: According to the BRAS configuration script, sixth information is obtained, where the format of the sixth information is: BRAS management IP / downlink OLT port / OLT management IP / IPv6 address segment; The IPV6 address segment in the sixth information is the second address segment.
3. A device for verifying an address, characterized in that: include: A first determining module is used to determine a first address segment that the OLT should be configured with based on PPPOE+ information, OLT device information, and a district and county address planning table; A second determining module is used to determine the second address segment actually configured by the OLT according to the BRAS configuration script; a verification module, configured to compare the first address segment with the second address segment to verify whether the second address segment is configured correctly; The first determination module includes: a first determination unit for determining an OLT management IP address based on the PPPOE+ information; a second determination unit for determining the district or county where the OLT is located based on the OLT management IP address and the OLT device information; and a third determination unit for determining a first address segment to be configured for the OLT based on the district or county where the OLT is located and the district or county address planning table. The first determining unit is specifically configured to: obtain first information according to the PPPOE+ information, wherein the format of the first information is: BRAS management IP / downlink OLT port / OLT management IP; The second determining unit is specifically configured to: obtain second information based on the OLT device information, where the format of the second information is: OLT management IP / district and county where the OLT is located; and associate and merge the first information with the second information based on the OLT management IP in the first information and the OLT management IP in the second information to determine third information; wherein the format of the third information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located; The third determining unit is specifically configured to: obtain fourth information according to the district and county address planning table, wherein the format of the fourth information is: district and county / IPV6 address; and associate and merge the third information with the fourth information according to the district and county where the OLT is located in the third information and the district and county in the fourth information to determine fifth information; wherein the format of the fifth information is: BRAS management IP / downlink OLT port / OLT management IP / district and county where the OLT is located / IPV6 address; the IPV6 address in the fifth information is the first address segment; The verification module is specifically configured to: if the second address segment is included in the first address segment range, then the second address segment configuration is correct; if the second address segment is not included in the first address segment range, then the second address segment configuration is incorrect.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for verifying an address according to any one of claims 1 to 2 are implemented.
5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for verifying an address according to any one of claims 1 to 2 are implemented.