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 (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 ?
Best Answer
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 :
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.<INTERFACE_INDEX>
)Example output (for index = 152) :
3) Extract IP address from step 1) for particular Interface index. For example for index 152 it will be IP addresses like :
connected to VLAN called Vl206
I hope that I did it well.