[c-nsp] OID to pick up Device Type of Cisco devices

Lincoln Dale ltd at cisco.com
Sun Nov 2 18:39:06 EST 2008


lee.e.rian at census.gov wrote:
>
> Lincoln Dale wrote on 11/01/2008 06:46:35 PM:
>
> > Karl Gaissmaier wrote:
> > >> Maybe RFC1213 ipForwarding would work
> > >>
> > >>           ipForwarding OBJECT-TYPE
> > >>               SYNTAX  INTEGER {
> > >>                           forwarding(1),    -- acting as a gateway
> > >>                           not-forwarding(2) -- NOT acting as a 
> gateway
> > >>                       }
> > >>
> > >> but I kind of doubt it.  We just got some SUP32s in to replace CatOS
> > >> SUP2s
> > >> (pure L2 switches) & I haven't been able to figure out yet how to
> > >> tell them
>
> > ipForwarding should work fine.  it _should_ change behavior based on
> > whether there are any L3 interfaces configured or not.
>
> I hope not.  Seems to me that it _should_ change behavior based on 
> whether or not the device is acting as a router.  Consider the case of 
> all interfaces configured as a switchport.  Plain old L2 switch - 
> right?  Now add an IP address under the vlan interface so that I can 
> manage the switch.  It still shouldn't be playing router - so 
> ipForwarding should still return not-forwarding(2)
the moment you've created a SVI, the device is now behaving as a L3 
switch a.k.a. its routing.
my understanding is that on something like a Catalyst 6500 the result of 
ipForwarding _will_ change based on the above logic.

the logic may be a little bit more complicated than that - i can see 
that it probably makes more sense for the result to change only if there 
is either:
 - an SVI and there is at least 1 routed interface too, or
 - more than one SVI.
because its not technically possible to be a "router" if you only have 1 
L3 interface. :)

note that i haven't verified the snmp response from a c6k for any of 
this, but the above would make the most sense in terms of responding 
whether there is "IP Forwarding" aka "L3 switching" aka "routing" going on.

>
> > the challenge is how to use this moving forward on Cisco platforms that
> > have dedicated out-of-band management interfaces (e.g. Nexus 
> platforms),
> > because technically speaking, they ALWAYS have at L3 interface
> > configured (mgmt0 out-of-band) which is L3 by definition because it
> > exists in its own 'management' VRF).
>
> I'm missing why having an L3 interface would make any difference.  A 
> cat2900xl configured with an L3 address for management purposes 
> doesn't turn the box into a router.  Why should simply configuring an 
> L3 interface on a box change the value of ipForwarding?
well - Catalyst 2900XL doesn't do L3 switching (i guess thats why you 
chose it as an example), so to my mind, it should not ever respond 
saying that it can do IP Forwarding.

>
> hrmm..  or are you saying that some boxes are *always* going to think 
> they're a router regardless?

i think that may be the case today, yes.


getting back to the original poster's question, one true method one 
could use to determine of a device is operating as a 'router' or as a L2 
switch is to use a SNMP OID that indicates whether the device is 
participating in a L3 routing protocol, e.g. if you use OSPF as your 
IGP, then querying an OID associated with that perhaps makes more sense.
that would never be ambiguous.



cheers,

lincoln.


More information about the cisco-nsp mailing list