CN103905582A - Method and system for automatically detecting and binding IP/MAC - Google Patents
Method and system for automatically detecting and binding IP/MAC Download PDFInfo
- Publication number
- CN103905582A CN103905582A CN201410100399.0A CN201410100399A CN103905582A CN 103905582 A CN103905582 A CN 103905582A CN 201410100399 A CN201410100399 A CN 201410100399A CN 103905582 A CN103905582 A CN 103905582A
- Authority
- CN
- China
- Prior art keywords
- mac address
- address
- mac
- binding
- subprocess
- 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
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The invention provides a method for automatically detecting and binding an IP/AMC address couple. The method for automatically detecting and binding the IP/MAC address couple is characterized by comprising the steps of acquiring an IP address to be detected, establishing a subprocess which is made to carry out an ARP request of an MAC address of the IP address to be detected and monitor and process an ARP response message, acquiring the processing result of the subprocess, extracting the IP/MAC address couple, conducting IP/MAC binding processing on the IP/MAC address couple obtained by detection. The invention further provides a system using above method. The system comprises an IP acquiring module, a subprocess module, a result extracting module and a binding module. According to the method and system, based on a firewall or router equipment, the IP/MAC address couple can be automatically detected and automatically bound under the condition that the IP address of a host computer is only known.
Description
Technical field
The present invention relates to network information technology field, be specifically related to a kind of method and system of IP/MAC automatic detection binding.
Background technology
In network management, the phenomenon of IP address embezzlement often occurs, not only the normal use of network is impacted, simultaneously because stolen address often has higher authority, thereby also user has been caused to a large amount of losses economically and potential potential safety hazard.Therefore, stolen in order to prevent IP address, can, in the time of proxy server end distributing IP address, IP address and MAC Address be bound.
And IP address and MAC Address are bound, need survey MAC Address, the existing method of obtaining MAC Address has a variety of, wherein a kind of fairly simple method is exactly to obtain MAC Address under order, select " RUN " as first clicked " beginning " in computer, input Winipcfg order inside, just can find out MAC Address, carry out IP/MAC binding; And now also can carry out searching of MAC Address by a lot of softwares district.
But above-mentioned these methods all need acquisition configuration parameter and manually binding, complex operation, is only suitable for using among a small circle, more can not carry out automatic detection.
Summary of the invention
(1) technical problem solving
For the deficiencies in the prior art, the invention provides a kind of method of IP/MAC automatic detection binding, can be based on fire compartment wall or router device, in the situation that only knowing host IP address, automatic detection goes out IP/MAC address to also automatically binding.
(2) technical scheme
In order to reach above object, the present invention is achieved by the following technical programs:
The method of IP/MAC address to automatic detection binding, the method comprises:
S1: obtain IP address to be detected;
S2: create subprocess, make the ARP request of its MAC Address of carrying out IP to be detected, and monitor and process arp response message;
S3: obtain the result of detection of subprocess, extract IP/MAC address pair;
S4: process carrying out IP/MAC binding the IP/MAC address that detection is obtained.
Wherein, step S1 specifically comprises:
If single main frame, the IP address that obtains band detection main frame; If a certain subnet, the IP address that obtains network interface.
Wherein, if single main frame, the subprocess of described establishment specifically comprises:
Send the ARP request of the MAC Address of IP to be detected;
Monitor the response message of this ARP;
Collect IP/MAC address pair.
Wherein, if a certain subnet, the subprocess of described establishment specifically comprises:
Calculate subnet number according to the IP of network interface;
The traversal all IP of subnet address sends ARP request;
Monitor the response message of all ARP;
Collect all IP/MAC addresses pair.
Preferably, IP when device node single port allows multiple different sub-network can traversal processing.
The system of IP/MAC to automatic detection binding, this system comprises: IP acquisition module, subprocess module, result extraction module and binding module;
IP acquisition module, for obtaining IP address to be detected;
Subprocess module, for creating subprocess, makes the ARP request of its MAC Address of carrying out IP to be detected, and monitors and process arp response message;
Result extraction module, for obtaining the result of detection of subprocess, extracts IP/MAC address pair;
Binding module, processes carrying out IP/MAC binding for the IP/MAC address that detection is obtained.
(3) beneficial effect
The present invention has following beneficial effect at least:
Method provided by the invention, can be based on fire compartment wall or router device, in the situation that only knowing host IP address automatic detection go out IP/MAC address to and automatically bind intelligentized processing and simplified user and obtain the step of MAC Address; And detection binding based on interface (subnet), can be for the multiple network equipments in this interface place subnet of a certain interface automatic detection or the IP/MAC address pair of main frame, then bind with it, the troublesome operation of user's acquisition configuration parameter and manual binding has been simplified in this processing, has greatly saved the time of configuration operation.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these figure other accompanying drawing.
Fig. 1 is the flow chart of a kind of IP/MAC automatic detection binding method for single main frame in the embodiment of the present invention;
Fig. 2 is the flow chart of the subprocess of middle establishment embodiment illustrated in fig. 1;
Fig. 3 is the method for the IP/MAC automatic detection binding of a kind of network interface in another embodiment of the present invention;
Fig. 4 is the flow chart of the subprocess of middle establishment embodiment illustrated in fig. 3;
Fig. 5 is the topological diagram of the applicable network of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 5.The all embodiment of the present invention are all in network as shown in Figure 5, wherein fire compartment wall is connected to the network, be connected with switch simultaneously, switch is connected with some main frames, the method that the embodiment of the present invention provides acts on the fire compartment wall in figure, also can act on other and support the network equipment of this function, as router device etc.
Referring to Fig. 1, the embodiment of the present invention provides a kind of method of the binding of the IP/MAC automatic detection for individual host, and the method comprises the steps:
Step 101: the IP address that obtains main frame to be detected;
Step 102: create subprocess, make the ARP request of its MAC Address of carrying out IP to be detected, and monitor and process arp response message;
Step 103: the result of detection that obtains subprocess;
Step 104: judge whether to exist IP/MAC address pair, if exist, proceed to step 105, otherwise proceed to step 106;
Step 105: extract IP/MAC address pair, and it is bound to processing;
The detection binding of step 106: End IP/MAC.
Referring to Fig. 2, step 102 specifically comprises:
Step 201: send the ARP request of the MAC Address of IP to be detected;
Step 202: the response message of monitoring this ARP;
Step 203: collect IP/MAC address pair.
Referring to Fig. 3, another embodiment of the present invention provides a kind of method of the binding of the IP/MAC automatic detection for network interface, and the method comprises the steps:
Step 301: according to the IP address of the name acquiring interface of network interface to be measured;
In this step, if IP when device node single port allows multiple different sub-network can traversal processing.
Step 302: create subprocess, make its ARP request of carrying out the MAC Address of all effective IP in subnet to be detected, and monitor the response message of processing ARP;
Step 303: the result of obtaining subprocess;
Step 304: judge whether to exist IP/MAC address pair, if exist, proceed to step 305, otherwise proceed to step 306;
Step 305: traversal processing IP/MAC address is to the binding processing of putting;
The detection binding of step 306: End IP/MAC.
Referring to Fig. 4, step 402 specifically comprises:
Step 401: calculate subnet number according to the IP of network interface;
Step 402: the traversal all IP of subnet address sends ARP request;
Step 403: the response message of monitoring all ARP;
Step 404: collect all IP/MAC addresses pair.
There is above-described embodiment to find out, the method that the embodiment of the present invention provides, can be based on fire compartment wall or router device, in the situation that only knowing host IP address automatic detection go out IP/MAC address to and automatically bind intelligentized processing and simplified user and obtain the step of MAC Address; And detection binding based on interface (subnet), can be for the multiple network equipments in this interface place subnet of a certain interface automatic detection or the IP/MAC address pair of main frame, then bind with it, the troublesome operation of user's acquisition configuration parameter and manual binding has been simplified in this processing, has greatly saved the time of configuration operation.
Another embodiment of the present invention also provides the system of a kind of IP/MAC to automatic detection binding, and this system comprises: IP acquisition module, subprocess module, result extraction module and binding module;
IP acquisition module, for obtaining IP address to be detected;
Subprocess module, for creating subprocess, makes the ARP request of its MAC Address of carrying out IP to be detected, and monitors and process arp response message;
Result extraction module, for obtaining the result of detection of subprocess, extracts IP/MAC address pair;
Binding module, processes carrying out IP/MAC binding for the IP/MAC address that detection is obtained.
Above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that; Its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these amendments or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (6)
1. the method for IP/MAC address to automatic detection binding, is characterized in that, the method comprises:
S1: obtain IP address to be detected;
S2: create subprocess, make the ARP request of its MAC Address of carrying out IP to be detected, and monitor and process arp response message;
S3: obtain the result of subprocess, extract IP/MAC address pair;
S4: process carrying out IP/MAC binding the IP/MAC address that detection is obtained.
2. method according to claim 1, is characterized in that, step S1 specifically comprises:
If single main frame, the IP address that obtains main frame to be detected; If a certain subnet, the IP address that obtains network interface.
3. method according to claim 2, is characterized in that, if single main frame, the subprocess of described establishment specifically comprises:
Send the ARP request of the MAC Address of IP to be detected;
Monitor the response message of this ARP;
Collect IP/MAC address pair.
4. method according to claim 2, is characterized in that, if a certain subnet, the subprocess of described establishment specifically comprises:
Calculate subnet number according to the IP of network interface;
The traversal all IP of subnet address sends ARP request;
Monitor the response message of all ARP;
Collect all IP/MAC addresses pair.
5. method according to claim 2, is characterized in that, IP when device node single port allows multiple different sub-network can traversal processing.
6. the system of IP/MAC to automatic detection binding, is characterized in that, this system comprises: IP acquisition module, subprocess module, result extraction module and binding module;
IP acquisition module, for obtaining IP address to be detected;
Subprocess module, for creating subprocess, makes the ARP request of its MAC Address of carrying out IP to be detected, and monitors and process arp response message;
Result extraction module, for obtaining the result of detection of subprocess, extracts IP/MAC address pair;
Binding module, processes carrying out IP/MAC binding for the IP/MAC address that detection is obtained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410100399.0A CN103905582A (en) | 2014-03-18 | 2014-03-18 | Method and system for automatically detecting and binding IP/MAC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410100399.0A CN103905582A (en) | 2014-03-18 | 2014-03-18 | Method and system for automatically detecting and binding IP/MAC |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103905582A true CN103905582A (en) | 2014-07-02 |
Family
ID=50996736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410100399.0A Pending CN103905582A (en) | 2014-03-18 | 2014-03-18 | Method and system for automatically detecting and binding IP/MAC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103905582A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019140958A1 (en) * | 2018-01-22 | 2019-07-25 | 西安中兴新软件有限责任公司 | Forwarding method and device, electronic device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1571358A (en) * | 2003-07-19 | 2005-01-26 | 华为技术有限公司 | Static user access network control method based on MAC address |
CN101345743A (en) * | 2007-07-09 | 2009-01-14 | 福建星网锐捷网络有限公司 | Method and system for preventing network attack by utilizing address analysis protocol |
CN101521658A (en) * | 2008-02-29 | 2009-09-02 | 上海博达数据通信有限公司 | Realizing method for Ethernet ARP scanning which is applied in broadband router |
CN101635628A (en) * | 2009-08-28 | 2010-01-27 | 杭州华三通信技术有限公司 | Method and device for preventing ARP attacks |
US20110113482A1 (en) * | 2002-10-25 | 2011-05-12 | Marco Foschiano | Method And Apparatus For Automatic Filter Generation And Maintenance |
-
2014
- 2014-03-18 CN CN201410100399.0A patent/CN103905582A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110113482A1 (en) * | 2002-10-25 | 2011-05-12 | Marco Foschiano | Method And Apparatus For Automatic Filter Generation And Maintenance |
CN1571358A (en) * | 2003-07-19 | 2005-01-26 | 华为技术有限公司 | Static user access network control method based on MAC address |
CN101345743A (en) * | 2007-07-09 | 2009-01-14 | 福建星网锐捷网络有限公司 | Method and system for preventing network attack by utilizing address analysis protocol |
CN101521658A (en) * | 2008-02-29 | 2009-09-02 | 上海博达数据通信有限公司 | Realizing method for Ethernet ARP scanning which is applied in broadband router |
CN101635628A (en) * | 2009-08-28 | 2010-01-27 | 杭州华三通信技术有限公司 | Method and device for preventing ARP attacks |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019140958A1 (en) * | 2018-01-22 | 2019-07-25 | 西安中兴新软件有限责任公司 | Forwarding method and device, electronic device and storage medium |
CN110071983A (en) * | 2018-01-22 | 2019-07-30 | 西安中兴新软件有限责任公司 | A kind of retransmission method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102413044B (en) | Method, device, equipment and system for generating DHCP (Dynamic Host Configuration Protocol) Snooping binding table | |
CN103220161B (en) | A kind of detection method of server state and device | |
WO2020028602A3 (en) | Method and system for a network presence platform with intelligent routing | |
CN102710811B (en) | Realize method and the switch of dhcp address safety distribution | |
US9584367B2 (en) | Node de-duplication in a network monitoring system | |
CN104113448A (en) | Method for automatically finding and monitoring devices in local area network | |
CN102056212B (en) | Method for detecting internet speed and network side equipment | |
CN107566236B (en) | Method, device and system for acquiring client private line end-to-end service path | |
CN107979497B (en) | Automatic configuration method and device | |
CN108023763A (en) | The creation method and device of a kind of network topological diagram | |
KR101341596B1 (en) | Apparatus and method for monitoring of wep application telecommunication data by user | |
CN103873466A (en) | HTTPS (Hypertext Transfer Protocol Secure) website filtration and interdict alarm method and device | |
CN107517138A (en) | Equipment detection method and device | |
CN104618522B (en) | The method and Ethernet access equipment that IP address of terminal automatically updates | |
CN106067906B (en) | A kind of method and monitoring device of reconnect | |
CN102904902B (en) | A kind of based on DHCP method for blocking bypass by | |
CN104468201A (en) | Automatic deleting method and device for offline network equipment | |
CN102594839B (en) | Method for distinguishing pseudo dynamic host configuration protocol (DHCP) servers and switchboards | |
CN105099805A (en) | Bidirectional forwarding detection method and system | |
WO2016078291A1 (en) | Method, apparatus and system for accessing file sharing server | |
CN104219337A (en) | IP address allocation method and device applied to SDN | |
CN102064963B (en) | Method and equipment for managing a plurality of computing equipment | |
CN104243454A (en) | IPv6 message filtering method and device | |
CN103905582A (en) | Method and system for automatically detecting and binding IP/MAC | |
CN107547676B (en) | Address processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140702 |
|
RJ01 | Rejection of invention patent application after publication |