Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm, trying to get mac addresses from switches in a network. For that i'm using snmp calls with these oids: (like in this manual) ., . But i have a problem with Raisecom ISCOM device: it seems not to support this oids.

Another problem is that Raisecom doesn't answer for snmp -c community@vlan... prompt - only without vlan.

So, my question is: how can i get this mac addresses and how to manage with vlans?

share|improve this question

try this small bash script to get mac - port - vlan $1 - is community $2 - is ip address/hostname

snmpwalk -Cc  -Onq -v 2c -c $1 $2 . |(
 while read line ; do 
echo $line | awk '{print $1}' | awk -F. '{printf("%02x%02x%02x%02x%02x%02x\t",$16,$17,$18,$19,$20,$21)}'
echo $line | awk '{printf("%u\t",$2)}' 
echo $line | awk '{print $1}' | awk -F. '{print $15}'
exit 0
share|improve this answer

Your Answer


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.