On 9/15/10, Abraham Varricatt <abraham.varricatt+s...@googlemail.com> wrote: > On Tue, Sep 14, 2010 at 10:13 PM, Abraham Varricatt < > abraham.varricatt+s...@googlemail.com<abraham.varricatt%2bs...@googlemail.com>> > wrote: >> What is the relationship between the SNMP reported "interfaces" (in >> MIB-II, I think) and the physical ports on a system? I'm having a hard >> time finding anything on the web.
Probably because it's implementation & configuration dependent. > I've done some more investigation/study into this and well, could someone > please confirm if I've got my facts right below? I'll try :) > An "interface" refers to a connection into a sub-network and is uniquely > identified by a MAC ID. I took a quick look at RFC1213 & I'm not exactly clear what they mean by a "sub-network", but an interface is uniquely identified by the ifIndex value. Not all interfaces have a mac address - eg: % snmpwalk router ifPhysAddress RFC1213-MIB::ifPhysAddress.1 = Hex-STRING: 00 15 62 xx yy 00 RFC1213-MIB::ifPhysAddress.2 = Hex-STRING: 00 15 62 xx yy 01 RFC1213-MIB::ifPhysAddress.3 = "" ... snip lots of the same ... RFC1213-MIB::ifPhysAddress.89 = "" RFC1213-MIB::ifPhysAddress.90 = Hex-STRING: 00 15 62 xx yy 00 RFC1213-MIB::ifPhysAddress.91 = Hex-STRING: 00 15 62 xx yy 00 RFC1213-MIB::ifPhysAddress.92 = Hex-STRING: 00 15 62 xx yy 00 RFC1213-MIB::ifPhysAddress.93 = Hex-STRING: 00 15 62 xx yy 00 RFC1213-MIB::ifPhysAddress.94 = "" ...etc > In the case of a router having 4 physical ports, it > is usually seen that these 4 ports are connected to the "LAN" network and maybe on your Linksys, but not on all routers. > that to anyone connecting to any of the 4 ports will see the same MAC ID on > the other end. I've got a switch at my desk & each physical port has a unique mac address - but each vlan interface has the same mac address :) I suspect what mac address you see on which port is implementation & configuration dependent. It could also be dependent on what flavor ethernet frame is being sent by the device - eg. a spanning tree bpdu would have the port mac address while the arp reply for the router IP address would have the vlan mac address. > To visualize it, .... snip ascii art ... > In the above, consider Port-1 and Port-2 as empty (nothing is connected > there). For the router it has a single "LAN" interface and this interface is > shared by the 4 ports Again, I dunno about Linksys, but another possibility is that the 4 ports are a switch or hub where all the layer 2 stuff takes place and the "LAN" interface is where all the layer 3 (eg. routing) stuff happens. > 2 systems are connected to Port-3 and Port-4 > respectively. Both PC-B and PC-C will see the router as having the same IP > and MAC ID (indicated in figure). The mac address of the layer-3 router ip address may or may not have anything to do with a layer-2 port mac address. > What I need to confirm is, if we have an SNMP agent running on the switch, > will it be able to distinguish between the 4 ports? I would hope so. > Thinking along the same lines, suppose PC-B (acting as an SNMP manager) asks > the router the status of its 'lone' interface, it should reply that it's > active. i.e. using SNMPv2 (or standard MIB-II) there is no way for the agent > to respond back the status of the individual ports. check out ifAdminStatus and ifOperStatus > Using SNMP is it possible for the router to respond back to a manager the > status of the individual ports? i.e. to tell PC-B that Port-1 & Port-2 are > empty but Port-3 & Port-4 are occupied? ifOperStatus will tell you if the thing connected to the port is up or down. I don't know if it's possible to tell the difference between a port with nothing plugged into it & a port with a cable plugged into it that's connected to a powered off device. > I'm sorry if these questions seem noob-ish, but the book I have with me > doesn't really explain this issue in a way that I understand. Also, the > above theory is my "best-fit" explanation to my router's behavior (a Linksys > WRT54GL running DD-WRT). You could try something like snmpbulkwalk [linksysIpAddress] .1.3.6 > mib.txt and see what all you get.. Regards, Lee > > Still a bit puzzled, > Abraham Varricatt > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders