Determination method of router geographic position
Abstract
The invention provides a method for determining the geographic location of a router, which can accurately obtain the geographic location of the router, that is, the information of the province and city where the router is located. It includes the following steps: perform alias resolution detection on the target router to obtain the IP addresses of multiple interfaces of the target router; use TCP/UPD protocol from multiple detection sources to obtain IP data packets to access the multiple interfaces IP The IP address, path sequence and response time value of all nodes in the path of the address are used as the first set of characteristic values; the obtained IP address of multiple interfaces of the router reaches the IP address of each node in the path of each interface of the router. The IP geo-location database of the company obtains its reference geographic location as the second set of feature values; by processing and filtering the above-mentioned feature values using specific rules, the geographic location data that conflicts with the specific rules are removed; and the filtered feature values are weighted and calculated Get real geographic data.

Term
8.8 yearsleft in the term
Expires 14 July 2035.
- Priority and filed
- Granted
- Today
- Expires
5 claims: 1 independent, 4 dependent
- 11· 一种路由器地理位置的判断方法,包括以下步骤: 1) 对目标路由器进行别名解析探测,获得目标路由器的多个接口的IP地址; 2) 从多个探测源利用TCP/UDP协议,使用路由跟踪程序获得IP数据包访问所述多个接 口的IP地址所经过的路径中所有的节点的IP地址、路径顺序及响应时间值作为第一组特征 值; 3) 对步骤1)获得的路由器多个接口的IP地址和步骤2)获得的到达路由器各接口的路 径中各节点的IP地址使用公开的IP地理位置库获得其参考地理位置作为第二组特征值; 4) 通过对第一组特征值及第二组特征值使用一特定规则进行处理和过滤,去除与所述 特定规则冲突的地理位置数据; 5) 通过对步骤4)过滤后的第一组特征值及第二组特征值进行加权计算得到路由器的 真实地理数据;加权计算公式如下: Ρ=ΣΡΐ+ΣΡΐ j*Tij/ETij 其中,Pi为路由器各节点参考地理位置;Pi j为到达路由器各接口经过的各条路径中 前一个节点参考地理位置;Ti j为路径中前一个节点到达接口的响应时间。
- 2如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤1)中通过IGMP协 议对目标路由器进行别名解析探测。
- 3如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤2)中使用不少于 20个探测源分别使用TCP/UDP协议使用路由跟踪程序获得访问目标路由器多个IP地址的所 采取的所有路径。
- 4如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤3)所述公开的IP 地理位置库为互联网免费公开的第三方地理位置库。
- 5如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤4)中使用的特定 规则包括: 4-1)同一个节点地理位置是唯一的; 4-2)同城市两个节点之间的响应时间应小于m ; 4-3)同省两个城市之间响应时间应处于η和。之间; 4-4)跨省回折数据予以纠正或者剔除; 其中,m是同城市两个节点之间响应时间的最大值,η是同省同两个城市的节点之间的 最小响应时间,ο是同省两个城市的节点之间的最大响应时间。
Independent claims5
118 paragraphs, as filed
A method for determining the geographic location of a routerTechnical field
[0001] The present invention relates to the field of information technology, in particular to routers, and in particular to a method for determining the geographic location of routers.
Background technique
[0002] A router is a device that connects to various local area networks and wide area networks in the Internet. It automatically selects and sets routes according to the channel conditions, and sends signals in order of the best path. The router is the hub of the Internet, the "traffic policeman". At present, routers have been widely used in all walks of life, and various products of different grades have become the main force in realizing various backbone network internal connections, backbone network interconnections, and backbone network and Internet interconnection services.
[0003] A router is used to connect multiple logically separated networks. The so-called logical network represents a single network or a subnet. When data is transmitted from one subnet to another, it can be done through a router.
[0004] Routers are divided into local routers and remote routers, local routers are used to connect network transmission media, such as optical fiber, coaxial cable, twisted pair; remote routers are used to connect remote transmission media, and require corresponding equipment, such as The telephone line must be equipped with a modem, and the wireless must pass through a wireless receiver and transmitter. The router is the main node device of the Internet.
[0005] The router determines the forwarding of data through routing. The forwarding strategy is called routing, which is also the origin of the router name (router, forwarder). As the interconnection hub between different networks, the router system constitutes the main context of the Internet based on TCP/IP. It can also be said that the router constitutes the skeleton of the Internet. Its processing speed is one of the main bottlenecks of network communication, and its reliability and stability directly affect the quality of network interconnection. Therefore, in the campus intranet, regional intranet, and even the entire Internet research field, router research has always been at the core, and its development process and direction have become a microcosm of the entire Internet research.
[0006] The analysis of the geographic location of the router is of great significance for the analysis of the interconnection between provinces and cities of the domestic Internet and the interconnection of various operators. At present, the analysis of the geographic location of the router is mainly based on the IP address published by the router based on the publicly-published third-party IP geographic location database. However, there are the following problems:
[0007] 1. There is no official data on the IP geolocation database, which is mainly collected manually by a third party. There are more data on the IP geolocation of enterprises and homes, and lack of data on the IP of the backbone network, so there is no way to analyze the routers deployed on the backbone network. .
[0008] 2. There is usually only one address publicly announced by the router. In fact, the router has multiple interfaces (Interface), and each interface has one or more IP addresses. Due to the inaccuracy of the third-party IP geolocation database, the result is The multiple geographic location data of often conflicts, which makes it impossible to determine its accurate geographic location.
[0009] 3. Depending on the specific IP geographic location database, the IP geographic location database of different third parties differs in specific data, leading to conflicts.
Summary of the invention
[0010] In view of the above problems, the purpose of the present invention is to provide a method for determining the geographic location of a router, which can accurately obtain the geographic location of the router, that is, information about the province and city where the router is located.
[0011] In order to achieve the above objectives, the technical solutions adopted by the present invention are:
[0012] A method for determining the geographic location of a router includes the following steps:
CN 105119827 Β
[0013] 1) Perform alias resolution detection on the target router through the IGMP protocol to obtain the information of multiple interfaces of the target router
IP address;
[0014] 2) Using TCP/UDP protocol from multiple detection sources, using tracert to obtain the IP addresses and path sequence of all nodes in the path through which IP data packets access the IP addresses of the multiple interfaces And the response time value; [0015] 3) The IP addresses of multiple interfaces of the router obtained in step 1 and the IP addresses of each node in the path to each interface of the router obtained in step 2 are obtained by using the public IP geographic location database. position.
[0016] 4) The above characteristic values (reference geographic location of each interface of the router, reference geographic location of the passing node in the path to each interface of the router, path sequence, response time value of each node in the path) are performed using the following specific rules Process and filter to remove geographic location data that conflicts with the rules.
[0017] 5) Use the reference geographic location of each interface of the router filtered in step 4, the reference geographic location of the previous node in the path to each interface of the router, and the response time of the previous node in the path to the interface for weighted calculation to obtain the router's Real geographic data.
[0018] Further, step 1) performs alias resolution detection on the target router through the IGMP protocol, and in this step, multiple interface IP addresses of the target router can be obtained.
[0019] Further, in order to obtain enough paths for subsequent calculation and analysis, there are certain requirements for the number of detection sources; Step 2) Use no less than 20 detection sources to use TCP/UDP protocol to obtain the access target All paths taken by the router with multiple IP addresses.
[0020] Further, the IP geographic location library used in step 3) can be a third-party geographic location library that is freely disclosed on the Internet.
[0021] Further, the specific rules used in step 4) are as follows:
[0022] 1. The geographic location of the same node is unique;
[0023] 2. The response time between two nodes in the same city should be less than m;
[0024] 3. The response time between two cities in the same province should be between η and η. between;
[0025] 4. Cross-province turnaround data (data of province A and province A in the path) should be corrected or eliminated.
[0026] where m is the maximum response time between two nodes in the same city, and n is the minimum response time between nodes in the same province and two cities. It is the maximum response time between nodes in two cities in the same province.
[0027] Further, the weighting calculation formula used in step 5) is as follows:
[0028] P=EPi+EPij*Tij/ETij
[0029] Wherein, Pi is the reference geographic location of each node of the router;
[0030] Pi j is the reference geographic location of the previous node in each path to reach each interface of the router;
[0031] Tij is the response time of the previous node in the path to the interface.
[0032] The present invention adopts the above technical solutions, detects and analyzes various characteristic values of routers through multiple protocols, and uses these characteristic values to perform iteration and weighted calculations to obtain accurate geographic location information of routers: It has the following advantages: [0033] 1 ) Multi-protocol detection is used, which is not restricted by a single protocol.
[0034] 2) A router that can handle the edge or end point of the network boundary;
[0035] 3) The detection speed is fast, and the detection and analysis of a single router can be completed within 5 minutes.
[0036] 4) Through repeated iterative comparison verification calculations, suspicious and inconsistent geographic location data in the public third-party geographic location database can be excluded.
CN 105119827 Β
Description of the drawings
[0037] FIG. 1 is a flowchart of a method for determining the geographic location of a router according to the present invention.
[0038] FIG. 2 is a schematic diagram of a path obtained by detecting a multi-node interface address of a router by multiple detection sources according to the present invention.
Detailed ways
[0039] The working principle and specific working process of the method for determining the geographic location of a router of the present invention are described below with reference to the accompanying drawings as follows:
[0040] As shown in FIG. 1, the method first uses the IGMP protocol to analyze and probe the router alias.
[0041] IGMP: (Internet Group Management Protocol>Internet Group Management Protocol) protocol profile:
[0042] The Internet Group Management Protocol (IGMP) is a multicast protocol in the Internet protocol family, which is used by IP hosts to report their group membership to any directly adjacent router. It stipulates how hosts in different network segments carry out multicast communication. The prerequisite is that the router itself supports multicast. IGMP information is encapsulated in an IP message, and its IP protocol number is 2.
[0043] It is used to establish and maintain the multicast group membership between the IP host and the multicast router directly adjacent to it. igmp does not include the dissemination and maintenance of group membership information between multicast routers. This part of the work is completed by each multicast routing protocol. All hosts participating in multicast must implement IGMP.
[0044] Hosts participating in ip multicast can join or leave the multicast group at any location, at any time, and the total number of members is unlimited. The multicast router does not need and cannot save the membership of all hosts. It only learns through the IGMP protocol whether there is a receiver of a multicast group on the network segment connected to each interface, that is, group members. The host only needs to save which multicast groups it has joined.
[0045] IGMP is asymmetric between the host and the router: the host needs to respond to the IGMP query message of the multicast router, that is, respond with an igmp membership report message; the router periodically sends membership query messages, and then according to the received The response message to determine whether a specific group has a host on its own subnet has joined, and when a report of the hosts withdrawal from the group is received, a query message for the specific group (igmp version 2) is sent to determine a specific group Whether there are no more members.
[0046] By parsing the router alias through the IGMP protocol, the IP address of each interface of the target router can be obtained, that is, the IP address set of each interface of the target router can be obtained.
[0047] Then use the TCP/UPD protocol from multiple detection sources to use the trace-route program to obtain the path taken by the IP data packet sent by the detection source to access the IP address set of each interface of the target router, and the nodes passing through the path, and the nodes passing by The response time value.
[0048] Wherein, the tracer program (tracert) is used to determine the path taken by the IP data packet to access the target. The tracert command uses the IP time-to-live (TTL) field and ICMP error messages to determine the route from a host to other hosts on the network. The command format is as follows:
[0049] tracert[-d][~h maximum_hops][-j computer-list][~w timeout]target_name [0050] Internet Control Message Protocol (ICMP) by sending different IP time-to-live (TTL) values to the target" In response to the packet, the Tracert diagnostic program determines the route taken to the target. Each router on the path is required to decrement the TTL on the packet by at least 1 before forwarding the packet. When the TTL on the packet is reduced to 0, the router should The message "ICMP has timed out" is sent back to the source system.
CN 105119827 Β
[0051] t racert sends a response data packet with a TTL of 1 first, and increments the TTL by 1 in each subsequent sending process until the target response or TTL reaches the maximum value, thereby determining the route. The route is determined by checking the "I CMP has timed out" message sent back by the intermediate router. Some routers directly discard packets with expired TTL without asking, which is not visible in the Tracert utility.
[0052] The simplest usage is tracert hostname, where hostname is the computer name or the IP address of the computer whose path you want to trace, and tracert will return the various IP addresses of the destination.
[0053] The working principle of tracertX
[0054] By sending Internet Control Message Protocol (ICMP) response packets with different IP lifetime values to the target, the tracert diagnostic program determines the route taken to the target. Each router on the path is required to at least The TTL on the data packet is decremented by 1. When the TTL on the data packet is reduced to 0, the router should send an "ICMP timeout" message back to the source system.
[0055] t racert first sends a response data packet with a TTL of 1, and in each subsequent sending process, increments the TTL by 1 until the target response or TTL reaches the maximum value, thereby determining the route. The route is determined by checking the "I CMP has timed out" message sent back by the intermediate router. Some routers directly discard packets with expired TTL without asking, which is not visible in the Tracert utility.
[0056] The tracert command prints out a list of the near-end router interfaces in the path that returns the "ICMP timeout" message in order. If the -d option is used, the tracert utility does not query DNS on each IP address.
[0057] Obtaining feature value data through the above steps includes:
1. Different detection sources detect the geographic location of each node in the path of the target router
[0059] 2. Response time characteristic value of each node in the path
[0060] 3. Geographic location data of multiple interfaces of the target router obtained through alias resolution detection
[0061] The following describes the process of judging the geographic location of a router in the present invention through specific embodiments:
[0062] Embodiment 1:
[0063] Detect and analyze key routers across the country through 26 detection nodes across the country, and obtain geographic location information of these routers to analyze network interconnections between different operators in different provinces.
[0064] The specific process is as follows:
[0065] 1) Use the IGMP protocol to perform alias resolution detection on the router to obtain the IP addresses of multiple interfaces of the router.
[0066] 2) Then use the tracert program (tracert) from multiple source addresses through the TCP/UDP protocol to obtain multiple paths taken by the IP data packet to access the IP addresses of all interfaces of the target router.
[0067] 3) Obtain the geographic locations of the IP addresses of all nodes in the path and each IP geographic location in the alias resolution set of multiple interfaces of the target router by using the public IP geographic location database.
[0068] 4) Iterative correction calculation is performed through the geographic location of the preceding and following nodes in the path and the geographic location of the IP address of each interface in the alias resolution set to obtain the geographic location of the router.
[0069] Examples of path data are as follows:
[0070] Detection source 1 =>node al-1 =>node al-2 =>node al-3......=>node al-n =>target router interface 1
[0071] Detection source 1 => node a2-l => node a2-l => node a2-3......=> node a2-m => target router interface 2
[0072]……
CN 105119827 Β
[0073] Detection source 1 => node ax-Ι => node ax-l => node ax-3......=> node ax-o => target router interface X
[0074] Detection source 2 => node bl-1 => node bl-2 => node bl-3......=> node bl-n => i standard router interface 1
[0075] Detection source 2 => node b2-l => node b2-l => node b2-3......=> node b2-m => target router interface 2
[0076]……
[0077] Detection source 2 => node bx-Ι => node bx-l => node bx-3......=> node bx-p => target router interface X
[0078] Detection source y = "node yl-l => node yi_2 = "node yl-3......=" node yl-n => i standard router interface 1
[0079] Detection source y="node y2-l=>node y2-l="node y2-3......="node y2-m=>target router interface 2
[0080]……
[0081] Detection source y = "node yx-l => node yx-l = "node yx-3...... = "node yx-p => i-marked router interface X
[0082] The sample data after the standard feature value is as follows:
[0083] Beijing 0 = "Beijing 10 = "Beijing 30 = "Beijing 50... Hubei Wuhan 60 = "Hubei Wuhan 70 =" Hubei Wuhan 80 = "
[0084] Hunan Changsha 100 = "Hunan Changsha 110......=" Hunan Changsha 150
[0085] Beijing 0 = "Beijing 10 = "Beijing 30 = "Beijing 50... Hubei Wuhan 60 = "Hubei Wuhan 70 =" Hubei Wuhan 80 = "
[0086] Hunan Changsha 100 = "Hunan Zhuzhou 110...... =" Hunan Changsha 150
[0087]……
[0088] The response time of each node in the above data is subtracted from the response time of the previous node in the path to obtain the
[0089] The average response time of the node, and the results are as follows:
[0090] Beijing 0 = "Beijing 10 = "Beijing 20 = "Beijing 20... Hubei Wuhan 10 = "Hubei Wuhan 10 = "Hubei Wuhan 10 ="
[0091] Hunan Changsha 20 = "Hunan Changsha 10...... = "Hunan Changsha 10
[0092] Beijing 0 = "Beijing 10 = "Beijing 20 = "Beijing 20... Hubei Wuhan 10 = "Hubei Wuhan 10 = "Hubei Wuhan 10 ="
[0093] Hunan Changsha 20 = "Hunan Zhuzhou 10...... = "Hunan Changsha 10
[0094] Then, according to the above data, inaccurate and suspicious geographic locations in the path are filtered and corrected according to the response time values of the nodes before and after the target router and specific processing rules, where the specific rules are as follows:
[0095] 1. The geographic location of the same node is unique;
[0096] 2. The response time between two nodes in the same city should be less than m;
[0097] 3. The response time between two cities in the same province should be between η and η. between;
[0098] 4. Cross-province turnaround data (data of province A and province A in the path) shall be corrected or eliminated.
CN 105119827 Β
[0099] where m is the maximum response time between two nodes in the same city, and n is the minimum response time between nodes in the same province and two cities. It is the maximum response time between nodes in two cities in the same province.
[0100] Finally, according to the reference geographic location of each node of the router, the reference geographic location of the previous node in each path through each interface of the router, and the response time of the previous node in the destination routing path to the interface, the geographic location of the target route is calculated by weighting. position. The weighting calculation formula is as follows:
[0101] P=EPi+EPij*Tij/ETij
[0102] Wherein, Pi is the reference geographic location of each node of the router;
[0103] Pi j is the reference geographic location of the previous node in each path to reach each interface of the router;
[0104] Tij is the response time of the previous node in the path to the interface.
[0105] As described above, by adopting the above technical solution, various feature values of the router are detected and analyzed through multiple protocols, and these feature values are used for iterative and weighted calculations to obtain accurate geographic location information of the router: the present invention has the following advantages:
[0106] 1) Multi-protocol detection is used, which is not restricted by a single protocol.
[0107] 2) Routers that can handle the edge or end of the network boundary;
[0108] 3) The detection speed is fast, and the detection and analysis of a single router can be completed within 5 minutes.
[0109] 4) Through repeated iterative comparison verification calculations, suspicious and inconsistent geographic location data in the public third-party geographic location database can be excluded.
CN 105119827 Β
2 sheets
Sheet 1 Sheet 2
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| WO2025125235A1 | Cited by | World Intellectual Property Organization (WIPO) | International search |
| CN104506591A | Cites | China | – |
| CN102387205A | Cites | China | – |
| CN102811144A | Cites | China | – |
| CN103220376A | Cites | China | – |
| US2004017312A1 | Cites | United States of America | – |
2 members in 1 office
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 201510412519 | China | A | |
| CN20151412519 | – | – | – |
Members2
| Document | Office | Kind | |
|---|---|---|---|
| CN105119827A | China | A | |
| CN105119827BThis record | China | B |
3 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Patent grantGrantedGR01 | GR01 | |
| Entry into substantive examinationC10 | C10 | |
| PublicationC06 | C06 |
Numbers
- Publication
- 105119827
- Publication, DOCDB
- 105119827
- Publication, EPODOC
- CN105119827B
- Application
- 104125195
- Application, DOCDB
- 201510412519
- Application, EPODOC
- CN201510412519
Titles2
- Chinese
- 一种路由器地理位置的判断方法
- English
- A method for judging the geographical position of routers
Classification
- CPC, 4
- H04L45/74
- H04L12/185
- H04L2101/668
- H04L2101/69
- IPC, 3
- H04L12 741
- H04L29 12
- H04L45 74