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 the TCP/UPD protocol from multiple detection sources and use the route tracking program to obtain the IP data packets to access the multiple interfaces. 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 addresses of multiple interfaces of the router reach the IP addresses of each node in the path of each interface of the router. The IP geo-location database of IP address obtains its reference geo-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 specific rules are removed; and the filtered feature values are weighted and calculated Get real geographic data.

Term
8.8 yearsto projected expiry
Projected expiry 14 July 2035, counted from filing; an application has no term until it is granted.
- Priority and filed
- Published
- Today
- Projected expiry
6 claims: 1 independent, 5 dependent
- 1一种路由器地理位置的判断方法,包括以下步骤: 1) 对目标路由器进行别名解析探测,获得目标路由器的多个接口的IP地址; 2) 从多个探测源利用TCP/UPD协议,使用路由跟踪程序获得IP数据包访问所述多个接 口的IP地址所经过的路径中所有的节点的IP地址、路径顺序及响应时间值作为第一组特 征值; 3) 对步骤1)获得的路由器多个接口的IP地址和步骤2)获得的到达路由器各接口的 路径中各节点的IP地址使用公开的IP地理位置库获得其参考地理位置作为第二组特征 值; 4) 通过对第一组特征值及第二组特征值使用一特定规则进行处理和过滤,去除与所述 特定规则冲突的地理位置数据; 5) 通过对步骤4)过滤后的第一组特征值及第二组特征值进行加权计算得到路由器的 真实地理数据。
- 2如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤1)中通过IGMP 协议对目标路由器进行别名解析探测。
- 3如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤2)中使用不少 于20个探测源分别使用TCP/UPD协议使用路由跟踪程序获得访问目标路由器多个IP地址 的所采取的所有路径。
- 4如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤3)所述公开的 IP地理位置库为互联网免费公开的第三方地理位置库。
- 5如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤4)中使用的特 定规则包括: 4-1)同一个节点地理位置是唯一的; 4-2)同城市两个节点之间的响应时间应小于m ; 4-3)同省两个城市之间响应时间应处于η和。之间; 4-4)跨省回折数据予以纠正或者剔除; 其中,m是同城市两个节点之间响应时间的最大值,η是同省同两个城市的节点之间的 最小响应时间,ο是同省两个城市的节点之间的最大响应时间。
- 6如权利要求1所述的路由器地理位置的判断方法,其特征在于,步骤5)中使用的加 权计算公式如下: Ρ = Σ Pi+ Σ Pij*Tij/ Σ Tij 其中,Pi为路由器各节点参考地理位置;Pij为到达路由器各接口经过的各条路径中 前一个节点参考地理位置;Tij为路径中前一个节点到达接口的响应时间。
Independent claims6
124 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 (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 the 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 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 of the provinces and cities of the domestic Internet and the interconnection of various operators. At present, the analysis of the router's geographic location is mainly based on the IP address published by the router based on the publicly-published third-party IP geographic location database, but the following problems exist:
[0007] 1. There is no official data on the IP geographic location database, which is mainly collected manually by a third party. There are many corporate and home IP geographic location data, and there is a lack of backbone network IP data, so the routers deployed on the backbone network cannot be analyzed. .
[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, the information of 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:
[0013] 1) Perform alias resolution detection on the target router through the IGMP protocol to obtain the IP addresses of multiple interfaces of the target router;
[0014] 2) Using TCP/UPD 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 response time value;
[00 3) Use the public IP geographic location database to obtain the reference geographic location of the IP addresses of multiple interfaces of the router obtained in step 1 and the IP addresses of nodes in the path to each interface of the router obtained in step 2.
[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 respectively use TCP/UPD protocol to obtain access targets using a trace-route program 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, n is the minimum response time between nodes in the same province and two cities, and ο 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] Ρ = Σ Ρΐ+ Σ Pij*Tij/ Σ Tij
[0029] Wherein, Pi is the reference geographic location of each node of the router;
[0030] Pij 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 scheme, detects and analyzes various characteristic values of the router through multiple protocols, and uses these characteristic values to perform iteration and weighted calculations to obtain accurate geographic location information of the router: having the following advantages.
Eight',·
[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 discrepancies in the public third-party geographic location database can be excluded
Consistent geographic location data.
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 will be 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 introduction:
[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 IP packets, and its IP protocol number is 2o
[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 are receivers of a multicast group, that is, group members, on the network segment connected to each interface. 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, responds 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 each node in the path, and each node. The response time value.
[0048] Wherein, a 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] By sending different IP time-to-live (TTL) values to the target "Internet Control Message Protocol (ICMP) "In response to the data packet, the Tracert diagnostic program determines the route taken to the target. Require every router on the path to forward
Before the data packet, at least decrement the TTL on the data packet. When the TTL on the data packet is reduced to 0, the router should send the "ICMP timeout" message back to the source system.
[0051] Tracert first sends a response data packet with a TTL of 1, and then 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 "ICMP timeout" message sent back by the intermediate router. Some routers directly discard packets with expired TTL without asking, which is not seen 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 is to be traced, and tracert will return the various IP addresses of the destination.
[0053] Working principle of tracert
[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 to be taken to the target. Each router on the path is required to decrement the TTL on the data packet at least before forwarding the data packet. 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] Tracert first sends a response data packet with a TTL of 1, and then 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 "ICMP timeout" 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 sequentially prints out the list of the near-end router interfaces in the path that returns the "ICMP timeout" message. If you use the -d option, 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 process of judging the geographic location of a router in the present invention is described below through specific embodiments:
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) Perform alias resolution detection on the router using the IGMP protocol 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 multiple interface alias resolution set 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 a2T = "node a2~3......=" node a2 ~ m => target
Router interface 2
[0072] ......
<td>[0073] Detection source 1 = "node ax-Ι =</td><td>Point ax 1 Ή Point ax 3···</td><td>Ήpointax ο</td><td>=></td><td>the goal</td>
<td>Router interface χ</td><td></td><td></td><td></td><td></td>
<td>[0074] Detection source 2 = "node bl-Ι =</td><td>Ή point bl 2 point bl 3···</td><td>Ήpointbl η</td><td>=></td><td>the goal</td>
<td>Router interface 1</td><td></td><td></td><td></td><td></td>
<td>[0075] Detection source 2 = "node b2-l =</td><td>Point b2 1 point b2 3···</td><td>Point b2 m</td><td>=></td><td>the goal</td>
<td>Router interface 2</td><td></td><td></td><td></td><td></td>
<td>[0076] ......</td><td></td><td></td><td></td><td></td>
<td>[0077] Detection source 2 = "node bx-Ι =</td><td>Ή point bx 1 point bx 3···</td><td>Ή point bx ρ</td><td>=></td><td>the goal</td>
<td>Router interface χ</td><td></td><td></td><td></td><td></td>
<td>[0078] Detection source y = "node yl-Ι =</td><td>Cidian yl 2 "point yl 3···</td><td>Ήpointyl η</td><td>=></td><td>the goal</td>
<td>Router interface 1</td><td></td><td></td><td></td><td></td>
<td>[0079] Detection source y = "node y2-l =</td><td>Cidiany2 1Point y2 3···</td><td>Point y2 m</td><td>=></td><td>the goal</td>
<td>Router interface 2</td><td></td><td></td><td></td><td></td>
<td>[0080] ......</td><td></td><td></td><td></td><td></td>
<td>[0081] Detection source y = "node yx-Ι =</td><td>Cidian yx 1 ή point yx 3···</td><td>Ήpointyx Ρ</td><td>=></td><td>the goal</td>
Router interface X
[0082] Example 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, and the response time of each node to the next
[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 n and n. between;
[0098] 4. Cross-province turnaround data (data from province A and province A and province A in the path) are corrected or eliminated.
[0099] where m is the maximum response time between two nodes in the same city, n is the minimum response time between nodes in the same province and two cities, and ο 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] Ρ = Σ Pi+ Σ Pij^Tij/ Σ Tij
[0102] Wherein, Pi is the reference geographic location of each node of the router;
[0103] Pij 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 mentioned 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 calculation 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.
2 sheets
Sheet 1 Sheet 2
Every citation, both ways
| Document | Relation | Office | Category | Cited during | Relevant claims |
|---|---|---|---|---|---|
| CN114884850A | Cited by | China | – | Search report | – |
| CN112615785A | Cited by | China | – | Search report | – |
| FR3157043A1 | Cited by | France | – | Search report | – |
| CN108632396A | Cited by | China | – | Search report | – |
| CN110677343A | Cited by | China | – | Search report | – |
| CN109617728A | Cited by | China | – | Search report | – |
| CN114584532A | Cited by | China | – | Search report | – |
| CN102387205A | Cites | China | A | Search report | 1-6 |
| CN102811144A | Cites | China | A | Search report | 1-6 |
| CN103220376A | Cites | China | A | Search report | 1-6 |
| CN104506591A | Cites | China | A | Search report | 1-6 |
| US2004017312A1 | Cites | United States of America | A | Search report | 1-6 |
2 members in 1 office
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 201510412519 | China | A | |
| CN20151412519 | – | – | – |
Members2
| Document | Office | Kind | |
|---|---|---|---|
| CN105119827AThis record | China | A | |
| CN105119827B | 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
- CN105119827
- 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