Summary of the invention
The invention provides a kind of method, the Apparatus and system of revising terminal network parameter, high to solve Terminal Design cost in prior art, the problem of terminal network parameter modification mode complexity.
In order to solve the problem, the invention provides a kind of method, the Apparatus and system of revising terminal network parameter, technical scheme is as follows:
Revise a method for terminal network parameter, comprising:
Transmitting terminal carries the discovery message of described transmitting terminal network parameter to receiving terminal broadcast;
Receive the discovery response message carrying 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 amendment message of the network parameter of amendment to described receiving terminal broadcast;
Receive the amendment response message carrying amendment result that described receiving terminal sends according to described amendment message.
Further, described revise the step of the network parameter of described receiving terminal according to described discovery response message after also comprise: the network parameter storing described amendment.
Further, described transmitting terminal network parameter comprises: transmitting terminal IP address, subnet mask;
The described amendment message carrying the network parameter of amendment to described receiving terminal transmission, comprising: described amendment message carries receiving terminal identification marking; The network parameter of amendment is broadcast to the receiving terminal that receiving terminal mark is corresponding.
Revise a method for terminal network parameter, comprising:
Receive the discovery message carrying described transmitting terminal network parameter of transmitting terminal broadcast;
Send the discovery response message carrying receiving terminal network parameter to described transmitting terminal according to described discovery message;
Receive the amendment message that described transmitting terminal sends, described amendment message carries described transmitting terminal according to the amended network parameter of described discovery response message;
According to the network parameter of described amended network parameter amendment self;
The amendment response message carrying amendment result is sent to described transmitting terminal.
Further, described step of carrying the discovery response message of receiving terminal network parameter according to described discovery message to described transmitting terminal transmission, comprising:
Judge whether self and transmitting terminal are in same subnet according to the network parameter in described discovery message, if so, then the network parameter of self is carried in transmission response message and sends to described transmitting terminal; If not, then in self routing table, add the routing iinformation arriving transmitting terminal subnet, or the IP address of transmitting terminal is set to self gateway address, and own net parameter is carried at send in response message and sends to described transmitting terminal.
Further, the described network parameter according to described amended network parameter amendment self, comprising:
Receive amendment message, therefrom extract transmitting terminal identification marking, when judging to be amendment inherent parameters, the network parameter after memory modify.
Revise a device for terminal network parameter, comprising:
Sending module, for carrying the discovery message of described transmitting terminal network parameter to receiving terminal broadcast;
First receiver module, for receiving the discovery response message carrying receiving terminal network parameter that described receiving terminal sends according to described discovery message;
Amendment and sending module, for revising the network parameter of described receiving terminal according to described discovery response message, and carry the amendment message of the network parameter of amendment to described receiving terminal broadcast;
Second receiver module, for receiving the amendment response message carrying amendment result that described receiving terminal sends according to described amendment message.
Further, this device also comprises memory module, for storing the network parameter of described amendment.
Revise a device for terminal network parameter, comprising:
First receiver module, for receiving the discovery message carrying described transmitting terminal network parameter of transmitting terminal broadcast;
Sending module, for sending the discovery response message carrying receiving terminal network parameter to described transmitting terminal according to described discovery message;
Second receiver module, for receiving the amendment message that described transmitting terminal sends, described amendment message carries described transmitting terminal according to the amended network parameter of described discovery response message;
Modified module, for the network parameter according to described amended network parameter amendment self;
Responder module, for sending the amendment response message carrying amendment result to described transmitting terminal.
Further, described sending module, specifically for judging whether self and transmitting terminal are in same subnet according to the network parameter in described discovery message, if so, is then carried at the network parameter of self in transmission response message and sends to described transmitting terminal; If not, then in self routing table, add the routing iinformation arriving transmitting terminal subnet, or the IP address of transmitting terminal is set to self gateway address, and own net parameter is carried at send in response message and sends to described transmitting terminal.
Further, described modified module, specifically for receiving amendment message, therefrom extracts receiving terminal identification marking, when judging to be amendment inherent parameters, and the network parameter after memory modify.
Revise a system for terminal network parameter, comprising:
Transmitting terminal, for carrying the discovery message of described transmitting terminal network parameter to receiving terminal broadcast; Receive the discovery response message carrying 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 amendment message of the network parameter of amendment to described receiving terminal broadcast; Receive the amendment response message carrying amendment result that described receiving terminal sends according to described amendment message;
Receiving terminal, for receiving the discovery message carrying described transmitting terminal network parameter of transmitting terminal broadcast; Send the discovery response message carrying receiving terminal network parameter to described transmitting terminal according to described discovery message; Receive the amendment message that described transmitting terminal sends, described amendment message carries described transmitting terminal according to the amended network parameter of described discovery response message; According to the network parameter of described amended network parameter amendment self; The amendment response message carrying amendment result is sent to described transmitting terminal.
Technical scheme of the present invention can when not knowing terminal network parameter, find and amendment terminal network parameter, overcome terminal and just must can complete the discovery of network parameter and the problem of amendment by keyboard and display screen, reduce terminal hardware design cost, simplify terminal network parameter modification mode, the maintenance improving keeper is experienced.In addition, technical scheme of the present invention does not need terminal to support the complex protocols such as IGMP, overcomes in network service the extra demand brought terminal protocol stack when using IGMP protocol realization information interaction, reduce further terminal software design cost.
Embodiment
In order to make technical problem to be solved by this invention, technical scheme and beneficial effect clearly, understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
First embodiment of the present invention provides a kind of method revising terminal network parameter, as shown in Figure 1, comprising:
101, transmitting terminal carries the discovery message of this transmitting terminal network parameter to receiving terminal broadcast;
102, receive the discovery response message carrying 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 amendment message of the network parameter of amendment to the broadcast of this receiving terminal;
104, receive the amendment response message carrying amendment result that this receiving terminal sends according to this amendment message.
Further, according to this clean culture, this finds that response message also comprises after revising the step of the network parameter of this receiving terminal: the network parameter storing this amendment.
Further, described transmitting terminal network parameter comprises: transmitting terminal IP address, subnet mask;
Further, the described amendment message carrying the network parameter of amendment to described receiving terminal transmission, comprising:
Described amendment message carries receiving terminal identification marking;
The network parameter of amendment is broadcast to the receiving terminal that receiving terminal mark is corresponding.
Further, this sends the amendment message carrying the network parameter of amendment to this receiving terminal, comprising:
This amendment message carries receiving terminal identification marking;
The network parameter of amendment is broadcast to the receiving terminal that receiving terminal mark is corresponding.
Second embodiment of the present invention provides a kind of method revising terminal network parameter, as shown in Figure 2, comprising:
201, receive the discovery message carrying this transmitting terminal network parameter of transmitting terminal broadcast;
202, send the discovery response message carrying receiving terminal network parameter to this transmitting terminal according to this discovery message;
203, receive the amendment message that this transmitting terminal sends, this amendment message carries this transmitting terminal according to the amended network parameter of this discovery response message;
204, according to the network parameter of this amended network parameter amendment self;
205, the amendment response message carrying amendment result is sent to this transmitting terminal.
Further, described step of carrying the discovery response message of receiving terminal network parameter according to this discovery message to the transmission of this transmitting terminal, comprising:
Judge whether self and transmitting terminal are in same subnet according to the network parameter in this discovery message, if so, then the network parameter of self is carried in transmission response message and sends to this transmitting terminal; If not, then in self routing table, add the routing iinformation arriving transmitting terminal subnet, or the IP address of transmitting terminal is set to self gateway address, and own net parameter is carried at send in response message and sends to this transmitting terminal.
Further, the described network parameter according to described amended network parameter amendment self, comprising:
Receive amendment message, therefrom revise message and extract transmitting terminal identification marking, when judging to be amendment inherent parameters, the network parameter after memory modify.
Below in conjunction with concrete example, the present invention is described in detail.
As described in Figure 3, the method for amendment terminal network parameter provided by the invention comprises:
Step 301, runs the IP discovering tool software be positioned in transmitting terminal.
Wherein, transmitting 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 is connected with receiving terminal by the network equipment such as switch or hub (HUB), electric wire connecting junction, or direct-connected by Ethernet cable.
Step 302, the IP discovering tool software of transmitting terminal sends the discovery message carrying own net parameter to receiving terminal based on user datagram (UDP, UserDatagramProtocol) agreement.
After keeper sends network parameter discovery order, transmitting terminal self network parameter is carried out packing and generates discovery message by IP discovering tool software, these parameters include but not limited to IP address, subnet mask, gateway address etc., then send based on udp broadcast.
Step 303, receiving terminal receives and finds message, from finding IP address and the subnet mask of extracting transmitting terminal message, judges whether self and transmitting terminal are in same subnet, if at same subnet, then jump to step 305; Otherwise, perform step 304.
Particularly, receiving terminal receives discovery message, according to IP address, the subnet mask of self and transmitting terminal, calculates respective place subnet, and judges whether to be in same subnet, if so, then proceed to step 305, if not, then perform step 304.
Step 304, receiving terminal increases the routing iinformation arriving transmitting terminal subnet in self routing table, or interim self gateway of amendment, and transmitting terminal IP address is set to self gateway address.
Step 305, own net parameter is packed by receiving terminal, sends find response message based on udp protocol.
Receiving terminal packing own net parameter, sends based on UDP clean culture and finds response message.Because the route of the IP discovering tool software arriving transmitting terminal is ready, this message can reach the destination smoothly.
Step 306, the IP discovering tool software receipt of transmitting terminal finds response message, and keeper can revise network parameter accordingly, and IP discovering tool software is by the packing of the network parameter of amendment afterwards, and carry necessary receiving terminal identification marking, finally send amendment message based on udp protocol.
The IP discovering tool software receipt of transmitting terminal is to the network parameter of receiving terminal, and keeper can check these network parameters and modify.Amended network parameter is sent by udp broadcast equally.Do not use UDP clean culture to send amendment message, be because when receiving terminal quantity is a lot, IP discovering tool software needs as step 304, and increase the routing iinformation arriving each terminal, this can bring extra network overhead.Also, owing to using broadcasting packet, in amendment message, necessary carried terminal identification marking, the former IP address of such as terminal or terminal number etc., when there is multiple receiving terminal, each receiving terminal can judge whether self is message destination accordingly.
Step 307, receiving terminal receives amendment message, after being confirmed to be amendment inherent parameters, stores new network parameter, then sends amendment response message based on UDP clean culture, otherwise, directly abandon amendment message.
Wherein, the successfully modified information of receiving terminal is carried in amendment response message.
Step 308, the IP discovering tool software receipt of transmitting terminal to amendment response message, to keeper's display update result.
Below to make a more detailed description above-described embodiment as shown in Figure 4 and Figure 5, Figure 4 shows that the network architecture diagram of this embodiment, Fig. 5 is the flow chart under the network architecture of Fig. 4.With transmitting terminal and receiving terminal for PC needs as an example, transmitting terminal is a PC, runs IP discovering tool software; Receiving terminal is multiple PC, and receiving terminal is connected by Ethernet cable with transmitting terminal.
Wherein, the IP address of transmitting 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, subnet mask 255.255.255.0, and gateway address is 192.168.1.1.
Reside in the IP discovering tool software in transmitting terminal, first read transmitting terminal network parameter, such as IP address, subnet mask, gateway address etc., then these network parameters are sent (step 501) by udp broadcast message.Due to IP discovering tool software application is broadcast transmission, and all terminals be connected with transmitting terminal, all will receive this broadcast.
For terminal 1, after it receives broadcasting packet, calculate transmitting terminal place subnet, also namely 10.86.10.188 and 255.255.255.0 phase and, draw 10.86.10.0; Calculate self place subnet again, namely 192.168.1.10 and 255.255.255.0 phase with, draw 192.168.1.0.Because 10.86.10.0 and 192.168.1.0 is different, show receiving terminal and transmitting terminal not same subnet (step 502), therefore, terminal 1 needs to add the route arriving transmitting terminal place subnet, can send response message to transmitting terminal.For Windows, adding route can use as issued orders: system (" routeADD10.86.10.0MASK255.255.255.0192.168.1.10METRIC3 "), Windows is told in this order, add the route that arrives subnet 10.86.10.0 (mask is 255.255.255.0), this route can be gone directly from this terminal.
As shown in Figure 5, after terminal 1 gets out route, own net parameter can be packed, use UDP clean culture to send and find that response message is to transmitting terminal (step 503).Because route is ready, this response message can arrive transmitting terminal smoothly.Keeper can check the network parameter of terminal 1 from IP discovering tool software, and modifies to it as required, more amended network parameter is sent to terminal 1 (step 504) by udp broadcast with the form revising message.Because amendment message is also sent by broadcast, therefore all terminals all will receive this message, but carry terminal 1 identification marking due to amendment message, only have that terminal 1 can the match is successful.After terminal 1 receives this message, store new parameter (step 505), and utilize UDP clean culture to send amendment response message.Equally because route is ready, this response message can arrive transmitting terminal smoothly, and keeper can see amendment result (step 506) from this IP discovering tool software.
Based on the inventive concept identical with method, embodiments provide a kind of device revising terminal network parameter, comprise as shown in Figure 6:
Sending module, for carrying the discovery message of this transmitting terminal network parameter to receiving terminal broadcast;
First receiver module, for receiving the discovery response message carrying receiving terminal network parameter that this receiving terminal sends according to this discovery message;
Amendment and sending module, for revising the network parameter of this receiving terminal according to this discovery response message, and carry the amendment message of the network parameter of amendment to the broadcast of this receiving terminal;
Second receiver module, for receiving the amendment response message carrying amendment result that this receiving terminal sends according to this amendment message.
Further, also comprise memory module, for storing the network parameter of this amendment.
Based on the inventive concept identical with method, embodiments provide a kind of device revising terminal network parameter, as shown in Figure 7, comprising:
First receiver module, for receiving the discovery message carrying this transmitting terminal network parameter of transmitting terminal broadcast;
Sending module, for sending the discovery response message carrying receiving terminal network parameter to this transmitting terminal according to this discovery message;
Second receiver module, for receiving the amendment message that this transmitting terminal sends, this amendment message carries this transmitting terminal according to the amended network parameter of this discovery response message;
Modified module, for the network parameter according to this amended network parameter amendment self;
Responder module, for sending the amendment response message carrying amendment result to this transmitting terminal.
Further, this sending module, specifically for judging whether self and transmitting terminal are in same subnet according to the network parameter in this discovery message, if so, is then carried at the network parameter of self in transmission response message and sends to this transmitting terminal; If not, then in self routing table, add the routing iinformation arriving transmitting terminal subnet, or the IP address of transmitting terminal is set to self gateway address, and own net parameter is carried at send in response message and sends to this transmitting terminal.
Further, this modified module, specifically for receiving amendment message, therefrom extracts transmitting terminal identification marking, when judging to be amendment inherent parameters, and the network parameter after memory modify.
Present invention also offers a kind of system revising terminal network parameter, as shown in Figure 8, comprising:
Transmitting terminal, for carrying the discovery message of this transmitting terminal network parameter to receiving terminal broadcast; Receive the discovery response message carrying 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 amendment message of the network parameter of amendment to the broadcast of this receiving terminal; Receive the amendment response message carrying amendment result that this receiving terminal sends according to this amendment message;
Receiving terminal, for receiving the discovery message carrying this transmitting terminal network parameter of transmitting terminal broadcast; Send the discovery response message carrying receiving terminal network parameter to this transmitting terminal according to this discovery message; Receive the amendment message that this transmitting terminal sends, this amendment message carries this transmitting terminal according to the amended network parameter of this discovery response message; According to the network parameter of this amended network parameter amendment self; The amendment response message carrying amendment result is sent to this transmitting terminal.
Technical scheme of the present invention can when not knowing terminal network parameter, find and amendment terminal network parameter, overcome terminal and just must can complete the discovery of network parameter and the problem of amendment by keyboard and display screen, reduce terminal hardware design cost, simplify terminal network parameter modification mode, the maintenance improving keeper is experienced.In addition, technical scheme of the present invention does not need terminal to support the complex protocols such as IGMP, overcomes in network service the extra demand brought terminal protocol stack when using IGMP protocol realization information interaction, reduce further terminal software design cost.
Above-mentioned explanation illustrate and describes a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope described herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection range of claim appended by the present invention.