Need help, DHCP/IP hostname problem.

Discussion in 'General Mac Discussion' started by bellis1, Apr 2, 2005.

  1. bellis1 macrumors 6502

    Feb 9, 2003
    I inquired about this earlier but have not found a solution. I recently turned on compter-to-computer networking in airport and I think it changed my hostname. The computer that was hosting the comp-to-comp airport network is also within a network that automatically assigns my IP though DHCP. Now instead of having my original IP address as my hostname I have a DHCP-183-35 name assigned. I see this in the sharing pane, terminal, etc and if I use remote login, afp, and ssh. I can still connect if I use my IP address but am getting a warning error:

    "ssh brettellis@
    reverse mapping checking getaddrinfo for failed - POSSIBLE BREAKIN ATTEMPT!"

    can someone tell me how I go about getting back to just my IP address instead of the dhcp-100-35 naming?

  2. yellow Moderator emeritus


    Oct 21, 2003
    Portland, OR
    Just ignore it.

    It's going to be a huge hassle to try and get it fixed and in the end, I can almost guarantee that you won't win and will be in the exact same position that you are now.

    As I told you in your other thread about this, the reason you have to use the IP address is because reverse DNS lookups aren't resolving properly.

    To get this fixed, you'll have to go to your IT group for your university.
  3. bellis1 thread starter macrumors 6502

    Feb 9, 2003
    Fair enough

    I tried to read up it but got nowhere after hours of research. I'll ask the IT guys sometime over a few beers. I assume I can also ignore the warning? I hate the feeling that I know just enough to be dangerous. Thanks for advice, and I will turn a blind eye to it.
  4. simie macrumors 6502a


    Aug 26, 2004
    I found this

    Now you could type the host name and the IP address manually in the hosts file.

    Once you have located the file make a backup of it.

    Here is how to find it.

    To find the hosts file in OS X's graphical interface:

    Open Finder.

    In the Go menu, select "Go to Folder"

    Type /etc for the folder name.

    In the list of files that appears, you should find hosts. Double click it to open it in a text editor.

    The format of the file is: "".

    The contents of the file should look like this.

    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ## localhost broadcasthost
    ::1 localhost

    You may have to reboot your Mac
  5. yellow Moderator emeritus


    Oct 21, 2003
    Portland, OR
    This solution isn't going to do much for the original poster, because (I assume), he's trying to SSH into his Mac from a remote computer. Editing /etc/hosts is only going to work on his Mac, when he's SSHing from it to wherever..
  6. bellis1 thread starter macrumors 6502

    Feb 9, 2003
    I am accessing remotely

    I am accessing from a remote computer. I figured out that I can change the hostname in the /bin hostname file but it doesn't really get to the root of the problem. I am very interested in understanding unix and networking but am still very intimidated by a lot of it. I don't even know where to start understanding the info. in something like netinfo and have no clue how my computer gets assigned and retains DHCP info. Maybe someday. Until then I'll try to keep my hands clean and let the IT guys deal with the institution's Dells instead of my mac.
  7. yellow Moderator emeritus


    Oct 21, 2003
    Portland, OR
    The hosts file is in /etc. Many of the UNIX config files are housed in /etc, that's what it's for. /bin is for binaries.

    DHCP is controlled by the DHCP server, apparently being dolled out by another computer in your suite. THAT computer is getting it's DHCP address from the DHCP server run by the university. A computer comes on the wire, announces who it is and UDP broadcasts for an address from the DHCP server. The first one that answers gives it an address.

    DNS is controlled by a DNS server. In your case, there's no DNS going on because you're getting an IP address that isn't part of the university's DNS server's assigned names. Hence, no proper DNS lookup for you.

    You can either get the uni-IT folks to get you an entry (good luck), or hook your Mac up to the network properly so you get a university DHCP address.

    And finally, here's a good place to start with darwin UNIX-like tutorial:

Share This Page