CN106603348A - DHCP Offer flooding simulation method and system - Google Patents

DHCP Offer flooding simulation method and system Download PDF

Info

Publication number
CN106603348A
CN106603348A CN201710079086.5A CN201710079086A CN106603348A CN 106603348 A CN106603348 A CN 106603348A CN 201710079086 A CN201710079086 A CN 201710079086A CN 106603348 A CN106603348 A CN 106603348A
Authority
CN
China
Prior art keywords
router
measured
dhcp
address
main frame
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.)
Granted
Application number
CN201710079086.5A
Other languages
Chinese (zh)
Other versions
CN106603348B (en
Inventor
范清宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201710079086.5A priority Critical patent/CN106603348B/en
Publication of CN106603348A publication Critical patent/CN106603348A/en
Application granted granted Critical
Publication of CN106603348B publication Critical patent/CN106603348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a DHCP Offer flooding simulation method. The method comprises the following steps: a test host establishing a DHCP Offer packet; a router to be tested requesting an IP from a test accompanying router through a concentrator, and breaking connection between the test accompanying router and the concentrator at half of time of the leasing period of the obtained IP; the test host sending numerous DHCP Offer packets to the router to be tested through the concentrator; the test host determining whether the router to be tested obtains source IPs in the DHCP Offer packets, and if so, determining that a DHCP function of the router to be tested is abnormal; and otherwise, stopping sending the DHCP Offer packets, re-establishing connection between the test accompanying router and the concentrator, determining whether the router to be tested obtains the IP sent by the test accompanying router, if so, determining that the DHCP function of the router to be tested is normal, and otherwise, determining that the DHCP function of the router to be tested is abnormal. According to the invention, the condition of tensed current test environment resources is solved.

Description

The method and system that a kind of simulation DHCP Offer flood
Technical field
The invention belongs to field tests, more particularly to the method and system that a kind of simulation DHCP Offer flood.
Background technology
DHCP (Dynamic Host Configuration Protocol, DHCP) is that DynamicHost arranges agreement, and it is The procotol of one LAN.In method be generally applied to large-scale LAN environment, Main Function is the management of concentration, divides With IP address, the main frame in network environment is set dynamically to obtain the information such as IP address, Gateway addresses, dns server address, And can lift the utilization rate of address.Originally, do not occurred come test router DHCP functions using flooding in laboratory environment, The situation taken by mistake by environmental disturbances or cannot be surfed the Net by address more, the problem is that just discovery is checked at Jing client feedbacks scene 's.Although there is test environment later, existing laboratory environment test resource is limited, can not fully achieve true ring The test in border, this needs to prepare multiple Dynamic Host Configuration Protocol server and arranges different IP, while responding the DHCP that router sends Discover carrys out immersion simulations to be tested, and test environment resource is at full stretch, and test environment is costly, and does not test DHCP work( Test resource is wasted during energy, test environment is complicated, it is desirable to have people instructs operation, takes time and effort.
The content of the invention
The present invention provides the method and system that a kind of simulation DHCP Offer (DHCP supplies message) flood, existing to solve There is the nervous condition problem of the test environment resource of the DHCP functions of test router present in technology.
The method that a kind of simulation DHCP Offer of the present invention flood, including step:
Test main frame described in S100 sets up DHCP Offer bags;
S200 routers to be measured, to survey router solicitation IP address is accompanied, treat that the router to be measured is successfully obtained by hub Get described accompanying to survey after the IP address that router distributes, it is separated at the 1/2 of lease phase to accompany between survey router and hub Connection;
Test main frame described in S300 sends a large amount of DHCP Offer bags set up by hub to router to be measured, described DHCP Offer bags include the source IP address for being supplied to the router to be measured;
Test main frame described in S400 judges whether the router to be measured obtains the source IP address in DHCP Offer bags, If so, step S500 is then entered, otherwise into step S600;
S500 judges the router DHCP dysfunctions to be measured;
Test main frame described in S600 stops sending the DHCP Offer bags, and re-establishes to accompany and survey router and hub Between connection, judge the router to be measured can obtain accompany survey router send IP address, if so, then enter step S700, otherwise into step S500;
S700 judges that router DHCP functions to be measured are normal.
The invention discloses a kind of method that simulation DHCP Offer flood, it is adaptable to all-router.Mainly pass through DHCP Offer bags are set up, after router normally obtains IP address, when 1/2 time lease phase sent out DHCP Request, is disconnected With the connection of surveying router (equivalent to server) of accompanying for distributing its IP address, then interference present in simulated environment is (a large amount of Send DHCP Offer bags), the methods that flood of simulation DHCP Offer of the present invention can be used to carry out test router can or can not Mistake takes address, judges the DHCP functions of router.The method simple possible, it is easy to which operation and control, test environment is simple, saves Test resource, reduces cost, improves testing efficiency, solves the DHCP functions of test router present in prior art The nervous condition problem of test environment resource.
Further, also include:It is DHCP that S010 arranges net playing mode of router to be measured, and arranges the rent for accompanying survey router Contract period;S020 respectively has test main frame and hub wired connection, router to be measured with the hub with survey router is accompanied Line connects, and sets up test environment.
Further, step S200 includes:
Router to be measured described in S210 sends in a broadcast manner DHCP Discover messages, and IP address is rented in request;
Accompany survey router to receive after the DHCP Discover messages described in S220, send to the router to be measured One DHCP Offer message, the IP address that router can be supplied to router to be measured to use is surveyed in the message comprising described accompanying And it is described accompany survey router itself IP address;
Router to be measured is received after the DHCP Offer messages described in S230, sends the DHCP Request of a broadcast Message, and accompany survey router address and the router to be measured described in adding in the Option Field of the DHCP Request messages The IP address of application;
Accompany survey router to receive described in S240 and send after the DHCP Request messages response DHCP ACK messages, and Increase the use lease phase information of the IP address of the router solicitation to be measured in the DHCP ACK message Option Fields;
Router to be measured described in S250 is received after the DHCP ACK messages, and the IP ground for surveying router distribution is accompanied described in inspection Whether location can use, if then the router to be measured successfully obtains the IP address chosen, and according to the IP address Continue process using lease phase automatic;
At moment lease phase 1/2 of the IP address that S260 is obtained in the router to be measured, disconnection accompanies survey router with collection Communication connection between line device, the router to be measured can accompany survey router to send DHCP Request messages to re-rent to described IP address.
1/2 moment for selecting the lease phase disconnects and accompanies the connection for surveying router and hub so that router to be measured with accompany survey Cannot be linked up by message between router and re-rent IP address matters, now, add a large amount of external interferences, that is, be sent substantial amounts of DHCP Offer messages, see whether router to be measured can be disturbed by it, and mistake takes the IP address in interference message.
Further, step S100 includes:Test main frame described in S110 sets up a large amount of DHCP Offer by xcap Bag.This programme is to realize that a kind of simulation DHCP Offer flood using xcap software group bags.Xcap is that a windows sends out Job contract tool, can from system all of network interface at reading.Xcap give out a contract for a project instrument can with windows from specified interface The message of construction is sent, two kinds of simple sending strategys are supported, one is to send (being chosen with mouse) chosen, and two is to cycle through It is multiple.Xcap supports the common ether network packet of construction, including arp, rarp, ipv4, ipv6, icmpv4, icmpv6, igmp, Udp, tcp, pim, ospf, rip, snmp, ppp, pppoe, ipsec (ah/esp) etc., and some messages for being of little use, such as Really 802.3, STP etc..The xcap softwares can simulate various DHCP Offer bags, so as to test exhaustive comprehensively.Xcap softwares Originally it is intrinsic environment in test protocol consistency function test envelope, there are a SOP reference documents, shirtsleeve operation allows tester's energy Enough quick left-hand seats, the advantages of with easy to control, resource multiplex, efficiency high.Additionally, being to ensure that test quality is same with efficiency When, lab resources, reasonable distribution, fixed test environment can also be saved, advantageously ensure that the accuracy of test result.
Further, step S300 includes:Test main frame described in S310 is by hub to the router to be measured The DHCP Offer bags of a large amount of establishments are cycled through, the DHCP Offer bags include the source IP for being supplied to the router to be measured Address.
Present invention also offers the system that a kind of simulation DHCP Offer flood, including:Router to be measured, accompany survey route Device, test main frame and hub, the router to be measured, accompany survey router and test main frame respectively with the wired company of the hub Connect, the test main frame includes:Group bag module, packet sending and receiving module and inspection judge module, the packet sending and receiving module difference It is connected with described group of bag module, inspection judge module, wherein:
The group bag module of the test main frame sets up DHCP Offer bags;
Router to be measured, to survey router solicitation IP address is accompanied, treats that the router to be measured successfully gets by hub It is described to accompany after the IP address for surveying router distribution, it is separated at the 1/2 of lease phase to accompany the company surveyed between router and hub Connect;
The packet sending and receiving module of the test main frame sends described group of bag module and sets up by hub to router to be measured Substantial amounts of DHCP Offer bags;
The inspection judge module of the test main frame judges whether the router to be measured obtains the DHCP Offer Source IP address in bag;
If the inspection judge module of the test main frame judges that the router to be measured obtains the DHCP Offer bags In source IP address, then judge the router DHCP dysfunctions to be measured;
If the inspection judge module of the test main frame judges that the router to be measured does not obtain the DHCP Offer bags In source IP address, then the packet sending and receiving module of the test main frame stop sending the DHCP Offer bags, re-establish and accompany The connection surveyed between router and hub, the inspection judge module of the test main frame determines whether the router to be measured Can obtain to accompany and survey the IP address that router sends, if so, then the inspection judge module of the test main frame judges route to be measured Device DHCP functions are normal, and the inspection judge module of otherwise described test main frame judges the router DHCP dysfunctions to be measured.
The simple system of the present invention is easy to control, and test environment is fixed, and tester is upper quick-moving, efficiency high.This system may be used also Multiplexing, saves test resource, and in addition to testing the router feature, the environment can also carry out the protocol tests such as ARP, port leak Sweep test etc..
Further, the test main frame also includes the setup module being connected with the packet sending and receiving module, wherein:It is described It is DHCP that the setup module of test main frame arranges net playing mode of router to be measured, and arranges the lease phase for accompanying survey router.
Further, router to be measured treats the router to be measured by hub to survey router solicitation IP address is accompanied Successfully get described accompanying to survey after the IP address that router distributes, it is separated at the 1/2 of lease phase to accompany survey router and line concentration Connection between device;Including:
The router to be measured sends in a broadcast manner DHCP Discover messages, and IP address is rented in request;
It is described to accompany survey router to receive after the DHCP Discover messages, send one to the router to be measured DHCP Offer messages, comprising IP address and the institute accompanied and survey that router can be supplied to router to be measured to use in the message State and accompany the IP address for surveying router itself;
The router to be measured is received after the DHCP Offer messages, sends the DHCP Request reports of a broadcast Text, and accompany survey router address and the router Shen to be measured described in adding in the Option Field of the DHCP Request messages IP address please;
It is described to accompany survey router to receive transmission response DHCP ACK messages after the DHCP Request messages, and described Increase the use lease phase information of the IP address of the router solicitation to be measured in DHCP ACK message Option Fields;
The router to be measured is received after the DHCP ACK messages, the IP address of survey router distribution is accompanied described in inspection and is It is no to use, if then the router to be measured successfully obtains the IP address chosen, and used according to the IP address Lease phase automatic continues process;
At moment lease phase 1/2 of the IP address obtained in the router to be measured, survey router and hub are accompanied in disconnection Between communication connection, the router to be measured can to it is described accompany survey router send DHCP Request messages come re-rent IP ground Location.
Further, the group bag module of the test main frame sets up DHCP Offer bags by xcap softwares.
Further, the packet sending and receiving module of the test main frame is cycled through by hub to the router to be measured A large amount of DHCP Offer bags set up, the DHCP Offer bags include the source IP address for being supplied to the router to be measured.
The present invention has the beneficial effect that:
(1) various DHCP Offer bags are set up in simulation, and exhaustive is tested comprehensively.
(2) test environment reusable, without using multiple servers, saves test resource and space utilization.And the environment The protocol tests such as ARP, the test of port vulnerability scanning etc. can also be carried out.
(3) test environment is fixed, it is ensured that test quality.
(4) simple to operate, test environment is easy to control, operator's easy to get started.
(5) low cost, while cost is reduced, also improves testing efficiency.
In sum, the present invention has the advantages that to ensure test quality, saves test resource, improves testing efficiency.
Description of the drawings
Technical scheme in order to be illustrated more clearly that the embodiment of the present invention, below will be to making needed for embodiment description Accompanying drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill in field, without having to pay creative labor, can be obtaining it according to these accompanying drawings His accompanying drawing.
Fig. 1 is the flow chart of embodiment of the method one that a kind of simulation DHCP Offer of the present invention flood;
Fig. 2 is router DHCP leases to be measured in another embodiment of method that a kind of simulation DHCP Offer of the present invention flood Process flow diagram flow chart;
Fig. 3 is the system embodiment block diagram that a kind of simulation DHCP Offer of the present invention flood;
Fig. 4 is the system embodiment topological diagram that a kind of simulation DHCP Offer of the present invention flood;
Fig. 5 is another embodiment flow chart of method that a kind of simulation DHCP Offer of the present invention flood.
Specific embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing the present invention is made into One step ground is described in detail, it is clear that described embodiment is only present invention some embodiments, rather than the enforcement of whole Example.Based on the embodiment in the present invention, what those of ordinary skill in the art were obtained under the premise of creative work is not made All other embodiment, belongs to the scope of protection of the invention.
The invention discloses a kind of method that simulation DHCP Offer flood, embodiment one is as shown in figure 1, including step:
Test main frame described in S100 sets up DHCP Offer bags;
S200 routers to be measured, to survey router solicitation IP address is accompanied, treat that the router to be measured is successfully obtained by hub Get described accompanying to survey after the IP address that router distributes, it is separated at the 1/2 of lease phase to accompany between survey router and hub Connection;
Test main frame described in S300 sends a large amount of DHCP Offer bags set up by hub to router to be measured, described DHCP Offer bags include the source IP address for being supplied to the router to be measured;
Test main frame described in S400 judges whether the router to be measured obtains the source IP address in DHCP Offer bags, If so, step S500 is then entered, otherwise into step S600;
S500 judges the router DHCP dysfunctions to be measured;
Test main frame described in S600 stops sending the DHCP Offer bags, and re-establishes to accompany and survey router and hub Between connection, judge the router to be measured can obtain accompany survey router send IP address, if so, then enter step S700, otherwise into step S500;
S700 judges that router DHCP functions to be measured are normal.
The present embodiment simulates the test environment that DHCP Offer flood, and surveys router to serve as a server with accompanying, A large amount of DHCP Offer bags are set up with test main frame realize that simulation DHCP floods.First, test main frame first sets up substantial amounts of DHCP Offer bags, first set up and well do not send, and treat subsequently to send together and build the phenomenon that floods.Survey route is accompanied to act as a server Role, therefore, tested route first surveys router (equivalent to server) application IP address to accompanying, and can see normally obtain IP ground Location.If tested route can be obtained successfully accompanies the IP address for surveying route assignment, at the 1/2 of the lease phase of this IP address Between this moment, disconnection accompanies the connection for surveying router and hub, then allows test main frame to pass through hub to router to be measured A large amount of DHCP Offer bags set up before are sent, is contained inside this DHCP Offer bag and is supplied to router to be measured to use IP, referred to herein as source IP.Note, source IP here surveys router and be supplied to the IP address of router to be measured not to be with accompanying before Same address, because being here the message that the counterfeit server of test main frame is initiated, this message and accompanies before survey router to divide Give the DHCP Offer messages of router to be measured in addition to the IP address for providing is different with IP address, remaining difference is little.Very Extremely, in fraud of router to be measured, the IP of the sender that the DHCP Offer messages that test main frame sends are included nor The real IP address of oneself, but disguise oneself as and accompany survey router, the IP of the sender included in the message accompanies survey router IP.Therefore, if router to be measured does not carry out further checking to message and confirms, the DHCP that the test main frame sends just is obtained If source IP address in Offer messages, then illustrate that the router DHCP functions to be measured occur in that exception.That is, subsequently Router to be measured is judged either with or without the source IP address obtained in the DHCP Offer bags that test main frame sends, if obtain Words, then illustrate the DHCP dysfunctions of the router to be measured.If not obtaining, then reconnect and accompany survey router with collection Netting twine between line device, sets up connection, reexamines and judges that router to be measured surveys the IP that router is provided either with or without obtaining to accompany, if Can get to accompany after in connection and survey the IP that router is provided, then illustrate that the router DHCP functions to be measured are normal, it is impossible to acquisition Words, then judge the router DHCP dysfunctions to be measured.
The method of the present embodiment is simple, goes back reusable, saves test resource, without the need for providing multiple DHCP services Device, the method flooded by simulating DHCP solves the nervous situation of test environment resource.Cost is reduced, test effect is improve Rate, and the quality tested is guaranteed.
Preferably, before the test of above-described embodiment starts, in addition it is also necessary to arranged accordingly, test environment is built. Specifically, it is DHCP to arrange net playing mode of router to be measured, and arranges the lease phase for accompanying survey router, such as 1 minute, will test Main frame and hub wired connection, certainly, router to be measured with accompany survey router respectively with the hub wired connection, such as This, has put up test environment.
Preferably, in the above-described embodiments, in step S100, test main frame sets up a large amount of DHCP Offer bags, I Can be set up using xcap softwares, xcap softwares are originally intrinsic environment in test protocol consistency function test envelope, are had SOP reference documents, shirtsleeve operation allow tester can quick left-hand seat, do not know about the tester of test environment, it is only necessary to Can be tested with reference to SOP documents;In addition the advantages of there is easy to control, resource multiplex, efficiency high.
Preferably, in above-described embodiment, as shown in Fig. 2 step S200 includes step:
Router to be measured described in S210 sends in a broadcast manner DHCP Discover messages, and IP address is rented in request;
Accompany survey router to receive after the DHCP Discover messages described in S220, send to the router to be measured One DHCP Offer message, the IP address that router can be supplied to router to be measured to use is surveyed in the message comprising described accompanying And it is described accompany survey router itself IP address;
Router to be measured is received after the DHCP Offer messages described in S230, sends the DHCP Request of a broadcast Message, and accompany survey router address and the router to be measured described in adding in the Option Field of the DHCP Request messages The IP address of application;
Accompany survey router to receive described in S240 and send after the DHCP Request messages response DHCP ACK messages, and Increase the use lease phase information of the IP address of the router solicitation to be measured in the DHCP ACK message Option Fields;
Router to be measured described in S250 is received after the DHCP ACK messages, and the IP ground for surveying router distribution is accompanied described in inspection Whether location can use, if then the router to be measured successfully obtains the IP address chosen, and according to the IP address Continue process using lease phase automatic;
At moment lease phase 1/2 of the IP address that S260 is obtained in the router to be measured, disconnection accompanies survey router with collection Communication connection between line device, the router to be measured can accompany survey router to send DHCP Request messages to re-rent to described IP address.
After the half the time (i.e. 1/2 moment of lease phase) for reaching the effect duration that lease specifies, router to be measured just enters Enter " re-renting state ", router to be measured can send to Dynamic Host Configuration Protocol server (the accompanying survey router) unicast for distributing IP address for it DHCP REQUEST messages, to carry out the renewal of IP leases.If, as Dynamic Host Configuration Protocol server accompany survey router to think can be after It is continuous to use, a confirmation message will be returned to router to be measured, router so to be measured successfully re-rents IP address.If accompanying survey Router is thought again the IP address cannot be distributed to into the router to be measured, then be notified that router to be measured can not be obtained new Lease.If in the renewed treaty operation failure that the half the time of lease is carried out, router to be measured can be when reaching 7/8 in the lease time limit (87.5%) when, if also there is no the confirmation message of server, the IP address is reclaimed with regard to being serviced device.Client computer must be again Newly start the application process of lease.Therefore, the communication connection for surveying router and hub is accompanied in the 1/2 moment disconnection in the lease phase, So that accompany survey router to fail to receive lease message or the answer message re-rented cannot be returned to be given to router to be measured, now, Again a large amount of DHCP Offer bags are sent by test main frame, disguise oneself as and accompany survey router, simulation DHCP Offer flood, and detect road By the DHCP functions of device.
Preferably, in a kind of step S300 of embodiment, test main frame can be with by the way of cycling through, by what is set up Substantial amounts of DHCP Offer packet loops are sent to router to be measured.
Based on identical technology design, the embodiment of the present invention also provides the system that a kind of simulation DHCP Offer flood, should The executable said method embodiment of system.The system that simulation DHCP Offer provided in an embodiment of the present invention flood, such as Fig. 3 institutes Show, including:Router to be measured 10, survey router 20, test main frame 30 and hub 40 are accompanied, the router to be measured 10, accompany survey Router 20 and test main frame 30 respectively with the wired connection of the hub 40, the test main frame 30 includes:Group bag module 31, Packet sending and receiving module 32 and inspection judge module 33, the packet sending and receiving module 32 is sentenced respectively with described group of bag module 31, inspection Disconnected module 33 is connected, wherein:
The group bag module 31 of the test main frame 30 sets up DHCP Offer bags;
The router to be measured 10, to the survey IP address requesting of router 20 is accompanied, treats the router to be measured by hub 40 10 successfully get described accompanying surveys after the IP address that router 20 distributes, separated at the 1/2 of lease phase to accompany survey router 20 With the connection between hub 40;
The packet sending and receiving module 32 of the test main frame 30 sends described group of bag by hub 40 to router to be measured 10 The substantial amounts of DHCP Offer bags that module 31 is set up;
The inspection judge module 33 of the test main frame 30 judges whether the router to be measured 10 obtains the DHCP Source IP address in Offer bags;
If the inspection judge module 33 of the test main frame 30 judges that the router to be measured 10 obtains the DHCP Source IP address in Offer bags, then judge the router 10DHCP dysfunctions to be measured;
If the inspection judge module 33 of the test main frame 30 judges that the router to be measured 10 does not obtain the DHCP Source IP address in Offer bags, the then stopping of packet sending and receiving module 32 of the test main frame 30 sends the DHCP Offer bags, Re-establish and accompany the connection surveyed between router 20 and hub 40, the inspection judge module 33 of the test main frame 30 is further Judge that can the router to be measured 10 obtain to accompany and survey the IP address that router 20 sends, if so, the then test main frame 30 Check that judge module 33 judges that router 10DHCP functions to be measured are normal, the inspection judge module 33 of otherwise described test main frame 30 Judge the DHCP dysfunctions of the router to be measured 10.
The system saves test resource, and in addition to testing the function, the environment can also carry out the protocol tests such as ARP, port Vulnerability scanning test etc..Efficiency high, test environment is fixed, and is easily understood, and tester is upper quick-moving.Be ensure test quality with While efficiency, lab resources, reasonable distribution, fixed test environment can also be saved, advantageously ensure that the standard of test result True property.
Preferably, the test main frame 30 in above-described embodiment also includes the setting mould being connected with the packet sending and receiving module 32 Block 34, wherein:It is DHCP that the setup module 34 of the test main frame 30 arranges the network access of router to be measured 10, and survey is accompanied in setting The lease phase of router 20.Because the system floods for simulating DHCP Offer, for testing, therefore typically the lease phase is set It is set to 1 minute, arranging the lease phase long can affect testing efficiency.
Preferably, a kind of group bag module 31 of test main frame 30 of above-described embodiment sets up DHCP by xcap softwares Offer bags.Xcap softwares are originally intrinsic environment in test protocol consistency function test envelope, have SOP reference documents, simply Operation allow tester can quick left-hand seat, the advantages of with easy to control, resource multiplex, efficiency high.
Preferably, in the system that a kind of simulation DHCP Offer of above-described embodiment flood, the router to be measured 10 By hub 40 to the survey IP address requesting of router 20 is accompanied, treat that the router to be measured 10 successfully gets described accompanying and surveys route It is separated at the 1/2 of lease phase to accompany the connection surveyed between router 20 and hub 40 after the IP address of the distribution of device 20;This Process includes:
The router to be measured 10 sends in a broadcast manner DHCP Discover messages, and IP address is rented in request;
It is described to accompany survey router 20 to receive after the DHCP Discover messages, send to the router to be measured 10 One DHCP Offer message, the IP that router 20 can be supplied to router to be measured 10 to use is surveyed in the message comprising described accompanying Address and described accompany survey router 20 IP address of itself;
The router to be measured 10 is received after the DHCP Offer messages, sends the DHCP Request reports of a broadcast Text, and accompany the survey address of router 20 and the router to be measured described in adding in the Option Field of the DHCP Request messages The IP address of 10 applications;
It is described to accompany survey router 20 to receive transmission response DHCP ACK messages after the DHCP Request messages, and in institute State the use lease phase information of the IP address for increasing the application of router to be measured 10 in DHCP ACK message Option Fields;
The router to be measured 10 is received after the DHCP ACK messages, and the IP ground for surveying the distribution of router 20 is accompanied described in inspection Whether location can use, if then the router to be measured 10 successfully obtains the IP address chosen, and according to IP ground Location continues process using lease phase automatic;
At moment lease phase 1/2 of the IP address obtained in the router to be measured 10, disconnection accompanies survey router 20 with collection Communication connection between line device 40, the router to be measured 10 can accompany survey router 20 to send DHCP Request messages to described To re-rent IP address.
Preferably, on the basis of any of the above-described embodiment, the packet sending and receiving module 32 of the test main frame 30 is by collection Line device 40 cycles through the DHCP Offer bags of a large amount of establishments to the router to be measured 10, and the DHCP Offer bags are included and carried Supply the source IP address of the router to be measured 10.Cycle through a large amount of DHCP Offer bags set up and cause immersion simulations Effect is more preferable.
Another embodiment of the present invention, the system of the present invention is tested using the method for the present invention, simulation DHCP The method that Offer floods is applied to all-router.Mainly use xcap softwares to set up manually
DHCP Offer bags, after router obtains address, when 1/2 time lease phase sent out DHCP Request, analog loop (sending DHCP Offer bags in a large number) is disturbed present in border come solve router can or can not be wrong by test problems such as addresses.
Basic, concrete test flow chart refers to Fig. 5:
S501 builds test environment:It is DHCP that PC arranges net playing mode of router, accompanies the survey router lease phase to be set to 1 point Clock, is connected PC with HUB after the completion of arrangement above, and specific environment topological diagram is as shown in Figure 4;
S502 sets up DHCP Offer bags:In the message that will organize in testing protocol consistency environment, purpose MAC (ff: ff:ff:ff:ff:ff/01:00:5e:01:01:Except 01) it is revised as router LAN mouth MAC;
S503 routers normally obtain address;
S504 disconnects and accompanies the netting twine surveyed between router and HUB:Router is normally obtained behind address, the lease phase 1/2 when Between (30s) disconnect and accompany the netting twine surveyed between router and HUB;
S505 sends DHCP Offer bags:Protocol test PC cycles through a large amount of source IP to router 192.168.1.170 DHCP Offer bags;
S506 checks that router obtains IP situations:Check router either with or without address in acquisition offer bags 192.168.1.170;Step S510 is entered if any, otherwise into S507;
S507 stops paying out DHCP Offer bags:If router does not obtain address 192.168.1.170 in offer bags;Association View test PC stops sending DHCP Offer bags;
S508 is reconnected and is accompanied the netting twine surveyed between router and HUB;
S509 checks that router obtains IP situations:Check whether router can correctly obtain address, if then entering S511, Otherwise enter S510;
S510 judges router DHCP dysfunctions;
S511 judges that router DHCP functions are normal.
Compared with existing best technique, it is an advantage of the current invention that:
It is easy to control:The tester of test environment is not known about, only needs to be tested with reference to SOP documents;
Reusable:Test resource is saved, in addition to testing the function, the environment can also carry out the protocol tests such as ARP, port Vulnerability scanning test etc.;
Efficiency high:Test environment is fixed, and is easily understood, and tester is upper quick-moving.
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been described Property concept, then can make other change and modification to these embodiments.So, claims are intended to be construed to include excellent Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out the essence of various changes and modification without deviating from the present invention to the present invention God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising these changes and modification.

Claims (10)

1. a kind of method that simulation DHCP Offer flood, it is characterised in that including step:
Test main frame described in S100 sets up DHCP Offer bags;
S200 routers to be measured, to survey router solicitation IP address is accompanied, treat that the router to be measured successfully gets by hub Described to accompany after the IP address for surveying router distribution, at the 1/2 of lease phase, separated described accompanying surveys router and the hub Between connection;
Test main frame described in S300 sends a large amount of DHCP Offer bags set up by the hub to the router to be measured, The DHCP Offer bags include the source IP address for being supplied to the router to be measured;
Test main frame described in S400 judges whether the router to be measured obtains the source IP address in DHCP Offer bags, if It is, then into step S500, otherwise into step S600;
S500 judges the router DHCP dysfunctions to be measured;
Test main frame described in S600 stops sending the DHCP Offer bags, and survey router and the collection are accompanied described in re-establishing Connection between line device, judges that can the router to be measured obtain to accompany and surveys the IP address that router sends, and if so, then enters step Rapid S700, otherwise into step S500;
S700 judges that router DHCP functions to be measured are normal.
2. the method that a kind of simulation DHCP Offer according to claim 1 flood, it is characterised in that also include:
It is DHCP that S010 arranges the net playing mode of router to be measured, and is accompanied described in arranging the lease phase for surveying router;
S020 is by the test main frame and the hub wired connection, and the survey router accompanies survey router difference with described With the hub wired connection, test environment is set up.
3. the method that a kind of simulation DHCP Offer according to claim 1 flood, it is characterised in that step S200 Including step:
Router to be measured described in S210 sends in a broadcast manner DHCP Discover messages, and IP address is rented in request;
Accompany survey router to receive after the DHCP Discover messages described in S220, to the router to be measured one is sent DHCP Offer messages, the IP address that router can be supplied to the router to be measured to use is surveyed in the message comprising described accompanying And it is described accompany survey router itself IP address;
Router to be measured is received after the DHCP Offer messages described in S230, sends the DHCP Request reports of a broadcast Text, and accompany survey router address and the router Shen to be measured described in adding in the Option Field of the DHCP Request messages IP address please;
Accompany survey router to receive described in S240 and send after the DHCP Request messages response DHCP ACK messages, and described Increase the use lease phase information of the IP address of the router solicitation to be measured in DHCP ACK message Option Fields;
Router to be measured described in S250 is received after the DHCP ACK messages, the IP address of survey router distribution is accompanied described in inspection and is It is no to use, if then the router to be measured successfully obtains the IP address chosen, and used according to the IP address Lease phase automatic continues process;
At moment lease phase 1/2 of the IP address that S260 is obtained in the router to be measured, survey router and institute are accompanied described in disconnection The communication connection between hub is stated, the router to be measured can accompany survey router transmission DHCP Request messages to described Re-rent IP address.
4. the method that a kind of simulation DHCP Offer according to claim 1 flood, it is characterised in that step S100 Including step:
Test main frame described in S110 sets up a large amount of DHCP Offer bags by xcap.
5. the method that a kind of simulation DHCP Offer according to any one of claim 1-4 flood, it is characterised in that described Step S300 includes step:
Test main frame described in S310 cycles through the DHCP of a large amount of establishments by the hub to the router to be measured Offer bags, the DHCP Offer bags include the source IP address for being supplied to the router to be measured.
6. the system that a kind of simulation DHCP Offer flood, it is characterised in that include:Router to be measured, accompany survey router, test Main frame and hub, the router to be measured, accompany survey router and test main frame respectively with the hub wired connection, it is described Test main frame includes:Group bag module, packet sending and receiving module and check judge module, the packet sending and receiving module respectively with it is described Group bag module, inspection judge module are connected, wherein:
The group bag module of the test main frame sets up DHCP Offer bags;
The router to be measured, to survey router solicitation IP address is accompanied, treats that the router to be measured is successfully obtained by the hub Get described accompanying to survey after the IP address that router distributes, at the 1/2 of lease phase, separated described accompanying surveys router and the collection Connection between line device;
The packet sending and receiving module of the test main frame sends described group of bag module by the hub to the router to be measured The substantial amounts of DHCP Offer bags set up, the DHCP Offer bags include the source IP address for being supplied to the router to be measured;
The inspection judge module of the test main frame judges whether the router to be measured is obtained in the DHCP Offer bags Source IP address;
If the inspection judge module of the test main frame judges that the router to be measured is obtained in the DHCP Offer bags Source IP address, then judge the router DHCP dysfunctions to be measured;
If the inspection judge module of the test main frame judges that the router to be measured is not obtained in the DHCP Offer bags Source IP address, the then packet sending and receiving module stopping of the test main frame sends the DHCP Offer bags, re-establishes described accompanying The connection surveyed between router and the hub, the inspection judge module of the test main frame determines whether the road to be measured Can described accompanying be obtained by device and surveys the IP address that router sends, if so, then the inspection judge module of the test main frame judges The router DHCP functions to be measured are normal, and the inspection judge module of otherwise described test main frame judges the router to be measured DHCP dysfunctions.
7. the system that a kind of simulation DHCP Offer according to claim 6 flood, it is characterised in that the test main frame Also include the setup module being connected with the packet sending and receiving module, wherein:
It is DHCP that the setup module of the test main frame arranges the net playing mode of router to be measured, and survey route is accompanied described in arranging The lease phase of device.
8. the system that a kind of simulation DHCP Offer according to claim 6 flood, it is characterised in that router to be measured leads to Hub is crossed to survey router solicitation IP address is accompanied, treats that the router to be measured successfully gets described accompanying and surveys router distribution It is separated at the 1/2 of lease phase to accompany the connection surveyed between router and hub after IP address;Including:
The router to be measured sends in a broadcast manner DHCP Discover messages, and IP address is rented in request;
It is described to accompany survey router to receive after the DHCP Discover messages, send a DHCP to the router to be measured Offer messages, comprising IP address and the institute accompanied and survey that router can be supplied to the router to be measured to use in the message State and accompany the IP address for surveying router itself;
The router to be measured is received after the DHCP Offer messages, sends the DHCP Request messages of a broadcast, and Survey router address and the router solicitation to be measured of accompanying is added in the Option Field of the DHCP Request messages IP address;
It is described to accompany survey router to receive transmission response DHCP ACK messages after the DHCP Request messages, and in the DHCP Increase the use lease phase information of the IP address of the router solicitation to be measured in ACK message Option Fields;
Whether the router to be measured is received after the DHCP ACK messages, accompany the IP address for surveying router distribution described in inspection Enough use, if then the router to be measured successfully obtains the IP address chosen, and lease is used according to the IP address Phase automatic continues process;
At moment lease phase 1/2 of the IP address obtained in the router to be measured, survey router and the collection are accompanied described in disconnection Communication connection between line device, the router to be measured can accompany survey router to send DHCP Request messages to re-rent to described IP address.
9. the system that a kind of simulation DHCP Offer according to claim 6 flood, it is characterised in that the test main frame Group bag module by xcap set up DHCP Offer bags.
10. the system that a kind of simulation DHCP Offer according to any one of claim 6-9 flood, it is characterised in that:
The packet sending and receiving module of the test main frame cycles through a large amount of establishments by the hub to the router to be measured DHCP Offer bags, the DHCP Offer bags are comprising being supplied to the source IP address of the router to be measured.
CN201710079086.5A 2017-02-14 2017-02-14 A kind of method and system that simulation DHCP Offer floods Active CN106603348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710079086.5A CN106603348B (en) 2017-02-14 2017-02-14 A kind of method and system that simulation DHCP Offer floods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710079086.5A CN106603348B (en) 2017-02-14 2017-02-14 A kind of method and system that simulation DHCP Offer floods

Publications (2)

Publication Number Publication Date
CN106603348A true CN106603348A (en) 2017-04-26
CN106603348B CN106603348B (en) 2019-10-11

Family

ID=58587488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710079086.5A Active CN106603348B (en) 2017-02-14 2017-02-14 A kind of method and system that simulation DHCP Offer floods

Country Status (1)

Country Link
CN (1) CN106603348B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667953A (en) * 2018-04-27 2018-10-16 四川斐讯信息技术有限公司 A kind of the lease function test method and system, test device of DHCP service
CN113740748A (en) * 2021-09-03 2021-12-03 深圳市新威尔电子有限公司 Battery detection method for sending message based on CAN bus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453495A (en) * 2008-12-30 2009-06-10 杭州华三通信技术有限公司 Method, system and equipment for preventing authentication address resolution protocol information loss
CN102438028A (en) * 2012-01-19 2012-05-02 神州数码网络(北京)有限公司 Method, device and system for preventing fraud of dynamic host configuration protocol (DHCP) server
CN103701825A (en) * 2013-12-31 2014-04-02 工业和信息化部电子第五研究所 Security testing system oriented to mobile intelligent terminal IPv6 protocol and application of protocol
EP2757743A1 (en) * 2011-11-16 2014-07-23 Huawei Technologies Co., Ltd Method, device, apparatus and system for generation of dhcp snooping binding table
CN104009967A (en) * 2013-02-27 2014-08-27 上海斐讯数据通信技术有限公司 Method for preventing attack of untrusted servers
CN105323120A (en) * 2015-11-26 2016-02-10 上海斐讯数据通信技术有限公司 Test method, test device and test terminal for DHCP service side

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453495A (en) * 2008-12-30 2009-06-10 杭州华三通信技术有限公司 Method, system and equipment for preventing authentication address resolution protocol information loss
EP2757743A1 (en) * 2011-11-16 2014-07-23 Huawei Technologies Co., Ltd Method, device, apparatus and system for generation of dhcp snooping binding table
CN102438028A (en) * 2012-01-19 2012-05-02 神州数码网络(北京)有限公司 Method, device and system for preventing fraud of dynamic host configuration protocol (DHCP) server
CN104009967A (en) * 2013-02-27 2014-08-27 上海斐讯数据通信技术有限公司 Method for preventing attack of untrusted servers
CN103701825A (en) * 2013-12-31 2014-04-02 工业和信息化部电子第五研究所 Security testing system oriented to mobile intelligent terminal IPv6 protocol and application of protocol
CN105323120A (en) * 2015-11-26 2016-02-10 上海斐讯数据通信技术有限公司 Test method, test device and test terminal for DHCP service side

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667953A (en) * 2018-04-27 2018-10-16 四川斐讯信息技术有限公司 A kind of the lease function test method and system, test device of DHCP service
CN113740748A (en) * 2021-09-03 2021-12-03 深圳市新威尔电子有限公司 Battery detection method for sending message based on CAN bus
CN113740748B (en) * 2021-09-03 2024-04-26 深圳市新威尔电子有限公司 Battery detection method based on CAN bus sending message

Also Published As

Publication number Publication date
CN106603348B (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN110430096A (en) A kind of gateway test method and equipment
CN100536438C (en) Method for testing DHCPv6 service and client
CN105743684B (en) The configuration method and router of router under a kind of ap mode
US20120084415A1 (en) Method and equipment for self-configuring transmission in self-organized network
CN105847343B (en) Public network information detection method, apparatus and system for point-to-point transmission
CN101729500A (en) Method, device and system for identifying IP session
CN107770012A (en) A kind of broad band access method, device and virtual broadband RAS system
CN108667672A (en) A kind of automatic adaptation method and router of LAN interface and wan interface
CN104935564B (en) Make the equipment based on mDNS agreements and service the method found mutually in a local network
CN103200030B (en) The apparatus and method of network management
CN111447302B (en) Method and system for simulating multi-client to test DHCP (dynamic host configuration protocol) by using raw socket
CN105635335B (en) Social resources cut-in method, apparatus and system
CN102185766A (en) Unicast forwarding method and forwarding equipment for responding messages by DHCP (Dynamic host configuration protocol) server
CN104539483A (en) Network testing system
CN103516567A (en) Method and system for equipment discovery and server
CN105376754A (en) Method for testing number of connectable wireless users of router
CN106603348A (en) DHCP Offer flooding simulation method and system
CN103401954A (en) Implementation method of virtual DHCP (dynamic host configuration protocol)
CN105338131B (en) The test method and system of a kind of Dynamic Host Configuration Protocol server address tankage
CN102075588B (en) Method and system for realizing network address translation (NAT) transversing and equipment
CN111225080B (en) Method for acquiring gateway down-hanging equipment information
WO2016161716A1 (en) Multicast data stream monitoring method and device, and multicast forwarding device
CN105262628A (en) Campus dormitory network management system based on multi-operator link sharing
CN104065630A (en) IPv6 network-orientated detection method for counterfeit source address messages
CN109981813A (en) Message processing method and device

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201105

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240410

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Country or region after: China

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right