Getting the IP Address from an AFP Server

Jump to First Reply
Posted:
in Genius Bar edited January 2014
I have many Mac clients that gets their IP address from a DHCP server (I believe it is WINS), and each Mac has Personal File Sharing turned on. So the IP address always changes and I have no control over this in my company.



Is there a way (an application?) that I can find out the IP address a Mac client has via the AFP information that is being broadcast from another Mac? When you Connect To Server, it will do so with an address that looks like afp:/at/clientName/*: which is an AppleTalk connection.



I have tried port scanning software and can find the Mac clients that have port 548 open, but I would like to be able to zero in on a specific client via their IP address based on their AFP name at any given moment. This would be easy if all the Macs were on the same subnet, as Rendezvous would allow me to connect via clientName.local, but they are scattered across many subents.



Thanks.

Comments

  • Reply 1 of 4
    dobbydobby Posts: 797member
    If afp is on appletalk then no. If afp is on tcp-ip then you could probably get the tcp information if you turn of you ip lookup (dns/wins).

    The afp url should then show only the ip address.

    Eg. afp://10.10.10.100





    Dobby
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 4
    The idea is not to just connect to them via afp, but to be able to use other IP services, like VNC.
     0Likes 0Dislikes 0Informatives
  • Reply 3 of 4
    Well this is no permanent solution but if you need to find out the IP address of a computer your connected to you can always run netstat -n or tcpdump..
     0Likes 0Dislikes 0Informatives
  • Reply 4 of 4
    Quote:

    Originally posted by Mount_my_floppy

    Well this is no permanent solution but if you need to find out the IP address of a computer your connected to you can always run netstat -n or tcpdump..



    Thank you! This works well. I just connect to the AFP share via AppleTalk from Connect To Server, run netstat -n, and from there I can deduce the IP address of the computer I with which wish to make an IP connection for VNC.



    Now that I know netstat -n does this, this allows me to further investigate how to automate this process. One thing I found on macosxhints.com (with this clue for searching for netstat) was that I can type in "netstat -na | grep 548" to narrow down the output to the IP address of the AFP server!
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.