[0027] The Snmp protocol is a simple network management protocol based on the three-layer network protocol, and is currently the most widely used network management method. In order to realize the purpose of realizing the long-distance cluster management of large-scale network equipment by making full use of the high-efficiency and fast advantages of the snmp management mode without increasing the public network ip address, the present invention, such as figure 1 As shown, the present invention sets the uppermost network device in the topology structure as the proxy device B according to the topology structure of the managed network device; only a public network ip address is configured for the proxy device B, and the pair is connected to the proxy device B The other network devices only configure an internal private IP address in the same network segment as the proxy device B; add a forwarding server module in the proxy device B; the forwarding server module in the proxy device B analyzes the snmp request report sent by the management device A It forwards the snmp request message sent by the management device A to the network device Ci or Di or Ei to be accessed; then, the forwarding server module in the proxy device B then forwards the snmp message sent by the network device Ci or Di or Ei To the management device A. Therefore, it is possible to realize the cluster management of large-scale network devices without allocating a public network ip address to each network device.
[0028] In order to realize the above-mentioned cluster management of large-scale network devices based on the snmp protocol, a forwarding node needs to be bound to the snmp request message sent by the management device A, and the network device that the management device A needs to access is embedded in the forwarding node. The internal private ip address is the destination ip address to be forwarded by the forwarding server module, and then the operation node to be accessed is bound behind the forwarding node, so that the forwarding server can determine the network device that the management device A wants to access based on the forwarding node. Then, the forwarding server module removes the forwarding node from the message and stores the ip address and port number of the management device A, and then sends the processed message to the destination network device; finally, it receives the reply message from the destination network device The ip address and port number of the management device A are added to the reply message of the network device, and then forwarded to the management terminal to complete the management terminal's access to any device in the topology network.
[0029] In the entire implementation process, the forwarding server module only does a message delivery work, the real processing is still in the network equipment to be accessed, so that the load on the proxy device is not large, and the proxy device B and the management device The communication between the devices Ci or Di or Ei that A wants to access is carried out through freely allocated private ip addresses in the same network segment, so a lot of public network ip addresses are saved.
[0030] The method for remote cluster management of large-scale network equipment based on the SNMP protocol provided by the present invention includes the following steps:
[0031] 1. The management device obtains the topology structure information of the entire managed network device, and sets the uppermost network device in the topology structure as the proxy device according to the topology structure of the managed network device;
[0032] 2. Allocate a public network ip address for the proxy device; allocate an internal private ip address that is in the same network segment as the proxy device for the proxy device and each other network device connected to the proxy device; and notify all internal private ip addresses Management equipment;
[0033] 3. Add a forwarding server module in the proxy device; the forwarding server module mainly completes receiving the snmp request message sent by the management device; forwards the snmp request message sent by the management device to the device to be accessed to the network device to be accessed; The snmp message replies from the access device is forwarded to the management device; the specific steps are as follows figure 2 Shown
[0034] 1) The management device sends a snmp request message, and binds the ip address of the network device to be accessed by the management device in the snmp request message;
[0035] 2) The agent device monitors port 161 of the management device, and receives the snmp request message sent by the management device;
[0036] 3). Determine whether you are a network device to be accessed by the management device or a proxy device?
[0037]The proxy device parses the received snmp request message. If a forwarding node is bound to the snmp request message, the internal private ip address of the network device that the management device needs to access is embedded in the forwarding node, which is the forwarding destination of the forwarding server module ip address, it means that the proxy device is not the network device to be accessed by the management device at this time, but a proxy device that forwards snmp messages, jump to step 6);
[0038] If there is no forwarding node bound in the snmp request message, but the ip address of the proxy device to be accessed by the management device, it means that the proxy device is not a proxy device but a network device to be accessed by the management device, then enter the standard snmp Processing flow;
[0039] 4). Receive request messages from management equipment;
[0040] 5). Processing the request message and replying to the management device, end;
[0041] 6) The forwarding server module receives the snmp request message sent by the management device, parses the snmp request message to obtain the ip address of the network device to be accessed by the management device, establishes a socket descriptor for forwarding, and sets the ip address and source port of the management device The number and the newly created socket descriptor are stored in a structure array, and the structure array is aging counted;
[0042] 7) The forwarding server module removes the forwarding node in the snmp request message from the request message, reassembles the message, and sends the message to the network device whose ip address is the IP address calculated from the snmp request message ;
[0043] During the forwarding process, the proxy device will automatically select the private ip address to communicate with other devices;
[0044] 8). The forwarding server module receives the reply message of the device to be accessed, and finds the same array element as the socket descriptor in the structure array established above, and takes out the ip address and source port number of the management device as the destination ip address and destination The port number is returned to the management device.
[0045] The above-mentioned custom forwarding node bound in the snmp request message sent by the management device is for example: 1.3.6.1.4.1.10808.3.2.2.100.X1.X2.X3.X4.0, of which, 1.3 .6.1.4.1.10808.3.2.2.100 is a custom forwarding node definition, X1.X2.X3.X4 is the destination ip address of the network device to be accessed by the embedded management device, that is, the destination ip address of the access. If there is no custom forwarding node in the snmp request message sent by the management device, it means that the proxy device is not a proxy device but a network device to be accessed by the management device, and the standard snmp processing flow is entered. If the above-mentioned forwarding node is included in the snmp request message sent by the management device, it means that the proxy device is not the network device that the management device wants to access, but a proxy device that forwards the snmp message, and the proxy device will forward the subsequent work to The forwarding server module is completed.
[0046] It should be noted that such as figure 2 As shown, when the proxy device forwards the snmp request message, it is also responsible for forwarding the trap message sent by other devices. That is, the proxy device monitors port 162, receives trap messages sent by other network devices, and forwards the messages to port 162 of the management device intact. This completes the proxy implementation of the entire standard snmp protocol.
[0047] Throughout the work process, the management device always communicates with the proxy device through the public network ip address, and the proxy device always communicates with other topology network devices through the private ip address, so that it will pass through an agent with a public ip address in the topology network The device has completed the access and management of any device in the topology network. This saves a large number of effective public IP addresses for operators who lack IP resources. In addition, the present invention does not change the standard snmp protocol in the whole process, and is compatible with all network devices that support the standard snmp protocol, so that the compatibility is strong, and the advantages of the efficient and fast snmp management method are fully utilized.