Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 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 :

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.<INTERFACE_INDEX>)

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.