09-18-2013 11:08 AM
I have been fighing with developing a good way to determine if a loopback0 exists on a router using snmp. Using snmpwalk seems to always give me a million lines of code while snmpget never responce with anything. Sorry for the newb quesiton but I am really lost here.
Basically I need to hit 250 routers (2800's) to check for "loopback0", I also need to know what ip is on that interface and my end result will need to be:
"<router(ip or host)>,<Lo0 ip address>,<Lo0 subnet)" for later parsing.
Anyone have a quick command referance I could use with the snmp-get win32 tools to produce this? As an fyi, I have been using OID because I cant even seem to find a way to use MIBs with the windows version - nor what mib set to use very clear.
09-18-2013 08:12 PM
Hi,
Object | ipAddrEntry |
OID | 1.3.6.1.2.1.4.20.1 |
This is the ONLY oid ,close to what you need .
Do the SNMP WALK on this OID ,this will give you these outputs:
ipAdEntAddr (1)
ipAdEntIfIndex (2)
ipAdEntNetMask (3)
ipAdEntBcastAddr (4)
ipAdEntReasmMaxSize (5)
Thanks-
Afroz
[Do rate the useful post]
09-20-2013 07:55 AM
When I run it I get everything. This is the line I am running - thoughts?
snmpwalk -r:
In that file I can see the interface discriptions are listed, and some IP addresses are listed, but none in the file are the ip of the loopback0.
09-24-2013 09:49 AM
Resolved - used commands below then used a vbs script to parse the data:
"Grab All Interface Desc"
snmpwalk -r:
"Grab All IP's"
snmpwalk -r:
08-20-2016 02:27 PM
I have met similar problem and finally I decided to write a script that prepares a list of all IP interfaces of our routers. I add the list to host file so my traceroute shows hostnames and its interface names.
The script can be used for your purpose - just search lines with "Lo0". This filtering does not directly show routers with missing Loopback0 - you can e.g. compare list of Lo0 routers with list of all router etc.
A.B.C.D | Device_hostname-Interface_name | #/Prefix | #Interface description |
10.1.1.1 | router_R01-Gi1/0/2 | #28 | |
10.5.1.22 | Beijing-router01-WAN-Tu611 | #24 | # Port to internet |
192.168.24.254 | firewall2-eth5 | #24 |
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide