All, Can anyone point me to the best way to find the mac address of a phone on my system?? I can get the ip's just fine but dont seem to be able to pull mac addresses from any network tools. Thanks-John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060619/b6e95d07/attachment.htm
arp in the shell mojowrkn wrote:> All, Can anyone point me to the best way to find the mac address of a > phone on my system?? I can get the ip's just fine but dont seem to be > able to pull mac addresses from any network tools. > > Thanks-John > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
as long as they are in the same network segment as the asterisk server you can use arp man arp mojowrkn wrote:> All, Can anyone point me to the best way to find the mac address of a > phone on my system?? I can get the ip's just fine but dont seem to be > able to pull mac addresses from any network tools. > > Thanks-John > > > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
[root@pbx-1 root]# arp -an ? (172.16.8.1) at 00:04:C1:21:CC:C0 [ether] on eth0 ? (172.16.8.53) at 00:04:F2:01:FA:94 [ether] on eth0 ? (172.16.8.48) at 00:04:F2:01:FA:D8 [ether] on eth0 ? (172.16.8.62) at 00:04:F2:01:FB:65 [ether] on eth0 ? (172.16.8.60) at 00:04:F2:01:FB:20 [ether] on eth0 ? (172.16.8.59) at 00:07:E9:50:F7:56 [ether] on eth0 ? (172.16.8.58) at 00:04:F2:00:D0:23 [ether] on eth0 ? (172.16.8.57) at 00:07:E9:50:F7:4D [ether] on eth0 mojowrkn wrote:> All, Can anyone point me to the best way to find the mac address of a phone > on my system?? I can get the ip's just fine but dont seem to be able to > pull > mac addresses from any network tools.-- Now accepting new clients in Birmingham, Atlanta, Huntsville, Chattanooga, and Montgomery.
mojowrkn wrote:> All, Can anyone point me to the best way to find the mac address of a > phone on my system?? I can get the ip's just fine but dont seem to be > able to pull mac addresses from any network tools. > > Thanks-John > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >arp -a
>From your Asterisk console:tcpdump -i eth0 -e | grep -A1 <your target phone's IP address> Then: Make a call on your target phone. Disclaimer: not tested -----Original Message----- From: mojowrkn [mailto:mojowrkn@gmail.com] Sent: Monday, June 19, 2006 11:21 AM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] finding mac addresses All, Can anyone point me to the best way to find the mac address of a phone on my system?? I can get the ip's just fine but dont seem to be able to pull mac addresses from any network tools. Thanks-John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060619/f13b79c5/attachment.htm
On Mon, Jun 19, 2006 at 10:21:16AM -0700, mojowrkn wrote:> All, Can anyone point me to the best way to find the mac address of a phone > on my system?? I can get the ip's just fine but dont seem to be able to pull > mac addresses from any network tools.Is it in your LAN? if so, arp(8) is your friend. /proc/net/arp likewise. You may need to ping the phone beforehand to make sure its address is actually in the table. If the phone is not in your LAN, there is no direct way to tell. -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com
Mojo with Horan & Company, LLC
2006-Jun-19 11:02 UTC
[Asterisk-Users] finding mac addresses
an example might be IP="10.0.0.213" MAC=`arp | grep "$IP" | awk {'print $3'}` mojowrkn wrote:> All, Can anyone point me to the best way to find the mac address of a > phone on my system?? I can get the ip's just fine but dont seem to be > able to pull mac addresses from any network tools. > > Thanks-John > > > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Mojo <mojo@horanappraisals.com> Office Manger, Horan & Company, LLC (907) 747-6666 x112
If your phones are connected to a Cisco switch, depending your your IOS level you can possibly use the "show mac-address-table" command. Which would show you not only the mac-address for all the devices attached to the switch, but what port they are hanging off of. Hope this helps. T.>From: mojowrkn <mojowrkn@gmail.com> >Reply-To: Asterisk Users Mailing List - Non-Commercial >Discussion<asterisk-users@lists.digium.com> >To: asterisk-users@lists.digium.com >Subject: [Asterisk-Users] finding mac addresses >Date: Mon, 19 Jun 2006 10:21:16 -0700 > >All, Can anyone point me to the best way to find the mac address of a phone >on my system?? I can get the ip's just fine but dont seem to be able to >pull >mac addresses from any network tools. > >Thanks-John>_______________________________________________ >--Bandwidth and Colocation provided by Easynews.com -- > >Asterisk-Users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Sure--an nmap (http://www.insecure.org) ping scan will show this. For example, on my network, I have an DHCP-addressed Iaxy that usually camps out on 192.168.1.130. Running a ping scan with nmap returns the following: $sudo nmap -sP -v -v 192.168.1.130 Password: Starting Nmap 4.01 ( http://www.insecure.org/nmap/ ) at 2006-06-19 12:13 AKDT Initiating ARP Ping Scan against 192.168.1.130 [1 port] at 12:13 The ARP Ping Scan took 0.02s to scan 1 total hosts. DNS resolution of 1 IPs took 0.03s. Mode: Async [#: 3, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0] Host 192.168.1.130 appears to be up. MAC Address: 00:03:64:00:15:61 (Scenix Semiconductor) Nmap finished: 1 IP address (1 host up) scanned in 0.758 seconds Raw packets sent: 1 (42B) | Rcvd: 1 (42B) $ While I don't yet have any VoIP phones on this network to test, I imagine nmap would find VoIP phones, as well. HTH! --Mike> All, Can anyone point me to the best way to find the mac address of a phone > on my system?? I can get the ip's just fine but dont seem to be able to pull > mac addresses from any network tools. > > Thanks-John-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060619/67ef242c/attachment.htm
> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of mojowrkn > Sent: Tuesday, 20 June 2006 03:21 > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] finding mac addresses > > All, Can anyone point me to the best way to find the mac address of a > phone on my system?? I can get the ip's just fine but dont seem to beable> to pull mac addresses from any network tools. >For IPv4: ip neigh show dev eth0 or: arp -ani eth0 For IPv6: ip -6 neigh show dev eth0 replace eth0 with the network interface name if it's not eth0. If it doesn't show up, ping it first to populate the arp table. Out of curiosity, for what purpose do you need the MAC address? James