SNMP and NetBIOS Protocol understanding

Source: Internet
Author: User
Tags snmp snmp api

Http://  A Simple Network Management Protocol (snmp,simple networks Management Protocol) constitutes an Internet Engineering Working Group (IETF, Internet Engineering Task Force) is defined as part of the Internet Protocol cluster . 1. Function:
Imagine a network of servers, work machines, three-layer switches, and more. If I want to work in the machine, through a way to query the three-layer switch access device Ip,mac and other information, how to do it? I want to know how many days the server is currently running, do I have to telnet to the host to know? Of course not, we can simply send some pre-agreed data to the server, the server will also be in accordance with the specified data format to return their information. This well-defined data format is SNMP. The goal is to manage the hardware and software platforms produced by many manufacturers on the Internet. Any device that supports SNMP protocol can be read by SNMP. 2. Usage: To experience the functionality provided by the SNMP protocol, you can use open source Net-snmp, which supports unix,unix-like,windows multiple operating systems, provides command-line situation calls, or Lib for the C and Perl situations.
Windows also has a dedicated SNMP API can be called, very convenient AH.
Common APIs include SnmpMgrOpen (), Snmpmgrclose (), SnmpMgrRequest (), which can be used to search for relevant data from the Web. 3. Principle:
Two concepts:
OID entry: Is the ID number of a parameter for each device, which is somewhat similar to the "path" in the operating system, such as/usr/bin/ping
MIB Library: Save the name, type, value meaning and other details of the parameter description.
Four operations:
Get: Gets the specified OID value.
GETNEXT: Reads the next OID value of the current OID and takes it as the new "current OID". The ability to traverse all values in order to remember only one OID.
Set: Sets the specified OID value.
TRAP: For the device to actively feedback the results of the monitoring program, to avoid the monitoring program polling, but also timely access to sensitive data results. Second, network basic input and output system(NetBIOS:Network Basic input/output System ) is abbreviated1. Function:
The NetBIOS protocol allows you to read the Windows host user Name list, the list of shared directory names, the list of rank names, the time service type, and the MAC address.
The function of our common Windows system to share files in a local area network is implemented by using the NetBIOS protocol.
For example, you can open your network Places, find the machines in your current web, and view the shared files in them.
You can also access the shared file in the Start-run window, enter \\\shareDirectory, and if you want to replace the IP with the host name (NetBIOS name) of the target machine, it can be accessed normally. This feature is also dependent on NetBIOS completion. (Note: As for the specific file transfer of what data protocol, I have not found the relevant information, not quite sure) 2. Usage:
Sharing files is simple, right-click Folders, properties, sharing is OK. or open Network Places, you can also see all the hosts in the LAN (NetBIOS enabled, and successfully registered in the main browsing server) The open source world has a command-line program called Nbtscan, which can obtain NetBIOS information and support Windows,linux. Windows also provides the NBTSTAT command to query network machines that involve NetBIOS information (Nbtscan under Windows is also based on this completion).
Nbtstat-n Viewing native NetBIOS information
Nbtstat-a View NetBIOS information for a specified IP  3. Principle:
As long as we enter a command on our computer, we can see the details of other computers on the LAN, and even see the list of shared files. How did this happen?
There is a master browser in a domain, and the master browser is responsible for creating and maintaining a list of network shared resources.
When there is a computer (non-browser) on the network, it will first send a login request to the main browser, the master browser to accept the request, automatically put this computer information into the list of shared resources, at this time through the network neighbors can see the computer information on the boot.
When the computer shuts down, it will also send a logout message, and the network will not see the computer in the neighborhood, but if this computer is not properly shutdown, it will appear, can be seen in the Network neighborhood, but not access to the computer's shared resources. (in general, the master browser needs three consecutive times, the cumulative 12*3=36 minutes do not receive a computer's still normal operation of information, it is considered that the host has been shut down)
The master browser is generated by the campaign, and during the master browser's work, the list of shared resources is maintained by the master browser, but the master browser will periodically (15 minutes) Copy the entire list to the browser.
In the above example, the shared Resources feature of the Network Neighborhood is just one of many features of NetBIOS.  References:"The Secret of Network scanning technology" Li RuiminNetBIOS protocol NetBIOS Programming instance Http:// /7587414
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.