Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
In communication network; The transmission of data message all is based on certain communication protocol in the network packet; Data message all has the restriction of a length in the process of transmission, this certain in a kind of communication protocol above one deck the maximum data message size that can pass through just be called MTU MTU (MaximumTransmission Unit).
Wherein, MTU MTU is relevant with maximum transfer size MSS (Maximum Segment Size).Maximum transfer size MSS is meant the maximum data segmentation that the tcp data bag in the network packet can transmit at every turn.The MSS value of each client is relevant with the MTU value of each client, so the size of MSS value can reflect the size of MTU value, the size of MSS value adds the size of packet IP head and the size of TCP head, is the size of MTU value.Like MTU value under the total main frame default situations of: Ethernet is 1500 bytes, and the MSS value is 1460 bytes, and the size that IP head and TCP head are added up is generally 40 bytes.
The detection method of client terminal quantity is through revising the MTU value of each client under the public network IP under a kind of public network IP of the embodiment of the invention; Make that each client has different MTU values under the public network IP, thereby can confirm the number of client under the public network IP according to the number of MTU value under the public network IP.
See also Fig. 2, the detection method of a kind of shared access client terminal quantity of the embodiment of the invention, this method comprises:
Step 101: receive the network packet that the public network IP client is sent, comprise the characteristic information that reflects client in this network packet;
Step 201: according to the MTU value of each client under this public network IP of unique identification under this public network IP of characteristic information acquisition of this client;
Step 301: the number of confirming client under this public network IP according to the number of the MTU value of this public network IP client.
By on can find out that the embodiment of the invention just can obtain the number of client under this public network IP through the corresponding MTU value difference of each client under this public network IP based on the number of MTU value under this public network IP.Therefore, the keeper can draw the number that inserts client under this public network IP based on the number of MTU value, makes things convenient for the Admin Administration.
Wherein, the characteristic information of this client comprises: the size of the size of data maximum transfer size MSS, IP head and TCP head in the network packet.
Further; Characteristic information to client comprises the size of data maximum transfer size MSS, IP head in the network packet and the big or small this mode of TCP head; See also Fig. 3; Before the MTU value step according to each client under this public network IP of characteristic information acquisition of this client, also comprise:
Obtain the MTU value of client according to the size of the size of data maximum transfer size MSS, IP head in the network packet and TCP head; The MTU value of this client compares with the MTU value of the client of acquiescence, confirms that according to comparative result the MTU value of client is modified.
Further, confirm that according to comparative result the MTU value of client is modified, can be unequal with the MTU value of the client of acquiescence for: the MTU value of client, then the MTU value of definite client is modified;
Wherein, when the MTU value of client equated with the MTU value of the client of acquiescence, the MTU value that can confirm as client was not modified.
When the MTU of client value is not modified, can pass through predetermined algorithm according to the intrinsic information of client under the public network IP, obtain the MTU value of unique identification client, see also the step 2012 among Fig. 3.
By on can find out, through the step 2011 among Fig. 3, through in the packet Network Based the reflection client host characteristic information, just can confirm whether the MTU value of client is modified.
Need to prove that the MTU value of the above-mentioned client of mentioning is unequal with the MTU value of the client of acquiescence, and the MTU value of client equates there is certain error with the MTU value of the client of acquiescence.
Wherein, the intrinsic information of this client is the differentiation information of client, and promptly the intrinsic information of client is different under the public network IP.The intrinsic information of this client can be the NIC address MAC (Media Access Control) of client, also can be the ID (Identification) of CPU in the client, and the embodiment of the invention is not limited thereto.
Wherein, predetermined algorithm can be hash algorithm, like hash function, i.e. and Hash mathematical equation.
Further; Intrinsic information according to client under the public network IP passes through predetermined algorithm; Obtain the unique identification client the MTU value can for: according to the Hash mathematical equation, the ID of CPU in the NIC address of client or the client is converted into number range in 576~1500 MTU value.Like this, client can just can obtain the MTU value of each client of unique identification according to the intrinsic information of client self under this public network IP through predetermined algorithm.
Through said method, client can have the MTU value of unique identification client under this public network IP.Like this, under this public network IP, can obtain the number of client under this public network IP according to the number of different MTU values.
Be example below with the Ethernet, the detection method of a kind of shared access host number of the foregoing description described:
Under public network IP, the MTU value is 1500 under each client default situations of Ethernet.At first receive this public network IP lower network packet; MTU value according to characteristic information (that is: the size of the size of maximum transfer size MSS, IP head and TCP head) the computing client end of the reflection client in this network packet; Compare according to the MTU value of client and the 1500MTU value under the client default situations; When the MTU of client value is 1500; Then the MTU value of client is not modified, and passes through predetermined algorithm according to the MAC Address of client or the ID of CPU, obtains a new MTU value.Because the ID of the MAC Address of this new client MTU value and client or CPU is relevant, so the MTU value that this new MTU value is the unique identification client.
By last, according to there being what MTU values can confirm what clients are arranged under this public network IP under this public network IP, thereby be convenient to the Admin Administration.
See also Fig. 4, before the network packet that step 101 reception public network IP client is sent, also comprise step:
Step 3011: receive the request that client MTU value is revised;
Step 3012:, search MTU value information record, and available MTU value is sent to client according to the request that this client MTU value is revised.
Wherein, MTU value information record can be stored in the memory cell.
Wherein, Each MTU value in the MTU value information record is different; Already used MTU value of client and untapped MTU value have been write down in the MTU value information record; Can untapped MTU value be sent to client through searching MTU value information record, thereby can make this client have the MTU value of this client of unique identification.
By on can find out, can make client have the MTU value of unique identification client through said method.Number based on the MTU value just can be confirmed the number of this client, thereby is convenient to the Admin Administration.
Further, based on the request that this client MTU value is revised, the MTU value information record that inquiry is stored, and available MTU value sent to after the client, can also comprise:
Step 3013:, upgrade MTU value information record according to the MTU value that sends to client.
By on can find out that client is sent the MTU value and revised request, the request of client-based MTU value modification is searched MTU value information record, and available MTU value is returned to client, thereby can make this client have different MTU values.
Wherein, to step 3011, be to send the request that the MTU value is revised by client, therefore, need in client, installing M TU value revise the program of asking.
By on can find out that client has the MTU value of unique identification client under the public network IP, like this, under this public network IP, can obtain the number of client under this public network IP according to the number of different MTU values, thereby be convenient to the Admin Administration.
Need to prove,, just can obtain the quantity of client under this public network IP under this public network IP of MTU value unique identification of each client under the situation of each client for the detection method of a kind of shared access client terminal quantity of the foregoing description.When each client under this public network IP of MTU value unique identification of client under this public network IP, can obtain the quantity of client under this public network IP according to step 101-step 301; When the MTU value of client under this public network IP equates with the MTU value of acquiescence, can revise the MTU value of client according to predetermined algorithm through the intrinsic information of client.Perhaps before the network packet that reception public network IP client is sent, revise client MTU value through step 3011-3012.
In a word, by on can find out that the embodiment of the invention just can obtain the number of client under this public network IP through the corresponding MTU value difference of each client under this public network IP based on the number of MTU value under this public network IP.Therefore, the keeper can draw the number that inserts client under this public network IP based on the number of MTU value, makes things convenient for the Admin Administration.
To said method embodiment, the embodiment of the invention also provides a kind of detection system of shared access client terminal quantity.See also Fig. 5, the detection system of a kind of shared access client terminal quantity of the embodiment of the invention comprises:
End-probing device 200; The network packet that is used for sending based on client under the public network IP reflects the characteristic information of client; Determine whether and to revise client MTU value to client under this public network IP, and the client that will revise the MTU value reports transmitting apparatus 300 under the program;
Transmitting apparatus 300 under the program, are used for the client of needs modification MTU value is made amendment to the MTU value of this client according to the intrinsic information of this client, and wherein, each client under this public network IP has different MTU values;
Share and insert checkout gear 100; Be used to receive the network packet of the characteristic information of the reflection client that client is sent under the public network IP; And obtain the MTU value of each client of unique identification under this public network IP according to the characteristic information of this network packet, confirm the number of client under this public network IP according to the number of the MTU value of client under this public network IP.
By on can find out; The client that the detection system of a kind of shared access client terminal quantity of the embodiment of the invention will be revised the MTU value through end-probing device 200 reports transmitting apparatus 300 under the program; The MTU value of this client is made amendment according to the intrinsic information of client through 300 pairs of clients that need to revise the MTU value of transmitting apparatus under the program; Like this; Share inserting checkout gear 100 can confirm the number of client under this public network IP according to the number of the MTU value of client under this public network IP, thereby is convenient to the Admin Administration.
Wherein, the intrinsic information of this client is the differentiation information of client, and promptly the intrinsic information of client is different under the public network IP.The intrinsic information of this client can be the NIC address MAC (Media Access Control) of client, also can be the ID (Identification) of CPU in the client, and the embodiment of the invention is not limited thereto.
According to the intrinsic information of this client to the MTU value of this client make amendment can for: through predetermined algorithm, obtain the MTU value of unique identification client according to the intrinsic information of client under the public network IP.
Wherein, predetermined algorithm can be hash algorithm, like hash function, i.e. and Hash mathematical equation.
Further, according to the intrinsic information of this client to the MTU value of this client make amendment can for: according to the Hash mathematical equation, the ID of CPU in the NIC address of client or the client is converted into number range in 576~1500 MTU value.Like this, client can just can obtain the MTU value of each client of unique identification according to the intrinsic information of client self under this public network IP through predetermined algorithm.
Wherein, see also Fig. 6, this is shared and inserts checkout gear 100, comprising:
Receiving element 30: be used to receive the network packet that client is sent under the public network IP, comprise the characteristic information that reflects client in this network packet;
Computing unit 50: be used for obtaining the MTU value of each client under this public network IP, each client under this public network IP of MTU value unique identification of each client under this public network IP according to the characteristic information of this client;
Confirm unit 70: the number that is used for confirming client under this public network IP according to the number of the MTU value of this client.
Wherein, a kind of executive agent of sharing step 101, step 201 and step 301 in the method that inserts client terminal quantity that detects can be shared access checkout gear 100 for this.
By on can find out that a kind of shared access checkout gear 100 of the embodiment of the invention just can obtain the number of client under this public network IP through the corresponding MTU value difference of each client under this public network IP based on the number of MTU value under this public network IP.Therefore, the keeper can draw the number that inserts client under this public network IP based on the number of MTU value, makes things convenient for the Admin Administration.
Wherein, the characteristic information of this client comprises: the size of the size of data maximum transfer size MSS, IP head and TCP head in the network packet.
Further, see also Fig. 7, this end-probing device 200 comprises:
Receiving element 21 is used for receiving the characteristic information of client is sent under the public network IP network packet reflection client;
Judging unit 23 is used for determining whether that according to the characteristic information of reflection client needs are to client modification client MTU value under this public network IP;
Report unit 25, the client that is used for needs are revised the MTU value reports transmitting apparatus 300 under the program.
Wherein, the characteristic information of this client comprises: the size of the size of data maximum transfer size MSS, IP head and TCP head in the network packet.
Wherein, according to the characteristic information of reflection client determine whether needs to client under this public network IP revise client MTU value can for:
Obtain the MTU value of client based on the size of the size of data maximum transfer size MSS, IP head and TCP head; The MTU value of this client compares with the MTU value of the client of acquiescence; Unequal when the MTU of this client value with the MTU value of the client of acquiescence, confirm that then the MTU value of client is modified;
When the MTU of this client value equates that with the MTU value of the client of acquiescence the MTU value that can confirm as client is not modified.
By on can find out that receive the network packet that client is sent under the public network IP through end-probing device 200, the characteristic information of reflection client compares with the MTU value of acquiescence in the packet Network Based, can draw the client of needs modification MTU value.
It is understandable that; Transmitting apparatus 300 can divide and is arranged under end-probing device 200 in a kind of detection system of shared access client terminal quantity and the program; Also can transmitting apparatus 300 under end-probing device 200 and the program be integrated in one, the embodiment of the invention is not limited thereto.
In a word; The MTU value that can the client under this public network IP be had the unique identification client through the detection system of a kind of shared access client terminal quantity of the foregoing description; Number according to the MTU value of client under this public network IP is confirmed the number of client under this public network IP, thereby is convenient to the Admin Administration.
Further, see also Fig. 8, the embodiment of the invention provides a kind of detection system of shared access client terminal quantity again.Should share the detection system that inserts client terminal quantity comprises:
District management device 400 is used to receive the request that client MTU value is revised, and searches the MTU value information record of being stored, and available MTU value is sent to client, and wherein, this each client has different MTU values;
Share and insert checkout gear 100; Be used to receive the network packet of the characteristic information of the reflection client that client is sent under the public network IP; And obtain the MTU value of each client of unique identification under this public network IP according to the characteristic information of this network packet, confirm the number of client under this public network IP according to the number of the MTU value of client under this public network IP.
By on can find out that the detection system of a kind of shared access client terminal quantity of the embodiment of the invention sends to client through district management device 400 with available MTU value.Should share access checkout gear 100 and just can confirm the number of client under this public network IP, thereby be convenient to the Admin Administration based on the number of MTU value under the public network IP.
Further, MTU value information record can be stored in the memory cell, and this district management device 400 is according to sending to client MTU value, MTU value information record in the updated stored unit.
Wherein, the characteristic information of this client comprises: the size of the size of data maximum transfer size MSS, IP head and TCP head in the network packet.
Wherein, continuous see also Fig. 8, this district management device 400 comprises:
Receiving element 41 is used to receive the request that client MTU value is revised;
Query unit 43 is used for revising according to this client the request of MTU, inquires about the MTU information record in the memory cell 45, and available MTU value is replied to client.
Need to prove; Receive the request that client MTU value is revised at district management device 400; Can client be installed in client and revise MTU value program, in the time of can guaranteeing that like this client connects Internet, need to send the request that client MTU value is revised to district management device 400 earlier.
Wherein, the executive agent of step 3011, step 3012 and the step 3013 in a kind of detection method of shared access client terminal quantity can be this district management device 400.
Further, this district management device 400 also comprises: updating block 47 is used for according to the MTU value that replies to client, MTU information record in the updated stored unit 45.
Need to prove; Continuous see also Fig. 8, the private ip network of being made up of client has constituted a Local Area Network, and this Local Area Network is provided with district management device 400; Client in this Local Area Network have only revised the MTU value through this district management device 400 after; Just can make client pass through this district management device, share the online gateway through the zone then the private ip of client is converted into publicly-owned IP, the interior client of this Local Area Network is connected with Internet.
Should share access checkout gear 100 and receive the network packet that client is sent under the public network IP (the online gateway is shared in the zone), just can confirm the number of client based on the number of MTU value under this public network IP.
Like this, client is sent the MTU value and is revised request in the Local Area Network, according to the request of the MTU value modification of client in this Local Area Network; The MTU value information record that inquiry is stored; And available MTU value returned to client, and then, MTU value information record in the updated stored unit.Like this, when another client in this Local Area Network is sent MTU value modification request, can guarantee that different client side has different MTU values in this Local Area Network based on untapped MTU value of MTU value information record distribution.
Wherein, this Local Area Network can be enterprise, school, regional local area network (LAN) such as sub-district.
It is understandable that; District management device 400 among Fig. 8 also can layout be shared online gateway and shared the access between the checkout gear 100 in the zone; Like this; The request that this client MTU value is revised need be passed through the zone and share the request that the online gateway revises this client MTU value and be transmitted to this district management device 400, and the zone is shared the gateway of surfing the Net and also need the MTU value that district management device 400 sends to client be transmitted to client then.The embodiment of the invention is not limited thereto.
Wherein, continuous see also Fig. 6, the embodiment of the invention also provides a kind of shared access checkout gear 100, comprising:
Receiving element 30: be used to receive the network packet that client is sent under the public network IP, comprise the MTU value tag information that reflects client in this network packet;
Computing unit 50: be used for MTU value, each client under this public network IP of MTU value unique identification of each client under this public network IP according to each client under this public network IP of MTU value tag information acquisition of this client;
Confirm unit 70: the number that is used for confirming client under this public network IP according to the number of the MTU value of this client.
Wherein, a kind of executive agent of sharing step 101, step 201 and step 301 in the method that inserts client terminal quantity that detects can be shared access checkout gear 100 for this.
By on can find out that a kind of shared access checkout gear 100 of the embodiment of the invention just can obtain the number of client under this public network IP through the corresponding MTU value difference of each client under this public network IP based on the number of MTU value under this public network IP.Therefore, the keeper can draw the number that inserts client under this public network IP based on the number of MTU value, makes things convenient for the Admin Administration.
Need to prove; In a kind of district management device 400 of the embodiment of the invention; Memory cell 45 can be included in the district management device 400, also can be not included in this device 400, can take plug-in mode perhaps to use the memory cell in existing equipment or the device.The embodiment of the invention does not limit this.
It is understandable that the client under the public network IP in the foregoing description can directly be connected with Internet through publicly-owned IP for: client; Also can through the router with nat feature the client private ip be converted into publicly-owned IP client is connected with Internet for: client connects through the router with nat feature, the embodiment of the invention is not limited thereto.
It is understandable that; Detection system for a kind of shared access client terminal quantity of the foregoing description; Also can increase by a data forwarding device in the public network IP exit; This data forwarding device can be transmitted to network packet to share and insert checkout gear 100, also can be transmitted to end-probing device 200.Wherein, this data forwarding device can be existing data forwarding device.One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (RandomAccess Memory, RAM) etc.
The above is merely several embodiments of the present invention, and those skilled in the art can carry out various changes or modification to the present invention and do not break away from the spirit and scope of the present invention according to application documents are disclosed.