CN111082984A - Method and device for simulating login of network equipment to carry out command line interaction - Google Patents

Method and device for simulating login of network equipment to carry out command line interaction Download PDF

Info

Publication number
CN111082984A
CN111082984A CN201911280421.3A CN201911280421A CN111082984A CN 111082984 A CN111082984 A CN 111082984A CN 201911280421 A CN201911280421 A CN 201911280421A CN 111082984 A CN111082984 A CN 111082984A
Authority
CN
China
Prior art keywords
command
client
address
interaction
network equipment
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.)
Pending
Application number
CN201911280421.3A
Other languages
Chinese (zh)
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.)
Zhongying Youchuang Information Technology Co Ltd
Original Assignee
Zhongying Youchuang Information Technology Co Ltd
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 Zhongying Youchuang Information Technology Co Ltd filed Critical Zhongying Youchuang Information Technology Co Ltd
Priority to CN201911280421.3A priority Critical patent/CN111082984A/en
Publication of CN111082984A publication Critical patent/CN111082984A/en
Pending legal-status Critical Current

Links

Images

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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

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

Abstract

The invention provides a method and a device for simulating login network equipment to carry out command line interaction, wherein the method comprises the following steps: setting a plurality of IP addresses, and configuring network equipment information for each IP address; associating the interaction command to the network device information; receiving a login request of a client, matching the login request of the client with an IP address, establishing connection with the client, and loading an interactive command associated with the IP address; and receiving a configuration command sent by the client, returning an interaction command to the client according to the configuration command, and performing command line interaction. The invention can simulate the functions of various network devices through one device, so that the correctness of software development can be verified at the first time after the software development is finished, meanwhile, the influence of the update of new functional software on the existing network environment system is reduced, and the development time is saved.

Description

Method and device for simulating login of network equipment to carry out command line interaction
Technical Field
The invention relates to the technical field of computer networks, in particular to a method and a device for simulating login of network equipment to carry out command line interaction.
Background
After the network management software is developed, the network devices are required to be collected and tested, including interacting with various manufacturer type devices in the telecommunication network environment to obtain device information.
When network equipment information is acquired, command formats used by manufacturers are different, and different models of the same manufacturer can be different. Therefore, one device with different models of various manufacturers cannot be bought for testing.
In the prior art, the actual current network environment of the telecommunication is realized, and the debugging is carried out by using the formal equipment which is already on line. In view of safety, some actual current telecommunication network environments cannot directly log in for testing, so that the correctness of network management software cannot be verified at the first time.
Disclosure of Invention
The embodiment of the invention provides a method for simulating login network equipment to carry out command line interaction, which simulates the network equipment to realize command line interaction by setting a plurality of IPs and associating interaction commands, and comprises the following steps:
setting a plurality of IP addresses, and configuring network equipment information for each IP address;
associating the interaction command to the network device information;
receiving a login request of a client, matching the login request of the client with an IP address, establishing connection with the client, and loading an interactive command associated with the IP address;
and receiving a configuration command sent by the client, returning an interaction command to the client according to the configuration command, and performing command line interaction.
The embodiment of the invention also provides a device for simulating login network equipment to carry out command line interaction, which comprises:
the IP address configuration network equipment information module is used for setting a plurality of IP addresses and configuring network equipment information for each IP address;
the interactive command association network equipment information module is used for associating the interactive command with the network equipment information;
the client connection module is used for receiving a login request of a client, matching the login request of the client with the IP address, establishing connection with the client and loading an interactive command associated with the IP address;
and the command line interaction module is used for receiving the configuration command sent by the client, returning the interaction command to the client according to the configuration command and carrying out command line interaction.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method for simulating the login network equipment to carry out command line interaction when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for implementing the method for simulating login network device to perform command line interaction.
The method and the device for simulating login network equipment to carry out command line interaction realize the function of simulating the network equipment by setting the IP address matched with the network equipment information and associating the interaction command, run network management software, then connect with the client to receive the configuration command of the client, return the corresponding interaction command according to the configuration command of the client and carry out command line interaction. The embodiment of the invention can simulate the functions of various network devices through one device, so that the correctness of software development can be verified at the first time after the software development is finished, meanwhile, the influence of the update of new functional software on the existing network environment system is reduced, and the development time is saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic diagram of a method for simulating login of a network device to perform command line interaction according to an embodiment of the present invention.
Fig. 2 is a data flow diagram illustrating a method for simulating command line interaction of a logged-in network device according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a simulation device for performing a command line interaction by using a simulation login network device according to an embodiment of the present invention.
Fig. 4 is a data flow diagram illustrating a method for simulating login of a network device to perform command line interaction, which is executed on a server according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of an apparatus for simulating command line interaction of a login network device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
As shown in fig. 1, a schematic diagram of a method for simulating command line interaction of a logged-in network device according to an embodiment of the present invention,
the embodiment of the invention provides a method for simulating login network equipment to carry out command line interaction, which simulates the network equipment to realize command line interaction by setting a plurality of IPs and associating interaction commands, and comprises the following steps:
step 101: setting a plurality of IP addresses, and configuring network equipment information for each IP address;
step 102: associating the interaction command to the network device information;
step 103: receiving a login request of a client, matching the login request of the client with an IP address, establishing connection with the client, and loading an interactive command associated with the IP address;
step 104: and receiving a configuration command sent by the client, returning an interaction command to the client according to the configuration command, and performing command line interaction.
The method for simulating login network equipment to carry out command line interaction provided by the embodiment of the invention realizes the function of simulating the network equipment by setting the IP address matched with the network equipment information and associating the interaction command, runs network management software, then is connected with the client to receive the configuration command of the client, returns the corresponding interaction command according to the configuration command of the client and carries out command line interaction. The embodiment of the invention can verify the correctness of software development in the first time after the software development is finished by simulating various network devices, and simultaneously reduce the influence of the update of new functional software on the existing network environment system and save the development time.
In the specific implementation of the method for simulating login network equipment to perform command line interaction according to the embodiment of the present invention, since a manufacturer provides a command and result document for implementing a specific function at the initial stage of network management software development, and a network management platform itself also accumulates a large number of network equipment operation examples and also provides content guarantee for software simulation, the embodiment of the present invention can simulate various types of equipment to perform command line interaction, and the method includes:
setting a plurality of IP addresses, and configuring network equipment information for each IP address; associating the interaction command to the network device information; receiving a login request of a client, matching the login request of the client with an IP address, establishing connection with the client, and loading an interactive command associated with the IP address; and receiving a configuration command sent by the client, returning an interaction command to the client according to the configuration command, and performing command line interaction.
In the embodiment of the present invention, the method for simulating login of a network device to perform command line interaction may be run on a server, so that a plurality of IP addresses may be simulated at a port of the server by using the function of the server operating system, and each IP address may be configured with network device information.
In a specific implementation of the method for simulating login of a network device to perform command line interaction according to the foregoing embodiment of the present invention, in an embodiment, the setting a plurality of IP addresses includes:
and allocating a plurality of IP addresses on a network card of a unix/linux or similar operating system server. In an embodiment, the method for simulating login of a network device to perform command line interaction in the embodiment of the present invention may be run on a unix/linux or similar operating system server, and 1 to 255 IP addresses are allocated on a network card of the unix/linux or similar operating system server. In an embodiment, the aforementioned IP address is used by the client login server.
In a specific implementation of the method for simulating logging in of a network device to perform command line interaction according to the foregoing embodiment of the present invention, in an embodiment, the network device information includes: network device model information;
configuring network equipment information for each IP address, comprising the following steps: and configuring the model information of the network equipment for each IP address, and storing the model information into a model database.
In a specific implementation of the method for simulating logging in of a network device to perform command line interaction according to the foregoing embodiment of the present invention, in an embodiment, associating an interaction command with network device information includes: and associating the interactive command to the model of the network equipment and storing the interactive command to a command database. In an embodiment, the aforementioned network device model information includes a network device model and a network device provider; configuring network equipment model information for each IP address according to actual needs, and storing the information in a model database in a text or data mode; the model database is used for storing the model information of the network equipment corresponding to the IP address pair.
In a specific implementation of the method for simulating login of network device to perform command line interaction according to the foregoing embodiment of the present invention, in an embodiment, receiving a login request from a client, matching the login request from the client with an IP address, establishing a connection with the client, and loading an interaction command associated with the IP address includes:
when a client sends a login request, receiving the login request of the client, wherein the login request of the client comprises: IP address matching information;
matching the IP address matching information with the IP address, and establishing connection with the client;
according to the IP address, inquiring the network equipment model information matched with the IP address in a model database;
inquiring an interactive command associated with the network equipment model information in a command database according to the network equipment model information;
and associating the interactive command with the IP address, and loading the interactive command associated with the IP address.
In the embodiment, a client firstly needs to send a login request, receives IP address matching information included in the login request of the client when the client sends the login request, matches the IP address matching information with an IP address, and establishes connection with the client; the establishing of the connection with the client may include the client logging in the server to establish the connection in a user name and password manner. After connection with a client is established, network equipment model information matched with an IP address is inquired in a model database according to the IP address, after the network equipment model information corresponding to the IP address is inquired, an interaction command related to the network equipment model information is inquired in a command database according to the network equipment model information, then the interaction command is related to the IP address, and the interaction command related to the IP address is loaded. In an embodiment, the aforementioned interaction command may be an interaction content performed by using telnet/ssh protocol, or an interaction content performed by using snmp protocol, without limiting a protocol version.
In a specific implementation of the foregoing method for simulating login of a network device to perform command line interaction according to the embodiment of the present invention, in an embodiment, receiving a configuration command sent by a client, and returning an interaction command to the client according to the configuration command to perform command line interaction includes:
receiving a configuration command sent by a client;
when the configuration command is matched with the interactive command, returning the interactive command to the client side for command line interaction;
and when the configuration command is not matched with the interactive command, sending an error report to the client, and waiting for the client to send the matching command again.
In the embodiment, after the connection with the client is established and the interactive command associated with the IP address is loaded, the configuration command sent by the client is received, the configuration command and the interactive command are subjected to matching verification, and when the configuration command is matched with the interactive command, the interactive command is returned to the client to carry out command line interaction; and when the configuration command is not matched with the interactive command, sending an error report to the client, and waiting for the client to send the matching command again.
In a specific implementation of the method for simulating login of a network device to perform command line interaction according to the foregoing embodiment of the present invention, in an embodiment, the method further includes: after the command line interaction is completed, disconnecting the client and waiting for the next client; in embodiments, multiple clients may be connected simultaneously, with command line interaction occurring simultaneously.
As shown in fig. 2, a data flow diagram of a method for simulating login of a network device to perform command line interaction in an embodiment of the present invention is also provided, where the data flow of the method for simulating login of the network device to perform command line interaction includes:
step S1: 1 to 255 IP addresses are distributed on a network card of a unix/linux or similar operating system server through the functions of an operating system.
Step S2: and configuring corresponding manufacturers and models for each IP address according to actual needs, and storing the manufacturers and models into a model database in a text or database mode.
Step S3: and configuring corresponding interactive command contents for each manufacturer and model according to actual needs. The interactive content may be interactive content using telnet/ssh protocol, or interactive content using snmp protocol, and is stored in the command database.
Step S4: the main process runs on a unix/linux or similar operating system server and waits for a client to connect.
Step S5: the client side obtains the type IP address of the network equipment which is expected to log in, the IP address is used for logging in, the main process establishes connection with the client side on a unix/linux or similar operating system server, the corresponding type of equipment is judged according to the IP address requested by the client side logging in the server, and the interactive command content of the type is loaded.
Step S6: and after the client establishes connection, sending a configuration command according to actual needs.
Step S7: receiving a command sent by a client, and returning corresponding result information or a command format aiming at the command; and carrying out command line interaction when the commands are matched, giving an error prompt when the commands are not matched, and then continuously waiting for the client to send the commands.
Step S8: the client may disconnect from the server after sending the full command. The server side can be connected with a plurality of client sides at the same time to carry out command line interaction.
In the embodiment of the present invention, a simulation device for performing simulation by using a method for performing command line interaction by using a simulated login network device is further provided, as shown in fig. 3, a schematic diagram of a simulation device for performing a method for performing command line interaction by using a simulated login network device in the embodiment of the present invention is shown, the method for performing command line interaction by using a simulated login network device in the embodiment of the present invention is run on a server, and includes a plurality of IP addresses and simulation device data corresponding to the IP addresses; the simulation device data includes network device information and interaction commands. The client is connected with the server through the IP address, acquires the network equipment information and the interaction command corresponding to the IP address, and interacts with the server through a command line.
In an embodiment, an embodiment is further provided in which a method for simulating login network equipment to perform command line interaction is run on a server, as shown in fig. 4, which is a data flow diagram of a method for simulating login network equipment to perform command line interaction running on a server according to an embodiment of the present invention, the data flow diagram includes client, server, and server simulation equipment data; the client is used for sending a login request and a configuration command, receiving an interaction command and performing command line interaction with the server; the server simulation equipment data comprises network equipment information and an interaction command; the server is used for operating a method for simulating login of the network equipment to carry out command line interaction; the server can judge whether the client is connected through telnet/ssh or snmp protocol established by which IP, and then searches the information of the network equipment of a model corresponding to a certain manufacturer represented by the IP; and then establishing connection, and carrying out command line interaction according to the interaction command corresponding to the inquired network equipment information. The method comprises the steps that a client side and a server which operates a method for simulating login network equipment to carry out command line interaction establish telnet/ssh or snmp protocol connection through an IP address, and the server judges which IP address of the server is adopted by the client side to establish telnet/ssh or snmp protocol connection; acquiring corresponding network equipment information according to a character string of an IP address for establishing connection of a client, acquiring an interactive command according to the network equipment information, returning the interactive command, and loading the interactive command associated with the IP address; and then receiving different configuration commands sent by the client, analyzing results corresponding to the configuration commands, and returning the interactive commands to the client for command line interaction according to the analysis results.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method for simulating the login network equipment to carry out command line interaction when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for implementing the method for simulating login network device to perform command line interaction.
As shown in fig. 5, an embodiment of the present invention provides a device for simulating login of a network device to perform command line interaction, where the device includes:
an IP address configuration network device information module 501, configured to set multiple IP addresses and configure each IP address with network device information;
an interactive command association network device information module 502 for associating an interactive command to network device information;
the client connection module 503 is configured to receive a login request of a client, match the login request of the client with an IP address, establish connection with the client, and load an interactive command associated with the IP address;
and the command line interaction module 504 is configured to receive the configuration command sent by the client, and return the interaction command to the client according to the configuration command to perform command line interaction.
In a specific embodiment, when the apparatus for simulating login of a network device to perform command line interaction is implemented, the IP address configuration network device information module may be specifically configured to:
and allocating a plurality of IP addresses on a network card of a unix/linux or similar operating system server.
When the apparatus for simulating login of network device for command line interaction according to the foregoing embodiment of the present invention is implemented specifically, in an embodiment, the apparatus may further include a model database for storing model information of the network device;
the network equipment information may include: network device model information;
the IP address configuration network device information module may be further configured to: and configuring the model information of the network equipment for each IP address, and storing the model information into a model database.
When the apparatus for simulating logging in network device to perform command line interaction according to the foregoing embodiment of the present invention is implemented specifically, in an embodiment, the apparatus may further include a command database for storing interaction commands;
the interactive command associated network device information module is specifically configured to: and associating the interactive command to the model of the network equipment and storing the interactive command to a command database.
In an embodiment of the present invention, when the apparatus for simulating login to a network device to perform command line interaction is implemented specifically, the client connection module may be specifically configured to:
when a client sends a login request, receiving the login request of the client, wherein the login request of the client comprises: IP address matching information;
matching the IP address matching information with the IP address, and establishing connection with the client;
according to the IP address, inquiring the network equipment model information matched with the IP address in a model database;
inquiring an interactive command associated with the network equipment model information in a command database according to the network equipment model information;
and associating the interactive command with the IP address, and loading the interactive command associated with the IP address.
In a specific embodiment, when the apparatus for simulating login to a network device to perform command line interaction is implemented, the command line interaction module may be specifically configured to:
receiving a configuration command sent by a client;
when the configuration command is matched with the interactive command, returning the interactive command to the client side for command line interaction;
and when the configuration command is not matched with the interactive command, sending an error report to the client, and waiting for the client to send the matching command again.
In a specific embodiment, when the apparatus for simulating login of a network device to perform command line interaction is implemented, the client connection module may be further configured to: after the command line interaction is completed, the connection with the client is disconnected, and the connection with a plurality of clients can be simultaneously carried out, and the command line interaction is carried out simultaneously.
To sum up, the method and apparatus for simulating login of network device to perform command line interaction provided in the embodiments of the present invention implement the function of simulating network device by setting the IP address matching the network device information and associating the interaction command, run the network management software, then connect with the client to receive the configuration command of the client, return the corresponding interaction command according to the configuration command of the client, and perform command line interaction. The embodiment of the invention can simulate various network devices through one device, can realize the unit and system test after the network management software development is finished, can verify the correctness of the software development at the first time after the software development is finished, simultaneously reduces the influence of the update of new functional software on the existing network environment system, and saves the development time.
The implementation of the embodiment of the invention is to simulate and log in network equipment of various manufacturer models through a server based on unix/linux or similar operating systems, and carry out command line interaction of equipment of corresponding models with a client. When a client logs in a unix/linux or similar operating system server, the simulation system takes over the shell environment of the unix/linux or similar operating system, enters the running environment of the system, acquires the IP address of the logged-in client in the system environment, judges the type of the network equipment needing to be interacted with the IP, provides a command interaction document corresponding to the type of the equipment, establishes a command line mode with the client, responds to a command request sent by the client, and achieves the effect of performing command line interaction with the network equipment. The method can support the interaction in a telnet/ssh protocol mode or a snmp protocol mode. By using one device, network devices of different manufacturers can be simulated. The embodiment of the invention can simulate network equipment of any manufacturer model by using a unix/linux or similar operating system server in a software mode, thereby achieving the effect similar to the interaction with actual network equipment.
The embodiment of the invention utilizes a server of unix/linux or similar operating systems to simulate the server into network equipment of various types by operating a method for simulating login of the network equipment to carry out command line interaction on the server, so that a client can carry out interaction of the network equipment expected by the client with the server after logging in the server. The method is based on telnet/ssh protocol or snmp protocol, and the network open source protocol is used for realizing specific application. A plurality of IP addresses are simulated by using a port of a server, each IP address can represent one device on a network, each IP address corresponds to one virtual device, and each virtual device can interact with a client to perform data query and configuration. The client establishes connection with different IP addresses by using telnet/ssh protocol or snmp protocol, thereby achieving the purpose of logging in different devices and carrying out interactive operation with the devices.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (16)

1. A method for simulating login of network equipment to perform command line interaction is characterized by comprising the following steps:
setting a plurality of IP addresses, and configuring network equipment information for each IP address;
associating the interaction command to the network device information;
receiving a login request of a client, matching the login request of the client with an IP address, establishing connection with the client, and loading an interactive command associated with the IP address;
and receiving a configuration command sent by the client, returning an interaction command to the client according to the configuration command, and performing command line interaction.
2. The method of claim 1, wherein said setting a plurality of IP addresses comprises:
and distributing a plurality of IP addresses on the network card of the unix/linux server.
3. The method of claim 1, wherein the network device information comprises: network device model information;
configuring network equipment information for each IP address, comprising the following steps: and configuring the model information of the network equipment for each IP address, and storing the model information into a model database.
4. The method of claim 3, wherein associating the interaction command to the network device information comprises: and associating the interactive command to the model of the network equipment and storing the interactive command to a command database.
5. The method of claim 4, wherein receiving a login request from a client, matching the login request from the client with an IP address, establishing a connection with the client, and loading an interactive command associated with the IP address comprises:
when a client sends a login request, receiving the login request of the client, wherein the login request of the client comprises: IP address matching information;
matching the IP address matching information with the IP address, and establishing connection with the client;
according to the IP address, inquiring the network equipment model information matched with the IP address in a model database;
inquiring an interactive command associated with the network equipment model information in a command database according to the network equipment model information;
and associating the interactive command with the IP address, and loading the interactive command associated with the IP address.
6. The method of claim 1, wherein receiving a configuration command sent by a client, returning an interaction command to the client according to the configuration command, and performing command line interaction, comprises:
receiving a configuration command sent by a client;
when the configuration command is matched with the interactive command, returning the interactive command to the client side for command line interaction;
and when the configuration command is not matched with the interactive command, sending an error report to the client, and waiting for the client to send the matching command again.
7. The method of claim 1, further comprising: and after the command line interaction is completed, disconnecting the client side and waiting for the next client side.
8. An apparatus for simulating logging onto a network device for command line interaction, comprising:
the IP address configuration network equipment information module is used for setting a plurality of IP addresses and configuring network equipment information for each IP address;
the interactive command association network equipment information module is used for associating the interactive command with the network equipment information;
the client connection module is used for receiving a login request of a client, matching the login request of the client with the IP address, establishing connection with the client and loading an interactive command associated with the IP address;
and the command line interaction module is used for receiving the configuration command sent by the client, returning the interaction command to the client according to the configuration command and carrying out command line interaction.
9. The apparatus of claim 8, wherein the IP address configuration network device information module is specifically configured to:
and distributing a plurality of IP addresses on the network card of the unix/linux server.
10. The apparatus of claim 8, further comprising a model database for storing network device model information;
network device information, comprising: network device model information;
the IP address configuration network device information module is further configured to: and configuring the model information of the network equipment for each IP address, and storing the model information into a model database.
11. The apparatus of claim 10, further comprising a command database for storing interaction commands;
the interactive command associated network device information module is specifically configured to: and associating the interactive command to the model of the network equipment and storing the interactive command to a command database.
12. The apparatus of claim 11, wherein the client connection module is specifically configured to:
when a client sends a login request, receiving the login request of the client, wherein the login request of the client comprises: IP address matching information;
matching the IP address matching information with the IP address, and establishing connection with the client;
according to the IP address, inquiring the network equipment model information matched with the IP address in a model database;
inquiring an interactive command associated with the network equipment model information in a command database according to the network equipment model information;
and associating the interactive command with the IP address, and loading the interactive command associated with the IP address.
13. The apparatus of claim 8, wherein the command line interaction module is specifically configured to:
receiving a configuration command sent by a client;
when the configuration command is matched with the interactive command, returning the interactive command to the client side for command line interaction;
and when the configuration command is not matched with the interactive command, sending an error report to the client, and waiting for the client to send the matching command again.
14. The apparatus of claim 8, wherein the client connection module is further configured to: and after the command line interaction is completed, disconnecting the client side and waiting for the next client side.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of simulating command line interaction of a login network device according to any one of claims 1 to 7 when executing the computer program.
16. A computer-readable storage medium storing a computer program for executing the method for simulating login network device command line interaction according to any one of claims 1 to 7.
CN201911280421.3A 2019-12-13 2019-12-13 Method and device for simulating login of network equipment to carry out command line interaction Pending CN111082984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911280421.3A CN111082984A (en) 2019-12-13 2019-12-13 Method and device for simulating login of network equipment to carry out command line interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911280421.3A CN111082984A (en) 2019-12-13 2019-12-13 Method and device for simulating login of network equipment to carry out command line interaction

Publications (1)

Publication Number Publication Date
CN111082984A true CN111082984A (en) 2020-04-28

Family

ID=70314468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911280421.3A Pending CN111082984A (en) 2019-12-13 2019-12-13 Method and device for simulating login of network equipment to carry out command line interaction

Country Status (1)

Country Link
CN (1) CN111082984A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794584A (en) * 2021-08-15 2021-12-14 新华三信息安全技术有限公司 Network management method and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805381A (en) * 2005-01-13 2006-07-19 中兴通讯股份有限公司 Multi-network element emulation test system and implementation method
CN104683190A (en) * 2015-03-26 2015-06-03 重庆金美通信有限责任公司 Webmaster managed network simulation system and webmaster managed network simulation method
CN104796302A (en) * 2015-04-17 2015-07-22 大唐移动通信设备有限公司 Method and system for testing network element simulators

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805381A (en) * 2005-01-13 2006-07-19 中兴通讯股份有限公司 Multi-network element emulation test system and implementation method
CN104683190A (en) * 2015-03-26 2015-06-03 重庆金美通信有限责任公司 Webmaster managed network simulation system and webmaster managed network simulation method
CN104796302A (en) * 2015-04-17 2015-07-22 大唐移动通信设备有限公司 Method and system for testing network element simulators

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
晏蓉.: "《宽带接入技术》", 31 August 2011, 中国铁道出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794584A (en) * 2021-08-15 2021-12-14 新华三信息安全技术有限公司 Network management method and equipment
CN113794584B (en) * 2021-08-15 2023-04-14 新华三信息安全技术有限公司 Network management method and equipment

Similar Documents

Publication Publication Date Title
US6549882B1 (en) Mechanisms for providing and using a scripting language for flexibly simulationg a plurality of different network protocols
CN110032507B (en) Application program testing method, device and system, electronic equipment and storage medium
CN112988485B (en) Simulation test method and device for electric power Internet of things equipment
US10169203B2 (en) Test simulation for software defined networking environments
CN111859832B (en) Chip simulation verification method and device and related equipment
CN112860375B (en) Kubernetes-based containerized application request replication method, system, medium and device
CN114374632B (en) Internet of things data platform multi-protocol test efficiency improvement method
CN113489603B (en) Interactive background flow generation method and system in network target range
CN111104321A (en) Docker-based cloud platform stability testing method and system
CN108694121B (en) Automatic testing method, device and system
CN107181606B (en) Method and apparatus for controlling network nodes
TWI404383B (en) System for injecting protocol specific errors during the certification of components in a storage area network
CN110198222B (en) Plug-and-play test method and test master station for power distribution automation terminal
CN107203471B (en) Joint debugging method, service platform and computer storage medium
CN111082984A (en) Method and device for simulating login of network equipment to carry out command line interaction
CN112543109B (en) Cloud host creation method, cloud host creation system, server and storage medium
CN112217693B (en) Controller testing method and device, electronic equipment and storage medium
CN111221687B (en) Cloud storage testing system and method
CN114466000A (en) CDN gateway source returning method and device
CN110955537B (en) Method and device for containing pipes by physical machine
CN112732296B (en) Software version updating method and device, storage medium and electronic equipment
CN115412447B (en) Service testing method, device and medium based on SDN
CN113836040A (en) Application program testing method and device, computer storage medium and electronic equipment
CN113315647A (en) Network simulation method and device
CN117792953A (en) Intercommunication test method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200428

RJ01 Rejection of invention patent application after publication