Use a name instead of IP address to connect from local network
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 15 of 15
  1. #1
    cfoland Guest

    Question Use a name instead of IP address to connect from local network

    Im running Fedora Core 5. I want to give my server a name so that when I connect to it from the local network I can type in http://somename as apposed to http://199.7.x.x Is this possible? I thought I saw a post about how to do this but I cant find it. Any help would be great.

  2. #2
    pete_1967 Guest
    You can either bind ips to names in your /etc/hosts file and/or add current desktop's name tp the /etc/HOSTNAME or if you have static ips, change it in the /etc/sysconfig/network

    You can also check it in the /proc/sys/kernel/hostname

    More detailed info for you: http://www.cpqlinux.com/hostname.html

  3. #3
    ccrvic Guest
    Quote Originally Posted by cfoland
    I want to give my server a name so that when I connect to it from the local network I can type in http://somename as apposed to http://199.7.x.x Is this possible?
    Yes.

    If you're using DHCP, you need to configure your DNS to allow updates from your DHCP server.

    Vic.

  4. #4
    cfoland Guest
    Thanks for the replies. Yes, Im using a static IP. I have a hostname setup. My problem is that when I want to log into my egroupware I have to go to http://199.7.85.125/egroupware What I want to do is go to http://somename/egroupware I have tried replacing the net address with my hostname but it doesnot work. If im on the linux box then I can go to http://localhost/eroupware and it will let me in but if Im on a different pc on the local network I have to use the IP addess. Any ideas?

  5. #5
    ccrvic Guest
    Quote Originally Posted by cfoland
    Yes, Im using a static IP.
    In that case, start populating your /etc/hosts file(s).

    Vic.

  6. #6
    cfoland Guest
    What do you mean by populating? I have the following files: hosts, host.conf, hosts.allow, and hosts.deny. It looks like I should be working with the hosts file but Im unsure as to what to edit.

  7. #7
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    61
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cfoland
    What do you mean by populating? I have the following files: hosts, host.conf, hosts.allow, and hosts.deny. It looks like I should be working with the hosts file but Im unsure as to what to edit.
    Hello:
    I think everyone is saying the same thing so I am just adding to it in hopes it will assist.
    To give the sever a name, the easiest way to accomplish what you want [from the GUI] in FC5 is select System /Administration/Network and select the DNS tab and replace the Hostname with the one that you want. Save and exit.
    Then restart your network.
    Assuming that there is a router involved that is doing the dns resolution for you, then for DNS resolution issues / potential issues you may need to edit your /etc/hosts file and add an entry similar to this;
    servername 197.XXX.x.XXX
    197.XXX.x.XXX servername
    Save and exit and either reboot or restart you network again.
    Then you can use the name of the server to connect instead of the ip address.
    hth
    Seve
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  8. #8
    cfoland Guest
    I did what Seve recomended and it works perfect from the Linux server but when I tried it from my XP machine (which is on the same local network) it didnt work and I had to connect using the IP address?

  9. #9
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    61
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cfoland
    I did what Seve recomended and it works perfect from the Linux server but when I tried it from my XP machine (which is on the same local network) it didnt work and I had to connect using the IP address?
    Hello:
    Can you successfully ping your Linux server from Win by both IP and name?
    Did you reboot your router?

    Seve
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  10. #10
    cfoland Guest
    I can ping it by IP but not by name. I get the error: Ping request could not find host. Rebooting the router is not an option for me as it would take down the entire company and then I would get fired.

  11. #11
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    61
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cfoland
    I can ping it by IP but not by name. I get the error: Ping request could not find host. Rebooting the router is not an option for me as it would take down the entire company and then I would get fired.
    Yikes....don't want to do that
    So somewhere you have a dns resolution issue.
    Don't use win enough to help .. sorry I can't help more.
    Perhaps someone else can chime in.
    Seve
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  12. #12
    ccrvic Guest
    Quote Originally Posted by cfoland
    I did what Seve recomended and it works perfect from the Linux server but when I tried it from my XP machine (which is on the same local network) it didnt work and I had to connect using the IP address?
    Have you put the same info into the hosts file on your XP machine?

    I assumed this was a small network - if you've got a reasonable number of machines on it, it is probably worth setting up an internal zone on your DNS server.

    Vic.

  13. #13
    cfoland Guest
    Thanks for all of the replies. Ill work on DNS server and hope that takes care of it.

  14. #14
    sheridon Guest
    So Cfoland, you entered the information that seve told you to on the linux machine and you can now get to the server using the hostname. This only made it so that the linux box knows where to go.... You can do the same thing on the windows machine also. just open a search for files and folders...(as I dont remember where the file is) and do a search for "hosts" it will be something like Windows....../etc/hosts. Make a backup copy of the file..... then you will have to right click on the file and open with Notepad and then just add the information to that file that you did to the hosts file you did on the linux machine then just save. That will enable to you use the hostname to connect to the server...

    Hope that helps

  15. #15
    cfoland Guest
    Thanks for the advice, my problem is that there are around 200 windows machines that need to connect to this and editing a file on each machine is not an option as some are not on site and the time alone would take to long. I guess they will just have to type in the IP address. I still learned a few things so thanks for all the help guys.

Similar Threads

  1. vino picks wrong local network for address
    By rbroberts in forum Using Fedora
    Replies: 0
    Last Post: 1st September 2009, 03:22 AM
  2. No IP address for local machine
    By manugupt1 in forum Servers & Networking
    Replies: 1
    Last Post: 31st March 2009, 08:49 PM
  3. can connect to wireless router, but no internet or local network
    By HellGuardian in forum Servers & Networking
    Replies: 11
    Last Post: 4th November 2008, 08:29 PM
  4. Replies: 5
    Last Post: 29th June 2007, 01:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •