router switch determination via snmp

Apr 09, 2007 2 Replies

I am trying to determine if a cisco device is a router or a switch. For example, 3500 series. I have tried looking at the sysservices but the values returned show layer 2 and layer 3:



SNMPv2-MIB::sysServices.0 = INTEGER: 6



According to Cisco

formatting link
"For example, a node which performs only routing functions would have a value of 4 (2^(3-1)).



sysServices



1 physical (e.g., repeaters)
2 datalink/subnetwork (e.g., bridges)
3 internet (e.g., supports the IP)
4 end-to-end (e.g., supports the TCP)
7 applications (e.g., supports the SMTP)"

Since the value is a 6 this is 2+4 or switch+routing.



I was thinking if I checked IP-MIB::ipForwarding.0 = INTEGER: notForwarding(2)



that would be my sanity check against it. If a device is capable of being either a switch or a router then if ipforwarding is not enabled it should be a switch. But is this universal behavior on cisco devices?



thanks



i think the problem here is that there isnt a hard difference between the 2, just a change in emphasis.

switches tend to have many LAN interfaces, routers tend to have non LAN interfaces (with exceptions in both camps).

formatting link
>

just about maybe every Cisco "router" is actually a bridge / router - ie can bridge as well - so the result seems sensible.

Also most switches are capable of routing (eg the 3550s you mention) - so this isnt going to help.

More importantly - why are you trying to "classify" the device type in this way - surely the issue is about what they are set up to do in the network?

Dont know.

But i do have 2600 type routers set up only to bridge IP across a serial link, so i dont think that fixes all the edge cases even if you get the results you want.....

Correct. I am using a mix of COTS and OpenSource tools to monitor the network. One such tool is NMIS which has type=router or type=switch. I need to know how the device is really acting for proper feeding of the nodes.csv file. I also needed to generate reports on how the device is acting (ie is it acting as a router?) for management to go with all the other reports already being created.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required