Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

New Member

SNMPWalk question

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.

Cisco Employee

SNMPWalk question



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)



[Do rate the useful post]

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****
New Member

SNMPWalk question

When I run it I get everything.  This is the line I am running - thoughts?

snmpwalk -r: -c"" -v:2c -op:>file.txt

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. 

New Member

Re: SNMPWalk question

Resolved - used commands below then used a vbs script to parse the data:

"Grab All Interface Desc"

snmpwalk -r: -c:"" -v:2c -os: -op:>>file.txt

"Grab All IP's"

snmpwalk -r: -c:"" -v:2c -os: -op:.>>file.txt

New Member

I have met similar problem

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.

Example of the result file

A.B.C.D Device_hostname-Interface_name #/Prefix #Interface description router_R01-Gi1/0/2 #28 Beijing-router01-WAN-Tu611 #24 # Port to internet firewall2-eth5 #24
CreatePlease to create content