Summary of the invention
The object of the present invention is to provide a kind of implementation method of visiting from outside nodes in MANET domain name.
The present invention has defined five kinds of message: domain name service information announcement message, domain-name information registration message, domain name service response message, certificate message and registration center's response message.Its message format is as follows:
Domain name service information announcement message message structure
Type type of message 0
The Reserved reserved field is changed to complete 0
N gateway name server sign
0 expression gateway can not provide domain name service, and name server is by Name
Server IP Address field provides; 1 expression gateway is exactly the domain name clothes
The affair device, its address is provided by Gateway IP Address field, at this moment,
No Name Server IP Address field
The P protocol-identifier: the IP address in 0 this message of expression is the IPv4 address;
IP address in 1 this message of expression is the IPv6 address
The IP address of Gateway IP Address gateway
The IP address of Name Server IP Address name server
32 of Gateway Lifetime, the service life cycle of gateway
32 of Reply Sequence Number, message SN is used for the new and old of identification message
Domain-name information registration message message structure
Type type of message 1
The Reserved reserved field is changed to complete 0
The U domain-name information is new logo more: 0 expression is according to this information updating domain-name information
1 expression adds new domain name information according to this message
The P protocol-identifier: the IP address in 0 this message of expression is the IPv4 address;
IP address in 1 this message of expression is the IPv6 address
The domain name of Domain Name request registration
The IP address of Domain Name IP Address request registration domain name correspondence
32 of ID, registered user's identification code
32 of Request Sequence Number, the registration message sequence number is used for the new of identification message
Old
32 of Lifetime, the service life cycle of request registration domain-name information
Domain name service response message message structure
Type type of message 2
The Error type of error: 0 inerrancy, promptly this message is registration confirmation message
1 no name server
2 log-on message mistakes
3 registration centers are busy
4 services are unavailable
The Res reserved field is changed to complete 0
M supplements sign with money: 0 expression remaining cost abundance need not to supplement with money
1 expression remaining cost is few, need supplement with money as early as possible
N closes the name server sign
0 expression gateway can not provide domain name service, and name server is by Name
Server IP Address field provides; 1 expression gateway is exactly the domain name clothes
The affair device, its address is provided by Gateway IP Address field, at this moment,
No Name Server IP Address field
The P protocol-identifier: the IP address in 0 this message of expression is the IPv4 address;
IP address in 1 this message of expression is the IPv6 address
The IP address of Gateway IPAddress gateway
The IP address of Name Server IP Address name server
The domain name of Domain Name request registration
The IP address of Domain Name IP Address request registration domain name correspondence
32 of Request Sequence Number, the registration message sequence number disappears from the domain-name information registration
Copy in the breath
32 of Reply Sequence Number, message SN is used for the new and old of identification message
32 of Lifetime, the domain-name information of applying for is served life cycle
The certificate message message structure
Type type of message 3
The Reserved reserved field is changed to complete 0
The P protocol-identifier: the IP address in 0 this message of expression is the IPv4 address;
IP address in 1 this message of expression is the IPv6 address
The domain name of Domain Name request registration
32 of ID, registered user's identification code
32 of Lifetime, the service life cycle of request registration domain-name information
Registration center's response message message structure
Type type of message 4
The Error type of error: 0 inerrancy, promptly this message is registration confirmation message
1 log-on message mistake
2 services are unavailable
The Reserved reserved field is changed to complete 0
M supplements sign with money: 0 expression remaining cost abundance need not to supplement with money
1 expression remaining cost is few, need supplement with money as early as possible
The P protocol-identifier: the IP address in 0 this message of expression is the IPv4 address;
IP address in 1 this message of expression is the IPv6 address
The domain name of Domain Name request registration
32 of ID, registered user's identification code
32 of Lifetime, the domain-name information of applying for is served life cycle
More than in several message, Domain Name adopts the defined form of resource record (resourcerecord) name (NAME) field among the RFC1035.
The present invention requires the employed domain name of user and to obtain the authorization to the domain name distributor gear application of a country, and how many domain name distributor gears distributes to domain name of user, User Identity sign indicating number ID and employed time limit of this domain name according to user's paying.Domain name clothes distributor gear is being safeguarded a registration center, the domain name of in store user applies in its database, ID and according to domain name service life cycle of disbursement and sattlement.
The present invention requires the MANET network to be connected with external network by a gateway, moves domain name service on the gateway, and perhaps gateway configuration has name server.External network can conduct interviews by method proposed by the invention domain name to the MANET node.
Realization of the present invention is made up of domain name service information declaration module, domain-name information Registering modules, domain name service update module, registration center's processing module.On all MANET nodes (comprising gateway) and name server, all safeguard a domain name service buffer memory, be used to provide the domain name mapping service.Domain name service buffer memory on the MANET node provides domain name mapping service (the inner domain name service/analytic method of MANET is not within the scope of the invention) for the node in the MANET, and the domain name service buffer memory on the name server (for example domain-name information database of traditional domain name system) provides the domain name mapping service for external network.All MANET nodes and name server are also all being safeguarded a domain name registration buffer memory.The domain name registration buffer memory of name server is used to preserve domain name applied for registration information a period of time, with the arrival of queued for log-on center answer message; The domain name registration buffer memory of MANET node is used to preserve registration message a period of time, to avoid making that owing to Web broadcast same registration message is repeatedly transmitted.The MANET register node is being safeguarded a registration sequence number counter, and times of registration is increased progressively counting, and the transmission or the repeating transmission of each domain-name information registration message all will add 1 with the value of registration sequence number counter; Gateway is safeguarding that is replied a sequence number counter, and declaration of domain name service information and domain name service information answer are increased progressively counting, and the transmission of each domain name service information declaration or domain name service response message all will add 1 with the value of replying sequence number counter.Domain name service information declaration module operates on the gateway, is responsible for to MANET node broadcasts gateway information and domain name server information, and domain-name information registration message and domain name service response message are handled and transmitted; The domain-name information Registering modules operates on the MANET node, is responsible for starting the domain-name information registration process, carries out the processing and the forwarding of message, returns information to the user; The domain name service update module operates on MANET node and the name server, be responsible for according to domain name service response message or registration center's response message the domain name service buffer memory being upgraded, the update module of moving on name server also is responsible for sending certificate message to registration center; Registration center's processing module is handled the certificate message of receiving, and returns registration center's response message to name server.
The method of visiting from outside MANET domain name is as follows:
Gateway is periodically declared gateway information and the domain name server information of oneself to the MANET network, so that the MANET node is known the existence and the configuration relevant information of gateway.Gateway domain name service information declaration idiographic flow as shown in Figure 1.
Add MANET or move to the node of a new MANET, if oneself domain name need be offered visiting from outside, must be to an own domain name of first to file in advance of name server registration.The MANET node sends to name server with the domain name of oneself, current IP address and user identity identification sign indicating number ID and registers, and after only succeeding in registration, external network could conduct interviews to this domain name.MANET domain-name information registration idiographic flow as shown in Figure 2.
After gateway is received the domain-name information registration message,, this message is handled according to the name server configuration of current network.Gateway messages is handled idiographic flow as shown in Figure 3.
After name server is received domain name registration message, domain name applied for registration, user ID and application are transmitted to the domain name registration center service time, user identity is authenticated by the domain name registration center.Domain-name information by authentication is added into the domain name service buffer memory of name server, offers visiting from outside.Name server Message Processing idiographic flow as shown in Figure 4.
After certificate message is received at the domain name registration center, in domain name user management database, the information of receiving is verified, returned registration center's response message to name server then.The domain name registration Central Message is handled idiographic flow as shown in Figure 5.
After name server receives that registration center is replied, send the domain name service response message to register node; Gateway is received this message, fills and transmits; Intermediate node upgrades oneself gateway and name server configuration according to the domain name service buffer memory of the renewal of the relevant information in this message oneself, and this message is transmitted to register node.Intermediate node Message Processing idiographic flow as shown in Figure 6.
After register node is received the domain name service response message, handle, upgrade oneself gateway and name server configuration, and, return different informations to the user according to the Error value according to information wherein.If Error is 0, and M is 0, returns " succeed in registration, be Lifetime this service time " to the user; If Error is 0, and M is 1, returns " succeed in registration, be Lifetime this service time, and residue is few service time " to the user; If Error is 1, return " no name server enters the name server state of waiting for " to the user; If Error is 2, return " the log-on message mistake re-registers after the PLSCONFM " to the user; If Error is 3, return " registration center is busy, please retry " after a while to the user; If Error is 4, return " serve unavailable, please inquire about reason " to registration center to the user.
Register node receives that Error is 0 domain name service response message, show that the current domain-name information of node oneself (comprise domain name, IP address, serve life cycle) has added in the service buffer memory of name server, at this moment, external network can use service that this domain name access node provides.
Analyze the method for above-mentioned visiting from outside MANET node domain name, characteristics of the present invention as can be seen have:
(1) gateway configuration process, name server layoutprocedure and domain-name information registration process combine, and reduced and transmit the shared extra bandwidth of these messages separately on MANET, have increased the uniformity of system simultaneously.
(2) because this method has comprised the name server layoutprocedure,, promptly realized the domain name intercommunication of MANET network and external network so the MANET node can pass through the domain name access external network node.
(3) utilize the domain name of application in advance to identify, both made things convenient for network management, alleviated the burden that the user remembers dynamic change IP address again as network node.
The invention technical scheme
External network is by the method for domain name access nodes in MANET: it is characterized in that gateway configuration process, name server layoutprocedure and domain-name information registration process combine; Gateway is periodically to self-organizing network declaration gateway information and domain name server information; The node that adds MANET or move to new MANET sends the request of domain-name information registration message the current domain-name information of node is registered; After gateway is received registration message, transmit to name server; Name server sends certificate message according to the register requirement of receiving to the domain name registration center; Registration center verifies in domain name user management database according to certificate message, then to name server echo reply message; After name server is received registration center's response message, domain name applied for registration information is added the domain name service buffer memory, and send domain name service information answer message to register node; Gateway is filled gateway information in the domain name service response message, then this message is sent to register node; Intermediate node disposes and the domain name service buffer memory according to gateway configuration, the name server of the information updating in the domain name service response message oneself, and transmits this message to register node; After register node is received response message, the service that external network just can provide by this node of domain name access.
Embodiment
The method of visiting from outside mobile ad hoc network domain name, gateway domain name service information declaration flow process wherein is as follows:
Step S1: whether gateway is name server according to oneself or disposes name server, structure domain name information on services announcement message.
Step S2: with domain name service information announcement message periodically to the MANET node broadcasts.
The treatment step of each incident is as follows among Fig. 1: (gateway domain name service information declaration flow process)
S1.1: after domain name service information declaration module starts, the value that sequence number counter is replied in initialization is 0, judge whether oneself is name server, be oneself whether to have moved domain name service program (as BIND) to provide the domain name mapping service for other network node, if gateway is a name server, enter S1.2; Otherwise, forward S1.3 to;
S1.2: the IP address of gateway is kept among the name server record variable DN_SERVER, enters S1.6;
S1.3: judge oneself whether to dispose name server (for example, in linux operating system, judging the IP address that whether disposes name server among file/etc/resolv.conf),, forward S1.5 to if the name server configuration is arranged; Otherwise, enter S1.4;
S1.4: put DN_SERVER for empty, promptly do not have name server;
S1.5: put the IP address that DN_SERVER is the first-selected name server that gateway disposed (for example, in linux operating system, putting DN_SERVER is the IP address of article one nameserver record among file/etc/resolv.conf), enter S1.6;
S1.6: start timer T0, be used for periodically broadcasting the domain name service message, the time cycle of T0 is NS_BROADCAST_TIMEOUT (its value is according to the MANET network environment and the scale decision of reality), after T0 is overtime, restart timing next time immediately, timer T0 enters S1.7 after starting;
S1.7: the value that will reply sequence number counter adds 1, DN_SERVER is inserted in the domain name service information announcement message broadcast away.If gateway is exactly a name server, N is put 1, otherwise N is put 0; P decides according to the employed IP protocol type of gateway; Gateway Lifetime is the life cycle of gateway, reads from the gateway configuration file; Gateway IP Address is the IP address of gateway, and N is 1 o'clock, is the IP address that DN_SERVER preserved; When N was 0, Name ServerIP Address was the IP address among the DN_SERVER, and Reply Sequence Number is the currency of replying sequence number counter.Enter S1.8;
S1.8: check whether IP address of oneself or first-selected name server IP address change,, enter S1.9 if change; If do not change, forward S1.10 to;
S1.9: putting DN_SERVER is new domain name server address, forwards S1.6 to;
S1.10: judge whether T0 is overtime,, enter S1.8 if not overtime; If T0 is overtime by the time, enter S1.7, periodically broadcast the domain name service message.
The method of visiting from outside mobile ad hoc network domain name, domain-name information register flow path wherein is as follows:
Step S1: the node N that adds MANET or move to a new MANET judges whether oneself disposes gateway or name server, if having, reaches twice domain-name information registration message to gateway or name server clean culture, enters step S2; If do not have, reach twice domain-name information registration message to the MANET node broadcasts, forward step S3 to;
Step S2: node N starts timer T1, waits for the arrival of domain name service response message.As if twice clean culture, after timer T1 is overtime, do not receive the domain name service response message, reach twice domain-name information registration message to the MANET node broadcasts;
Step S3: if twice broadcasting after timer T1 is overtime, is not received the domain name service response message yet, just wait for the arrival of domain name service information, promptly wait for the arrival of gateway domain name service information announcement message, finish;
Step S4: if before timer T1 is overtime, received the domain name service response message, if this message is registration confirmation message, just show that domain-name information successfully registers, start domain name service timer life cycle T2, T2 is overtime when timer, restarts the domain-name information registration process; If this message is the error message of other type, just return corresponding prompt message to the user according to type of error;
The treatment step of each incident is as follows among Fig. 2: (domain-name information register flow path)
S2.1: when the domain-name information registration process starts, check at first whether node oneself disposes name server,, enter S2.2 if having; Otherwise, forward S2.3 to;
S2.2: the IP address of putting the IP head of domain-name information registration message is the domain name server address that is disposed, and enters S2.5;
S2.3: check whether node oneself disposes gateway,, enter S2.4 if having; Otherwise, enter S2.7;
S2.4: the IP address of putting the IP head of domain-name information registration message is the gateway address that is disposed, and enters S2.5;
S2.5: start register requirement counter Counter, the initial value of putting Counter is 0, enters S2.6;
S2.6: the domain-name information registration message is gone out to purpose IP address clean culture, in the domain-name information registration message: Domain Name is the domain name of request registration, Domain Name IP Address is the current IP address of node, ID is that registration center distributes to the identify label sign indicating number that the user uses Domain Name, the value of Request Sequence Number is the currency of registration sequence number counter, and Lifetime is the service time of request registration domain-name information; The value that to register sequence number counter then adds 1; Forward S2.9 to;
S2.7: start register requirement counter Counter, the initial value of putting Counter is 2, enters S2.8;
S2.8: the domain-name information registration message is gone out to the MANET node broadcasts, in the domain-name information registration message: Domain Name is the domain name of request registration, Domain Name IP Address is the current IP address of node, ID is that registration center distributes to the identify label sign indicating number that the user uses Domain Name, the value of Request Sequence Number is the currency of registration sequence number counter, and Lifetime is the service time of request registration domain-name information; The value that to register sequence number counter then adds 1; Enter S2.9;
S2.9: the value of register requirement counter Counter is added 1, enter S2.10;
S2.10: start and reply waiting timer T1, wait for the arrival of domain name service response message; The time cycle of T1 is NS_REPLY_WAIT_TIMEOUT (its value is according to the MANET network environment and the scale decision of reality); Enter S2.11;
S2.11: judge whether T1 is overtime,, enter S2.12 if overtime; If not overtime, and receive and registration confirmation message forward S2.15 to, otherwise, wait for that T1 is overtime;
S2.12: whether the value of judging Counter is less than 2, if forward S2.6 to, once more clean culture domain-name information registration message; Otherwise, enter S2.13;
S2.13: whether the value of judging Counter less than 4, if, forward S2.8 to, the domain-name information registration message is broadcasted away; Otherwise, enter S2.14;
S2.14: wait for the arrival of domain name service information declaration, start domain-name information registration process next time;
S2.15: start domain-name information service timer T2 life cycle, the time cycle of T2 is the Lifetime value in the domain name service response message of receiving, enters S2.16;
S2.16: judge whether T2 is overtime,, enter S2.1, start domain-name information registration process next time if overtime; Otherwise, enter S2.16, wait for that T2 is overtime.
The method of visiting from outside mobile ad hoc network domain name, gateway messages handling process wherein is as follows:
Step S1: judge the type of message of receiving, if the domain-name information registration message enters step S2 and handles; If the domain name service response message enters step S3 and handles;
Step S2:, this message is carried out the domain-name information location registration process if oneself be name server; Otherwise, this message is transmitted to name server;
Step S3: fill the relevant field in the domain name service response message, and, then this message is transmitted to register node according to this information updating domain name service buffer memory.
The treatment step of each incident is as follows among Fig. 3: (gateway messages handling process)
S3.1: when gateway is received domain-name information registration/domain name service response message, at first judge this type of message, if registration message enters S3.2; If response message forwards S3.9 to;
S3.2: judge whether gateway oneself is name server, checks promptly whether oneself has moved the domain name service program, if enter S3.3; Otherwise, forward S3.4 to;
S3.3: the domain-name information in the message of receiving is carried out location registration process;
S3.4: check whether oneself disposes name server, if enter S3.5; Otherwise, forward S3.6 to;
S3.5: transmit the domain-name information registration message to the own name server that is disposed;
S3.6: whether the destination of judging this message is gateway itself, checks promptly whether the IP head's the IP address of IP address and gateway oneself of this message is identical, if forward S3.8 to; Otherwise, enter 3.7;
S3.7: this domain-name information registration message is transmitted to purpose IP address;
S3.8: send " no name server " and reply, promptly send the domain name service response message to register node, wherein the Error field is changed to 1, and Reply Sequence Number field is changed to the currency of replying sequence number counter; The value that to reply sequence number counter then adds 1;
S3.9: Gateway IPAddress the domain name service response message of sending from name server and Reply Sequence Number field are filled, the value of Gateway IP Address is the IP address of gateway oneself, and the value of Reply Sequence Number is the currency of replying sequence number counter; The value that to reply sequence number counter then adds 1; Enter S3.10;
S3.10: the Policy Updates domain name service buffer memory according to following enters S3.11 then;
Error is 0 o'clock: searching domain name in the domain name service buffer memory is the record R of Domain Name, if find record R, Reply Sequence Number in the comparison response message and the ReplySequence Number among the R, if the former to reply sequence number big, according to the Domain Name in this message, Domain Name IP Address, Reply Sequence Number and Lifetime field new record R more, otherwise the R that holds the record is constant; If do not find record R,, in the domain name service buffer memory, add a new domain-name information record according to the DomainName in this message, Domain Name IP Address, Reply Sequence Number and Lifetime field;
Error is during for other value: searching domain name in the domain name service buffer memory is the record R of Domain Name, if find record R, Domain Name IP Address, ReplySequence Number among response message and the R are compared, if Reply Sequence Number is bigger in Domain Name IP Address difference and the response message, R is deleted from the domain name service buffer memory, otherwise the R that holds the record is constant; If do not find record R, the domain name service buffer memory do not done any change;
S3.11: this domain name service response message is transmitted to register node.
The method of visiting from outside mobile ad hoc network domain name, name server Message Processing flow process wherein is as follows:
Step S1: according to receiving the domain-name information registration message, operation domain name registration buffer memory;
Step S2: judge whether the registration to this domain-name information needs to carry out authentication, if enter step S3; Otherwise,, finish according to this information updating domain name service buffer memory;
Step S3: send certificate message, the arrival of queued for log-on center answer message to the domain name registration center;
Step S4: after receiving registration center's response message, according to this message, upgrade the domain name service buffer memory, and send the domain name service response message to register node.
The treatment step of each incident is as follows among Fig. 4: (name server Message Processing flow process)
S4.1: when name server is received the domain-name information registration message, start following domain-name information location registration process process immediately, at first in the registration buffer memory, search the record R that domain name is Domain Name,, forward S4.3 to if find record R; Otherwise, enter S4.2;
S4.2:, in the domain name registration buffer memory, add a new record according to the Domain Name in the domain-name information registration message of receiving, Domain NameIP Address and Request Sequence Number field; Forward S4.5 to;
S4.3: compare Request Sequence Number and the Request Sequence Number that writes down among the R in the registration message,, forward S4.5 to if the former is big; Otherwise, enter S4.4;
S4.4: this registration message is processed, abandons;
S4.5: searching domain name in the domain name service buffer memory is the record R of Domain Name, if find record R, enters S4.6; Otherwise, forward S4.8 to;
S4.6: if ID in the comparison domain-name information registration message and the ID among the R identical, forward S4.8 to; Otherwise, enter S4.7;
S4.7: send " log-on message mistake " and reply, promptly send the domain name service response message to register node, wherein: the Error field value is changed to 2; Gateway IP Address and Reply SequenceNumber field are put sky, wait until gateway and fill; Name Server IP Address is the IP address of node oneself; Domain Name, Domain Name IP Address, Request Sequence Number and Lifetime duplicate from the domain-name information registration message;
S4.8: start authentication counter A_Counter, the counting initial value is 0; Enter S4.9;
S4.9: send certificate message to registration center, wherein: Domain Name, ID and Lifetime duplicate from the domain-name information registration message; Enter S4.10;
S4.10: start registration center and reply waiting timer T3, the arrival of queued for log-on center answer message, be REGC_REPLY_WAIT_TIMEOUT (its value is decided according to the network environment of reality for the message two-way time between name server and registration center) time-count cycle of T3; The value of A_Counter adds 1; Enter S4.11;
S4.11: judge whether T3 is overtime,, forward S4.14 to if not overtime and receive registration center's response message; Otherwise, wait for that T3 is overtime, enter S4.12;
S4.12: whether the value of judging authentication counter A_Counter less than 2, if, forward S4.9 to, send certificate message once more; Otherwise, enter S4.13;
S4.13: send " registration center is busy " and reply, promptly send the domain name service response message to register node, wherein Error is 3;
S4.14: judge whether the registration center of receiving is replied is to confirm to reply, and checks promptly whether the Error field value in the response message is 0, if enter S4.15; Otherwise, forward S4.17 to;
S4.15: searching domain name in the domain name service buffer memory is the record R of Domain Name, if find record R, according to the respective field of Domain Name IP Address in the domain-name information registration message and the renewal of the Lifetime in registration center's response message R; If do not find record R,, in the domain name service buffer memory, add a new record according to the Lifetime in the Domain Name in the domain-name information registration message, Domain Name IP Address, ID and the registration center's response message.Enter S4.16;
S4.16: send " accreditation verification " and reply, promptly send the domain name service response message to register node, wherein: the Error field value is changed to 0; Gateway IP Address and Reply Sequence Number field are put sky; Name Server IP Address is the IP address of node oneself; Domain Name, Domain Name IP Address and Request Sequence Number duplicate from the domain-name information registration message; M and Lifetime duplicate from registration center's response message;
S4.17: send the domain name service response message to register node, wherein the Error field value duplicates from registration center's response message.
The method of visiting from outside mobile ad hoc network domain name, registration center's handling process wherein is as follows:
Step S1: ID verifies to registered user's identity, if by checking, enter step S2; Otherwise, will not register;
Step S2: check whether registered user's requested service is available,, enter step S3 if service is available; Otherwise, will not register;
Step S3: whether domain name service remaining time of checking the registered user is near the phase, if send " Recharge Promotion " to the user; Otherwise, send " by checking " and reply.
The treatment step of each incident is as follows among Fig. 5: (registration center's handling process)
S5.1: certificate message is received by registration center, at first searches the record R that domain name is Domain Name in the database of oneself, if find record R, enters S5.2; Otherwise, forward S5.3 to;
S5.2: whether the ID in the comparison certificate message is identical with the ID among the R, if identical, forwards S5.4 to; Otherwise, enter S5.3;
S5.3: send " log-on message mistake " and reply, promptly send registration center's response message to name server, wherein: Error is 1; Domain Name, ID and Lifetime duplicate from certificate message;
S5.4: check whether the registered user has authority to use institute's requested service (for example, whether having the right to use IPv6 domain name service, user's enjoyment service power whether temporarily to be forbidden etc.), if forward S5.6 to; Otherwise, enter S5.5;
S5.5: send " serving unavailable " and reply, promptly send registration center's response message to name server, wherein Error is 2;
S5.6: whether judge service remaining time less than request time, whether the difference of promptly checking domain name service life cycle in registration center's database and current time is less than the Lifetime value in the certificate message, if enter S5.7; Otherwise, forward S5.8 to;
S5.7: the Lifetime that puts in registration center's response message is service remaining time; Forward S5.10 to;
S5.8: put Lifetime in registration center's response message and be the Lifetime in the certificate message; Enter S5.9;
S5.9: whether the service of judging deducts request time less than prompting threshold value FARE_ALARM_TIME (its value is decided according to the charging policy of reality), if enter S5.10 remaining time; Otherwise, forward S5.11 to;
S5.10: send " expense is few " indication to the user, the M that promptly puts in registration center's response message is 1; Enter S5.11;
S5.11: send " by checking " and reply, promptly send registration center's response message to name server, wherein: Error is 0; Domain Name and ID duplicate from certificate message.
The method of visiting from outside mobile ad hoc network domain name, intermediate node Message Processing flow process wherein is as follows:
Step S1: judge the type of message of receiving, if the domain-name information registration message enters step S2; If the domain name service response message enters step S3;
Step S2: judge whether this registration message is processed, if abandon; Otherwise, the registration updating cache entries, and this forwards gone out;
Step S3:, and this forwards gone out according to domain name service the response message more configuration of gateway configuration, name server and the domain name service buffer memory of new node.
The treatment step of each incident is as follows among Fig. 6: (intermediate node Message Processing flow process)
S6.1: when intermediate node is received registration/response message, judge at first whether this message is the domain-name information registration message, if enter S6.2; Otherwise, forward S6.7 to;
S6.2: searching domain name in the domain name registration buffer memory is the record R of Domain Name, if find record R, enters S6.3; Otherwise, forward S6.6 to;
S6.3: compare Request Sequence Number and the Request Sequence Number that writes down among the R in the domain-name information registration message,, forward S6.5 to if the former is big; Otherwise, enter S6.4;
S6.4: this registration message is processed, abandons;
S6.5: according to the Domain Name IP Address in the domain-name information registration message and RequestSequence Number new record R more; Forward S6.12 to;
S6.6:, in the domain name registration buffer memory, add a new record according to the Domain Name in the domain-name information registration message, Domain Name IPAddress and Request Sequence Number; Forward S6.12 to;
S6.7: according to the gateway configuration of new node oneself more of the Gateway IP Address in the domain name service response message; Enter S6.8;
S6.8: according to the more name server configuration of new node oneself of the Name Server IP Address in the domain name service response message; Enter S6.9;
S6.9: judge whether this message is to confirm response message, checks promptly whether the Error value in the domain name service response message is 0, if forward S6.11 to; Otherwise, enter S6.10;
S6.10: searching domain name in the domain name service buffer memory is that Domain Name, IP address are the record R of DomainName IP Address, if find record R, R is deleted from the domain name service buffer memory; Forward S6.12 to;
S6.11: searching domain name in the domain name service buffer memory is that Domain Name, IP address are the record R of DomainName IP Address, if find record R, upgrade R according to Domain Name IP Address, Reply Sequence Number in the domain name service response message and Lifetime; Enter S6.12;
S6.12: will receive that registration/response message forwards.