CN101083670B - Address distributing system and method - Google Patents

Address distributing system and method Download PDF

Info

Publication number
CN101083670B
CN101083670B CN2006100609617A CN200610060961A CN101083670B CN 101083670 B CN101083670 B CN 101083670B CN 2006100609617 A CN2006100609617 A CN 2006100609617A CN 200610060961 A CN200610060961 A CN 200610060961A CN 101083670 B CN101083670 B CN 101083670B
Authority
CN
China
Prior art keywords
address
layer address
client
numeral
pair
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
Application number
CN2006100609617A
Other languages
Chinese (zh)
Other versions
CN101083670A (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.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry 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 Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CN2006100609617A priority Critical patent/CN101083670B/en
Publication of CN101083670A publication Critical patent/CN101083670A/en
Application granted granted Critical
Publication of CN101083670B publication Critical patent/CN101083670B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

Address allocation system includes client end and server. Being connected to client end through communication, the server includes the setting module, detecting module, and converting module. The setting module is in use for setting up filtering code. The detecting module is in use for detecting whether address in physical layer at client end is corresponding to address in network layer; if yes, the detecting module converts address in physical layer to address in network layer, and assigns the address in network layer to the client end. The invention also discloses a method for allocating addresses. Using the detecting module and converting module to allocate addresses in network layer, the invention and method establishes coincidence relation between address in physical layer at client end and allocated address in network layer directly, and further reduces time for allocating and determining address in network layer for client end.

Description

Address allocation system and method
Technical field
The present invention relates to address allocation system and method, relate in particular to dynamic host allocation protocol address allocation system and method.
Background technology
DHCP (DHCP) is a kind of DynamicHost combination protocol, and it is divided into two parts: one is server (DHCP Server), and another is client (DHCP Client).All Internet protocols (IP) address all is by the Dynamic Host Configuration Protocol server centralized management, and is responsible for handling the DHCP request of client, and client then can be used the IP address from server-assignment.
In process by many clients of server test, need know the IP address of client usually in advance, can carry out test operation to client.In the prior art, in order to determine the IP address of client, must be stored in the address corresponding lists in the Dynamic Host Configuration Protocol server according to medium access control (MAC) address lookup of client.If include many clients in the network environment, the IP address of then inquiring about every client will take a long time, and testing efficiency is lower.
Summary of the invention
For solving the deficiency that above-mentioned prior art exists, a kind of address allocation system need be provided, with the direct corresponding relation between the network layer address of the physical layer address of setting up client and distribution, and then reduce time of the network layer address of distribution and definite client.
In addition, also need to provide a kind of address allocation system,, and then reduce and distribute and time of the network layer address of definite client with the direct corresponding relation between the network layer address of the physical layer address of setting up client and distribution.
A kind of address allocation system comprises client and server.Server is connected with the client communication, and comprises setting module, detection module, and modular converter.Setting module is used to set filtering code.Whether detection module is used to detect the physical layer address of client corresponding to filtering code.Modular converter is used for when detection module detects physical layer address corresponding to filtering code, first pair of numeral of physical layer address, the second pair of numeral and the 3rd pair of numeral are converted to Any Digit between 0~255, as first of network layer address after the conversion, and change metric principle according to hexadecimal the 4th pair of numeral of described physical layer address, the 5th pair of numeral and the 6th pair of numeral are converted to second, the 3rd and the 4th of network layer address after the conversion, and network layer address is distributed to client.
A kind of address distribution method is applied to comprise that this address distribution method may further comprise the steps in the address allocation system of client and server: set filtering code by server; Send distribution address Request Packet to server by client, distribute the address Request Packet to comprise the physical layer address of this client; Judge that by server whether physical layer address is corresponding to filtering code; And if physical layer address is corresponding to filtering code, then first pair of numeral of physical layer address, the second pair of numeral and the 3rd pair of numeral are converted to the Any Digit between 0~255, as first of network layer address after the conversion, and change metric principle according to hexadecimal and the 4th pair of numeral of described physical layer address, the 5th pair of numeral and the 6th pair of numeral are converted to second, the 3rd and the 4th of network layer address after the conversion.
Address allocation system of the present invention and method are by detection module and modular converter distribution network layer address, set up the direct corresponding relation between the network layer address of the physical layer address of client and distribution, and and then reduced and distributed and time of the network layer address of definite client.
Description of drawings
Fig. 1 is the Organization Chart of address allocation system of the present invention.
Fig. 2 is the flow chart of address distribution method of the present invention.
Embodiment
See also Fig. 1, be depicted as the Organization Chart of address allocation system 100 of the present invention.
In the present embodiment, address allocation system 100 is applied in the communication system, and address allocation system 100 comprises server 110 and client 120, and server 110 is online by network 130 and client 120.Server 110 is a computer, and server 110 can pass through DHCP, and (Dynamic Host ConfigurationProtocol is that client 120 is distributed the address DHCP).Client 120 is modulator-demodulator (Modem) or switch (Switch), and network 130 comprises Ethernet (Ethernet).
The server 110 of address allocation system 100 comprises setting module 1100, detection module 1102, alarm module 1104 and modular converter 1106, and the client 120 of address allocation system 100 comprises determination module 1202.
Setting module 1100 is used to set filtering code.In the present embodiment, filtering code is 6 bit digital 000123.
Detection module 1102 is used to judge the filtering code that request distributes physical layer (Physical layer) address of the client 120 of address whether to set corresponding to setting module 1100.In the present embodiment, physical layer address is medium access control (Medium Access Control, MAC) address.Whether preceding 6 bit digital of the physical layer address of the client 120 of detection module 1102 comparison of request distribution address equal the filtering code 000123 that setting module 1100 is set.If preceding 6 bit digital of the physical layer address of client 120 equal filtering code 000123, then have the right request server 110 of this client 120 distributes addresses.If preceding 6 bit digital of the physical layer address of client 120 are not equal to filtering code 000123, then client 120 is had no right request server 110 and is distributed addresses.
Alarm module 1104 is used to send warning message.In the present embodiment, when preceding 6 bit digital that detect the physical layer address of client 120 when detection module 1102 were not equal to the filtering code that setting module 1100 sets, alarm module 1104 sent warning message.
Modular converter 1106 is used for the physical layer address of client 120 is converted to network layer address, and network layer address is distributed to client 120.In the present embodiment, network layer address is Internet protocol (InternetProtocol, IP) address.
Because physical layer address is made up of 12 hexadecimal digits, and per two a pair of numerals of adjacent numeral formation, so physical layer address is formed 6 pairs of numerals altogether.Promptly the 1st bit digital and the 2nd bit digital constitute first pair of numeral, and the 3rd bit digital and the 4th bit digital constitute second pair of numeral, and the rest may be inferred.Modular converter 1106 is converted to Any Digit between 0~255 with first pair of numeral, the second pair of numeral and the 3rd pair of numeral, as first of the network layer address after the conversion.Simultaneously, modular converter 1106 changes second, third and the 4th that metric principle is converted to the 4th pair of numeral of physical layer address, the 5th pair of numeral and the 6th pair of numeral network layer address according to hexadecimal.
For example, if physical layer address is 00:01:23:11:00:EF, then according to above-mentioned conversion principle, modular converter 1106 can be converted to 168 with first pair of numeral in this physical layer address 00, second pair of numeral 01 and the 3rd pair of numeral 23, as first of network layer address after the conversion, and the 4th pair of numeral 11, the 5th pair of numeral 00 and the 6th couple of digital EF be converted to 17,0 and 239, as second, third and the 4th of the network layer address after the conversion.Thus, the network layer address after the conversion is 168.17.0.239.
Determination module 1202 is used to judge the network layer address of whether accepting modular converter 1106 conversions.Be specially, because under network environment, exist two clients 120 to be assigned with the situation of consolidated network layer address, determination module 1202 can be by sending address flush agreement (Address Resolution Protocol, ARP) package to network 130 detects on the network whether have the client 120 with consolidated network layer address, thereby avoids taking place the network layer address conflict.
See also Fig. 2, be depicted as the flow chart of address distribution method of the present invention.
Enter step S200, setting module 1100 is set filtering code.
Enter step S202, client 120 sends distributes the address Request Packet to server 110.Distributing the address Request Packet is that DHCP shows (DHCP Discover) package, and DHCP shows that package comprises the physical layer address of client 120.
Enter step S204, detection module 1102 is judged the filtering code whether physical layer address of client 120 is set corresponding to setting module 1100.If the physical layer address of client 120 does not correspond to the filtering code that setting module 1100 is set, then enter step S206, alarm module 1104 sends warning message.If the filtering code that the physical layer address of client is set corresponding to setting module 1100 then enters step S208.
In step S208, modular converter 1106 is converted to network layer address with the physical layer address of client 120.In the present embodiment, modular converter 1106 can be converted to first pair of numeral in this physical layer address, the second pair of numeral and the 3rd pair of numeral Any Digit between 0~255, as first of network layer address after the conversion, and change second, third and the 4th that metric principle is converted to the 4th pair of numeral of physical layer address, the 5th pair of numeral and the 6th pair of numeral network layer address according to hexadecimal.It should be noted that the present invention is not limited to above-mentioned conversion regime, also can be other known conversion regime.
Enter step S210, server 110 sends and distributes the address response package to client 120.In the present embodiment, distribute the address response package to provide (DHCP Offer) package for DHCP, DHCP provides response to comprise the network layer address after modular converter 1106 conversions and the rental period (Lease time) of this network layer address.
Enter step S212, determination module 1202 is judged the network layer address whether reception server 110 sends.If determination module 1202 is judged the not network address of reception server 110 transmissions, then return step S202.If determination module 1202 is judged the network layer address that reception server 110 sends, then enter step S214.
In step S214, client 120 sends confirms that the rental period package is to server 110.In the present embodiment, confirm that the rental period package is dhcp request (DHCP request) package.The dhcp request package is used for notification server 110, and client 120 has been accepted the rental period that server 110 provides.
In step S216, server 110 sends the Address Confirmation package to client 120.In the present embodiment, the Address Confirmation package is that DHCP is confirmed (DHCP Ack) package.DHCP confirms that package is used to the network layer address of informing that client 120 can use server 110 to distribute.
Whether address allocation system 100 of the present invention and method detect the physical layer address of client 120 corresponding to predefined filtering code by detection module 1102, and the physical layer address of client 120 is converted to network layer address by modular converter 1106, thereby the MAC Address of realization client is direct corresponding with IP address allocated, to reduce the time of the IP address of determining client 120.

Claims (10)

1. address allocation system comprises:
Client;
Server is connected with described client communication, comprising:
Setting module is used to set filtering code;
Whether detection module is used to detect the physical layer address of described client corresponding to described filtering code; And
Modular converter, be used for when described detection module detects described physical layer address corresponding to described filtering code, first pair of numeral with described physical layer address, the second pair of numeral and the 3rd pair of numeral are converted to the Any Digit between 0~255, as first of network layer address after the conversion, and change the four pair numeral of metric principle with described physical layer address according to hexadecimal, the 5th pair of numeral and the 6th pair of numeral are converted to second of network layer address after the conversion, the 3rd and the 4th, and described network layer address distributed to described client.
2. address allocation system as claimed in claim 1 is characterized in that, also comprises alarm module, is used to send warning message.
3. address allocation system as claimed in claim 2, it is characterized in that, when preceding 6 bit digital that detect the physical layer address of described client when described detection module were not equal to the described filtering code that described setting module sets, described alarm module sent described warning message.
4. address allocation system as claimed in claim 2 is characterized in that described client also comprises determination module, is used for judging whether accept described network layer address.
5. address allocation system as claimed in claim 1 is characterized in that, described physical layer address is the medium access control address.
6. address allocation system as claimed in claim 1 is characterized in that, described network layer address is an Internet Protocol address.
7. address distribution method is applied to comprise that described address distribution method comprises step in the address allocation system of client and server:
Set filtering code by described server;
Send distribution address Request Packet to described server by described client, described distribution address Request Packet comprises the physical layer address of described client;
Whether detect described physical layer address corresponding to described filtering code by described server;
If described physical layer address is corresponding to described filtering code, then first pair of numeral of described physical layer address, the second pair of numeral and the 3rd pair of numeral are converted to the Any Digit between 0~255, as first of network layer address after the conversion, and change metric principle according to hexadecimal and the 4th pair of numeral of described physical layer address, the 5th pair of numeral and the 6th pair of numeral are converted to second, the 3rd and the 4th of network layer address after the conversion; And
If described physical layer address does not correspond to described filtering code, then send the step of warning by described server.
8. address distribution method as claimed in claim 7, it is characterized in that, also comprising sending by described server distributes the step of address response package to described client, described distribution address response package to comprise the network layer address after the conversion and the rental period of described network layer address.
9. address distribution method as claimed in claim 8 is characterized in that, also comprises:
Judge whether receive the network layer address that described server sends by described client;
If judge the network layer address that receives described server transmission by described client, then described client sends confirms that the rental period package is to described server.
10. address distribution method as claimed in claim 9, it is characterized in that, comprise that also described server sends the Address Confirmation package to described client after receiving described affirmation rental period package, can use the step of the described network layer address that described server distributed to confirm described client.
CN2006100609617A 2006-06-02 2006-06-02 Address distributing system and method Expired - Fee Related CN101083670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006100609617A CN101083670B (en) 2006-06-02 2006-06-02 Address distributing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006100609617A CN101083670B (en) 2006-06-02 2006-06-02 Address distributing system and method

Publications (2)

Publication Number Publication Date
CN101083670A CN101083670A (en) 2007-12-05
CN101083670B true CN101083670B (en) 2010-09-29

Family

ID=38912934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006100609617A Expired - Fee Related CN101083670B (en) 2006-06-02 2006-06-02 Address distributing system and method

Country Status (1)

Country Link
CN (1) CN101083670B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465842B (en) * 2007-12-21 2012-05-23 瑞昱半导体股份有限公司 Enactment method of integrated circuit as well as circuit and application thereof
CN105635326A (en) * 2014-10-27 2016-06-01 国基电子(上海)有限公司 Network equipment and IP address assignment method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6393484B1 (en) * 1999-04-12 2002-05-21 International Business Machines Corp. System and method for controlled access to shared-medium public and semi-public internet protocol (IP) networks
CN1585362A (en) * 2004-05-28 2005-02-23 港湾网络有限公司 Method for direct processing user IP address through local DHCP-SERVER
CN1661991A (en) * 2004-02-26 2005-08-31 日本电气株式会社 Subscriber line accommodation device and packet filtering method
CN1695341A (en) * 2002-11-06 2005-11-09 艾利森电话股份有限公司 Method and arrangement for preventing illegitimate use of IP addresses
CN1756239A (en) * 2004-09-27 2006-04-05 日本电气株式会社 Subscriber line accommodation apparatus and grouping filter method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6393484B1 (en) * 1999-04-12 2002-05-21 International Business Machines Corp. System and method for controlled access to shared-medium public and semi-public internet protocol (IP) networks
CN1695341A (en) * 2002-11-06 2005-11-09 艾利森电话股份有限公司 Method and arrangement for preventing illegitimate use of IP addresses
CN1661991A (en) * 2004-02-26 2005-08-31 日本电气株式会社 Subscriber line accommodation device and packet filtering method
CN1585362A (en) * 2004-05-28 2005-02-23 港湾网络有限公司 Method for direct processing user IP address through local DHCP-SERVER
CN1756239A (en) * 2004-09-27 2006-04-05 日本电气株式会社 Subscriber line accommodation apparatus and grouping filter method

Also Published As

Publication number Publication date
CN101083670A (en) 2007-12-05

Similar Documents

Publication Publication Date Title
US10298724B2 (en) Communication device and method for transmitting data within an industrial automation system
US6690669B1 (en) Communicating method between IPv4 terminal and IPv6 terminal and IPv4-IPv6 converting apparatus
US6118784A (en) Communicating method between IPv4 terminal and IPv6 terminal and IPv4-IPv6 converting apparatus
CN101179603B (en) Method and device for controlling user network access in IPv6 network
US20040071148A1 (en) Information device, gateway device and control method
CN101277261B (en) Identifier assigning device, identifier assigning system and information processing method
CN102761499B (en) Gateway and method for preventing same from being attacked
CN101188514A (en) Method, device and system for automatically discovering network element device
US20090070488A1 (en) Data Communication Method
WO2003025777A1 (en) Automatic remote assignment of internet protocol address information to a network device
CN101179515B (en) Method and device for inhibiting black hole routing
CN101083670B (en) Address distributing system and method
JP5660602B2 (en) Communication system, VPN gateway apparatus, and communication method used therefor
CN103327130A (en) Method, terminal and system for reusing MAC address
CN101242354B (en) Data transmission method, system and device
KR20020042180A (en) Automatic management method for socket of mobile communication system
CN106161595B (en) Industrial Internet-based process control real-time communication method, device and system
TWI311425B (en) Address allocation system and method
CN103414800A (en) Allocation and selection method and system of distributed relay servers in NAT traversal
EP2238735B1 (en) Method and apparatus for allocation of parameter values in a communications system
JP2007081456A (en) Converter
RU2765121C1 (en) Method for organizing streaming, method for providing information about the streaming identifier, use of a dns server, device, computer program and machine-readable medium
CN101170546B (en) Data stream multiplexing method and data stream multiplexing system
CN102025575B (en) Cable modem and method for connecting computers to internet by utilizing same
CN104363310A (en) Device IP configuring method

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100929

Termination date: 20110602