Re: how to discover MAC address?

Doug Hughes (Doug.Hughes@Eng.Auburn.EDU)
Tue, 15 Jul 1997 13:57:16 -0500

>greetings,
>
>i'm new to this SNMP stuff and i'm not sure if this is the correct list.
>
>i'd like to determine the hardware address for given a host IP address and
>the appropriate router IP address.
>
>
>i could see a script calling snmpget, but i don't know the correct parameters.
>
SNMP is at a higher level than this. The volatility of ARP information means that if the
machines has been off for a while, that information will stale out of the
ARP cache. You are likely going to find this to be a difficult endeavour. You've
already discovered that you need to know quite a bit of information a priori
in order to even get close.


>% getmac router_ip host_ip
>
>maybe???
>#!/bin/sh
># NAME - getmac
>MAC=`snmpget $1 public at.something.something...$2`
>echo $MAC
>
>
>on my cisco, the SNMP value i think i'm interested in is:
> at.atTable.atEntry.atPhysAddress.3.1.192.168.1.1 = Hex: 00 00 C0 AF 34 32
>
>3 is the physical interface number
>1 is the virtual network number (i think)
>192.168.1.1 is the IP address
>
>
>i can't seem to figure out how to determine the MAC address without knowing
>both interface numbers. i'd like to assume that i don't know the number of
>interfaces for a given router.
>

--
____________________________________________________________________________
Doug Hughes					Engineering Network Services
System/Net Admin  				Auburn University
			doug@eng.auburn.edu

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.