CN106817279A - A kind of broadband-based network detecting method - Google Patents
A kind of broadband-based network detecting method Download PDFInfo
- Publication number
- CN106817279A CN106817279A CN201710024853.2A CN201710024853A CN106817279A CN 106817279 A CN106817279 A CN 106817279A CN 201710024853 A CN201710024853 A CN 201710024853A CN 106817279 A CN106817279 A CN 106817279A
- Authority
- CN
- China
- Prior art keywords
- detection
- network
- fire wall
- interface card
- network interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/02—Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
- H04L63/0281—Proxies
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides a kind of broadband-based network detecting method, belongs to broadband fault automatic measurement technology field, and the present invention includes:1)Connectivity inspection, 2)Network link detection, 3)Detection proxy server is set, and 4)Detection fire wall is set, and 5)Detection network card status.With a kind of simple effective method detect remote service whether UNICOM, step by step by proxy server, fire wall, network interface card parameter and DNS data carry out automatic detection, and network failure is repaired in time on this basis with quick locating network fault Producing reason.
Description
Technical field
The present invention relates to broadband fault automatic measurement technology, more particularly to a kind of broadband-based network detecting method.
Background technology
In the case where internet is commonly used, because the installation of dangerous software causes network settings to change,
Or cause the situation of network failure more and more universal because network knowledge shortage carries out irrational setting to computer, repair automatically
Therefore the instrument of multiple network is also developed and applies, but these functions and software are mostly the aids of large software,
Desired use must install whole software kit, and occupying system resources are too many, while too many useless function is installed, otherwise use
Excessively complexity is difficult to use.
With the popularization and the extensive use of PC of network, and form various kinds software installation, home PC goes out existing network
Network failure has turned into the common problem of people, and it is not that part holds that network failure is solved for being unfamiliar with the people of computer and network
Easy thing.
The content of the invention
In order to solve the problem, the present invention proposes a kind of broadband-based network detecting method.
The present invention makes most simple directly method automatically detect the factor that may cause network failure, uses
Function and method are all that the API that system is provided will not relate to any safety problem, are that the simple of detection network failure has
The method of effect.
The technical scheme is that:
A kind of broadband-based network detecting method,
Including:
1)Connectivity checks, be detection far-end IP address whether the method that can be reached, realized by function;
2)Network link is detected, with 1)Method detect fixed service end IP address whether UNICOM;
3)Detection proxy server is set, and detects proxy server facilities, closes after acting on behalf of with 2)Method carry out UNICOM
Property detection;
4)Detection fire wall is set, and whether detection fire wall is opened, with 2 after closing)Method carry out connectivity detection;
5)Detection network card status, obtain the relevant parameter of network interface card, and detect whether network interface card parameter setting is reasonable.
Further,
Connectivity is checked, is sent to remote target machine using raw socket and take back existing ICMP packages;
Network link is detected, is that distal end fixed server IP can be configured in a configuration file;
Detection proxy server is set, and is that status data is obtained from specified registry key, closes agency and reexamines connection
The general character;
Detection fire wall is set, and is the interface function get_FirewallEnabled and put_ for using INetFwPolicy2 to provide
FirewallEnabled is checked and is set fire wall;
Detection network card status be from registration table SOFTWARE Microsoft WindowsNT CurrentVersion
Network interface card information is obtained in NetworkCards, judges whether network interface card disables with CreateFile functions, DeviceIoControl letters
Number obtains network card status and relevant information, and network card adapter information is obtained using GetAdaptersInfo.
The beneficial effects of the invention are as follows
The present invention is capable of detecting when to be set because of agency, and fire wall is set, and IP is set, network caused by DNS settings are incorrect
Failure.
Specific embodiment
More detailed elaboration is carried out to present disclosure below:
【Connectivity inspection method:】
ICMP bags are sent by detection main frame, whether detection distance host can be with UNICOM
1. raw socket, the socket connections of ICMP agreements are created according to distance host IP address
2. set up ICMP packages and send and wait returning result (having three tries)
3. then think that distance host can be with UNICOM, otherwise it is assumed that main frame is unreachable if result is returned;
【Network fault detecting method and step】
The first step:Network link is detected
1. basis【Connectivity inspection method】Method detection main frame whether can be with UNICOM;
2., if can be normal with UNICOM, network, terminate;
If cannot UNICOM, carry out【Second step】
Second step:Detection browses agency and sets
By registration table, facilities are acted on behalf of in detection, judge whether agency is set correct
1. registry key is obtained:
HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\
The value of ProxyEnable and ProxyServer under Internet Settings
2. agency is not enabled if ProxyEnable is 0, carried out【Fire wall is detected】;
3. agency is enabled if ProxyEnable is 1, continued;
4. close proxy server and (ProxyEnable is set into 0) is set
5. the connectivity of distance host is detected;
If 6. UNICOM, then it is assumed that be proxy server influence network, otherwise carry out【3rd step】
3rd step:Detection fire wall is set
Stop fire wall with the related API of fire wall, and detect UNICOM's row of network
The INetFwPolicy2 interfaces provided using windows
1. the function get_FirewallEnabled for being provided using INetFwPolicy2 interfaces
Obtain NET_FW_PROFILE2_PRIVATE and NET_FW_PROFILE2_PRIVATE
Network firewall state
It is unrelated with fire wall if 2. fire wall is all not turned on, terminate fire wall detection;
If 3. fire wall has unlatching, the function put_FirewallEnabled provided using INetFwPolicy2 closes anti-
Wall with flues;
4. piece connectivity of detection network;
If 5. UNICOM, then it is assumed that be fire wall influence network;
If 6. obstructed, carry out【4th step】;
4th step:Detection network card status
Whether detection network interface card disconnects or disables
1. obtain all network card adapter information using GetAdaptersInfo functions and preserve
2. from registration table HKEY_LOCAL_MACHINE
SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkCards
Middle acquisition installs network interface card information:
ServiceName:Service name,
Can be with composition file composition file +ServiceName according to service name
3. CreateFile functions are used, and file handle hFile is opened in successor's file description service
4., if returning to file handle mistake, illustrate that the network interface card is disabled
If the file handle for 5. obtaining is effectively, obtains the state of network interface card using DeviceIoControl functions and believe with related
Breath:
Network card status (disconnect, connection), MAC Address of Network Card, network interface card type
6. the multiple network interface cards of fruit, show the selection network interface card page
7. network card status are shown, judges whether network interface card is normal;
If 8. network interface card is normal, network card adapter information is found according to ServiceName, and obtain IP address and gateway and
DNS
9. whether the IP address and gateway of detection network interface card are effective IP address
If 10. invalid, IP and gateway set mistake;
If 11. effectively, detect gateway whether UNICOM;
If 12. is obstructed, illustrate that gateway sets mistake, carry out DNS detections
13. judge whether two DNS of network interface card are effective IP address;
14. if effective IP address, detects whether to reach, and can reach and then thinks that DNS has no problem if one,
Illustrate that DNS is set if it can not all reach problematic, point out modification DNS to set.
The present invention with a kind of simple effective method detection remote service whether UNICOM, step by step by agency service
Device, fire wall, network interface card parameter and DNS data carry out automatic detection, with quick locating network fault Producing reason as
According to reparation network failure in time.
Claims (6)
1. a kind of broadband-based network detecting method, it is characterised in that
Including:
1)Connectivity checks whether detection far-end IP address can reach;
2)Network link is detected, with 1)Method detect fixed service end IP address whether UNICOM;
3)Detection proxy server is set, and detects proxy server facilities, closes after acting on behalf of with 2)Method carry out UNICOM
Property detection;
4)Detection fire wall is set, and whether detection fire wall is opened, with 2 after closing)Method carry out connectivity detection;
5)Detection network card status, obtain the relevant parameter of network interface card, and detect whether network interface card parameter setting is reasonable.
2. method according to claim 1, it is characterised in that
Connectivity is checked, is sent to remote target machine using raw socket and take back existing ICMP packages.
3. method according to claim 1, it is characterised in that
Network link is detected, is that distal end fixed server IP can be configured in a configuration file.
4. method according to claim 1, it is characterised in that
Detection proxy server is set, and is that status data is obtained from specified registry key, closes agency and reexamines connection
The general character.
5. method according to claim 1, it is characterised in that
Detection fire wall is set, and is the interface function get_FirewallEnabled and put_ for using INetFwPolicy2 to provide
FirewallEnabled is checked and is set fire wall.
6. method according to claim 1, it is characterised in that
Detection network card status be from registration table SOFTWARE Microsoft WindowsNT CurrentVersion
Network interface card information is obtained in NetworkCards, judges whether network interface card disables with CreateFile functions, DeviceIoControl letters
Number obtains network card status and relevant information, and network card adapter information is obtained using GetAdaptersInfo.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710024853.2A CN106817279A (en) | 2017-01-13 | 2017-01-13 | A kind of broadband-based network detecting method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710024853.2A CN106817279A (en) | 2017-01-13 | 2017-01-13 | A kind of broadband-based network detecting method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106817279A true CN106817279A (en) | 2017-06-09 |
Family
ID=59110925
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710024853.2A Pending CN106817279A (en) | 2017-01-13 | 2017-01-13 | A kind of broadband-based network detecting method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106817279A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111314181A (en) * | 2020-03-20 | 2020-06-19 | 北京无限光场科技有限公司 | Network connectivity diagnosis method, device, terminal and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1741480A (en) * | 2004-08-29 | 2006-03-01 | 华为技术有限公司 | Method and equipment for detecting signalling or media path fault in next generation method |
CN1964287A (en) * | 2005-11-08 | 2007-05-16 | 鸿富锦精密工业(深圳)有限公司 | A system and method to test network card |
CN101072147A (en) * | 2007-06-20 | 2007-11-14 | 重庆邮电大学 | Industrial Ethernet protocol analysisand field tester |
CN103001801A (en) * | 2012-11-30 | 2013-03-27 | 北京奇虎科技有限公司 | Network repairing method and device |
CN103023699A (en) * | 2012-11-30 | 2013-04-03 | 北京奇虎科技有限公司 | Network repair method and system |
-
2017
- 2017-01-13 CN CN201710024853.2A patent/CN106817279A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1741480A (en) * | 2004-08-29 | 2006-03-01 | 华为技术有限公司 | Method and equipment for detecting signalling or media path fault in next generation method |
CN1964287A (en) * | 2005-11-08 | 2007-05-16 | 鸿富锦精密工业(深圳)有限公司 | A system and method to test network card |
CN101072147A (en) * | 2007-06-20 | 2007-11-14 | 重庆邮电大学 | Industrial Ethernet protocol analysisand field tester |
CN103001801A (en) * | 2012-11-30 | 2013-03-27 | 北京奇虎科技有限公司 | Network repairing method and device |
CN103023699A (en) * | 2012-11-30 | 2013-04-03 | 北京奇虎科技有限公司 | Network repair method and system |
Non-Patent Citations (4)
Title |
---|
ZFAN: ""用注册表挖掘Internet Explorer的新功能"", 《电脑技术》 * |
卢伟杰: ""利用网络命令检测网络故障"", 《玉林师范学院学报》 * |
张秉才: ""基于Windows诊断工具的网络故障分析和排除 "", 《广东广播电视大学学报》 * |
郭成城 等: ""Wnidows环境下TCP/IP网络故障定位的一种方法"", 《计算机应用研究》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111314181A (en) * | 2020-03-20 | 2020-06-19 | 北京无限光场科技有限公司 | Network connectivity diagnosis method, device, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103001801B (en) | Network restoration method and apparatus | |
CN103023699B (en) | A kind of network restoration method and system | |
CN102064979B (en) | Network fault restoration system, device and method | |
US20040066747A1 (en) | Methods and structure for automated troubleshooting of a virtual private network connection | |
US8432833B2 (en) | Auto MEP ID assignment within CFM maintenance association | |
WO2019165775A1 (en) | Local area network equipment searching method and searching system | |
CN102457403B (en) | Method and device for detecting network connection faults | |
CN106817279A (en) | A kind of broadband-based network detecting method | |
CN103701656A (en) | Testing method and system of broadband access unit | |
US20110252120A1 (en) | Configuration of a network node using captive mode | |
TW201010337A (en) | Apparatus power restart method in response to network connection status | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
Cisco | Confirming the Installation | |
CN104935684A (en) | Method for automatically configuring IP address | |
Cisco | A - Qualifying the NE for BBSM | |
US7643432B2 (en) | Method for analyzing a network environment | |
CN104618196A (en) | Method for identifying compatibility of server and Citrix system | |
Cisco | B - Switch Qualification Procedure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170609 |