Summary of the invention
The invention provides a kind of method, Apparatus and system of revising the terminal network parameter, to solve Terminal Design cost height in the prior art, terminal network parameter modification mode complicated problems.
In order to address the above problem, the invention provides a kind of method, Apparatus and system of revising the terminal network parameter, technical scheme is as follows:
A kind of method of revising the terminal network parameter comprises:
Send terminal and carry the discovery message of described transmission terminal network parameter to receiving terminal broadcasting;
Receive the discovery response message that carries the receiving terminal network parameter that described receiving terminal sends according to described discovery message;
Revise the network parameter of described receiving terminal according to described discovery response message, and carry the modification message of the network parameter of modification to described receiving terminal broadcasting;
Receive the modification response message that carries the modification result that described receiving terminal sends according to described modification message.
Further, also comprise after the step of the described network parameter of revising described receiving terminal according to described discovery response message: the network parameter of storing described modification.
Further, described transmission terminal network parameter comprises: send IP address of terminal, subnet mask;
Describedly send the modification message of the network parameter that carries modification to described receiving terminal, comprising: described modification message carries the receiving terminal identification marking; The network parameter of revising is broadcast to the corresponding receiving terminal of receiving terminal sign.
A kind of method of revising the terminal network parameter comprises:
Receive the discovery message that carries described transmission terminal network parameter that sends terminal broadcasting;
Send the discovery response message that carries the receiving terminal network parameter to described transmission terminal according to described discovery message;
Receive the modification message that described transmission terminal sends, described modification message carries described transmission terminal according to the amended network parameter of described discovery response message;
Revise the self networks parameter according to described amended network parameter;
Send the modification response message that carries the modification result to described transmission terminal.
Further, described step of carrying the discovery response message of receiving terminal network parameter to described transmission terminal transmission according to described discovery message comprises:
Judge according to the network parameter in the described discovery message whether self and transmission terminal are in same subnet, if then the self networks parameter is carried in the transmission response message and sends to described transmission terminal; If not, then in self routing table, add arriving the routing iinformation that sends the terminal subnet, the IP address that maybe will send terminal is made as self gateway address, and self network parameter is carried in the transmission response message sends to described transmission terminal.
Further, described according to described amended network parameter modification self networks parameter, comprising:
Message is revised in reception, therefrom extracts to send the terminal recognition sign, and when judgement is modification self parameter, the network parameter after the memory modify.
A kind of device of revising the terminal network parameter comprises:
Sending module is used for carrying the discovery message of described transmission terminal network parameter to receiving terminal broadcasting;
First receiver module is used to receive the discovery response message that carries the receiving terminal network parameter that described receiving terminal sends according to described discovery message;
Revise and sending module, be used for revising the network parameter of described receiving terminal, and carry the modification message of the network parameter of modification to described receiving terminal broadcasting according to described discovery response message;
Second receiver module is used to receive the modification response message that carries the modification result that described receiving terminal sends according to described modification message.
Further, this device also comprises memory module, is used to store the network parameter of described modification.
A kind of device of revising the terminal network parameter comprises:
First receiver module is used to receive the discovery message that carries described transmission terminal network parameter that sends terminal broadcasting;
Sending module is used for sending the discovery response message that carries the receiving terminal network parameter to described transmission terminal according to described discovery message;
Second receiver module is used to receive the modification message that described transmission terminal sends, and described modification message carries described transmission terminal according to the amended network parameter of described discovery response message;
Modified module is used for revising the self networks parameter according to described amended network parameter;
Responder module is used for sending the modification response message that carries the modification result to described transmission terminal.
Further, described sending module specifically is used for judging according to the network parameter of described discovery message whether self and transmission terminal are in same subnet, if then the self networks parameter is carried in the transmission response message and sends to described transmission terminal; If not, then in self routing table, add arriving the routing iinformation that sends the terminal subnet, the IP address that maybe will send terminal is made as self gateway address, and self network parameter is carried in the transmission response message sends to described transmission terminal.
Further, described modified module specifically is used for receiving and revises message, therefrom extracts the receiving terminal identification marking, when judgement is modification self parameter, and the network parameter after the memory modify.
A kind of system of revising the terminal network parameter comprises:
Send terminal, be used for carrying the discovery message of described transmission terminal network parameter to receiving terminal broadcasting; Receive the discovery response message that carries the receiving terminal network parameter that described receiving terminal sends according to described discovery message; Revise the network parameter of described receiving terminal according to described discovery response message, and carry the modification message of the network parameter of modification to described receiving terminal broadcasting; Receive the modification response message that carries the modification result that described receiving terminal sends according to described modification message;
Receiving terminal is used to receive the discovery message that carries described transmission terminal network parameter that sends terminal broadcasting; Send the discovery response message that carries the receiving terminal network parameter to described transmission terminal according to described discovery message; Receive the modification message that described transmission terminal sends, described modification message carries described transmission terminal according to the amended network parameter of described discovery response message; Revise the self networks parameter according to described amended network parameter; Send the modification response message that carries the modification result to described transmission terminal.
Technical scheme of the present invention can be under the situation of not knowing the terminal network parameter, find and revise the terminal network parameter, overcome terminal and must just can finish the problem of the discovery and the modification of network parameter by keyboard and display screen, reduced the terminal hardware design cost, simplified terminal network parameter modification mode, improved keeper's maintenance and experienced.In addition, technical scheme of the present invention does not need terminal to support complex protocols such as IGMP, has overcome the extra demand that when using the IGMP agreement to realize information interaction in the network service terminal protocol stack is brought, and has further reduced the terminal software design cost.
Embodiment
In order to make technical problem to be solved by this invention, technical scheme and beneficial effect clearer, clear,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
First embodiment of the present invention provides a kind of method of revising the terminal network parameter, as shown in Figure 1, comprising:
101, send terminal and carry the discovery message of this transmission terminal network parameter to receiving terminal broadcasting;
102, receive the discovery response message that carries the receiving terminal network parameter that this receiving terminal sends according to this discovery message;
103, revise the network parameter of this receiving terminal according to this discovery response message, and carry the modification message of the network parameter of modification to this receiving terminal broadcasting;
104, receive the modification response message that carries the modification result that this receiving terminal sends according to this modification message.
Further, this finds also to comprise after response message is revised the step of network parameter of this receiving terminal according to this clean culture: the network parameter of storing this modification.
Further, described transmission terminal network parameter comprises: send IP address of terminal, subnet mask;
Further, describedly send the modification message of the network parameter that carries modification, comprising to described receiving terminal:
Described modification message carries the receiving terminal identification marking;
The network parameter of revising is broadcast to the corresponding receiving terminal of receiving terminal sign.
Further, this sends the modification message of the network parameter that carries modification to this receiving terminal, comprising:
This modification message carries the receiving terminal identification marking;
The network parameter of revising is broadcast to the corresponding receiving terminal of receiving terminal sign.
Second embodiment of the present invention provides a kind of method of revising the terminal network parameter, as shown in Figure 2, comprising:
201, receive the discovery message that carries this transmission terminal network parameter that sends terminal broadcasting;
202, send the discovery response message that carries the receiving terminal network parameter to this transmission terminal according to this discovery message;
203, receive the modification message that this transmission terminal sends, this modification message carries this transmission terminal according to the amended network parameter of this discovery response message;
204, revise the self networks parameter according to this amended network parameter;
205, send the modification response message that carries the modification result to this transmission terminal.
Further, described step of carrying the discovery response message of receiving terminal network parameter to this transmission terminal transmission according to this discovery message comprises:
Judge according to the network parameter in this discovery message whether self and transmission terminal are in same subnet, if then the self networks parameter is carried in the transmission response message and sends to this transmission terminal; If not, then in self routing table, add arriving the routing iinformation that sends the terminal subnet, the IP address that maybe will send terminal is made as self gateway address, and self network parameter is carried in the transmission response message sends to this transmission terminal.
Further, described according to described amended network parameter modification self networks parameter, comprising:
Message is revised in reception, and therefrom revise message and extract transmission terminal recognition sign, when judgement is modification self parameter, the network parameter after the memory modify.
Below in conjunction with concrete example the present invention is described in detail.
As described in Figure 3, the method for modification terminal network parameter provided by the invention comprises:
Step 301, operation is positioned at the IP discovering tool software that sends on the terminal.
Wherein, sending terminal can be PC (PC), work station or server.Wherein, receiving terminal can be the built-in terminal that PC, work station, server or any network enabled connect.IP discovering tool software sends request message to receiving terminal, and receives the response message of feedback.IP discovering tool software links to each other with receiving terminal by the switch or the network equipments such as hub (HUB), electric wire connecting junction, and is perhaps direct-connected by Ethernet cable.
Step 302, the IP discovering tool software that sends terminal sends the discovery message that carries self network parameter based on user datagram (UDP, UserDatagram Protocol) agreement to receiving terminal.
After the keeper sends network parameter discovery order, IP discovering tool software will send terminal self network parameter and pack and generate to find message, these parameters include but not limited to IP address, subnet mask, gateway address etc., send based on udp broadcast then.
Step 303, receiving terminal receive the discovery message, extract IP address and the subnet mask that sends terminal from find message, judge that whether self and transmission terminal are in same subnet, if at same subnet, then jump to step 305; Otherwise, execution in step 304.
Particularly, receiving terminal receives the discovery message, and according to self and the IP address, the subnet mask that send terminal, calculate place subnet separately, and judge whether to be in same subnet, if, then change step 305 over to, if not, then execution in step 304.
Step 304, receiving terminal increase in self routing table and arrive the routing iinformation that sends the terminal subnet, perhaps revise self gateway temporarily, will send IP address of terminal and be made as self gateway address.
Step 305, receiving terminal sends the discovery response message with self network parameter packing based on udp protocol.
Receiving terminal packing self network parameter sends the discovery response message based on the UDP clean culture.Because it is ready to arrive the route of the IP discovering tool software that sends terminal, this message can reach the destination smoothly.
Step 306, the IP discovering tool software that sends terminal receives finds response message, and the keeper can revise network parameter in view of the above, and IP discovering tool software is with the network parameter packing of revising afterwards, and carry necessary receiving terminal identification marking, send based on udp protocol at last and revise message.
The IP discovering tool software that sends terminal receives the network parameter of receiving terminal, and the keeper can check these network parameters and make amendment.Amended network parameter sends by udp broadcast equally.Not using the UDP clean culture to send and revise message, is because when receiving terminal quantity is a lot, and IP discovering tool software need increase the routing iinformation that arrives each terminal as step 304, and this can bring extra network overhead.Also owing to use broadcasting packet, in revising message, must the carried terminal identification marking, for example terminal former IP address or terminal number etc., when having a plurality of receiving terminal, each receiving terminal can judge in view of the above whether self is the message destination.
Step 307, receiving terminal receive the modification message, be confirmed to be revise self parameter after, store new network parameter, send the modification response message based on the UDP clean culture then, otherwise, directly abandon the modification message.
Wherein, carry receiving terminal in the modification response message and revise successful information.
Step 308, the IP discovering tool software that sends terminal receives the modification response message, to keeper's display update result.
As shown in Figure 4 and Figure 5 the foregoing description is made a more detailed description, Figure 4 shows that the network architecture diagram of this embodiment below, Fig. 5 is the flow chart under the network architecture of Fig. 4.To send terminal and receiving terminal is that PC needs as an example, and sending terminal is a PC, operation IP discovering tool software; Receiving terminal is a plurality of PCs, and receiving terminal is connected by Ethernet cable with the transmission terminal.
Wherein, the IP address that sends terminal is 10.86.10.188, and subnet mask is 255.255.255.0, and gateway address is 10.86.10.1.The IP address of receiving terminal is 192.168.1.10, and subnet mask 255.255.255.0, gateway address are 192.168.1.1.
Reside in the IP discovering tool software that sends on the terminal, at first read and send the terminal network parameter, for example IP address, subnet mask, gateway address etc. send (step 501) with these network parameters by the udp broadcast message again.Because what IP discovering tool software used is broadcast transmission, all and the terminal that the transmission terminal links to each other all will receive this broadcasting.
With terminal 1 is example, after it receives broadcasting packet, calculate to send terminal place subnet, also be 10.86.10.188 with 255.255.255.0 with, draw 10.86.10.0; Calculate self place subnet again, promptly 192.168.1.10 and 255.255.255.0 with, draw 192.168.1.0.Because 10.86.10.0 is different with 192.168.1.0, show receiving terminal and send terminal that therefore, terminal 1 needs interpolation to arrive the route that sends terminal place subnet, so that can send response message to sending terminal not at same subnet (step 502).With Windows is example, adding route can use as issuing orders: system (" route ADD10.86.10.0MASK 255.255.255.0192.168.1.10METRIC 3 "), Windows is told in this order, add a route that arrives subnet 10.86.10.0 (mask is 255.255.255.0), this route can be through from this terminal.
As shown in Figure 5, after terminal 1 is ready to route, self network parameter packing can be used the UDP clean culture to send and is found that response message is to sending terminal (step 503).Because route is ready, this response message can arrive the transmission terminal smoothly.The keeper can check the network parameter of terminal 1 from IP discovering tool software, and as required it is made amendment, and more amended network parameter is sent to terminal 1 (step 504) by udp broadcast with the form of revising message.Also send owing to revise message, so all terminals all will receive this message, but carry terminal 1 identification marking to have only that terminal 1 can the match is successful owing to revise message by broadcasting.After terminal 1 is received this message, store new parameter (step 505), and utilize the UDP clean culture to send and revise response message.Same because route is ready, and this response message can arrive the transmission terminal smoothly, the keeper can see modification result's (step 506) from this IP discovering tool software.
Based on the inventive concept identical with method, the embodiment of the invention provides a kind of device of revising the terminal network parameter, comprises as shown in Figure 6:
Sending module is used for carrying the discovery message of this transmission terminal network parameter to receiving terminal broadcasting;
First receiver module is used to receive the discovery response message that carries the receiving terminal network parameter that this receiving terminal sends according to this discovery message;
Revise and sending module, be used for revising the network parameter of this receiving terminal, and carry the modification message of the network parameter of modification to this receiving terminal broadcasting according to this discovery response message;
Second receiver module is used to receive the modification response message that carries the modification result that this receiving terminal sends according to this modification message.
Further, also comprise memory module, be used to store the network parameter of this modification.
Based on the inventive concept identical with method, the embodiment of the invention provides a kind of device of revising the terminal network parameter, as shown in Figure 7, comprising:
First receiver module is used to receive the discovery message that carries this transmission terminal network parameter that sends terminal broadcasting;
Sending module is used for sending the discovery response message that carries the receiving terminal network parameter to this transmission terminal according to this discovery message;
Second receiver module is used to receive the modification message that this transmission terminal sends, and this modification message carries this transmission terminal according to the amended network parameter of this discovery response message;
Modified module is used for revising the self networks parameter according to this amended network parameter;
Responder module is used for sending the modification response message that carries the modification result to this transmission terminal.
Further, this sending module specifically is used for judging according to the network parameter of this discovery message whether self and transmission terminal are in same subnet, if then the self networks parameter is carried in the transmission response message and sends to this transmission terminal; If not, then in self routing table, add arriving the routing iinformation that sends the terminal subnet, the IP address that maybe will send terminal is made as self gateway address, and self network parameter is carried in the transmission response message sends to this transmission terminal.
Further, this modified module specifically is used for reception and revises message, and therefrom extract and send the terminal recognition sign, when judgement is modification self parameter, the network parameter after the memory modify.
The present invention also provides a kind of system of revising the terminal network parameter, as shown in Figure 8, comprising:
Send terminal, be used for carrying the discovery message of this transmission terminal network parameter to receiving terminal broadcasting; Receive the discovery response message that carries the receiving terminal network parameter that this receiving terminal sends according to this discovery message; Revise the network parameter of this receiving terminal according to this discovery response message, and carry the modification message of the network parameter of modification to this receiving terminal broadcasting; Receive the modification response message that carries the modification result that this receiving terminal sends according to this modification message;
Receiving terminal is used to receive the discovery message that carries this transmission terminal network parameter that sends terminal broadcasting; Send the discovery response message that carries the receiving terminal network parameter to this transmission terminal according to this discovery message; Receive the modification message that this transmission terminal sends, this modification message carries this transmission terminal according to the amended network parameter of this discovery response message; Revise the self networks parameter according to this amended network parameter; Send the modification response message that carries the modification result to this transmission terminal.
Technical scheme of the present invention can be under the situation of not knowing the terminal network parameter, find and revise the terminal network parameter, overcome terminal and must just can finish the problem of the discovery and the modification of network parameter by keyboard and display screen, reduced the terminal hardware design cost, simplified terminal network parameter modification mode, improved keeper's maintenance and experienced.In addition, technical scheme of the present invention does not need terminal to support complex protocols such as IGMP, has overcome the extra demand that when using the IGMP agreement to realize information interaction in the network service terminal protocol stack is brought, and has further reduced the terminal software design cost.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the disclosed form of this paper, should not regard eliminating as to other embodiment, and can be used for various other combinations, modification and environment, and can in invention contemplated scope described herein, change by the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection range of the appended claim of the present invention.