Summary of the invention
The purpose of this invention is to provide a kind of method, make the IP address of revising the network equipment more convenient, thereby made things convenient for Network Management Equipment that the network equipment that is not in the same subnet is managed by Network Management Equipment modification network appliance IP address.
The object of the present invention is achieved like this: the method by Network Management Equipment modification network appliance IP address comprises:
A, Network Management Equipment send the multicast protocol message of request network equipment information to the network equipment;
The multicast protocol message that b, network equipment response Network Management Equipment are sent is carrying the network equipment information that Network Management Equipment need obtain in the message;
C, Network Management Equipment are determined the network equipment of needs modification IP address according to the network equipment information of receiving;
D, the amended IP address information of this network equipment is sent to the network equipment by the multicast protocol message, and its IP address information is revised as the amended IP address information of carrying in this message by the network equipment.
Described multicast protocol message is the message based on UDP (User Datagram Protoco (UDP)).
Loaded information comprises in the multicast protocol message of the described request network equipment information of step a:
The network equipment information that need obtain: the IP address of the network equipment, subnet mask, default gateway information;
Known terminal equipment information: network equipment MAC (medium access control) address information.
Described step b comprises:
The multicast protocol message of the request network equipment information that b1, network equipment reception Network Management Equipment are sent;
B2, judge whether to the mac address information with present networks equipment is complementary according to the mac address information of the network equipment that carries in the message, if, execution in step b3, otherwise, execution in step b4;
The multicast protocol message that b3, response Network Management Equipment are sent is carrying the network equipment information that Network Management Equipment need obtain, execution in step c in the message;
B4, this message is not done any processing.
Described step c comprises:
C1, Network Management Equipment receive the response message of the network equipment, obtain the IP address information of the network equipment;
Whether c2, the IP address of judging the network equipment are in the same subnet with the IP address of Network Management Equipment, if, execution in step c3, otherwise, execution in step c4;
The IP address information of c3, this network equipment does not need to revise;
The IP address information of c4, this network equipment needs to revise.
Described steps d also comprises: the network equipment is revised after the IP address finishes, and sends the IP address to Network Management Equipment and revises successful message, and Network Management Equipment receives the information of this network equipment of its storage of modification after this message.
The described network equipment is all terminal equipments that Network Management Equipment is managed.
By technique scheme as can be seen, Network Management Equipment connects by the multicast protocol message and the network equipment among the present invention, realizes the modification to the corresponding network IP address of equipment, and it is very convenient compared with prior art to operate.And revise network appliance IP address easily and effectively, network equipment is changed, when causing equipment that Network Management Equipment manages and its not to be in the same network segment, Network Management Equipment can relatively easily be revised as the IP address that is in the same network segment with Network Management Equipment with the IP address of managed devices, thereby realizes the management to managed devices.
Embodiment
Core of the present invention is to adopt the multicast mode to establish a communications link between Network Management Equipment and terminal equipment, and the terminal equipment of revising the IP address to needs by Network Management Equipment sends the order of revising the IP address, terminal equipment is received after the instruction, through check, confirm errorless fill order later on, equipment restarts then, and Network Management Equipment just can establish a communications link by the IP address with terminal equipment, realizes the management to terminal equipment.
The specific embodiment of the present invention comprises as shown in Figure 1:
Step 1: the multicast protocol message of Network Management Equipment all terminal equipment information of being managed to network device requests, carrying the terminal equipment information that to obtain and known terminal equipment information in the message, need obtain terminal equipment information comprises: the IP address of equipment, subnet mask, default gateway information etc., with the convenient terminal equipment of determining to need to revise the IP address, known terminal equipment information is the MAC of equipment (medium access control) address;
Network Management Equipment is set up multicast and is connected, and adds the multicast group, sends multicast message, then with Network Management Equipment all terminal equipments in same multicast group, comprise with Network Management Equipment not at the equipment of same subnet, all can receive the message bag of Network Management Equipment;
Suppose that entire I P PBX (Internet protocol subscriber exchange) system comprises Network Management Equipment and four terminal equipments, the MAC Address of each terminal equipment is known, and the IP address is unknown, can not be successful so manage by general IP address connection communication; For this reason, Network Management Equipment need use multicast port one 0000 to set up the multicast connection, add multicast group 244.244.244.244, send multicast message, message format is: multicast message type (obtaining facility information), Network Management Equipment type, Network Management Equipment IP address (192.168.100.1), after sending, wait for receiveing the response of receiving terminal apparatus;
Step 2: the network equipment receives the multicast protocol message that Network Management Equipment is sent, and obtains the known terminal equipment information in the message;
Step 3: judge whether the known terminal equipment information of carrying in the message is complementary with own corresponding equipment information, if coupling, then execution in step 5, otherwise execution in step 4;
Step 4: abandon this message;
Step 5: the passage of being set up by Network Management Equipment transmission multicast protocol message sends response message to Network Management Equipment, carrying the terminal equipment information that Network Management Equipment need obtain in the message, like this, Network Management Equipment just can be known the detailed device information of all terminal equipments;
The form of response message is: multicast message type (obtaining facility information), terminal equipment type, terminal device IP address, subnet mask, default gateway, MAC Address; The information of each terminal equipment that Network Management Equipment gets access to from message, suppose that the information of four terminal equipments is respectively:
Terminal equipment one: MAC:00-50-58-00-00-01, IP address: 192.168.200.1;
Terminal equipment two: MAC:00-50-58-00-00-02, IP address: 192.168.200.2;
Terminal equipment three: MAC:00-50-58-00-00-03, IP address: 192.168.200.3;
Terminal equipment four: MAC:00-50-58-89-00-04, IP address: 192.169.1.2;
Step 6: the detailed device information that Network Management Equipment is sent according to terminal equipment, judge that whether terminal equipment IP address is in the same subnet with oneself IP address, if then execution in step 7, otherwise, execution in step 8;
Step 7: this terminal equipment IP address is not done any processing, all do not need to revise the IP address as the described terminal equipment one, two of step 5 and three;
Step 8: this terminal equipment IP address is made amendment, just need carry out the modification of IP address as the described terminal equipment four of step 5, concrete process comprises as shown in Figure 2:
Step 81: Network Management Equipment is set up multicast and is connected, add the multicast group, send the multicast message bag, carrying MAC Address (promptly needing to revise the sign of the terminal equipment of IP address), the amended IP address information (comprising IP address, subnet mask, default gateway) of the terminal equipment that needs to revise the IP address in the message bag;
Network Management Equipment uses multicast port one 0000 to set up the multicast connection, add multicast group 244.244.244.244, send the multicast message bag, message packet format is: multicast message type (modification IP address of equipment), Network Management Equipment type, Network Management Equipment IP address (192.168.100.1), the MAC Address (00-50-58-89-00-04) that needs the terminal equipment of modification IP address, the IP address (192.168.200.4) of revising, the subnet mask (255.255.0.0) of modification, the default gateway of revising (192.168.1.1);
Step 82: the message bag that terminal equipment is complementary with it according to terminal equipment message pick-up in the message bag, promptly with the consistent terminal equipment calling system method of MAC Address in the message, promptly use existing API (API function) to carry out the modification of IP address, send to Network Management Equipment simultaneously and revise successful message;
Be that MAC Address is that the terminal equipment four calling system methods of 00-50-58-89-00-04 are modified as analog value in the message bag with IP address, subnet mask, default gateway, be respectively the IP address 192.168.1.1 of IP address 192.168.200.4, subnet mask 255.255.0.0, default gateway; The multicast of using Network Management Equipment to set up then connects, and receives the response, and message format is: multicast message type (modification IP address of equipment), terminal equipment type, device mac address (00-50-58-89-00-04), modification IP address of equipment result (success);
Step 83: after successful message is revised in Network Management Equipment receiving terminal apparatus IP address, revise the information of this terminal equipment of local storage; Network Management Equipment also can send multicast message once more and obtain the information of terminal equipment to confirm whether to be modified as merit; Terminal equipment restarts then, the facility information that the while Network Management Equipment is stored in this locality according to the response results modification terminal equipment of terminal equipment.
After the IP address of corresponding terminal equipment is finished in modification, Network Management Equipment uses multicast port one 0000 to set up the multicast connection, add multicast group 244.244.244.244, send multicast message, message format is: multicast message type (obtaining facility information), Network Management Equipment type, Network Management Equipment IP address (192.168.100.1), after sending, wait for receiveing the response of receiving terminal apparatus, this process is identical with step 1; Terminal equipment is received the multicast message that obtains IP address of equipment, the multicast of using Network Management Equipment to set up connects, receive the response, message format is: multicast message type (obtaining facility information), terminal equipment type, terminal device IP address, subnet mask, default gateway, MAC Address, and this process and step 2 are to 5 identical; The information of each terminal equipment that Network Management Equipment gets access to from message can find that the terminal device IP address of modification comes into force; If still existence and Network Management Equipment IP address are not in the terminal equipment in the same network segment, perhaps can not set up the terminal equipment of communication by the IP address for a plurality of, Network Management Equipment can repeat said process, and all terminal equipments in whole system are all in same subnet; So far, terminal equipment IP address is revised successfully.