Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and system for initiatively detecting IP (Internet protocol) of switch

A technology of active detection and switching, applied in the computer field, to achieve good technical effects, good complex network environment, efficient and stable information acquisition

Inactive Publication Date: 2015-07-15
山东华软金盾软件股份有限公司
View PDF6 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Although the existing technology can achieve the function of obtaining topology information in the network, it also has limitations.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for initiatively detecting IP (Internet protocol) of switch
  • Method and system for initiatively detecting IP (Internet protocol) of switch
  • Method and system for initiatively detecting IP (Internet protocol) of switch

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] The Telnet protocol is a member of the TCP / IP protocol family, and it is the standard protocol and main method of Internet remote login service.

[0039] The main solution of this solution is to request the switch remotely through the local server in a complex network environment, and the switch actively detects all the IPs of the local port to update the arp cache on the switch, so as to obtain the IP and mac connected to the port only through the SNMP of the switch information. This solution can better adapt to the complex network environment of customers, and obtain information more efficiently and stably.

[0040] Specifically, as figure 1 As shown, a method for a switch to actively detect IP includes:

[0041] The local server is connected with the remote switch, and the server obtains the information of each VLAN on the switch through the SNMP protocol, and the information of the VLAN includes the ip address used by each vlan and the used subnet mask information...

Embodiment 2

[0047] Embodiment 1 is supplemented in detail.

[0048] Log in to the switch through the TELNET protocol, specifically including: enable multi-threading, and log in to the switch using the telnet protocol at the same time.

[0049] Further, preferably, the server sends the ping request to the switch with the send command through the socket interface;

[0050]The server then sends a request to the switch through the snmp interface, and obtains the mac and the ip information corresponding to the mac of each port on the switch in turn.

[0051] Further, preferably, use the switch's own ping command to actively detect all ip addresses of the local port, and update the arp cache on the switch.

[0052] The key point of this solution is to first obtain the information of each VLAN on the switch through the SNMP protocol, keep alive the ip and mask, and then calculate the network segment of each VLAN through the ip and mask, then log in to the switch through the TELNET protocol, and...

Embodiment 3

[0054] Such as figure 1 Shown is a schematic flow diagram of a complete embodiment, which specifically includes:

[0055] 1. The server obtains the vlan information on the switch, and the ip and mask of the vlan through the SNMP api.

[0056] 2. Calculate the network segment used by each vlan through the ip and mask of the vlan.

[0057] 3. Through multi-threading, open 4 threads and use the telnet protocol to log in to the switch and pass the authentication.

[0058] 4. Send the ping request to the switch through the send command of the socket, and the switch will execute the received commands in sequence.

[0059] 5. After the switch has pinged all IPs, the local arp cache has been updated to the latest.

[0060] 6. The server obtains the mac and mac-corresponding ip information of each port on the switch through the snmp api. What is obtained at this time is the final result, and there is no need to complete the information through active detection.

[0061] Among them,...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a system for initiatively detecting IP (Internet protocol) of a switch. The method comprises steps as follows: a local server and a remote switch are connected, the server acquires information of each VLAN (virtual local area network) on the switch by the aid of an SNMP (simple network management protocol), the VLAN information comprises ip addresses used by each vlan and subnet mask information used by the vlan; the ip addresses and the subnet mask information are kept alive, and a network segment of each VLAN is calculated by the aid of the ip addresses and the subnet mask information; the switch is logged in by the aid of a TELNET protocol, a ping request for each VLAN network segment is sent to the switch, the switch initiatively detects all the ip addresses of a local port according to the Ping request and updates arp cache on the switch; the server sends an acquisition request to the switch and acquires ip and mac information connected to each port in arp cache on the switch. With adoption of the scheme, the complex network environment for a customer can be better adapted, and information is more efficiently and stably acquired.

Description

technical field [0001] The invention belongs to the field of computers, and in particular relates to a method and system for an exchange to actively detect IP. Background technique [0002] In the current access products, the SNMP protocol will be used to obtain the ip and mac information on the switch port, so that the physical connection locations of legal and illegal ips can be accurately located. [0003] Through .iso.org.dod.internet.mgmt.mib-2.dot1dBridge.dot1dTp.dot1dTpFdbTable.dot1d TpFdbEntry.dot1dTpFdbPort in BRIDGE-MIB.txt, the mac information of the current switch port connection can be obtained through .iso.org.dod .internet.mgmt.mib-2.at.atTable.atEntry.atPhysAddress can obtain the corresponding relationship between part of ip and mac, and other MIBs can obtain the above information with the same effect, this is just an example. [0004] Obtaining the mac information corresponding to the switch port through SNMP is complete, but only part of it can be obtained...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/26H04L12/24H04L29/12
Inventor 马涌
Owner 山东华软金盾软件股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products