>From news (I map the mac to the machine with wmi) > I understand that these switches interface with snmp. We have > a Bay Networks Centillion 100, actually 3, that I would like > to query for a mac address to port listing. ftp://angus.ind.wpi.edu/pub/cra-contrib/nortel-tools/nortel-perl-tools-0.2.0.tar.gz
I wrote one, cnfdb.pl inside this archive: --- Faron Hopper <[EMAIL PROTECTED]> wrote: > Steven, > What are you trying to do by having the users "know" what switch they > are on? > > Faron > > ------------------------------------------------------------ > Contact Information > ------------------------------------------------------------ > Faron Hopper > Cap Gemini Ernst & Young > Kansas City Service Center > Network Services > 816-459-5139 Voice > 816-459-6767 Fax > 816-757-5236 Pager > [EMAIL PROTECTED] > > > >>> "Patrick J. LoPresti" <[EMAIL PROTECTED]> 12/12/03 08:29 AM > >>> > "Steven Satelle (Service Desk)" <[EMAIL PROTECTED]> writes: > > > What I would like to do is have each pc on boot, check which switch > > it is connected to. If it changes prompt the user for his new > > location. I've been looking into using snmp for this but all the > > stuff I've found needs to know hostname or ip address of the switch > > (I think, I dont really know much about Cisco). What I want is for > > the host to detect the switch change automatically, not have to > > manually tell it what switch it is on. Does anyone know if this is > > possible? > > As far as I know, this is not trivial. The whole point of a switch is > to be transparent to network traffic. > > What you can do is use SNMP to query the "forwarding database" (FDB) > of each switch. The FDB on the switch maps Ethernet (MAC) addresses > to port numbers. If you know which ports on each switch connect to > other switches, you can eventually locate the port which corresponds > to a particular MAC address. > > The process would go like this: > > 1) Determine your MAC address. > > 2) Ping each "core" switch (i.e., those at the root of your > topology) to guarantee your MAC address is in the FDB of each > switch between yourself and the core. > > 3) Use SNMP to query each "core" switch's FDB to learn where (i.e., > out which port) it forwards packets with your MAC address. The > table you want is the dot1dTpFdbTable; see > http://www.faqs.org/rfcs/rfc1493.html and/or do a Google search. > > 4) If that port goes to another switch, query that switch's FDB. > Repeat until you find the leaf switch and port to where your > packets are forwarded. > > If you are interested in working by IP address instead of MAC address, > you need to use the ipNetToMediaTable (the ARP table, essentially); > see http://www.faqs.org/rfcs/rfc1213.html and/or do a Google search. > > I wrote a Perl script to do all this a while ago, but it was very > messy and only ran on Linux, so it is not worth sharing. > > Good luck! > > - Pat > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
