No such thing as a small change | |
PerlMonks |
Re: Getting MAC Adress from wireless device and access pointby zengargoyle (Deacon) |
on Nov 11, 2003 at 11:12 UTC ( [id://306149]=note: print w/replies, xml ) | Need Help?? |
ping the IP of the network device, then check your ARP cache. if the IP<->MAC mapping is present then you are in the same broadcast domain as the network device and the MAC address is relevant. if the IP<->MAC mapping is not present in your ARP cache then you are in a different broadcast domain than the network device and the MAC is unavailable (through any direct means). if the network device is wireless then you will not be able to determine the MAC nor the IP of the access point through any direct means. you may have access to indirect means like SNMP. then anything is possible but you need the right passwords for the access points. if you have the IP of a network device and the passwords to the access points (and a list of the access points) then you can query the access point for the IP<->MAC mapping of all current connections (by IP or MAC). query each access point untill you find the IP/MAC you are interested in. depending on the access point and it's SNMP funcionality you may find the information in different places and have to find the right little bit.
in my case i always can find the MAC of the network device in question, then i query all of the access points looking for the one (or more) that have seen that MAC address on their radio interface (vs seeing the MAC on their wired interface). this gets me which access points the network device is using. my next step is usually to add them to the filter on the access point to deny them wireless access. (MuAhahah)
In Section
Seekers of Perl Wisdom
|
|