PDA

View Full Version : strangeness in /etc/hosts


jborn
9th February 2007, 02:32 AM
The first four lines of /etc/hosts are the following on my FC6 box:

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
127.0.0.1 localhost

My guess is I should remove the ::1 line and add localhost.localdomain to the 127.0.0.1 line

I'm also guessing that that line is causing a lot of slowness.

Last question is if my machince name it htpc (for home theater pc) I should have this:

127.0.0.1 htpc.localdomain localhost

Are these assumptions correct?

Wayne
9th February 2007, 02:47 AM
You didn't set a hostname during install? Or do you get one assigned for example, by DHCP? My hostname is 'Beerislife' so my hosts file reflects that with:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 Beerislife localhost.localdomain localhost
::1 Beerislife localhost.localdomain localhost

Wayne

jborn
9th February 2007, 02:55 AM

Nice host name.. No I set the host name after install.

From the look of what you posted I should have:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 htpc localhost.localdomain localhost
::1 htpc localhost.localdomain localhost

If I didn't set a hostname during install... Do I need to set it somewhere else? Is the information in this post correct?

Thanks

Wayne
9th February 2007, 03:01 AM
Nice host name.. No I set the host name after install.

From the look of what you posted I should have:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 htpc localhost.localdomain localhost
::1 htpc localhost.localdomain localhost

If I didn't set a hostname during install... Do I need to set it somewhere else? Is the information in this post correct?

Thanks

You got me interested in this because I definitely didn't have the second (::1) entry in FC5. This is what I found:

http://www.mjmwired.net/resources/mjm-fedora-fc6.html#ipv6

Edit: Read the last line carefully:

Some applications may have problems with this (Gnome).

Edit: In System > Administration > Network you can set the hostname.

Wayne

jborn
9th February 2007, 03:28 AM
OK so I've commented out the IPV6 line. so now I have this:

# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1 localhost.localdomain localhost
127.0.0.1 htpc localhost.localdomain localhost

By turning off IP6 is also made the boot process much faster. sendmail and sm-client boot in millis instead of 3+ minutes each.

Thanks for the help. I would like to understand why some applications will have a problem with this. Does gnome have IP6 in it by default?

Thanks

tmick
9th February 2007, 03:59 AM
Because IPv6 is still "new" alot of developers haven't implemented it yet. IP 6 Support is enabled in Fedora (I don't know if it is a GNOME thing or not)