CN101616190B - Network equipment with address network segment recognizing function - Google Patents
Network equipment with address network segment recognizing function Download PDFInfo
- Publication number
- CN101616190B CN101616190B CN2008101257864A CN200810125786A CN101616190B CN 101616190 B CN101616190 B CN 101616190B CN 2008101257864 A CN2008101257864 A CN 2008101257864A CN 200810125786 A CN200810125786 A CN 200810125786A CN 101616190 B CN101616190 B CN 101616190B
- Authority
- CN
- China
- Prior art keywords
- network segment
- value
- maximum
- segment value
- minimum
- 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.)
- Expired - Fee Related
Links
Images
Abstract
The invention relates to a network segment judging method with an address network segment recognizing function applied in network equipment, which comprises the following steps: receiving an input address network segment and carrying out coding program on the input address network segment so as to generate a maximal input network segment value and a minimal input network segment value; loading the recorded address network segments and generating a corresponding maximal recorded network segment value and a minimal recorded network segment value according to each recorded address network segment; respectively comparing the recorded address network segments; and executing a return step so as to inform a user whether network segment overlap occurs or not.
Description
Technical field
The present invention relates to a kind of network equipment, particularly a kind of network equipment with address network segment recognizing function.
Background technology
Be that many Internet Protocol addresss (Internet Protocol Address is hereinafter to be referred as the IP address) constitute in the network architecture.Each main frame all can be endowed an independent IP address, makes can carry out communication between each main frame.The Internet management committee has defined A, B, C, D, five types of addresses of E, in every type of address, has also stipulated network numbering and main frame numbering.In ICP/IP protocol, the IP address occurs with the binary digit form, is total to 32bit, and 1bit is exactly 1 in the binary system, and the people reads and memory but this form is not suitable for very much.Therefore a kind of " Dotted decimal notation " expression IP address is adopted in the decision of the Internet management committee: in the user oriented file; Be expressed as four decimal integers that separate with round dot intuitively by four sections IP addresses of 32 that constitute; Wherein, the corresponding byte (being that a byte is called a section with 8 positions in this manual) of each integer.
In order effectively to use the IP address, can internal network be cut into a plurality of sub-networks in many units.But in assignment procedure, the problem whether network segment that user and can't confirming sets can overlap.If it is overlapping that the network segment takes place, then will cause two main frames in the network segment can't be online smoothly.
Prior art is that each selects an IP address arbitrarily from two network segments, if this IP address comes across respectively in two network segments, thinks that then two network segments have overlapping.But such account form need rely on choosing the IP address and comparing other IP address of repetition, and the efficient that so can cause searching reduces.The complexity of the algorithm of prior art is " O (f (n)) ", and n is the quantity of the network segment.So the network segment of comparing when desire is many more, then the speed of comparison will be more low.
Summary of the invention
Whether in view of above problem, main purpose of the present invention is to provide a kind of network segment determination methods with address network segment recognizing function, overlapping in order to judge the newly-increased network segment and the network segment that is write down.
For achieving the above object; A kind of network segment determination methods that the present invention disclosed with address network segment recognizing function; Be applied in the network equipment; Network segment determination methods may further comprise the steps: receive the INADD network segment, and the INADD network segment is carried out coding step, in order to produce maximum input network segment value and minimum input network segment value; Load the recording address network segment, and the recording address network segment carried out coding step, based on each the recording address network segment produce that corresponding maximum has write down network segment value and minimum has write down network segment value; Compare respectively each group maximum write down to find out between network segment value and the minimum section that has write down network segment value include maximum input network segment value and the minimum section of importing network segment value; Wherein when " | minimum has write down network segment value-maximum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " greater than 0 the time, then set maximum and estimate the value of the network segment for " | minimum has write down network segment value-maximum and imported network segment value | "; When " | minimum has write down network segment value-maximum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " less than 0 the time, then maximum estimates the value of the network segment for " | maximum has write down network segment value-minimum and imported network segment value | "; If maximum estimate the network segment greater than " | minimum input network segment value-maximum input network segment value |+| minimum has write down network segment value-maximum and has write down network segment value | " time, the INADD network segment and the recording address network segment is not overlapping then; Carry out the repayment step, include maximum input network segment value in order to repayment and give the user with the network segment of recording address of the section of minimum input network segment value.
Whether the present invention also provides a kind of overlapping discrimination method of address network segment that quickens, and makes that the present invention can be than prior art more under the prerequisite of simplified hardware cost, and find out the input network segment fast and write down the network segment and have overlapping.
Describe the present invention below in conjunction with accompanying drawing and specific embodiment, but not as to qualification of the present invention.
Description of drawings
Fig. 1 is a network equipment configuration diagram of the present invention;
Fig. 2 is an operation workflow sketch map of the present invention.
Wherein, Reference numeral
100 network equipments
110 storage elements
111 network segment determining programs
112 repayment programs
120 arithmetic elements
Embodiment
Please refer to shown in Figure 1ly, it is a network equipment configuration diagram of the present invention.The network equipment described in this enforcement aspect can be but not be defined as router (router), bridger (bridge), gateway (gateway) or switch the arbitrary of hub (switch hub).The present invention also is applied in the identification of the 4th edition of the Internet protocol address network address in (Internet Protocol version 4 is called for short IPv4).Include in the network equipment 100: storage element 110, network segment determining program 111, repayment program 112 and arithmetic element 120.Storage element 110 is in order to store many recording address network segment and network segment determining programs 111.Arithmetic element 120 electrically connects storage element 110, and arithmetic element 120 is in order to carry out network segment determining program 111.
Please refer to shown in Figure 2ly, it is an operation workflow sketch map of the present invention.May further comprise the steps in the network segment determining program 111: receive the INADD network segment, and the INADD network segment is carried out coding step, in order to produce a maximum input network segment value and a minimum input network segment value (step S210).Wherein, coding step is the arbitrary of binary coding, decimal coded or hexadecimal code, and coding result is arranged according to small end (little end) mode.
Load the recording address network segment, and the recording address network segment carried out coding step, according to each the recording address network segment produce that corresponding maximum has write down network segment value and minimum has write down network segment value (step S220).Compare respectively each group maximum write down to find out between network segment value and the minimum section that has write down network segment value include maximum input network segment value and the minimum section (step S230) of importing network segment value.In the process of comparison the present invention system utilize following formula to the input network segment with write down the network segment compare (step S240).
When " | minimum has write down network segment value-maximum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " greater than 0 the time, then set maximum and estimate the value (step S241) of the network segment for " | minimum has write down network segment value-maximum and imported network segment value | ".
When " | minimum has write down network segment value-maximum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " less than 0 the time, then maximum estimates the value (step S242) of the network segment for " | maximum has write down network segment value-minimum and imported network segment value | ".
If maximum estimate the network segment greater than " | minimum input network segment value-maximum input network segment value |+| minimum has write down network segment value-maximum and has write down network segment value | " time, then the INADD network segment and the recording address network segment not overlapping (step S250).
Carry out the corresponding repayment step of repayment program, in order to repayment give the user and inform maximum input network segment value with minimum import between network segment value section whether with the recording address network segment overlapped (step S260).The repayment step of repayment program 112 can be by the picture of warning audio, caution light or message being shown in screen to the user.
For clearly demonstrating running of the present invention spirit, an example is proposed as explanation at this, be not only to be confined to this one to implement aspect, this with chat earlier bright.Suppose that the INADD network segment is 1.2.3.4~1.2.6.6, the record network segment is 1.2.5.5~1.2.7.8, judges whether the INADD network segment and the recording address network segment have overlapping.
At first, 1.2.3.4 and 1.2.6.6 are utilized hexadecimal code and arrange its result according to the small end mode, so obtain 0x01020304 and 0x01020606 respectively, wherein " 0x " representes hexadecimal.In like manner push away to such an extent that 1.2.5.5 and 1.2.7.8 produce 0x01020505 and 0x01020708 respectively.Maximum input network segment value is that " 0x01020606 ", minimum input network segment value are " 0x01020505 " for " 0x01020304 ", maximum have write down network segment value for " 0x01020708 " write down network segment value with minimum.
Then, judge " | maximum input network segment value-minimum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " whether greater than 0.Above-mentioned numerical value brought into can obtain (| 0x01020606-0x01020505|-|0x01020708-0x01020304|)=(10110-40410).Can know its value less than 0 by The above results, be " | 0x01020708-0x01020304| " so maximum estimates network segment value.In other words, to estimate the number of network segment value open ended IP address in this two networkings section be 0x404 to maximum.
And calculate " | maximum input network segment value-minimum imported network segment value |+| maximum has write down network segment value-minimum and has write down network segment value | " value, can obtain after bringing above-mentioned numerical value into this formula (| 0x01020606-0x01020304|+|0x01020708-0x01020505|)=0x505.At last; The comparison maximum estimate network segment value whether greater than " | minimum input network segment value-maximum imported network segment value |+| minimum has write down network segment value-maximum and has write down network segment value | "; Maximum estimates network segment value for " 0x404 " in this embodiment, and " | minimum input network segment value-maximum imported network segment value |+| minimum has write down network segment value-maximum and has write down network segment value | " be to be " 0x505 ".After above-mentioned comparison, maximum estimate network segment value less than " | minimum input network segment value-maximum imported network segment value |+| minimum has write down network segment value-maximum and has write down network segment value | ", so the INADD network segment has been contained in the input position network segment.
A kind of overlapping discrimination method of address network segment that quickens also is provided in the network equipment 100 of the present invention, has made that the present invention can be than prior art more under the prerequisite of simplified hardware cost, and found out the input network segment fast and write down the network segment and whether have overlapping.The present invention can be lowered into the complexity of network segment recognizing " O (1) ", and the present invention need not rely on the comparison of network segment address, so can improve the speed of identification.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.
Claims (5)
1. the network segment determination methods with address network segment recognizing function is applied to it is characterized in that in the network equipment, and this network segment determination methods may further comprise the steps:
Receive an INADD network segment, and this INADD network segment is carried out a coding step, in order to produce a maximum input network segment value and a minimum input network segment value;
Load the recording address network segment, and to those the recording address network segment carry out this coding step, based on each this recording address network segment produce that a corresponding maximum has write down network segment value and a minimum has write down network segment value;
Comparing each this maximum of group has respectively write down to find out between the section that network segment value and this minimum write down network segment value and has included the section that this maximum input network segment value and this minimum are imported network segment value; Wherein when " | minimum has write down network segment value-maximum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " greater than 0 the time, then set maximum and estimate the value of the network segment for " | minimum has write down network segment value-maximum and imported network segment value | "; When " | minimum has write down network segment value-maximum input network segment value |-| maximum has write down network segment value-minimum input network segment value | " less than 0 the time, then maximum estimates the value of the network segment for " | maximum has write down network segment value-minimum and imported network segment value | "; If maximum estimate the network segment greater than " | minimum input network segment value-maximum input network segment value |+| minimum has write down network segment value-maximum and has write down network segment value | " time, the INADD network segment and the recording address network segment is not overlapping then; And
Carry out a repayment step, give the user and inform in order to repayment and this maximum input network segment value and this minimum import section between network segment value whether the recording address network segment is overlapping with this.
2. the network segment determination methods with address network segment recognizing function according to claim 1 is characterized in that, this network equipment is router, bridger, gateway or switches hub.
3. the network segment determination methods with address network segment recognizing function according to claim 1 is characterized in that, this address network segment is the 4th edition of Internet protocol.
4. the network segment determination methods with address network segment recognizing function according to claim 1; It is characterized in that; This coding step utilizes binary coding, decimal coded or hexadecimal code that this INADD network segment is encoded, and coding result is arranged according to the small end mode.
5. the network segment determination methods with address network segment recognizing function according to claim 1 is characterized in that, this repayment step is caution audio, caution light or show message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101257864A CN101616190B (en) | 2008-06-25 | 2008-06-25 | Network equipment with address network segment recognizing function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101257864A CN101616190B (en) | 2008-06-25 | 2008-06-25 | Network equipment with address network segment recognizing function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101616190A CN101616190A (en) | 2009-12-30 |
CN101616190B true CN101616190B (en) | 2012-07-11 |
Family
ID=41495588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008101257864A Expired - Fee Related CN101616190B (en) | 2008-06-25 | 2008-06-25 | Network equipment with address network segment recognizing function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101616190B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI762995B (en) * | 2020-08-07 | 2022-05-01 | 中華電信股份有限公司 | System and method for communication site tagging associated with network flows |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1574773A (en) * | 2003-06-03 | 2005-02-02 | 华为技术有限公司 | Method for implementing address overlapping in gateway address and network address conversion pool |
CN1697445A (en) * | 2004-05-12 | 2005-11-16 | 华为技术有限公司 | Implementation method for transferring data in virtual private network |
CN1960313A (en) * | 2005-11-03 | 2007-05-09 | 中兴通讯股份有限公司 | Periphery devices of service provider of combining network address conversion, and method of application |
-
2008
- 2008-06-25 CN CN2008101257864A patent/CN101616190B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1574773A (en) * | 2003-06-03 | 2005-02-02 | 华为技术有限公司 | Method for implementing address overlapping in gateway address and network address conversion pool |
CN1697445A (en) * | 2004-05-12 | 2005-11-16 | 华为技术有限公司 | Implementation method for transferring data in virtual private network |
CN1960313A (en) * | 2005-11-03 | 2007-05-09 | 中兴通讯股份有限公司 | Periphery devices of service provider of combining network address conversion, and method of application |
Also Published As
Publication number | Publication date |
---|---|
CN101616190A (en) | 2009-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2608464C2 (en) | Device, method and network server for detecting data structures in data stream | |
CN108259347B (en) | Message transmission method and device | |
CN109639579B (en) | Multicast message processing method and device, storage medium and processor | |
CN111444067A (en) | Rule engine-based configuration system monitoring method, device and equipment | |
CN102035899B (en) | Method and device for determining addresses in IPv6 (internet protocol version 6) based LAN (local area network) | |
CN112738116A (en) | SID compression method and device based on SRV6 protocol | |
CN114244842B (en) | Secure resource scheduling method and device, electronic equipment and storage medium | |
CN101616190B (en) | Network equipment with address network segment recognizing function | |
US20200293997A1 (en) | Maintenance staff scheduling method based on compound internet of things (iot) and iot system | |
CN109740304A (en) | A kind of vehicle diagnosis right management method and relevant device | |
CN111694692B (en) | Data storage erasure method, device and equipment and readable storage medium | |
CN102137016A (en) | Network address translation table entry hot backup method and device | |
CN110519715A (en) | The addressing method and device of mobile terminal | |
CN111225077A (en) | Network distribution method, device and system for Internet of things equipment | |
CN102752189B (en) | A kind of method and apparatus processing message | |
CN111683036B (en) | Data storage method and device and message identification method and device | |
CN103955445A (en) | Data processing method, processor, and data processing equipment | |
CN110213400B (en) | Method for quickly and automatically constructing DNS (Domain name Server) scheduling ACL (Access control List) | |
CN109802872B (en) | Message capturing method, device and equipment | |
CN114844658A (en) | Method, device and storage medium for determining home source address | |
CN103095474B (en) | A kind of computer implemented method of TUP message pairing | |
CN113194071B (en) | Method, system and medium for detecting DDoS (distributed denial of service) based on unsupervised deep learning in SDN (software defined network) | |
CN109547389B (en) | Code stream file recombination method and device | |
CN110995700A (en) | Malformed IP message detection method, equipment and storage medium | |
CN113569103B (en) | Technical scheme self-matching method, electronic equipment and storage medium in coal chemical industry |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120711 Termination date: 20190625 |
|
CF01 | Termination of patent right due to non-payment of annual fee |