CN101009580A - A remote login implementation method based on SNMP protocol - Google Patents

A remote login implementation method based on SNMP protocol Download PDF

Info

Publication number
CN101009580A
CN101009580A CN 200610001782 CN200610001782A CN101009580A CN 101009580 A CN101009580 A CN 101009580A CN 200610001782 CN200610001782 CN 200610001782 CN 200610001782 A CN200610001782 A CN 200610001782A CN 101009580 A CN101009580 A CN 101009580A
Authority
CN
China
Prior art keywords
sign
message
general object
managed devices
response data
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN 200610001782
Other languages
Chinese (zh)
Other versions
CN100499495C (en
Inventor
李业
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2006100017826A priority Critical patent/CN100499495C/en
Publication of CN101009580A publication Critical patent/CN101009580A/en
Application granted granted Critical
Publication of CN100499495C publication Critical patent/CN100499495C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosed remote telnet method based on SNMP protocol comprises: defining some general object marks in the MIB; setting request message in manager to send telnet request information contained general object mark with its content value to the managed device; on the managed device, taking operation according to object mark and content value, storing response data, and returning response message to the manager; on the manager, obtaining the request message to send request information containing general object mark and its empty content value to the managed device; on the managed device, obtaining the response message to send response data with general object mark and its content value. This invention can overcome the conflict between the remote telnet expansibility and MIB stability.

Description

A kind of Telnet implementation method based on snmp protocol
Technical field
The present invention relates to computer communication field, especially relate to a kind of implementation method that realizes the network apparatus remote login management based on snmp protocol (Simple Network Management Protocol).
Background technology
Computer network management based on ICP/IP protocol is divided into two parts: management station and managed devices.As shown in Figure 1, based on the telemanagement of snmp protocol realization to the network equipment, normally utilize the communication message (PDU of agreement defined, protocol Data Unit) realizes, communication message is divided into the request of obtaining (get-request), obtain request (get-next-request) next time, request (set-request) is set, obtain response (get-response), self-trapping operations such as (trap), management station gives the managed devices configuration information by the information of get-request, get-next-request inquiry managed devices by set-request; Managed devices is given management station by the get/set message at get-response response management station by information such as trap active report and alarms.In addition, management station and managed devices need define unified management information bank (MIB), and it is the ensemble of communication that can be inquired about and be provided with by managing process in all agent processes.Mutual information is defined various information object sign (OID) and values thereof among the MIB between the various communication messages.
Hence one can see that, and any object identity OID mutual between management station and the managed devices need be defined in MIB.To a certain extent, this will bring some adverse effects to the expandability of MIB.Function for similar Telnet management realizes, need carry out telemanagement by snmp protocol on the one hand, requires MIB relatively stable, thereby avoids the frequent change of management station and managed devices software; On the other hand, log on command that managed devices provides and log-on message can often change along with the variation of demand, and this brings the modification to MIB again inevitably.For double-barreled question like this, do not have corresponding solution in the prior art.
Summary of the invention
The technical issues that need to address of the present invention provide a kind of Telnet implementation method based on snmp protocol, adopt the present invention can solve effectively that the Telnet autgmentability requires and the contradiction of MIB between relatively stable, improved the stability of a system and extensibility simultaneously.
In order to solve the problems of the technologies described above, the invention provides a kind of Telnet implementation method based on snmp protocol, finish the Telnet management of management station to managed devices, this method comprises the steps:
(a1) several general object signs of definition in management information bank, the general object sign comprises the order data sign that is used to represent log on command or response data at least;
(a2) management station sends login request message by request message is set to managed devices, and this login request message comprises described general object sign, and the represented contents value of this general object sign;
(a3) managed devices is resolved the login request message that receives, and carries out associative operation according to general object sign and contents value thereof, and preserves corresponding response data; Whether simultaneously return the expression login request message to management station was correctly received and was obtained response message;
(a4) management station sends the request message that obtains the log on command response data by obtaining request message to managed devices, comprises described general object sign in this message, and the represented contents value of this general object sign, and wherein contents value is empty;
(a5) managed devices sends response data message by obtaining response message to management station, comprises described general object sign in this message, and the represented contents value of this general object sign, and wherein contents value is corresponding response data.
Further, the present invention also has following characteristics: the general object of definition sign also comprises current bag character length sign, overall budget number sign and current bag sequence number sign in the step (a1).
Further, the present invention also has following characteristics: the general object sign in the step (a2) is made up of current bag character length sign and order data sign.
Further, the present invention also has following characteristics, and step (a3) can be further divided into following steps:
(b1) managed devices is resolved the login request message that receives, and obtains the title and the parameter value of log on command from order Data Identification and contents value thereof;
(b2) whether managed devices returns the expression login request message to management station and was correctly received and obtain response message;
(b3) managed devices carries out associative operation according to the title and the parameter value of log on command, preserves the response data of accordingly result, and determines to return to the required data overall budget number of management station.
Further, the present invention also has following characteristics: the general object sign in the step (a4) is made up of overall budget number sign, current bag sequence number sign, current bag character length sign and order data sign.
Further, the present invention also has following characteristics: step (a5) can be further divided into following steps:
(c1) managed devices is determined the current sequence number that needs to send packet according to the request message that obtains the log on command response data that receives, and reads the data content that length equals the contents value of current bag character length sign;
(c2) managed devices is inserted corresponding response data in the general object sign institute corresponding content value of response data message, and response data is respectively the packet character string content that obtains after overall budget number, current bag sequence number, current bag character length and the log on command operation;
(c3) managed devices sends response data message by obtaining response message to management station.
Further, the present invention also has following characteristics, and this method also comprises the steps:
(a6) management station resolves the response data message from managed devices, judges whether the overall budget number equals current bag sequence number in the message, if the overall budget number greater than current bag sequence number, shows that response data does not receive, returns step (a4), otherwise process ends.
Further, the present invention also has following characteristics, and this method also comprises the steps:
In step (a6), management station is also by resolving the response data message from managed devices, judged whether that the packet deficient phenomena takes place, if have, management station sends login request message by request message is set to managed devices again, repeating step (a2) is to (a6), until receiving complete response data.
Compared with prior art, the present invention has the following advantages:
Adopt this method, mainly be that various log on command and the log-on message that in MIB the Telnet function is comprised reduces a class, represented with one or several general object sign, thus when rlogin or log-on message expansion, after the modification, need not to carry out the modification of MIB, only need from general object sign and contents value thereof, to obtain information, resolved, suitably increase, revise the processing function of log on command, utilize general object sign and contents value thereof to return to management station's information needed again, thereby solved effectively that the Telnet autgmentability requires and the contradiction of MIB between relatively stable, simplified system, improved the stability of a system and extensibility.
Description of drawings
Fig. 1 is based on the 5 kind operation charts of snmp protocol realization to the telemanagement of the network equipment in the prior art;
Fig. 2 is the definition chart that general object is identified according in the specific embodiment of the present invention;
Fig. 3 is the operation chart according to the Telnet implementation method based on snmp protocol of the present invention.
Embodiment
In order to understand the present invention in depth, the present invention is described in detail below in conjunction with drawings and the specific embodiments.
The present invention is based on the Telnet implementation method of snmp protocol, its core concept is exactly that the various log on command and the log-on message that in MIB the Telnet function are comprised reduce a class, is represented with one or several general object sign.According to a kind of specific embodiment of the present invention, as shown in Figure 2, defined and realized that 4 required general object sign (OID): TNum of Telnet function represent the overall budget number sign of log on command or response data overall budget number, Pnum represents the current bag sequence number sign of log on command or the current bag sequence number of response data, wLength is current bag character length sign, Logcmd represents the order data sign of log on command or response data content, corresponding data type, read-write mode and span are all according to the requirement of snmp protocol, wherein, " OCTER STRING " character string type for defining in the snmp protocol, the definition maximum is no more than 1024 bytes in the present embodiment, and different utilization system can define voluntarily.
The design of Tnum and Pnum is owing to the restriction of snmp protocol to message length, the character length (wLength) of design Telnet SNMP message one bag data can not surpass 1024 bytes, when data can not be returned in a bag, then need to realize, design corresponding overall budget number sign and current bag sequence number thus and identify and judge for system by many bags.
This method mainly is in conjunction with SNMP message characteristics, has designed the rationally effective operating process of a cover, and concrete characteristics are as follows:
At first, management station's login managed devices adopts request (set-request) message is set, log on command and relevant parameter are filled in contents value to Logcmd with character string forms, simultaneously string length is filled in contents value, send to managed devices to wLength; Managed devices returns the set-request message and obtains response (get-response) message, according to the snmp protocol standard, whether the get-response message of response set-request message can only notify the set-request of management station message correctly to be received, can't carry the response results data of rlogin and return, so returning of follow-up data also needs to realize by other message.
Secondly, login returning of result in the present invention and do not adopt the trap mode to realize, consider it is to realize not too protocol compliant standard so on the one hand, on the other hand, when needs wrap trap more and return, bring difficulty can for the processing of management station.In addition, the wait duration of receiving all data owing to management station's setting may be longer, and when packet loss took place, managed devices can't be known and can initiatively not initiate again to report.Therefore, design is after the response message get-response of set-request message receives in management station, the time-delay certain hour is initiatively initiated the ready response results data of obtaining request (get-request) message inquiry managed devices, in the message the general object of being with identify and include TNum, Pnum, wLength and Logcmd.The response results data are returned with the get-response message by management station, wherein the contents value of Tnum is filled the overall budget number that all need return data, the contents value of Pnum is filled the current bag sequence number of returning, the contents value of wLength is filled current bag character length, and the contents value of Logcmd is filled the data content of current bag.Management station if do not have, continues to send the inquiry of get-request message, according to the whether complete reception of overall budget number and current bag sequence number judgment data till receiving entire data.If management station finds that the packet loss phenomenon is arranged, send out the set-request message again, repeat above-mentioned flow process.
With reference to Fig. 3, the present invention is based on the detailed realization flow of the Telnet implementation method of snmp protocol, specific as follows described:
Step 301, management station sends login request message to managed devices, and message bearing is in the set-request message, and OID that message is with is Logcmd and wLength, the contents value of Logcmd is a character string command, and the contents value of wLength is the character length of character string command;
Step 302, managed devices analytic message data are obtained title, the parameter value of log on command in the Logcmd contents value;
Step 303, managed devices are returned the get-response message of response set-request message to management station;
Step 304, managed devices carries out associative operation according to log on command and parameter value thereof, and preserves corresponding response data, response data is preserved, and determine to return to the required data overall budget number of management station;
Step 305, behind the get-response message that receives managed devices response set-request message, delay time a period of time, management station sends the request message that obtains the log on command response data to managed devices, this message bearing is in the get-request message, message with OID be TNum, Pnum, wLength and Logcmd, the content corresponding value is sky;
Step 306, managed devices are determined the current sequence number that needs to send packet, and are read the data content that length equals the contents value of wLength according to the request message that obtains the log on command response data that receives;
Step 307, managed devices sends response data message to management station, this message bearing is in the get-response message, message with OID be TNum, Pnum, wLength and Logcmd, the content corresponding value is inserted corresponding response data respectively, and response data is respectively the packet character string content that obtains after overall budget number, current bag sequence number, current bag character length and the log on command operation;
Step 308, management station resolves the response data message from managed devices, judges whether the overall budget number equals current bag sequence number in the message, if the overall budget number greater than current bag sequence number, shows that response data does not receive, and returns step 305; Otherwise, no longer send the get-request message and obtain data, process ends.
In addition, in step 308, management station can also be by resolving the response data message from managed devices, judged whether that the packet deficient phenomena takes place, if have, management station sends login request message by the set-request message to managed devices again, and repeating step 301 to 308 is until receiving complete response data.
Therefore, adopt this method, can significantly reduce the quantity of object identity OID among the MIB on the one hand, reach the purpose of simplifying MIB; On the other hand, solved that the Telnet autgmentability requires and the contradiction of MIB between relatively stable, avoided management station software to follow the expansion and the frequent change of log on command.Meanwhile, managed devices is handled except log on command the small amounts of content such as function, and software general frame and MIB all do not need to do change yet, and the raising for the compatibility and the extensibility of system has very important significance.

Claims (9)

1, a kind of Telnet implementation method based on snmp protocol is finished the Telnet management of management station to managed devices, and this method comprises the steps:
(a1) several general object signs of definition in management information bank, the general object sign comprises the order data sign that is used to represent log on command or response data at least;
(a2) management station sends login request message by request message is set to managed devices, and this login request message comprises described general object sign, and the represented contents value of this general object sign;
(a3) managed devices is resolved the login request message that receives, and carries out associative operation according to general object sign and contents value thereof, and preserves corresponding response data; Whether simultaneously return the expression login request message to management station was correctly received and was obtained response message;
(a4) management station sends the request message that obtains the log on command response data by obtaining request message to managed devices, comprises described general object sign in this message, and the represented contents value of this general object sign, and wherein contents value is empty;
(a5) managed devices sends response data message by obtaining response message to management station, comprises described general object sign in this message, and the represented contents value of this general object sign, and wherein contents value is corresponding response data.
2, the Telnet implementation method based on snmp protocol according to claim 1 is characterized in that: the general object of definition sign also comprises current bag character length sign in the step (a1).
3, the Telnet implementation method based on snmp protocol according to claim 2 is characterized in that: the general object of definition sign comprises overall budget number sign and current bag sequence number sign in the step (a1).
4, the Telnet implementation method based on snmp protocol according to claim 3 is characterized in that: the general object sign in the step (a2) is made up of current bag character length sign and order data sign.
5, the Telnet implementation method based on snmp protocol according to claim 4 is characterized in that, step (a3) can be further divided into following steps:
(b1) managed devices is resolved the login request message that receives, and obtains the title and the parameter value of log on command from order Data Identification and contents value thereof;
(b2) whether managed devices returns the expression login request message to management station and was correctly received and obtain response message;
(b3) managed devices carries out associative operation according to the title and the parameter value of log on command, preserves the response data of accordingly result, and determines to return to the required data overall budget number of management station.
6, the Telnet implementation method based on snmp protocol according to claim 5 is characterized in that: the general object sign in the step (a4) is made up of overall budget number sign, current bag sequence number sign, current bag character length sign and order data sign.
7, the Telnet implementation method based on snmp protocol according to claim 6 is characterized in that, step (a5) can be further divided into following steps:
(c1) managed devices is determined the current sequence number that needs to send packet according to the request message that obtains the log on command response data that receives, and reads the data content that length equals the contents value of current bag character length sign;
(c2) managed devices is inserted corresponding response data in the general object sign institute corresponding content value of response data message, and response data is respectively the packet character string content that obtains after overall budget number, current bag sequence number, current bag character length and the log on command operation;
(c3) managed devices sends response data message by obtaining response message to management station.
8, the Telnet implementation method based on snmp protocol according to claim 7 is characterized in that this method also comprises the steps:
(a6) management station resolves the response data message from managed devices, judges whether the overall budget number equals current bag sequence number in the message, if the overall budget number greater than current bag sequence number, shows that response data does not receive, returns step (a4), otherwise process ends.
9, the Telnet implementation method based on snmp protocol according to claim 8 is characterized in that this method also comprises the steps:
In step (a6), management station is also by resolving the response data message from managed devices, judged whether that the packet deficient phenomena takes place, if have, management station sends login request message by request message is set to managed devices again, repeating step (a2) is to (a6), until receiving complete response data.
CNB2006100017826A 2006-01-25 2006-01-25 A remote login implementation method based on SNMP protocol Expired - Fee Related CN100499495C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100017826A CN100499495C (en) 2006-01-25 2006-01-25 A remote login implementation method based on SNMP protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100017826A CN100499495C (en) 2006-01-25 2006-01-25 A remote login implementation method based on SNMP protocol

Publications (2)

Publication Number Publication Date
CN101009580A true CN101009580A (en) 2007-08-01
CN100499495C CN100499495C (en) 2009-06-10

Family

ID=38697748

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100017826A Expired - Fee Related CN100499495C (en) 2006-01-25 2006-01-25 A remote login implementation method based on SNMP protocol

Country Status (1)

Country Link
CN (1) CN100499495C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695028B (en) * 2009-10-16 2012-04-18 杭州华三通信技术有限公司 Method and device for configuring simple network management protocol
CN101610268B (en) * 2009-07-16 2013-06-05 杭州华三通信技术有限公司 Implementation method and equipment of keyword filtration
CN104486344A (en) * 2014-12-22 2015-04-01 上海斐讯数据通信技术有限公司 User access system and method based on SNMP (simple network management protocol)
CN107370668A (en) * 2017-08-25 2017-11-21 北京百度网讯科技有限公司 The methods, devices and systems of smart machine remote control
CN107872526A (en) * 2017-11-13 2018-04-03 浙江工商大学 Small-scale online teaching platform integrated management approach based on snmp protocol
CN114050959A (en) * 2021-10-15 2022-02-15 西安超越申泰信息科技有限公司 Remote security management method and device based on SNMP

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610268B (en) * 2009-07-16 2013-06-05 杭州华三通信技术有限公司 Implementation method and equipment of keyword filtration
CN101695028B (en) * 2009-10-16 2012-04-18 杭州华三通信技术有限公司 Method and device for configuring simple network management protocol
CN104486344A (en) * 2014-12-22 2015-04-01 上海斐讯数据通信技术有限公司 User access system and method based on SNMP (simple network management protocol)
CN107370668A (en) * 2017-08-25 2017-11-21 北京百度网讯科技有限公司 The methods, devices and systems of smart machine remote control
CN107872526A (en) * 2017-11-13 2018-04-03 浙江工商大学 Small-scale online teaching platform integrated management approach based on snmp protocol
CN114050959A (en) * 2021-10-15 2022-02-15 西安超越申泰信息科技有限公司 Remote security management method and device based on SNMP

Also Published As

Publication number Publication date
CN100499495C (en) 2009-06-10

Similar Documents

Publication Publication Date Title
CN102546760B (en) The method of equipment control and terminal, device, system
CN100499495C (en) A remote login implementation method based on SNMP protocol
KR100716167B1 (en) Network management system and method
CN100366000C (en) SNMP-based IPv6 sensor network node management method
EP1770906B1 (en) A method for realizing terminals management in the network device
EP1704672A1 (en) Automatic update system and method for using a meta mib
CN101826979A (en) Intelligent home appliance system
CN102447582A (en) Resource synchronization method and device
CN102271052A (en) Network system, network management device and gateway device
CN102301760A (en) Method and apparatus for tracking device management data changes
CN101860454B (en) Network performance data processing method and device thereof
CN102256241B (en) Method, server and intelligent card for acquiring bearer independent protocol (BIP) information of terminal
CN101848110B (en) TR069 network management method and equipment
CN111585815A (en) Port data acquisition method and device
US8327391B2 (en) Method, system and apparatus for transmitting remote procedure call commands
CN101599865A (en) A kind of management method of the cluster network based on unique public network IP address
CN102571418B (en) Method for equipment management
CN108712514A (en) IP address management method, apparatus and electronic equipment
CN100484131C (en) Realizing method for multiprotocol compatibility
CN102594611B (en) Trap session chain table updating method for webmaster agent
CN109274774A (en) A kind of date storage method, device and computer readable storage medium
CN101695028B (en) Method and device for configuring simple network management protocol
CN105512338B (en) The implementation method and device of a kind of big data quantity node navigation tree in web front-end
KR20030060598A (en) Method and apparatus for managing networks operated by different protocol
CN101854334B (en) Admission control system, device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090610

Termination date: 20150125

EXPY Termination of patent right or utility model