ARP tool ???

Support section for FREESCO v0.4.x 3rd Party Packages

ARP tool ???

Postby bob selby » Fri Mar 26, 2010 5:40 am

Is there a package containing an ARP command ??

I need to determine the MAC address of a node from purely the IP address.

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: ARP tool ???

Postby Lightning » Fri Mar 26, 2010 8:00 am

There is a modified arp command built into the system. You can see any MAC address connected and communicating with FREESCO simply by going to the control panel and using the "connected clients" -> "list" button. From a command line because it is a stripped arp command it is called "arpf"
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: ARP tool ???

Postby dingetje » Fri Mar 26, 2010 10:45 am

The following FAQ entry may be useful.

Also a full fledged arp command is not really required, all you need is the cat command, like so:

Code: Select all
cat /proc/net/arp


Example run:
Code: Select all
[root@Freesco] cat /proc/net/arp
IP address       HW type     Flags       HW address            Mask     Device
94.215.16.1      0x1         0x2         00:14:F1:E8:D4:05     *                 eth0
192.168.0.28     0x1         0x2         00:50:8B:03:F3:AE     *                 eth1


As you can see there's one client connected on eth1 and both IP and MAC address are shown.
If needed you can ping the client first to make sure it's present in the arp table.

The next command:
Code: Select all
 ipfwadm -M -l -n

will show all masquerade entries, so all connections made via your FREESCO with both internal and external IP addresses.

HTH
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Re: ARP tool ???

Postby bob selby » Fri Mar 26, 2010 11:05 am

Perhaps I should clarify ...

The firewall is 192.168.1.1 on the internal network.

The DHCP range is .10 - .25

There is one defined static IP address at 192.168.1.30.

There is a wireless access point at a static IP address of 192.168.1.2 - it *has* to be that value for reasons I wont go into here.

I have no access to the MAC address of the AP - what I want is to get the MAC address of the AP in a script.

None of the above techniques show anything outside the DHCP range (.10-.25) + the one at .30

I could add the AP into the DHCP static list ... but I dont know the IP address.

These are all connected via an unmanaged netgear switch so they cannot see each others traffic.

Any ideas??
Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: ARP tool ???

Postby Lightning » Fri Mar 26, 2010 6:57 pm

In order to get an arp entry the machine must have some sort of communication with the router. So all that is needed is to ping it's IP address directly from the router and after that has happened there will be an arp (mac) entry for that IP address for at least five minutes. If it is set to not respond to pings then just pull up it's web control panel to force some sort of communication by using the "snarf 192.168.1.2" command from the console. Either way will force it to communicate directly with the router and create an arp entry.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: ARP tool ???

Postby bob selby » Fri Mar 26, 2010 7:21 pm

That worked a treat :-)
Thanks
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: ARP tool ???

Postby dingetje » Fri Apr 09, 2010 10:06 am

If needed you can ping the client first to make sure it's present in the arp table.


I wonder why I wrote that? :?
Anyway, I'm glad its working now :wink:
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands


Return to 3rd Party Package Support for FREESCO v0.4.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron