Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
I cannot connect to Fedora using the hostname. I can only use an IP address. This is mainly for Samba, but I don't think VNC works either......
  1. #1
    Just Joined! mpg198's Avatar
    Join Date
    Apr 2009
    Posts
    86

    Connect to Fedora via Hostname?

    I cannot connect to Fedora using the hostname. I can only use an IP address. This is mainly for Samba, but I don't think VNC works either...

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    Hi mpg198,

    Does the host name resolve if you do a look up or ping the name?

    The probable cause is that your host is not registered with a DNS server, or depending on your network size, defined in your local hosts file.
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    17
    Quote Originally Posted by mpg198 View Post
    I cannot connect to Fedora using the hostname. I can only use an IP address. This is mainly for Samba, but I don't think VNC works either...
    Try to be sure that the hostname you use can translate to the IP you able to use. DNS issue?

  4. #4
    Just Joined! mpg198's Avatar
    Join Date
    Apr 2009
    Posts
    86
    I shouldn't have to add it to the hosts file, that would be too much effort for every computer.

    It works with Windows and Ubuntu, just not Fedora. Is there something in Fedora where it doens't register it's hostname with DNS or something like that?

  5. #5
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Read up on name resolution.

    Windows typically has NetBIOS running by default (file/print sharing in Windows). NetBIOS broadcasts to everything on the subnet. For larger networks, it chews a lot of bandwidth and is very annoying.

    Samba duplicates NetBIOS via the nmbd daemon. Your Ubuntu machine may have it running.

    Hosts files and/or DNS is much cleaner/smarter than relying on NetBIOS. If you have a *small* or home office, NetBIOS may suffice.

    I shouldn't have to add it to the hosts file, that would be too much effort for every computer.
    That's why NIS, LDAP, DNS, etc. were invented.

    Ha - MSFT dropped NetBIOS support in IPv6. Yay! It's going away...

    NetBIOS name resolution is not supported by Microsoft for Internet Protocol Version 6 (IPv6).

  6. #6
    Just Joined! mpg198's Avatar
    Join Date
    Apr 2009
    Posts
    86
    How do I get DNS? Shouldn't it already be running?

  7. #7
    Just Joined!
    Join Date
    Jan 2005
    Posts
    17
    Are you able to ping the Fedorah hostname? Does it resolve to the desired IP address? Are they in the same subnet?

  8. #8
    Just Joined! mpg198's Avatar
    Join Date
    Apr 2009
    Posts
    86
    Ping by hostname doesn't work. Ping by IP does...

  9. #9
    Just Joined! Farolito's Avatar
    Join Date
    Feb 2008
    Posts
    8

    Try this

    go the terminal and login as a root
    then go to /etc
    in etc edit the hosts file
    in the hosts file add something like 192.168.X.X mywindowsmachine in the end of the line. basically linux look at the hosts file to resolve the ip address if you are no familiar vi there is a step

    [user@localhost]$ su -
    password
    [root@localhost]# cd etc
    [root@localhost etc]# vi hosts
    <press insert to edit>
    192.168.X.X nameofthemachine
    <press scc again, and then press :wq to write and quit inside vi>
    [root@localhost]# service NetworkManager restart
    [root@localhost]# ping nameofthemachine

    should be successful.....

    another thing you can do the opposite in windows
    windows has a host file too
    the location is
    c:\windows\system32\drivers\etc\hosts
    you can edit as the same way the ip then the name of the machine

    I would suggest use static IP if you haven't done

  10. #10
    Just Joined! mpg198's Avatar
    Join Date
    Apr 2009
    Posts
    86
    I don't want to edit the hosts file, I need a permanent solution.

    In Ubuntu I don't have to edit the hosts file...

Page 1 of 2 1 2 LastLast

Posting Permissions

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