WO2011134238A1 - Method and device for processing simple network management protocol (snmp) request message - Google Patents

Method and device for processing simple network management protocol (snmp) request message Download PDF

Info

Publication number
WO2011134238A1
WO2011134238A1 PCT/CN2010/077626 CN2010077626W WO2011134238A1 WO 2011134238 A1 WO2011134238 A1 WO 2011134238A1 CN 2010077626 W CN2010077626 W CN 2010077626W WO 2011134238 A1 WO2011134238 A1 WO 2011134238A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
snmp
source
information item
control block
Prior art date
Application number
PCT/CN2010/077626
Other languages
French (fr)
Chinese (zh)
Inventor
郭红涛
王义安
罗小妮
强伟峰
王彦华
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011134238A1 publication Critical patent/WO2011134238A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]

Definitions

  • the present invention relates to the field of communications, and in particular, to an SNMP (Simple Network Management Protocol) request packet processing method and apparatus.
  • SNMP Simple Network Management Protocol
  • IP Internet Protocol
  • IP-based devices IP is not only used to carry traditional broadband services, but also to carry new voice services.
  • SNMP Simple Network Management Protocol
  • SNMP specifies five protocol data units (PDUs) (that is, SNMP packets) for interaction between the network management device 11 and the network element device (ie, the agent side device) 12. As shown in Figure 1, it is specifically:
  • Trap operation A packet sent by the NE device to notify the NMS that certain events occur.
  • SNMP packets In the above five types of SNMP packets, the first three types of packets are sent by the network management device to the network element device. The latter two types of packets are sent by the network element device to the network management device, and only the Trap type is used.
  • An SNMP packet is an unsolicited message initiated by a network element device. It reports specific events, such as device startup, shutdown, and other changes to the network management device.
  • SNMP provides three basic operations: Get network device information (Get: read operation), set network device parameter values (Set: write operation), and event report (Trap: trap operation) .
  • the Get-Response and Set-Request protocol messages all contain an identifier (ID) field, which is used to match requests and responses, and SNMP assigns a globally unique ID to each request. For packets sent by the same network management device, the ID will not be duplicated for a short period of time.
  • ID identifier
  • the Get-Request, Get-Next-Request, or Set-Request type sent by the network management device is called the SNMP request
  • the Get-Response type of the message sent by the network element device is called SNMP response message.
  • the present invention provides a method and a device for processing an SNMP request packet, which solves the problem of actually processing a large number of repeated requests, and completely avoids the impact of repeated SNMP request packets on the network element device.
  • the present invention provides a method for processing an SNMP request packet, including:
  • the currently received SNMP request packet is discarded.
  • the method further comprises:
  • the number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items of the same source IP is not greater than the second set number.
  • the identifier information extracting unit is configured to obtain the source IP address and the Request-ID in the currently received SNMP request packet, where different SNMP request packets received from the same source IP are uniquely identified by different Request-IDs;
  • a packet discarding unit is configured to discard the currently received SNMP request packet when the information item including the currently obtained source IP address and the Request-ID is found.
  • the SNMP request message processing device further includes:
  • the currently obtained source IP and Request-ID are stored as new information items in the SNMP management control block;
  • the message processing unit is configured to process the currently received SNMP request message when the information item including the currently obtained source IP address and the Request-ID is not found.
  • the SNMP request message processing device further includes:
  • the number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items of the same source IP is not greater than the second set number;
  • the unit is further configured to: when determining that the stored number of different information items including the currently acquired source IP is equal to the second set number, deleting the information item including the currently acquired source IP that has the longest storage time; determining the stored information item When the number of different source IPs included is equal to the first set number, the storage of the new information item is skipped.
  • FIG. 3 is a flowchart of a method for processing an SNMP request packet according to an embodiment of the present invention
  • FIG. 6 is a structural diagram of an apparatus for processing an SNMP request message according to an embodiment of the present invention.
  • the source IP address and the Request-ID learning mechanism in the SNMP request packet are set in the network element device, and the source IP address and the Request-ID in the previously received SNMP request message are stored as information items, and each information item includes a source. IP and Request-ID.
  • the source IP address and the Request-ID are extracted from the packet, and the current source IP address and Request-ID are used as indexes to search in the SNMP management control block.
  • Step S304 When the information item including the currently obtained source IP address and the Request-ID is found, the currently received SNMP request message is discarded.
  • the SNMP request packet processing method is provided, as shown in FIG. 4, the SNMP management.
  • the control block consists of an IP address queue and a transaction number queue corresponding to the entries in the IP address queue.
  • the REQ in FIG. 4 is a shorthand for the Request-ID in this document, and the different REQs in the lower corner indicate different Request-IDs.
  • Different entries in the IP address queue of the SNMP management control block store different source IPs in the information item. Each entry in the IP address queue corresponds to a transaction number queue. The Request-ID in the same source IP information is placed in the same transaction number queue.
  • the embodiment further includes: setting an aging timer corresponding to the information item stored in the SNMP management control block, and deleting the information item corresponding to the aging timer when the aging timer reaches the timing time , that is, the information items learned in the aging SNMP management control block.
  • Step S501 Extract the source IP and Request-ID fields in the SNMP request packet for the SNMP request message that is newly arrived from the network port.
  • Step S502 Search, by using the extracted source IP and Request-ID as an index, in the foregoing SNMP management control block;
  • Step S503 determining that the information items of the source IP and the Request-ID are already present in the SNMP management control block, and if yes, executing step S504, otherwise performing step S505;
  • Step S504 discarding the currently received SNMP request message, and returning to step S501.
  • Step S505 The extracted source IP address and the Request-ID are respectively learned into the SNMP management control block, and the aging timer of the information item is set, and the SNMP request packet is delivered to the normal processing flow to continue processing, and the process ends.
  • step S502 of the embodiment when the extracted source IP and the Request-ID are indexed in the SNMP management control block, the IP address queue of the storage network management device IP is preferably first retrieved by using the extracted source IP; If the IP address queue of the network management device IP is empty or the IP address queue of the storage network management device IP is not empty but the source IP address is not available, the request-ID cannot be retrieved.
  • Step S505 is directly performed: First, the extracted source IP address is learned. Go to the IP address queue, learn the extracted Request-ID to the transaction number queue corresponding to the source IP, and set the aging timing of the information item.
  • step S502 if the address queue of the storage network management device IP is retrieved by using the extracted source IP, if the address queue of the storage network management device IP is not empty and the source IP is retrieved, the transaction number queue corresponding to the source IP is searched. Extracted Request-ID; If the corresponding Request-ID is not found in the transaction number queue, step S505 is performed: learning the extracted Request-ID to the transaction number queue corresponding to the source IP, and setting the aging timing of the information item Device.
  • step S505 when the length of the address queue and the transaction number queue is limited, when the learning is performed in step S505, it is determined that the number of different source IPs included in the stored information item is equal to the first set number, such as 5, The learning process of the information item will be skipped and the subsequent processing will be directly performed. That is, after the number of learned IP addresses exceeds the length of the address queue, the new IP address can be learned only after the number of queues corresponding to the IP address of the longer time is aged and the number of IP addresses is less than the length of the address queue.
  • different information items including the acquired source IP are determined. When the number is equal to the second set number, the information item including the acquired source IP having the longest storage time is deleted. That is, after the maximum number of Request-ID queues corresponding to the source IP is reached, the oldest learned Request-ID in the transaction number queue corresponding to the source IP is deleted, and the newly learned Request-ID is added.
  • the execution flow of the aging timer being triggered and destroyed in this embodiment is: 1) setting the aging timer of the information item when setting the specific Request-ID entry of the information item in the transaction number queue; 2) the aging The timer expires, and the information item entry corresponding to the aging timer is deleted. 3) The aging timer of the information item is destroyed.
  • the aging timer of the information item in the 2) expires, the corresponding Request-ID entry in the column of the transaction number pair is deleted, and the process is also called the aging of the transaction number queue entry, or The aging of the Request-ID; check whether the transaction number queue of the same IP address after deleting the Request-ID entry is empty; if the column is empty, delete the corresponding IP address entry in the address queue. This process is called network management IP. Aging.
  • the default time of the aging of the Request-ID corresponding to the IP address is 30 seconds, and the time passes the time.
  • the machine interface can be flexibly configured according to the needs of the system.
  • an SNMP request message processing apparatus includes: an SNMP management control block 601 configured to store an information item, where the information item includes previous reception. The source IP address and the Request-ID in the SNMP request message; the identifier information extracting unit 602 is configured to obtain the source IP and the Request-ID in the currently received SNMP request message, where different SNMP request reports are received from the same source IP address.
  • the apparatus further includes: an identification information learning unit 605 configured to use the currently obtained source IP and Request-ID as new information when the information item including the currently acquired source IP and Request-ID is not found.
  • the item is stored in the SNMP management control block;
  • the message processing unit 606 is configured to: when the information item including the currently acquired source IP and Request-ID is not found, The current received SNMP request message.
  • the timer setting unit 607 is configured to set an aging timer corresponding to the information item in the SNMP management control block, and the identifier information aging unit 608 is configured to delete the aging timer when the aging timer reaches the timing time.
  • the information item corresponding to the aging timer implements aging of the information items stored in the SNMP management control block 601.
  • the method and device for processing the SNMP request packet provided by the present invention can solve the problem of the repeated SNMP request message from the perspective of the network element device, and can effectively avoid the network management device when the flooding and routing loopback exist in the network. Impact on the NE device when sending an SNMP request packet to the NE device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses a method and a device for processing a Simple Network Management Protocol (SNMP) request message. The method includes: obtaining the source IP and the Request-ID in the currently received SNMP request message, wherein different SNMP request messages which are received from the same source IP are uniquely identified by different Request-IDs; using the source IP and the Request-ID which are currently obtained as indexes to search in a SNMP management controlling module, wherein the SNMP management controlling module is used for storing information items and the information item includes the source IP and the Request-ID which are included in the previously received SNMP request message; and when the information item that includes the source IP and the Request-ID which are currently obtained is searched out, discarding the currently received SNMP request message. The present invention can effectively avoid the impact to the network element device when the network management device sends a SNMP request message to the network element device in the case that the flooding and the routing loopback exist in the network.

Description

一种 SNMP请求报文处理方法及装置  SNMP request message processing method and device
技术领域 Technical field
本发明涉及通信领域,尤其涉及一种 SNMP( Simple Network Management Protocol, 简单网络管理协议)请求报文处理方法及装置。 背景技术  The present invention relates to the field of communications, and in particular, to an SNMP (Simple Network Management Protocol) request packet processing method and apparatus. Background technique
现在网络的发展趋势是 IP ( Internet Protocol, 网络之间互连的协议 )化, 基于 IP的设备越来越多。 IP不仅用来承载传统的宽带业务, 也用来承载新的 语音业务。 应用 IP 的网络设备越多, 管理网络设备的重要性也不言而喻。 SNMP ( Simple Network Management Protocol , 简单网络管理协议)是目前应 用最为广泛的一种网络设备管理协议。  Nowadays, the development trend of the network is IP (Internet Protocol), and more and more IP-based devices. IP is not only used to carry traditional broadband services, but also to carry new voice services. The more network devices that use IP, the importance of managing network devices is self-evident. SNMP (Simple Network Management Protocol) is one of the most widely used network device management protocols.
SNMP规定了 5种协议数据单元(Protocol Date Unit, PDU ) (也就是 SNMP报文),用于网管设备 11和网元设备 (即代理侧设备 ) 12之间的交互。 如图 1所示, 具体为:  SNMP specifies five protocol data units (PDUs) (that is, SNMP packets) for interaction between the network management device 11 and the network element device (ie, the agent side device) 12. As shown in Figure 1, it is specifically:
1 )获取请求 (get-request ) : 由网管设备发送给网元设备, 用于网管设 备从网元设备处提取一个或多个参数值;  1) get-request: sent by the network management device to the network element device, where the network management device extracts one or more parameter values from the network element device;
2 )获取下一个请求 (get-next-request ) : 由网管设备发送给网元设备, 用于网管设备从网元设备处提取紧跟当前参数值的下一个参数值;  2) Get the next request (get-next-request): sent by the network management device to the network element device, where the network management device extracts the next parameter value immediately following the current parameter value from the network element device;
3 )设置请求 ( set-request ) : 由网管设备发送给网元设备, 用于设置网 元设备的一个或多个参数值, 因此网管设备可以使用 Set-Request远程设置网 元设备的参数;  3) set request (set-request): sent by the network management device to the network element device, used to set one or more parameter values of the network element device, so the network management device can remotely set the parameters of the network element device by using Set-Request;
4 )获取响应 ( get-response ):用于网元设备接收网管设备发送 get-request, get-next-request或 set-request后, 向网管设备返回一个或多个参数值;  4) Get response (get-response): After the network element device receives the get-request, get-next-request or set-request, the network element device returns one or more parameter values to the network management device.
5 ) 陷阱操作 (trap ) : 网元设备主动发出的报文, 用于通知网管设备有 某些事件发生。  5) Trap operation (trap): A packet sent by the NE device to notify the NMS that certain events occur.
上述五种类型的 SNMP报文中, 前面三种报文是由网管设备向网元设备 发出的, 后面两种报文是由网元设备发给网管设备的, 且只有 Trap类型的 SNMP报文是网元设备主动发起的非请求信息报文, 向网管设备报告特定的 事件, 如设备的启动、 关闭和其他变化等。通过上面五种类型的 SNMP ·^艮文, SNMP提供三种基本操作: 获取网络设备信息 (Get: 读操作) 、 设置网络设 备参数值 ( Set: 写操作)和事件报告 ( Trap: 陷阱操作) 。 In the above five types of SNMP packets, the first three types of packets are sent by the network management device to the network element device. The latter two types of packets are sent by the network element device to the network management device, and only the Trap type is used. An SNMP packet is an unsolicited message initiated by a network element device. It reports specific events, such as device startup, shutdown, and other changes to the network management device. Through the above five types of SNMP, SNMP provides three basic operations: Get network device information (Get: read operation), set network device parameter values (Set: write operation), and event report (Trap: trap operation) .
网管设备和网元设备交互过程中发送的 Get-request、 Get-Next-Request、 Get-request, Get-Next-Request, sent during the interaction between the network management device and the network element device.
Get-Response、 Set-Request协议报文中都包含标识( ID )字段, 该 ID字段用 于匹配请求和响应, SNMP给每个请求分配全局唯一的 ID。 对于同一个网管 设备发出的数据包, 该 ID在短时间内不会出现重复的情况。 本文中将网管设 备发送的 Get-request、 Get-Next-Request或 Set-Request类型的才艮文均称为 SNMP请求 ^艮文, 将网元设备发送的 Get-Response类型的^艮文称为 SNMP响 应报文。 The Get-Response and Set-Request protocol messages all contain an identifier (ID) field, which is used to match requests and responses, and SNMP assigns a globally unique ID to each request. For packets sent by the same network management device, the ID will not be duplicated for a short period of time. In this paper, the Get-Request, Get-Next-Request, or Set-Request type sent by the network management device is called the SNMP request, and the Get-Response type of the message sent by the network element device is called SNMP response message.
SNMP协议中, 在网元设备所处的广播域中存在洪范和路由环路的情况 下, 数据包会被洪范到所有的网元设备上, 有默认路由到网关的网元设备会 把这种数据包重新路由到网关上, 网关会再次把该数据包洪范到该广播域中 的所有网元设备上。 如图 2所示为存在上述问题的网络环境, 网管设备 C要 给网元设备 D发送 SNMP请求报文, 该 SNMP请求报文通过中间网络 B会 下发到网元设备 D上。 由于二次封装虚拟局域网 (VLAN ) ( QINQ )机制不 完善或者其他原因在中间网络 B存在洪范的情况下, 该 SNMP请求报文也会 被发送到网元设备 A上, 如果网元设备 A上存在缺省路由到中间网络 B , 则 这个 SNMP请求 ^艮文会被发回给中间网络 B。因为中间网络 B的洪范的原因, 该 SNMP请求 ^艮文再次被发到网元设备 D上。这样循环, 网元设备 D就会收 到很多重复的 SNMP请求报文( SNMP请求报文中的源 IP地址和 ID字段都 相同) , 要实际处理很多重复的请求, 造成设备繁忙, 严重的时候甚至会影 响到设备的正常运行。 这种情况可以通过解决中间网络 B的洪范问题和网元 设备 A路由环路的问题来解决, 但不能完全保证网络环境中不存在该问题。  In the SNMP protocol, when there is a flooding and routing loop in the broadcast domain where the network element device is located, the data packet will be flooded to all the network element devices, and the network element device with the default route to the gateway will The packet is rerouted to the gateway, and the gateway again floods the packet to all network element devices in the broadcast domain. As shown in Figure 2, in the network environment where the above problem occurs, the network management device C sends an SNMP request packet to the network element device D. The SNMP request packet is sent to the network element device D through the intermediate network B. The SNMP request packet is also sent to the network element device A if the secondary encapsulated virtual local area network (VLAN) (QINQ) mechanism is incomplete or other reasons are present in the intermediate network B. If the network element device A If there is a default route to the intermediate network B, then the SNMP request will be sent back to the intermediate network B. Because of the flood of intermediate network B, the SNMP request is sent to the network element device D again. In this way, the network element device D receives many repeated SNMP request messages (the source IP address and ID field in the SNMP request message are the same), and the actual processing of many repeated requests causes the device to be busy. It even affects the normal operation of the device. This situation can be solved by solving the flood problem of the intermediate network B and the problem of the routing loop of the network element device A, but it is not completely guaranteed that the problem does not exist in the network environment.
发明内容 Summary of the invention
本发明提供一种 SNMP请求报文处理方法及装置, 解决实际处理很多重 复的请求的问题, 彻底避免重复 SNMP请求报文对网元设备的冲击。 本发明提供一种 SNMP请求报文处理方法, 包括: The present invention provides a method and a device for processing an SNMP request packet, which solves the problem of actually processing a large number of repeated requests, and completely avoids the impact of repeated SNMP request packets on the network element device. The present invention provides a method for processing an SNMP request packet, including:
获取当前接收的 SNMP请求才艮文中的源 IP和请求标识( Request-ID ) , 其中从同一源 IP接收的不同 SNMP请求报文用不同的 Request-ID唯一标识; 以当前获取的源 IP和 Request-ID为索引在 SNMP管理控制块中进行查 找,该 SNMP管理控制块用于存储信息项,所述信息项包括之前接收的 SNMP 请求 4艮文中的源 IP和 Request-ID; 以及  The source IP address and the request identifier (Request-ID) in the received SNMP request are obtained. The different SNMP request packets received from the same source IP address are uniquely identified by different Request-IDs. The current source IP address and Request are obtained. - ID is an index in the SNMP management control block for storing information items, the information items including source IP and Request-ID in the previously received SNMP request message;
在查到包括当前获取的源 IP和 Request-ID的信息项时,丟弃当前接收的 SNMP请求报文。  When the information item including the current source IP address and the Request-ID is found, the currently received SNMP request packet is discarded.
优选地, 该方法还包括:  Preferably, the method further comprises:
在未查到包括当前获取的源 IP和 Request-ID的信息项时,将当前获取的 源 IP和 Request-ID作为新的信息项存储到所述 SNMP管理控制块中,并处理 当前接收的 SNMP请求报文。  When the information item including the currently acquired source IP and Request-ID is not found, the currently obtained source IP and Request-ID are stored as new information items in the SNMP management control block, and the currently received SNMP is processed. Request a message.
优选地, 该方法还包括: 对所述 SNMP管理控制块中存储的信息项设置 对应的老化定时器, 在所述老化定时器到达定时时间时, 删除与该老化定时 器对应的信息项。  Preferably, the method further includes: setting an aging timer corresponding to the information item stored in the SNMP management control block, and deleting the information item corresponding to the aging timer when the aging timer reaches the timing time.
优选地,所述 SNMP管理控制块中的信息项包括的不同源 IP的数目不大 于第一设定数目, 同一源 IP的不同信息项的数目不大于第二设定数目。  Preferably, the number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items of the same source IP is not greater than the second set number.
优选地,在将当前获取的源 IP和 Request-ID作为新的信息项存储到所述 SNMP管理控制块中之前, 所述方法还包括:  Preferably, before the storing the currently obtained source IP and the Request-ID as the new information item in the SNMP management control block, the method further includes:
确定所存储的包括当前获取的源 IP的不同信息项数目等于第二设定数目 时, 删除存储时间最长的包括当前获取的源 IP的信息项。  When it is determined that the stored number of different information items including the currently acquired source IP is equal to the second set number, the information item including the currently acquired source IP having the longest storage time is deleted.
优选地,在将当前获取的源 IP和 Request-ID作为新的信息项存储到所述 SNMP管理控制块中之前, 所述方法还包括:  Preferably, before the storing the currently obtained source IP and the Request-ID as the new information item in the SNMP management control block, the method further includes:
确定所存储的信息项包括的不同源 IP的数目等于第一设定数目时,跳过 对所述新的信息项的存储。  The storage of the new information item is skipped when it is determined that the number of different source IPs included in the stored information item is equal to the first set number.
本发明还提供一种 SNMP请求报文处理装置, 包括:  The present invention also provides an SNMP request packet processing apparatus, including:
SNMP管理控制块, 其设置为存储信息项, 所述信息项包括之前接收的 SNMP请求 ^艮文中源 IP和请求标识( Request-ID ) ; An SNMP management control block, configured to store an information item, the information item including previously received The source IP address and the request identifier (Request-ID) of the SNMP request.
标识信息提取单元, 其设置为获取当前接收的 SNMP请求报文中的源 IP 和 Request-ID , 其中从同一源 IP接收的不同 SNMP 请求报文用不同的 Request-ID唯一标识;  The identifier information extracting unit is configured to obtain the source IP address and the Request-ID in the currently received SNMP request packet, where different SNMP request packets received from the same source IP are uniquely identified by different Request-IDs;
标识信息查找单元,其设置为以当前获取的源 IP和 Request-ID为索引在 An identification information searching unit configured to index the currently obtained source IP and Request-ID
SNMP管理控制块中进行查找; 以及 Finding in the SNMP management control block;
报文丟弃单元,其设置为在查到包括当前获取的源 IP和 Request-ID的信 息项时, 丟弃当前接收的 SNMP请求报文。  A packet discarding unit is configured to discard the currently received SNMP request packet when the information item including the currently obtained source IP address and the Request-ID is found.
优选地, 该 SNMP请求报文处理装置还包括:  Preferably, the SNMP request message processing device further includes:
标识信息学习单元, 其设置为在未查到包括当前获取的源 IP 和 An identification information learning unit, configured to include not including the currently acquired source IP and
Request-ID的信息项时, 将当前获取的源 IP和 Request-ID作为新的信息项存 储到所述 SNMP管理控制块中; 以及 When the information item of the Request-ID is used, the currently obtained source IP and Request-ID are stored as new information items in the SNMP management control block;
报文处理单元,其设置为在未查到包括当前获取的源 IP和 Request-ID的 信息项时, 处理当前接收的 SNMP请求报文。  The message processing unit is configured to process the currently received SNMP request message when the information item including the currently obtained source IP address and the Request-ID is not found.
优选地, 该 SNMP请求报文处理装置还包括:  Preferably, the SNMP request message processing device further includes:
定时器设置单元, 其设置为对所述 SNMP管理控制块中的信息项设置对 应的老化定时器; 以及  a timer setting unit configured to set an aging timer corresponding to an information item in the SNMP management control block;
标识信息老化单元, 其设置为在所述老化定时器到达定时时间时, 删除 与该老化定时器对应的信息项。  An identification information aging unit is configured to delete an information item corresponding to the aging timer when the aging timer arrives at a timing time.
该装置中所述 SNMP管理控制块中的信息项包括的不同源 IP的数目不大 于第一设定数目, 同一源 IP的不同信息项的数目不大于第二设定数目; 所述 标识信息学习单元还设置为, 确定所存储的包括当前获取的源 IP的不同信息 项数目等于第二设定数目时, 删除存储时间最长的包括当前获取的源 IP的信 息项; 确定所存储的信息项包括的不同源 IP的数目等于第一设定数目时, 跳 过对所述新的信息项的存储。  The number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items of the same source IP is not greater than the second set number; The unit is further configured to: when determining that the stored number of different information items including the currently acquired source IP is equal to the second set number, deleting the information item including the currently acquired source IP that has the longest storage time; determining the stored information item When the number of different source IPs included is equal to the first set number, the storage of the new information item is skipped.
该装置中所述 SNMP管理控制块由一个 IP地址队列和对应于 IP地址队 列中条目的事务编号队列组成, 所述 IP地址队列中不同条目存储的是信息项 中的不同源 IP,同一源 IP的信息项中的 Request-ID存储在同一事物编号队列 中。 The SNMP management control block in the device is composed of an IP address queue and a transaction number queue corresponding to an entry in the IP address queue. Different entries in the IP address queue store different source IPs in the information item, and the same source IP address. The Request-ID in the information item is stored in the same transaction number queue. Medium.
利用本发明提供的 SNMP请求报文处理方法及装置具有以下有益效果: 从网元设备角度来解决出现的重复 SNMP请求报文的问题, 可以在网络中存 在洪范和路由环回的情况下, 有效避免网管设备向网元设备发送 SNMP请求 报文时对网元设备的冲击。 附图概述  The method and the device for processing the SNMP request packet provided by the present invention have the following beneficial effects: The problem of the repeated SNMP request message is solved from the perspective of the network element device, and the flooding and routing loopback may exist in the network. The impact on the NE device when the NMS sends an SNMP request packet to the NE device. BRIEF abstract
图 1为现有技术中网管设备利用 SNMP与网元设备 (即代理侧设备) 的 交互示意图;  FIG. 1 is a schematic diagram of interaction between a network management device and a network element device (ie, a proxy device) in the prior art;
图 2为现有技术中存在重复 SNMP请求报文对网元设备冲击的网络环境 示意图;  2 is a schematic diagram of a network environment in which a repeated SNMP request packet impacts a network element device in the prior art;
图 3为本发明实施例中 SNMP请求报文处理方法流程图;  3 is a flowchart of a method for processing an SNMP request packet according to an embodiment of the present invention;
图 4为本发明实施例中包括地址队列和事物编号队列的数据结构图; 图 5为本发明实施例中网元设备处理 SNMP请求报文流程图;  4 is a data structure diagram of an address queue and a transaction number queue according to an embodiment of the present invention; FIG. 5 is a flowchart of processing an SNMP request packet by a network element device according to an embodiment of the present invention;
图 6为本发明实施例中 SNMP请求报文处理系装置结构图。  FIG. 6 is a structural diagram of an apparatus for processing an SNMP request message according to an embodiment of the present invention.
本发明的较佳实施方式 Preferred embodiment of the invention
下面结合附图和实施例对本发明提供的 SNMP请求报文处理方法及装置 进行更详细的说明。  The SNMP request packet processing method and apparatus provided by the present invention are described in more detail below with reference to the accompanying drawings and embodiments.
网管设备发送的 SNMP请求 ^艮文如 Get-request、 Get-Next-Request或 SNMP request sent by the network management device ^艮文如 Get-request, Get-Next-Request or
Set-Request类型的报文, 是从上游网管设备过来的请求数据包, 对于代理侧 网元设备来说接收到上述 SNMP请求报文会进行处理并发送 SNMP响应报 文。因此重复的 SNMP请求报文对网元设备的冲击较大。本发明提供的 SNMP 请求报文处理方法及装置, 用于解决网络中存在洪范和路由环回的情况下, 重复的 SNMP请求报文对网元设备的冲击。 The packet of the Set-Request type is a request packet from the upstream network management device. The agent-side network element device receives the SNMP request packet and processes the SNMP response packet. Therefore, repeated SNMP request packets have a greater impact on the NE device. The method and device for processing the SNMP request packet provided by the present invention are used to solve the impact of repeated SNMP request packets on the network element device in the case that the flooding and the routing loopback exist in the network.
如图 3所示, 本发明提供一种 SNMP请求报文的处理方法, 包括: 步骤 S301 , 获取当前接收的 SNMP请求报文中的源 IP和 Request-ID, 其中从同一源 IP接收的不同 SNMP请求报文用不同 Request-ID唯一标识; 对于同一个网元设备来说, 可能存在多个网管设备都可能通过 SNMP来 管理该网元设备。网元设备是通过 SNMP请求报文中的源 IP地址来区分不同 的网管设备。从同一源 IP接收的不同 SNMP请求报文用不同 Request-ID唯一 标识,因此对于同一个网管设备发送的不同的 SNMP请求报文,是根据 SNMP 请求报文中 Request-ID 来区分的。根据 SNMP请求报文中的这两个信息来区 分不同网管设备的不同 Request请求操作。 As shown in FIG. 3, the present invention provides a method for processing an SNMP request packet, including: Step S301: Acquire a source IP and a Request-ID in a currently received SNMP request packet, The different SNMP request packets received from the same source IP address are uniquely identified by different Request-IDs. For the same network element device, multiple network management devices may manage the network element device through SNMP. The NE device distinguishes different network management devices by using the source IP address in the SNMP request packet. Different SNMP request packets received from the same source IP address are uniquely identified by different Request-IDs. Therefore, different SNMP request packets sent by the same network management device are distinguished according to the Request-ID in the SNMP request packet. Differentiating different Request requests from different network management devices according to the two pieces of information in the SNMP request message.
步骤 S302, 以当前获取的源 IP和 Request-ID为索引在 SNMP管理控制 块中进行查找, 该 SNMP管理控制块用于存储信息项, 所述信息项包括之前 接收的 SNMP请求报文中源 IP和 Request-ID。  Step S302: Perform a search in the SNMP management control block by using the currently obtained source IP and the Request-ID as an index, where the SNMP management control block is used to store the information item, where the information item includes the source IP address of the previously received SNMP request message. And Request-ID.
在网元设备中建立对 SNMP请求报文中的源 IP和 Request-ID学习机制, 对之前接收的 SNMP请求 ^艮文中的源 IP和 Request-ID作为信息项进行存储, 每一信息项包括源 IP和 Request-ID, 每个 SNMP请求报文到来的时候, 提取 报文中源 IP和 Request-ID,以当前获取的源 IP和 Request-ID为索引在 SNMP 管理控制块中进行查找。  The source IP address and the Request-ID learning mechanism in the SNMP request packet are set in the network element device, and the source IP address and the Request-ID in the previously received SNMP request message are stored as information items, and each information item includes a source. IP and Request-ID. When each SNMP request packet arrives, the source IP address and the Request-ID are extracted from the packet, and the current source IP address and Request-ID are used as indexes to search in the SNMP management control block.
步骤 S303 , 判断是否查到包括当前获取的源 IP和 Request-ID的信息项, 若是, 执行步骤 S304, 否则, 执行步骤 S305;  Step S303, it is determined whether the information item including the currently obtained source IP and Request-ID is found, and if yes, step S304 is performed, otherwise, step S305 is performed;
步骤 S304, 在查到包括当前获取的源 IP和 Request-ID的信息项时, 丟 弃当前接收的 SNMP请求报文。  Step S304: When the information item including the currently obtained source IP address and the Request-ID is found, the currently received SNMP request message is discarded.
以当前获取的源 IP和 Request-ID为索引在 SNMP管理控制块中进行查 找, 通过确定 SNMP 管理控制块是否已经存储包括当前获取的源 IP 和 Request-ID的信息项, 可以判断出该 SNMP请求报文是否是重复的数据包, 如果是重复的数据包就把该数据包丟掉, 即使网络中存在洪范和路由环回, 也不会对网元设备造成太大的冲击,从而彻底达到防止冲击网元设备的目的。  The current source IP address and the Request-ID are indexed in the SNMP management control block, and the SNMP management control block determines whether the information source including the currently obtained source IP address and the Request-ID is stored, and the SNMP request can be determined. Whether the packet is a duplicate packet, if it is a duplicate packet, the packet is discarded. Even if there is a flood and routing loopback in the network, it will not cause too much impact on the network element device, thereby completely preventing the packet. The purpose of impacting network element equipment.
优选地, 本实施例中还包括步骤 S305 , 在未查到包括当前获取的源 IP 和 Request-ID的信息项时,将当前获取的源 IP和 Request-ID作为新的信息项 存储到所述 SNMP管理控制块中, 并处理当前接收的 SNMP请求报文。  Preferably, the embodiment further includes a step S305, when the information item including the currently acquired source IP and the Request-ID is not found, storing the currently obtained source IP and Request-ID as new information items in the The SNMP management control block processes the currently received SNMP request message.
SNMP管理控制块未存储包括当前接收的 SNMP请求报文中的源 IP和 Request-ID的信息项有两种情况: The SNMP management control block does not store the source IP and the current received SNMP request message. There are two cases for the information item of the Request-ID:
1 )有存储当前接收的 SNMP请求报文中的源 IP的信息项, 但该信息项 存储的 Request-ID不是当前接收的 SNMP请求报文中的 Request-ID。 说明从 该源 IP 对应的网管设备接收过 SNMP 请求 ^艮文, 但未接收到过对应 Request-ID 的 SNMP请求报文, 因此不是重复数据包, 按正常的流程对该 SNMP请求艮文进行处理。  1) The information item of the source IP address in the currently received SNMP request message is stored, but the Request-ID stored in the information item is not the Request-ID in the currently received SNMP request message. The SNMP request packet has been received from the network management device corresponding to the source IP address, but the SNMP request packet corresponding to the Request-ID has not been received. Therefore, the SNMP request packet is not duplicated, and the SNMP request packet is processed according to a normal process. .
2 )没有存储当前接收的 SNMP请求报文中的源 IP的信息项, 说明还未 从该源 IP对应的网管设备接收过 SNMP请求报文, 因此不是重复数据包,按 正常的流程对该 SNMP请求报文进行处理。  2) The information of the source IP address in the currently received SNMP request packet is not stored, indicating that the SNMP request packet has not been received from the network management device corresponding to the source IP, so the data packet is not duplicated, and the SNMP is processed according to a normal process. Request a message for processing.
依照本发明的实施例中, 为了达到丟弃重复的 SNMP请求报文减少网络 异常包对网元设备的冲击的目的, 所提供的 SNMP请求报文处理方法中, 如 图 4所示, SNMP管理控制块由一个 IP地址队列和对应于 IP地址队列中条目 的事务编号队列组成, 图 4中的 REQ为本文中 Request-ID的简写, 下角标不 同的 REQ表示不同 Request-ID。 SNMP管理控制块的 IP地址队列中不同条目 存储的是信息项中的不同源 IP。 IP地址队列中的每个条目对应一个事物编号 队列, 同一个源 IP的信息中的 Request-ID放在同一个事物编号队列中。  In the embodiment of the present invention, in order to reduce the impact of the network abnormal packet on the network element device by discarding the repeated SNMP request packet, the SNMP request packet processing method is provided, as shown in FIG. 4, the SNMP management. The control block consists of an IP address queue and a transaction number queue corresponding to the entries in the IP address queue. The REQ in FIG. 4 is a shorthand for the Request-ID in this document, and the different REQs in the lower corner indicate different Request-IDs. Different entries in the IP address queue of the SNMP management control block store different source IPs in the information item. Each entry in the IP address queue corresponds to a transaction number queue. The Request-ID in the same source IP information is placed in the same transaction number queue.
优选地, 本实施例中还包括, 对所述 SNMP管理控制块中存储的信息项 设置对应的老化定时器, 在所述老化定时器到达定时时间时, 删除与该老化 定时器对应的信息项, 即老化 SNMP管理控制块中学习到的信息项。  Preferably, the embodiment further includes: setting an aging timer corresponding to the information item stored in the SNMP management control block, and deleting the information item corresponding to the aging timer when the aging timer reaches the timing time , that is, the information items learned in the aging SNMP management control block.
本实施例的 SNMP管理控制块中存放网管设备 IP地址的 IP地址队列和 存放 Request-ID的事物编号队列初始状态为空, 为了节省网元设备的存储空 间, 优选地, SNMP管理控制块所存储的所有信息项中所包括的不同源 IP数 目 (地址队列的长度)不大于第一设定数目, 包括同一源 IP的不同信息项数 目 (事物编号队列的长度) 不大于设定第二数目。 以上述数据结构为例, 优 选地最多存放 5 个网管设备对应的 IP地址。 对应每个 IP地址用于存放 Request-ID的事物编号队列初始状态为空, 最大长度为 16个元素。  In the SNMP management control block of this embodiment, the IP address queue for storing the IP address of the network management device and the initial number of the transaction number queue for storing the Request-ID are empty. To save the storage space of the network element device, the SNMP management control block is preferably stored. The number of different source IPs (the length of the address queue) included in all the information items is not greater than the first set number, and the number of different information items including the same source IP (the length of the transaction number queue) is not greater than the set second number. Taking the above data structure as an example, it is preferable to store at most five IP addresses corresponding to the network management devices. The initial number of the transaction number queue for each IP address used to store the Request-ID is null, and the maximum length is 16 elements.
如图 5所示 , 本实施例中在 SNMP请求报文到来时 , 网元设备对 SNMP 请求报文处理流程具体包括: 步骤 S501 , 对于当前从网络口新到来的 SNMP请求报文, 提取出 SNMP 请求报文中源 IP和 Request-ID字段; As shown in FIG. 5, in the embodiment, when the SNMP request packet arrives, the process of processing the SNMP request packet by the network element device specifically includes: Step S501: Extract the source IP and Request-ID fields in the SNMP request packet for the SNMP request message that is newly arrived from the network port.
步骤 S502, 以提取出的源 IP和 Request-ID为索引在上述 SNMP管理控 制块中检索;  Step S502: Search, by using the extracted source IP and Request-ID as an index, in the foregoing SNMP management control block;
步骤 S503 , 判断上述源 IP和 Request-ID的信息项已存在于 SNMP管理 控制块中, 若是, 执行步骤 S504, 否则执行步骤 S505;  Step S503, determining that the information items of the source IP and the Request-ID are already present in the SNMP management control block, and if yes, executing step S504, otherwise performing step S505;
步骤 S504, 丟弃当前接收的 SNMP请求报文, 并返回步骤 S501。  Step S504, discarding the currently received SNMP request message, and returning to step S501.
步骤 S505 , 将上述提取的源 IP和 Request-ID分别学习到 SNMP管理控 制块中, 设置该信息项的老化定时器, 并将 SNMP请求报文交给正常的处理 流程继续处理, 结束。  Step S505: The extracted source IP address and the Request-ID are respectively learned into the SNMP management control block, and the aging timer of the information item is set, and the SNMP request packet is delivered to the normal processing flow to continue processing, and the process ends.
本实施例中步骤 S502, 以提取出的源 IP和 Request-ID为索引在 SNMP 管理控制块中进行检索时,优选地首先以提取出的源 IP检索存储网管设备 IP 的 IP地址队列; 如果存储网管设备 IP的 IP地址队列为空或者存储网管设备 IP的 IP地址队列非空但是不存在提取的源 IP时, 可以不进行 Request-ID的 检索, 直接执行步骤 S505: 首先学习提取的源 IP地址到 IP地址队列, 学习 提取的 Request-ID到该源 IP对应的事务编号队列,设置该信息项的老化定时 哭口  In step S502 of the embodiment, when the extracted source IP and the Request-ID are indexed in the SNMP management control block, the IP address queue of the storage network management device IP is preferably first retrieved by using the extracted source IP; If the IP address queue of the network management device IP is empty or the IP address queue of the storage network management device IP is not empty but the source IP address is not available, the request-ID cannot be retrieved. Step S505 is directly performed: First, the extracted source IP address is learned. Go to the IP address queue, learn the extracted Request-ID to the transaction number queue corresponding to the source IP, and set the aging timing of the information item.
步骤 S502中, 若以提取出的源 IP检索存储网管设备 IP的地址队列时, 存储网管设备 IP的地址队列非空且检索到该源 IP时, 则在该源 IP对应的事 务编号队列中查找提取出的 Request-ID; 如果事务编号队列中找不到相应的 Request-ID , 则执行步骤 S505: 学习提取的 Request-ID到该源 IP对应的事务 编号队列, 并设置该信息项的老化定时器。  In step S502, if the address queue of the storage network management device IP is retrieved by using the extracted source IP, if the address queue of the storage network management device IP is not empty and the source IP is retrieved, the transaction number queue corresponding to the source IP is searched. Extracted Request-ID; If the corresponding Request-ID is not found in the transaction number queue, step S505 is performed: learning the extracted Request-ID to the transaction number queue corresponding to the source IP, and setting the aging timing of the information item Device.
本实施例中在地址队列和事物编号队列长度有限制的情况下, 在步骤 S505中进行学习时,确定所存储的信息项包括的不同源 IP的数目等于第一设 定数目时如 5时, 将跳过信息项的学习过程, 直接进行后续的处理。 即学习 的 IP地址的个数超出地址队列长度后, 只有等时间较长的 IP地址对应的事 物编号队列老化掉以后, IP地址的个数小于地址队列长度时, 才能学习新的 IP地址。 在步骤 S505中进行学习时, 确定包括所获取的源 IP的不同信息项 数目等于第二设定数目时,删除存储时间最长的包括所获取的源 IP的信息项。 即对应源 IP的 Request-ID 队列学习达到最大个数后, 删除源 IP对应的事物 编号队列中最老学习到的 Request-ID , 添加新学习到的 Request-ID。 In the embodiment, when the length of the address queue and the transaction number queue is limited, when the learning is performed in step S505, it is determined that the number of different source IPs included in the stored information item is equal to the first set number, such as 5, The learning process of the information item will be skipped and the subsequent processing will be directly performed. That is, after the number of learned IP addresses exceeds the length of the address queue, the new IP address can be learned only after the number of queues corresponding to the IP address of the longer time is aged and the number of IP addresses is less than the length of the address queue. When learning is performed in step S505, different information items including the acquired source IP are determined. When the number is equal to the second set number, the information item including the acquired source IP having the longest storage time is deleted. That is, after the maximum number of Request-ID queues corresponding to the source IP is reached, the oldest learned Request-ID in the transaction number queue corresponding to the source IP is deleted, and the newly learned Request-ID is added.
进一步地,每次删除事务编号队列中的最老学习到的 Request-ID的时候, 要先销毁相应的定时器, 然后再进行删除 Request-ID的操作。  Further, each time the oldest learned Request-ID in the transaction number queue is deleted, the corresponding timer is first destroyed, and then the Request-ID is deleted.
本实施例中老化定时器被触发和销毁的执行流程是: 1 )在设置事务编号 队列中信息项具体的 Request-ID条目的时候,设定该信息项的老化定时器; 2 ) 所述老化定时器超时, 删除老化定时器对应的信息项条目; 3 )销毁该信息项 的老化定时器。  The execution flow of the aging timer being triggered and destroyed in this embodiment is: 1) setting the aging timer of the information item when setting the specific Request-ID entry of the information item in the transaction number queue; 2) the aging The timer expires, and the information item entry corresponding to the aging timer is deleted. 3) The aging timer of the information item is destroyed.
进一步地, 所述 2 ) 中某信息项的老化定时器到达定时时间超时后, 删 除事务编号对列中的相应 Request-ID条目, 这个过程也称之为事务编号队列 条目的老化, 或者称之为 Request-ID的老化; 检查删除 Request-ID条目后的 同 IP地址的事务编号队列是否为空; 若对列为空, 则删除地址队列中相应的 IP地址条目, 这个过程称之为网管 IP的老化。  Further, after the aging timer of the information item in the 2) expires, the corresponding Request-ID entry in the column of the transaction number pair is deleted, and the process is also called the aging of the transaction number queue entry, or The aging of the Request-ID; check whether the transaction number queue of the same IP address after deleting the Request-ID entry is empty; if the column is empty, delete the corresponding IP address entry in the address queue. This process is called network management IP. Aging.
进一步地, 为了使该老化既起到区分不同 SNMP请求报文, 又防止过于 频繁老化,本实施例中把与 IP地址对应的 Request-ID的老化缺省时间定为 30 秒, 该时间通过人机界面可以根据系统的需要灵活配置。  In addition, in this embodiment, the default time of the aging of the Request-ID corresponding to the IP address is 30 seconds, and the time passes the time. The machine interface can be flexibly configured according to the needs of the system.
依照本发明的另一实施例中, 提供一种 SNMP请求报文处理装置, 如图 6所示, 该装置包括: SNMP管理控制块 601 , 其设置为存储信息项, 所述信 息项包括之前接收的 SNMP请求报文中源 IP和 Request-ID; 标识信息提取单 元 602 , 其设置为获取当前接收的 SNMP请求报文中的源 IP和 Request-ID , 其中从同一源 IP接收的不同 SNMP请求报文用不同 Request-ID唯一标识;标 识信息查找单元 603 , 其设置为以当前获取的源 IP和 Request-ID为索引在 SNMP管理控制块中进行查找; 报文丟弃单元 604, 其设置为在查到包括当 前获取的源 IP和 Request-ID的信息项时, 丟弃当前接收的 SNMP请求报文。  According to another embodiment of the present invention, an SNMP request message processing apparatus is provided. As shown in FIG. 6, the apparatus includes: an SNMP management control block 601 configured to store an information item, where the information item includes previous reception. The source IP address and the Request-ID in the SNMP request message; the identifier information extracting unit 602 is configured to obtain the source IP and the Request-ID in the currently received SNMP request message, where different SNMP request reports are received from the same source IP address. The message is uniquely identified by using a different Request-ID; the identifier information searching unit 603 is configured to perform the search in the SNMP management control block with the currently obtained source IP and Request-ID as indexes; the message discarding unit 604 is set to When the information item including the current source IP address and the Request-ID is found, the currently received SNMP request packet is discarded.
优选地, 该装置还包括: 标识信息学习单元 605, 其设置为在未查到包 括当前获取的源 IP 和 Request-ID 的信息项时, 将当前获取的源 IP 和 Request-ID作为新的信息项存储到所述 SNMP管理控制块中; 报文处理单元 606, 其设置为在未查到包括当前获取的源 IP和 Request-ID的信息项时, 处 理当前接收的 SNMP请求报文。定时器设置单元 607,其设置为对所述 SNMP 管理控制块中的信息项设置对应的老化定时器; 标识信息老化单元 608, 其 设置为在所述老化定时器到达定时时间时, 删除与该老化定时器对应的信息 项, 实现对 SNMP管理控制块 601所存储的信息项的老化。 Preferably, the apparatus further includes: an identification information learning unit 605 configured to use the currently obtained source IP and Request-ID as new information when the information item including the currently acquired source IP and Request-ID is not found. The item is stored in the SNMP management control block; the message processing unit 606 is configured to: when the information item including the currently acquired source IP and Request-ID is not found, The current received SNMP request message. The timer setting unit 607 is configured to set an aging timer corresponding to the information item in the SNMP management control block, and the identifier information aging unit 608 is configured to delete the aging timer when the aging timer reaches the timing time. The information item corresponding to the aging timer implements aging of the information items stored in the SNMP management control block 601.
为了节省该装置存储信息项的空间, SNMP管理控制块中的信息项包括 的不同源 IP的数目不大于第一设定数目, 包括同一源 IP的不同信息项的数 目不大于第二设定数目, 所述标识信息学习单元 605还设置为, 确定所存储 的包括当前获取的源 IP的不同信息项数目等于第二设定数目时, 删除存储时 间最长的包括当前获取的源 IP的信息项; 确定所存储的信息项包括的不同源 IP的数目等于第一设定数目时, 跳过对所述新的信息项的存储。  In order to save space for storing information items of the device, the number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items including the same source IP is not greater than the second set number. The identifier information learning unit 605 is further configured to: when determining that the stored number of different information items including the currently acquired source IP is equal to the second set number, deleting the information item including the currently acquired source IP that has the longest storage time And determining to store the new information item when the number of different source IPs included in the stored information item is equal to the first set number.
具体实施时, 所述 SNMP管理控制块由一个 IP地址队列和对应于 IP地 址队列中条目的事务编号队列组成, 所述 IP地址队列中不同条目存储的是信 息项中的不同源 IP,同一个源 IP的信息项中的 Request-ID存储在同一个事物 编号队列中。 以数据结构的形式管理学习到源 IP 和与 IP 地址对应的 Request-ID。  In a specific implementation, the SNMP management control block is composed of an IP address queue and a transaction number queue corresponding to an entry in the IP address queue, where different entries in the IP address queue store different source IPs in the information item, the same The Request-ID in the information item of the source IP is stored in the same transaction number queue. The source IP and the Request-ID corresponding to the IP address are learned in the form of a data structure.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。 发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要 求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。  One of ordinary skill in the art will appreciate that all or a portion of the steps above may be accomplished by a program to instruct the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software. The spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of the inventions
工业实用性 Industrial applicability
本发明提供的 SNMP请求报文处理方法及装置, 从网元设备角度来解决 出现的重复 SNMP请求报文的问题, 可以在网络中存在洪范和路由环回的情 况下, 有效地避免网管设备向网元设备发送 SNMP请求报文时对网元设备的 冲击。  The method and device for processing the SNMP request packet provided by the present invention can solve the problem of the repeated SNMP request message from the perspective of the network element device, and can effectively avoid the network management device when the flooding and routing loopback exist in the network. Impact on the NE device when sending an SNMP request packet to the NE device.

Claims

权 利 要 求 书 Claim
1、 一种简单网络管理协议(SNMP )请求报文处理方法, 该方法包括: 获取当前接收的 SNMP请求才艮文中的源 IP和请求标识( Request-ID ) , 其中从同一源 IP接收的不同 SNMP请求报文用不同的 Request-ID唯一标识; 以当前获取的源 IP和 Request-ID为索引在 SNMP管理控制块中进行查 找,该 SNMP管理控制块用于存储信息项,所述信息项包括之前接收的 SNMP 请求 4艮文中的源 IP和 Request-ID; 以及  A method for processing a simple network management protocol (SNMP) request message, the method comprising: obtaining a source IP and a request identifier (Request-ID) in a currently received SNMP request, wherein different received from the same source IP The SNMP request packet is uniquely identified by using a different Request-ID; the current management source IP address and the Request-ID are used as an index to be searched in the SNMP management control block, where the SNMP management control block is used to store information items, and the information items include The source IP and Request-ID in the previously received SNMP request 4;
在查到包括当前获取的源 IP和 Request-ID的信息项时,丟弃当前接收的 SNMP请求报文。  When the information item including the current source IP address and the Request-ID is found, the currently received SNMP request packet is discarded.
2、 如权利要求 1所述的方法, 所述方法还包括:  2. The method of claim 1 further comprising:
在未查到包括当前获取的源 IP和 Request-ID的信息项时,将当前获取的 源 IP和 Request-ID作为新的信息项存储到所述 SNMP管理控制块中,并处理 当前接收的 SNMP请求报文。  When the information item including the currently acquired source IP and Request-ID is not found, the currently obtained source IP and Request-ID are stored as new information items in the SNMP management control block, and the currently received SNMP is processed. Request a message.
3、 如权利要求 2所述的方法, 所述方法还包括:  3. The method of claim 2, the method further comprising:
对所述 SNMP管理控制块中存储的信息项设置对应的老化定时器, 在所 述老化定时器到达定时时间时, 删除与该老化定时器对应的信息项。  And setting an aging timer corresponding to the information item stored in the SNMP management control block, and deleting an information item corresponding to the aging timer when the aging timer reaches a timing time.
4、 如权利要求 3所述的方法, 其中, 所述 SNMP管理控制块中的信息 项包括的不同源 IP的数目不大于第一设定数目, 同一源 IP的不同信息项的 数目不大于第二设定数目。  The method of claim 3, wherein the number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items of the same source IP is not greater than Two sets the number.
5、如权利要求 4所述的方法, 其中, 在将当前获取的源 IP和 Request-ID 作为新的信息项存储到所述 SNMP管理控制块中之前, 所述方法还包括: 确定所存储的包括当前获取的源 IP的不同信息项数目等于第二设定数目 时, 删除存储时间最长的包括当前获取的源 IP的信息项。  The method according to claim 4, wherein before storing the currently acquired source IP and Request-ID as new information items in the SNMP management control block, the method further comprises: determining the stored When the number of different information items including the currently obtained source IP is equal to the second set number, the information item including the currently acquired source IP having the longest storage time is deleted.
6、如权利要求 4所述的方法, 其中, 在将当前获取的源 IP和 Request-ID 作为新的信息项存储到所述 SNMP管理控制块中之前, 所述方法还包括: 确定所存储的信息项包括的不同源 IP的数目等于第一设定数目时,跳过 对所述新的信息项的存储。 6. The method according to claim 4, wherein before storing the currently acquired source IP and Request-ID as new information items in the SNMP management control block, the method further comprises: determining the stored When the number of different source IPs included in the information item is equal to the first set number, the storage of the new information item is skipped.
7、 一种简单网络管理协议(SNMP )请求报文处理装置, 该装置包括:7. A Simple Network Management Protocol (SNMP) request message processing device, the device comprising:
SNMP管理控制块, 其设置为存储信息项, 所述信息项包括之前接收的 SNMP请求 ^艮文中源 IP和请求标识( Request-ID ) ; An SNMP management control block, configured to store an information item, where the information item includes a previously received SNMP request, a source IP address, and a request identifier (Request-ID);
标识信息提取单元, 其设置为获取当前接收的 SNMP请求报文中的源 IP 和 Request-ID , 其中从同一源 IP接收的不同 SNMP 请求报文用不同的 Request-ID唯一标识;  The identifier information extracting unit is configured to obtain the source IP address and the Request-ID in the currently received SNMP request packet, where different SNMP request packets received from the same source IP are uniquely identified by different Request-IDs;
标识信息查找单元,其设置为以当前获取的源 IP和 Request-ID为索引在 SNMP管理控制块中进行查找; 以及  An identifier information searching unit configured to perform searching in the SNMP management control block by using the currently obtained source IP and Request-ID as indexes;
报文丟弃单元,其设置为在查到包括当前获取的源 IP和 Request-ID的信 息项时, 丟弃当前接收的 SNMP请求报文。  A packet discarding unit is configured to discard the currently received SNMP request packet when the information item including the currently obtained source IP address and the Request-ID is found.
8、 如权利要求 7所述的装置, 所述装置还包括:  8. The apparatus of claim 7, the apparatus further comprising:
标识信息学习单元, 其设置为在未查到包括当前获取的源 IP 和 Request-ID的信息项时, 将当前获取的源 IP和 Request-ID作为新的信息项存 储到所述 SNMP管理控制块中; 以及  And an identifier information learning unit configured to store the currently acquired source IP and Request-ID as new information items to the SNMP management control block when the information item including the currently acquired source IP and Request-ID is not found. Medium; and
报文处理单元,其设置为在未查到包括当前获取的源 IP和 Request-ID的 信息项时, 处理当前接收的 SNMP请求报文。  The message processing unit is configured to process the currently received SNMP request message when the information item including the currently obtained source IP address and the Request-ID is not found.
9、 如权利要求 8所述的装置, 所述装置还包括:  9. The device of claim 8, the device further comprising:
定时器设置单元, 其设置为对所述 SNMP管理控制块中的信息项设置对 应的老化定时器; 以及  a timer setting unit configured to set an aging timer corresponding to an information item in the SNMP management control block;
标识信息老化单元, 其设置为在所述老化定时器到达定时时间时, 删除 与该老化定时器对应的信息项。  An identification information aging unit is configured to delete an information item corresponding to the aging timer when the aging timer arrives at a timing time.
10、 如权利要求 8所述的装置, 其中, 所述 SNMP管理控制块中的信息 项包括的不同源 IP的数目不大于第一设定数目, 同一源 IP的不同信息项的 数目不大于第二设定数目,  The device of claim 8, wherein the number of different source IPs included in the information item in the SNMP management control block is not greater than the first set number, and the number of different information items of the same source IP is not greater than Second, set the number,
所述标识信息学习单元还设置为,确定所存储的包括当前获取的源 IP的 不同信息项数目等于第二设定数目时, 删除存储时间最长的包括当前获取的 源 IP的信息项; 确定所存储的信息项包括的不同源 IP的数目等于第一设定 数目时, 跳过对所述新的信息项的存储。 The identifier information learning unit is further configured to: when it is determined that the stored number of different information items including the currently obtained source IP is equal to the second set number, delete the information item including the currently acquired source IP that has the longest storage time; When the stored information item includes the number of different source IPs equal to the first set number, the storage of the new information item is skipped.
11、 如权利要求 7~10任一权利要求所述的装置, 其中, 所述 SNMP管 理控制块由一个 IP地址队列和对应于 IP地址队列中条目的事务编号队列组 成, 所述 IP地址队列中不同条目存储的是信息项中的不同源 IP, 同一源 IP 的信息项中的 Request-ID存储在同一事物编号队列中。 The device according to any one of claims 7 to 10, wherein the SNMP management control block is composed of an IP address queue and a transaction number queue corresponding to an entry in an IP address queue, where the IP address queue is Different entries store different source IPs in the information item, and the Request-ID in the information item of the same source IP is stored in the same transaction number queue.
PCT/CN2010/077626 2010-04-27 2010-10-09 Method and device for processing simple network management protocol (snmp) request message WO2011134238A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010165474A CN101834743A (en) 2010-04-27 2010-04-27 Processing method and device of SNMP (Simple Network Management Protocol) request message
CN201010165474.3 2010-04-27

Publications (1)

Publication Number Publication Date
WO2011134238A1 true WO2011134238A1 (en) 2011-11-03

Family

ID=42718679

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/077626 WO2011134238A1 (en) 2010-04-27 2010-10-09 Method and device for processing simple network management protocol (snmp) request message

Country Status (2)

Country Link
CN (1) CN101834743A (en)
WO (1) WO2011134238A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834743A (en) * 2010-04-27 2010-09-15 中兴通讯股份有限公司 Processing method and device of SNMP (Simple Network Management Protocol) request message
CN102209002A (en) * 2011-07-21 2011-10-05 迈普通信技术股份有限公司 Simple network management protocol (SNMP) network management system and SNMP request processing method
CN103166784A (en) * 2011-12-14 2013-06-19 中兴通讯股份有限公司 Method and device for retraining simple network management protocol (SNMP) message impact
WO2014075214A1 (en) 2012-11-13 2014-05-22 华为技术有限公司 Method and network element for obtaining packet information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1536827A (en) * 2003-04-11 2004-10-13 ���Ͽع����޹�˾ Network supervisor SNMP trap inhibition
CN1859210A (en) * 2006-04-12 2006-11-08 华为技术有限公司 Method and device for suppressing terminal equipment cold starting trap message
CN101662700A (en) * 2009-08-28 2010-03-03 中兴通讯股份有限公司 Method and system for transferring signaling message
CN101834743A (en) * 2010-04-27 2010-09-15 中兴通讯股份有限公司 Processing method and device of SNMP (Simple Network Management Protocol) request message

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1536827A (en) * 2003-04-11 2004-10-13 ���Ͽع����޹�˾ Network supervisor SNMP trap inhibition
CN1859210A (en) * 2006-04-12 2006-11-08 华为技术有限公司 Method and device for suppressing terminal equipment cold starting trap message
CN101662700A (en) * 2009-08-28 2010-03-03 中兴通讯股份有限公司 Method and system for transferring signaling message
CN101834743A (en) * 2010-04-27 2010-09-15 中兴通讯股份有限公司 Processing method and device of SNMP (Simple Network Management Protocol) request message

Also Published As

Publication number Publication date
CN101834743A (en) 2010-09-15

Similar Documents

Publication Publication Date Title
US7017082B1 (en) Method and system for a process manager
JP5880560B2 (en) Communication system, forwarding node, received packet processing method and program
EP2904745B1 (en) Method and apparatus for accelerating forwarding in software-defined networks
US7903546B2 (en) Detecting unavailable network connections
US7266754B2 (en) Detecting network denial of service attacks
JP5088162B2 (en) Frame transmission apparatus and loop determination method
US8549119B1 (en) Error handling for device management configuration and operational data retrieval commands
WO2008080324A1 (en) A method and apparatus for preventing igmp message attack
WO2012155817A1 (en) Loopback testing method, device and system
WO2021135419A1 (en) Method and apparatus for updating routing information, computer device, and storage medium
JP2006501717A (en) Telecom network element monitoring
US20160094657A1 (en) Event-driven synchronization in snmp managed networks
WO2011134238A1 (en) Method and device for processing simple network management protocol (snmp) request message
JP4869160B2 (en) Packet relay device
EP2658193A2 (en) Method and apparatus for sending topology change packet, and method and apparatus for updating forwarding table
CN100512305C (en) Process transfer method
WO2014180363A1 (en) Openflow signaling control method and device
WO2012079487A1 (en) Method, network manager and system for trap handling based on simple network management protocol (snmp)
US9270533B2 (en) Fast network discovery using SNMP multi-cast
US7894459B2 (en) Determining availability of a network service
Cisco Interface Configuration and Support
Cisco Interface Configuration and Support
Cisco Interface Configuration and Support
Cisco Interface Configuration and Support
Cisco Interface Configuration and Support

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10850569

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10850569

Country of ref document: EP

Kind code of ref document: A1