02-14-2013 10:00 AM
I would like to get using of course SNMP, list of client IPs connected to VLAN in Cisco Catalyst 3600.
So far, I have pseudo-algorithm made by me which obtains those IP addresses, but I am not sure if this is done in right way :
1) Receive all IP addresses from Catalyst using oid 1.3.6.1.2.1.4.20.1.2
. I get something like :
IP-MIB::ipAdEntIfIndex.10.10.2.1 = INTEGER: 152
IP-MIB::ipAdEntIfIndex.10.10.2.251 = INTEGER: 152
IP-MIB::ipAdEntIfIndex.10.10.3.251 = INTEGER: 151
and so on.
2) Get ifIndex of VLAN (oid 1.3.6.1.2.1.4.20.1.2.10.10.2.1.<IP_ADDRESS>
) for particular IP address from above list :
IP-MIB::ipAdEntIfIndex.10.10.2.1 = INTEGER: 152
IP-MIB::ipAdEntIfIndex.10.10.2.251 = INTEGER: 152
IP-MIB::ipAdEntIfIndex.10.10.3.251 = INTEGER: 151
3) Get VLAN name (oid 1.3.6.1.4.1.9.9.46.1.3.1.1.4.1.<IF_INDEX>
) If_index is borrowed from list above :
IP-MIB::ipAdEntNetMask.152 = No Such Instance currently exists at this OID
IP-MIB::ipAdEntNetMask.151 = No Such Instance currently exists at this OID
In the third step I have this problem, that instance can not be found in OID. It is weird, because for about forty IP addresses i can find about their 10 VLAN names to which they are connected. Or perhaps I am doing this wrong ?
02-18-2013 12:12 AM
I managed also obtain new algorithm to find those IPs connected to VLAN :
1) Obtain index value which uniquely identifies the interface to which this entry is applicable (oid : 1.3.6.1.2.1.4.20.1.2)
Example output :
IP-MIB::ipAdEntIfIndex.10.10.2.1 = INTEGER: 152
IP-MIB::ipAdEntIfIndex.10.10.2.251 = INTEGER: 152
IP-MIB::ipAdEntIfIndex.10.10.3.250 = INTEGER: 151
IP-MIB::ipAdEntIfIndex.10.10.3.251 = INTEGER: 151
IP-MIB::ipAdEntIfIndex.10.100.0.1 = INTEGER: 312
IP-MIB::ipAdEntIfIndex.10.100.0.251 = INTEGER: 312 and so on...
2) Get name of interfaces on Catalyst 3600 using above index (oid : 1.3.6.1.2.1.31.1.1.1.1.
Example output (for index = 152) :
IF-MIB::ifName.152 = STRING: Vl206
3) Extract IP address from step 1) for particular Interface index. For example for index 152 it will be IP addresses like :
10.10.2.1
10.10.2.251
connected to VLAN called Vl206
I hope that I did it well.
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