Could you please also look into this for ML9.1:
Mandrake Linux 9.0: my /etc/hosts/ had no entry for hostname after
installation.
I have a stand-alone computer connected to the internet via
ethernetcard>cable modem, ISP is Telenet.be (Belgium).
DHCP client gets the IP for my computer.
I don't run a private network.
At installation I gave my computer the name "vat.biers.computer"
I was able to surf the Internet, then all programs that I started in
KDE took 30 sec before they appeared, apparently something was timing
out. I learned (not very sure, my understanding is not fully correct)
that to start a program in X-windows it tries to connect to the X server
via TCP/IP, using the hostname (I think) from
/etc/sysconfig/network : "vat.biers.computer". It tries to resolve
the address of hostname by following the order in /etc/host.conf:
"order hosts,bind": first look in /etc/hosts then ask DNS servers
of Telenet.be (which are given by DHCP server and written to
/etc/resolv.conf). In my /etc/hosts only localhost had an entry:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 is local loopback address (lo)
I'm just guessing about this: the DNS servers give a negative response
or something, so that connection defaults to localhost:my system where
X server is running.
Then my internet connection was having problems, I was still able to
ping and read newsgroups though (maybe only the DNS servers were in
trouble? don't know). I was quite astonished to see that everytime I
started a new X-application my cable modem sent something out but
didn't receive an answer, and that the program only appeared after 30
sec.
After a long search on Google etc, I inserted this line in /etc/hosts:
127.0.0.2 vat.biers.computer vat
The command ifconfig shows eth0 and lo, lo having inet addr:127.0.0.1
and Mask:255.0.0.0 which makes that every address that starts with
127.*.*.* defaults to lo (something like that).So 127.0.0.2 also point
to interface lo.
Some people state that only localhost should point/equal 127.0.0.1,
others also point annoying popup adds names to 127.0.0.1
(e.g. 127.0.0.1 network-209-67-38-7.doubleclick.net).
Some say make an entry for your hostname in the range of 192.168.*.*
or 10.0.0.0 or 172.16-31.*.* which are in the private network IP-range
(and use a dummy0 whatever that is).
On my ML 8.2 system (on another partition) I never encountered this
problem, there the /etc/hosts was:
127.0.0.1 localhost.localdomain localhost
192.168.0.1 vat.biers.computer
This 192.168.0.1 of my ML8.2 also was found in
/etc/sysconfig/network-scripts/ifcfg-eth0 ("IPADDR=192.168.0.1").
In ML9.0 ifcg-eth0 didn't have an IPADDRESS= entry.
Does it matter whether I use 127.0.0.1,127.0.0.2 or 192.168.*.* for
my hostname?
So after I modified my /etc/hosts/ to
127.0.0.1 localhost.localdomain localhost
127.0.0.2 vat.biers.computer vat
I had no more slow loading X-applications in KDE when my internet
connection was "bad" since connections went now straight to lo.
MY 1.QUESTION IS: HOW ON EARTH IS IT POSSIBLE THAT NOTHING IN THE
INSTALLATION PROCESS OF ML 9.0 TOLD ME WHAT TO DO?
Is it because of faulty installation scripts by mandrake? Did I
do something wrong? Nowhere have I found FAQs by Mandrake or by other
non-user sources that deal with this problem, how can a newbie ever
figure this out?
Am I the only one with this problem? What did your hosts file
look like after a fresh install of ML9.0?
Even what I found by searching in Google,Google.groups, forums, etc
was seldom useful, didn't give insight, was even contradicting.
SO MY 2.QUESTION IS: IS THERE ANYONE OUT THERE THAT CAN GIVE A
FULL AND CORRECT EXPLANATION ON HOW THE HOSTNAME SHOULD BE CONFIGURED?
Anyone that knows good website links about this matter? Anyone that
knows why ML9.0 can have this "fault"?
Am I missing something?
vatbier
I spent too much time searching for an answer:
this is what I have found:
************************************************************************
"groups.google: ... However, when I changed to a static address the
computer ran fast."
************************************************************************
"Make sure that you have an entry in the hosts file for your own
machine.
If you have a network and are pulling from dhcp then you can add the
machine name under the loopback network, ie.
127.0.0.1 localhost lb
127.0.0.2 mymachine.mydomain.whatever mymachine" ???WHY
************************************************************************
"I have a question about networking.
I have a Cable Modem (Com21) setup to access the net.
It is setup under network settings as a Lan, and it finds the Ethernet
Card, Auto configs the DHCP and all that jazz.
Now when the cable modem connection goes down, and I try to open
anything be it a terminal from within KDE 3.02, Konq, even running
stuff from the pure terminal mode the programs take 5-10min to even
startup.
I do have my host ip and hostname under the /etc/host file.
I'm running Mandrake 8.2 with stock kernel 2.4.18-6mdk.
Now is this a timeout feature, or is there a way to prevent the system
from turning to mush whenever the cable modem goes out?
Everything still runs, but extremly slow. I'm talkin like 286 slow.
It's driving me up the wall since my area does have cable modem outages
now and again."
************************************************************************
"For some (like me) there are some issues with the hostname, apparently
KDE runs quicker on static ip than dhcp - why? I have no idea....
(My KDE was quicker with the network disabled at bootup)
Best advice: Try another windowmanager, try Gnome if you like that one,
try Windowmaker or Blackbox.."
************************************************************************
"Sorry 'bout this, but welcome to KDE.....
I've had them same experience myself, eventually gave up and moved to
Blackbox instead...
What you can do?
Well, people will try to convince you that tweaking hdparm would help
you, and I guess it could do some good atleast - do some hdparm testing
and see what speed you get from your drives.
My only experience in getting rid of this is that when dhcp fails
during startup ("delaying eth0", for example) KDE always got sluggish,
because of some hostname issue.
Some people have reported that if you don't startup eth0 in the
startup, this delay will disappear, could be worth a try...
Otherwise, try searching google/deja for KDE and "slow" - this is a
really usual trouble.....
(that's why that icon is there when you start a program, so you know
it's really on it's way)"
************************************************************************
"try putting your localhost ip in /etc/hosts pointing to your machine
name in /etc/hosts (did that make sense?). anyway, mine looks like
this:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 tuxmachine.testlab.org tuxmachine
192.168.0.2 tuxmachine.testlab.org tuxmachine
10.0.0.1 tuxmachine.testlab.org tuxmachine"
************************************************************************
"I've had problems with KDE being slow together with DHCP - I noticed
that when DHCP failed at bootup, things were quicker....or seemed so
anyway...
(Others have had the same experience)
Some times KDE would start up the terminal in 1 second, the other it
would take 10....wierd...
I got so sick of it that I'm using blackbox as a windowmanager
instead..."
************************************************************************
"well when having dhcp enable ......i have had problem with 8x slow
down i changed from dhcp to static and it worked fine....
so what am saying using dhcp slows down the computer thre my
experiences ....i mean 50mhz speed slow!!!
i hope that helps"
************************************************************************
"Have you set your hostname in your /etc/hosts ? If your hostname is
unknown to your system all X-Apps try to connect to an unknown host and
finally start after running into timeout"
************************************************************************
"It sounds like the problem is in your routing table...
Programs that use X are network-transparent - the way this works is
that, instead of sending information directly to your screen, they make
a network connection to port 6000 on your computer. The X server
listens at port 6000, and accepts connections from these programs and
then displays the relevant information on your monitor. So every
program that displays information on your X display is connected to
your X server via TCP/IP.
What I think is the problem is that your routing table is set up
incorrectly. That means that connections on port 6000 (ie applications
connecting to your X server) are going out through your cable modem to
your ISP and back again, rather than staying in your computer. When
you're connected to the internet, this happens so fast that you don't
notice (or doesn't happen at all; the routing table may change).
However when the cable connection dies, connection requests on port
6000 take ages to time out before they try another route, which is the
route they should be taking in the first place, which is directly to
your computer.
Why is this happening? Probably the Mandrake scripts for networking
have made a mistake somewhere and are putting the wrong information
into your routing table. It's worth trying to configure your network
again (with Drake tools or with linuxconf, which imho is more solid).
It might be worth posting your routing table from when you're connected
& fast, and from when you're disconnected & slow, so that we can take a
look at it. To get your routing table simply type route as root."
************************************************************************
"> > > The "DHCP server" case:
> > > You have to make sure that this (DHCP-server) host is configured
> > > correctly, i.e. it should know your
> > > MAC. I'm not very firm with DHCP - i.e. never configured a DHCP
server
> > > - so there might be
> > > situations where you can live without the server knowing your
machine's
> > > MAC. (A MAC is a number consisting of 6 bytes identifying a NIC
> > > uniquely within this world.)
> > > You probably have to ask your system administrator to add your
host to
> > > the DHCP
> > > configuration.
> > >
> > > The "no DHCP server" case:
> > > If you don't have a DHCP server on your network your eth0 is
simply
> > > misconfigured.
> > > You should give it a fixed IP address - usually a _private_ one,
i.e.:
> > > 192.168.1.1.
> > >
> > > The private IP addresses are listed in RFC 1597.
> > >
> > > One of the 192.168.x.x range is always a good choice.
> > >
> > > You also have to make sure that your routing is configured
properly.
> > > If you have a dial-up connection to the internet and get a dynamic
IP
> > > address you also need to
> > > setup your NAT correctly. But this is of course _very_
distribution and
> > > connection-type depending."
************************************************************************
"Running the program "hostname" should tell you what it is set too. I
really can't remember where RH store it but what you suggest sounds
about right.
I found it didn't really matter what IP it had, just so long as it was
in the /etc/hosts file with an IP. You could do what someone else
suggested or add another entry on the 127.0.0.1 line.
As for DHCP, the only things you could stuff up there on the client
side is getting the wrong nameservers in /etc/resolve.conf, not get an
IP or have no default route installed. There is an option that will
allow DHCP to update /etc/resolve.conf but if you know the IPs of your
name servers and have it entered correcly then it shouldn't matter.
I persume you can surf etc from the machine. "ifconfig" eth0 will show
up the IP attached to your network card and "route" will tell you if
your default routing is to your network card."
************************************************************************
"> I had something like this problem on gentoo with kde3.02 I solved
it by
> put the hostname in /etc/hosts
> 127.0.0.1 localhost my.host.name
>
> basically what ever is reported by running "hostname"
>"
************************************************************************
"> hosts
> 127.0.0.1 localhost.localdomain localhost
> 192.168.0.100 DI-604
This is missing a domain. It is wrong. Many things will not work. You
need a FQDN plus alias on this line. "DI-604" is OK as an alias.
It looks like you are allowing the dhcp server to give you a hostname
instead of setting it yourself. Please set it yourself. It should be
something like
192.168.2.30 frop.frib.org frop
and I'd configure dummy0 to have that address. Then the eth0 interface
will be configured by dhcp to have address 192.168.0.100 and the
modem will be your gateway to the net."
************************************************************************
"I've had this problem before, now I keep my hostname and fqhn on the
local addy line like this.
127.0.0.1 kato.jeetkunedomaster.net kato localhost.localdomain localhost
<---on one line???
That way I don't have problems when I move from point to point where my
IP# changes or I have the device down either."
************************************************************************
"ML8.2:The startup script checks for a 'localhost' entry in /etc/hosts,
so you need to leave that there and simply add your preferred hostname
on a second line. Try something like this:
[dave@dedannshae dave]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.0.1 dedannshae.thuria.org dedannshae
[dave@dedannshae dave]$
Works great on my system, using dhcp at home and work (it's a laptop)"
************************************************************************
"Yes do it.
Mine reads:
127.0.0.1 localhost
127.0.0.2 pen.homeip.net pen
Hint: 127.anything means localhost."
************************************************************************
"You should have a file (for everything there is a file :-)):
"/etc/hosts"; a default one looks like this:
127.0.0.1 localhost.localdomain localhost
If you have named you computer (very popular with distros, but it often
screws things up), you need to add that at the start of the list on the
right. Notice that the list is delimited with blanks. If you had a
network you would need to add more addresses."
************************************************************************
"> not complain anymore? I just added a line like this:
> 127.0.0.1 whatever.localhost.localdomain whatever
No. Ther emust be only one line for 127.0.0.1 and it should read <-WHY??
127.0.0.1 localhost loghost
(not what RH have, in other words). Your machine should have a proper
name, and be attached to another address. You might try, for example:
127.0.0.2 barney.rubble.org barney
But I'd rather you used a 192.168.0.x address, and configured the
<----WHY???
dummy0 interface to have that IP. "barney" is your hostname. Set
it wherever your distro needs it set for the bootup scripts. In
RH derived distros, that'll be somewhere below /etc/sysconfig/."
************************************************************************
"]>I tried
]> # hostname foo
]>and changed the relevant entries in /etc/hosts, but the machine
]>reverted to the old name upon rebooting...
]>What do I need to do to make the change permanent?
]I'm sorry for neglecting to mention that my distribution is Debian,
]kernel version 2.4.18.
The hostname is stored as a kernel variable which is revealed in
/proc/sys/kernel/hostname. You need a program somewhere in your startup
scripts to set this. Since I run Mandrake, not debian, I am not sure
where this is done. Presumably debian has a file somewhere that it looks
into to find the hostname at bootup. Under mandrake this is
/etc/sysconfig/network, but I am sure it will be elsewhere under
debian."
************************************************************************
"# By the way, Arnt Gulbrandsen <[EMAIL PROTECTED]> says that
127.0.0.1 # should NEVER be named with the name of the machine. It
causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#
# For loopbacking.
127.0.0.1 localhost
# This next entry is technically wrong, but good enough to get TCP/IP
apps
# to quit complaining that they can't verify the hostname on a
loopback-only
# Linux box.
127.0.0.1 darkstar.example.net darkstar
# End of hosts.
Interesting, eh? "technically wrong, but good enough to..."
And I'll note that all that is needed to make it technically correct, is
change that last line to
127.0.0.2 darkstar.example.net darkstar"
************************************************************************
">>
>> And I'll note that all that is needed to make it technically correct,
>> is change that last line to
>>
>> 127.0.0.2 darkstar.example.net darkstar
>>
>Bull
If you think that is wrong, why not explain what you see wrong
with it! In fact, it is quite correct and is guaranteed to work
on a proper implementation. That is significantly the opposite
of using two lines and a FQDN for 127.0.0.1.
BTW, your URL with the list of dozens of entries for 127.0.0.1
is simply *wrong*. As I noted previosly, the _correct_ way to
do that would be to provide each entry with a 127.x.x.n entry
where n is never 0 or 255 and the entire IP address is not
127.0.0.1. Again, that is guaranteed to work on a proper
implementation. Given your "Bull" answer above, I highly
suspect you haven't looked at that close enough to understand
why it works or why it is better than what you've said it should
be."
************************************************************************
"> Ok try this in your hosts file
>>
>> 127.0.0.1 localhost.localdomain localhost
>> 127.0.0.1 linuxdesktop
>
>
>Thanks so much for all the work (everybody). I took a few hours off for
>sleep and found all of this. Wow.
>
>Okay, now for my stupid question: how do these two lines work? I'm
>having trouble figuring out the meaning of each line. I"m guessing that
>the second says to set the localhost to linuxdesktop (after I've done
>that with the command "hostname linuxdesktop", but the top one baffles
me.
The simple fact is, those two lines do *not* work!
I would suggest that grabbing the whole list of Peter
T. Breuer's articles in this thread and reading them _very_
carefully would be an excellent start on understanding what
should be in /etc/hosts.
There is more to it than that, but Peter is pointing out what
*not* to do very accurately. Most of the things that people are
attempting to do using the lo interface should instead be done
with a dummy interface and one or more 192.168.x.x IP addresses.
The one and the only line that should use the 127.0.0.1 IP
address is,
127.0.0.1 localhost
Which is exactly what Peter has been patiently trying to
explain."
************************************************************************
">> On Sat, 14 Dec 2002 09:52:34 +0100, Peter T. Breuer wrote:
>>>>> Ok try this in your hosts file
>>>>> 127.0.0.1 localhost.localdomain localhost
>>> That's wrong, but not seriously so.
>>
>> Explain how it is wrong. In fact, it the the ONLY acceptable content
>> for this line. It is the default, correct, sole content.
It's wrong in that it presents a FQDN for localhost, trying to make out
that it's a member of the nonexistent domain "localdomain". No -
localhost is a member of the ROOT domain and making it a member of
anything else leads to confusion, and puzzled replies to lookups of
"localhost.".
>>>>> 127.0.0.1 linuxdesktop
>>>
>>> That's wrong. Borkked. Remove. There must be ONLY ONE mapping for
>>>each IP.
>>
>> Actually, if it is on a line by itself, it stands as a third alias
>> for 127.0.0.1, and it is acceptable UNLESS the OP has a NIC, of
>> course.
It does not. I quote the manpage for you on the acceptable format for
/etc/hosts.
This manual page describes the format of the /etc/hosts
file. This file is a simple text file that associates IP
addresses with hostnames, one line per IP address. For
^^^^^^^^^^^^^^^^^^^^^^^^^
each host a single line should be present with the follow
ing information:
IP_address canonical_hostname aliases
OK? Anything else is "out of spec" and cause your mother's wolf
to be eaten by red riding hood.
>> Before you post a reply, run a test! Confirm that this name, this
>> third alias, can be resolved bidirectionally. It can.
Go drown yourself in shark oil.
By the way, just for fun, I'll "try it".
# For loopbacking.
127.0.0.1 localhost eth1_loghost
127.0.0.1 nuthouse
and yes, it works, and no, it's not guarranteed to work. So "dont do
that"."
************************************************************************
"From the Linux from scratch hosts.html:
Creating the /etc/hosts file
If a network card is to be configured, you have to decide on the
IP-address,
FQDN and possible aliases for use in the /etc/hosts file. The syntax is:
<IP address> myhost.mydomain.org aliases
You should made sure that the IP-address is in the private network
IP-address range. Valid ranges are:
Class Networks
A 10.0.0.0
B 172.16.0.0 through 172.31.0.0
C 192.168.0.0 through 192.168.255.0
A valid IP address could be 192.168.1.1. A valid FQDN for this IP could
be www.linuxfromscratch.org"
************************************************************************
"The code that handles /etc/hosts tries to match:
1. addresses to names. Find the first matching address, return the first
corresponding name:
./gethostbyaddr.pl 127.0.0.1
localhost.localdomain
(actually, multiple names can be returned from gethostbyaddr)
2. Names to addresses. Find the first matching name, return the
corresponding address:
./gethostbyname.pl localhost
127.0.0.1
What does this mean? It means any formatting consistent with these
outcomes is permitted. What you cannot have is an ambiguous case --
two or more IPs for the same name (my objection to the editing of the
localhost line).
But having two or more names for the same IP is obviously permitted, as
shown by:
127.0.0.1 localhost.localdomain localhost
These can be on different lines for readability or any other reason.
--
Paul Lutus
http://www.arachnoid.com
Post a follow-up to this message
Message 56 in thread
From: Paul Lutus ([EMAIL PROTECTED])
Subject: Re: Sendmail holds up booting
Newsgroups: comp.os.linux.setup
Date: 2002-12-14 13:43:47 PST
On Sat, 14 Dec 2002 10:17:52 +0000, Paul Lutus wrote:
/ ...
> But having two or more names for the same IP is obviously permitted,
as
> shown by:
>
> 127.0.0.1 localhost.localdomain localhost
>
> These can be on different lines for readability or any other reason.
Mistake. I was wrong. If gethostbyaddr is used to acquire a list of
aliases, then all of them must be on the same line. This may not have
much
everyday practical significance, but if a problem comes up, try putting
all the aliases on one line."
************************************************************************
"> Joel Mayes <[EMAIL PROTECTED]> writes:
>
>>127.0.0.1 network-209-67-38-7.doubleclick.net
>>127.0.0.1 network-209-67-38-8.doubleclick.net
>>127.0.0.1 network-209-67-38-9.doubleclick.net
>>This is a perfectly good use of a hosts file.
>
> As a matter of interest, what is the point of these entries?
>
>
Kill doubleclicks popup adds. You see when your browser is looking for
something at network-209-67-38-7.doubleclick.net it looks on your
machine.
Guess what happens?
the hostname in the /etc/hosts file is used instead of the real IP
so I never see them, I just get a broken image link instead :)"
************************************************************************
"Plus you need a /etc/sysconfig/network-scripts/ifup-dummy0 script.
Something like:
DEVICE=dummy0
IPADDR=192.168.0.2
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=dummy
I'm not a RH user, so that's just my approximation. DOn't follow this
scheme unless you can guarantee that
ifconfig dummy0 192.168.0.2
works.
Peter"
************************************************************************
"I agree with Peter that using the dummy0 device is the best way.
Bgfay, you can determine if the ifconfig command works by trying it!
If it doesn't, try "modprobe dummy" to see what you get, and if that
works, then try the ifconfig command again. Basically the modprobe
command will load a kernel module to provide the dummy device, and
of course the ifconfig command configures the dummy interface and
associates it with a specific IP address. (If that still doesn't
work, talk to Peter because I'm not brave enough to try leading
you through the next step! ;-)
However, you can also do it another way, using the lo device instead
of the dummy device. You just don't use the 127.0.0.1 address, that's
all! Instead, try 127.0.0.2, for example. Put this in /etc/hosts,
127.0.0.1 localhost
127.0.0.2 myhost.mydomain myhost
(Changing "myhost" and "mydomain" to whatever you want to name
your machine.)
The trick to this is in the way that the lo device is configured.
If you do "ifconfig lo" you'll get a response that begins with
these lines,
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
Note the "Mask:" value of 255.0.0.0, which means that any IP
packet with a destination address which matches the first octet
of the dotted quad (the 127) is going to be sent to this
interface, regardless of what the last three numbers are.
<---I think I now understand it a little bit
<---better
For example, without doing anything different than you have now,
try to ping several different 127.x.x.n addresses, where x is
from 0 to 255 and n is from 1 to 254 (0 and 255 are illegal,
being the network and the broadcast addresses, though in this
case they _will_ actually work. But you don't want to be a Paul
Lutus and do something just because a simple test appears to be
valid.) Ping will work on *any* of the 127.x.x.n addresses!
But you need an entry in /etc/hosts to use a hostname with ping.
So put "127.0.0.2 bgfay" in /etc/hosts, and then try this,
ping bgfay
It'll work.
--
Floyd L. Davidson <http://www.ptialaska.net/~floyd>"
<--thanks Floyd
************************************************************************
"Add into the file /etc/sysconfig/network
DHCP_HOSTNAME=xxxxxxxx <----
where xxxxxx equals you host name.
"Chris Bragg" <[EMAIL PROTECTED]> wrote in message
news:ut2u9.1774$[EMAIL PROTECTED]...
> Steve wrote:
>
> > Add your machine to your /etc/hosts file
> >
> > 127.0.0.1 localhost.localdomain localhost
> > 192.168.0.1 myhost.mydomain.com
> >
> > When the network service starts at boot time, it will change the
> > name when it configs your network card (use the ip address of your
> >NIC).
> >
> > Jakob Rohde wrote:
> >> Hi,
> >>
> >> I've installed RH 8.0 and wanted to change localhost.localdomain
> >> which I did in the Network Configurator found in the menu. But
> >> the utility doesn't change it everywhere needed.
> >>
> >> How do I change it effectively?
> >>
> >> TIA
> >>
> >> Jakob
>
> Ahhh, but how to do it if the system receives its IP by DHCP, and DHCP
doesn't assign a hostname?" <----
************************************************************************
"http://www.cpqlinux.com/hostname.html:Configuring /etc/hosts:
If your IP address is assigned to you by a DHCP server, then /etc/hosts
is configured as follows:
127.0.0.1 mybox.mydomain.com localhost.localdomain localhost mybox
If you have a static IP address, then /etc/hosts is configured as
follows:
127.0.0.1 localhost.localdomain localhost
192.168.0.10 mybox.mydomain.com mybox"
************************************************************************
"> Ripley wrote:
>
>> Hello all,
>>
>> I realy like KDE3 except for one thing. When I don't setup
>> my netw
>> ork or when I loose it, starting a new application is a pain in the
>> @$$. I
>> t take for ever to open a window. If the window/application is
>> already op
>> en, it works fine. Is there something to tweak? I have a laptop and
>> I reg
>> ularly need to change place and sometime without network. What can I
>> do?
>
> perhaps it helps to put the hostname in to /etc/hosts as a synonym for
> localhost
> Something like
> 127.0.0.1 localhost hostname
>
> Kevin
>
Thanks, it works perfectly :o)"
"not sure of this is 100% correct: Solution: Among the changes made to
the network settings, the system's hostname was changed. KDE apparently,
does a DNS lookup when starting applications. There was no DNS entry for
the new host name, therefore KDE would try to resolve the name until
name resolution timed out, then the application would start.
<--IS THIS THE RIGHT
<--EXPLANATION OR IS
<--IT WRONG?
To resolve the issue one of two things must be done. First, a DNS entry
can be created on the DNS server used by the problematic host.
Alternatively/additionally, an entry should be created in /etc/hosts.
In this particular case, there was an entry for the loopback interface
that appeared to be correct but, an additional entry was needed to
resolve the issue. The original /etc/hosts entry looked like this:
127.0.0.1 sys1.dummy.net localhost
The /etc/hosts file was edited to appear as follows, thus resolving the
problem.
127.0.0.1 sys1.dummy.net localhost
127.0.0.1 sys1
With this configuration, KDE was able to resolve the hostname SYS1 to
the loopback address of 127.0.0.1. This lookup is almost instantaneous
and KDE application startup has returned to normal."
************************************************************************
"http://www.mandrakeuser.org/mub/viewtopic.php?topic=7640&forum=3:
Can someone tell me how to change hostname. When i boot it says
localhost but when i get to the login screen for gnome it says
something like dsccp1.
Its a while since I had this problem, but if I remember correctly, you
type in a console:
hostname -v <hostnameyouwant>
I think the file /etc/hosts should then look like:
127.0.0.1 localhost.localdomain <hostnameyouwant>.localdomain
It's pulling your hostname down via dhcp. Your isp is assigning your
box that name, not sure if you can do much about it. About the only
way I know of to circumvent that is to set your box up with a static
IP and the hostname of your choosing. DHCP is always going to assign
you a hostname no matter what
It has never done it before and i am running the same system as
always!
Well, in that case, I'd assume your ISP just added a feature to
it's dhcp server.
I did just change routers from linksys to netgear. I wonder if it is
assigning it since i am configured for dhcp.
If you have a router, then get rid of dhcp and assign a static IP to
your box and the hostname as well, through Linuxconf. I know Linksys,
but Netgear should work in a similar way. If not, then switch back to
Linksys.
************************************************************************
"picture of typical linux small office/home network configuration:
http://www.opq.se/sxs/images/office.png"
************************************************************************
"http://www.tldp.org/LDP/nag2/x-087-2-iface.interface.html
Linux Network Administrators Guide
Chapter 5. Configuring TCP/IP Networking
5.7.5. The PLIP Interface
A PLIP link used to connect two machines is a little different from an
Ethernet. PLIP links are an example of what are called point-to-point
links, meaning that there is a single host at each end of the link.
Networks like Ethernet are called broadcast networks. Configuration of
point-to-point links is different because unlike broadcast networks,
point-to-point links don't support a network of their own.
PLIP provides very cheap and portable links between computers. As an
example, we'll consider the laptop computer of an employee at the
Virtual Brewery that is connected to vlager via PLIP. The laptop
itself is called vlite and has only one parallel port. At boot time,
this port will be registered as plip1. To activate the link, you have
to configure the plip1 interface using the following commands:[3]
# ifconfig plip1 vlite pointopoint vlager
# route add default gw vlager
The first command configures the interface, telling the kernel that
this is a point-to-point link, with the remote side having the
address of vlager.
The second installs the default route, using vlager as gateway. On
vlager, a similar ifconfig command is necessary to activate the link
(a route invocation is not needed):
# ifconfig plip1 vlager pointopoint vlite
Note that the plip1 interface on vlager does not need a separate IP
address, but may also be given the address 172.16.1.1. Point-to-point
networks don't support a network directly, so the interfaces don't
require an address on any supported network. The kernel uses the
interface information in the routing table to avoid any possible
confusion.[4]
Now we have configured routing from the laptop to the Brewery's
network; what's still missing is a way to route from any of the
Brewery's hosts to vlite. One particularly cumbersome way is to add
a specific route to every host's routing table that names vlager as
a gateway to vlite:
# route add vlite gw vlager
Dynamic routing offers a much better option for temporary routes. You
could use gated, a routing daemon, which you would have to install on
each host in the network in order to distribute routing information
dynamically. The easiest option, however, is to use proxy ARP
(Address Resolution Protocol). With proxy ARP, vlager will respond to
any ARP query for vlite by sending its own Ethernet address. All
packets for vlite will wind up at vlager, which then forwards them to
the laptop. We will come back to proxy ARP in the section Section
5.10."
Current net-tools releases contain a tool called plipconfig, which
allows you to set certain PLIP timing parameters. The IRQ to be used
for the printer port can be set using the ifconfig command.
5.7.6. The SLIP and PPP Interfaces
Although SLIP and PPP links are only simple point-to-point links like
PLIP connections, there is much more to be said about them. Usually,
establishing a SLIP connection involves dialing up a remote site
through your modem and setting the serial line to SLIP mode. PPP is
used in a similar fashion. We discuss SLIP and PPP in detail in
Chapter 7 and Chapter 8.
5.7.7. The Dummy Interface
The dummy interface is a little exotic, but rather useful nevertheless.
Its main benefit is with standalone hosts and machines whose only IP
network connection is a dialup link. In fact, the latter are standalone
hosts most of the time, too.
The dilemma with standalone hosts is that they only have a single
network device active, the loopback device, which is usually assigned
the address 127.0.0.1. On some occasions, however, you must send data
to the "official" IP address of the local host. For instance, consider
the laptop vlite, which was disconnected from a network for the
duration of this example. An application on vlite may now want to send
data to another application on the same host. Looking up vlite in
/etc/hosts yields an IP address of 172.16.1.65, so the application
tries to send to this address. As the loopback interface is currently
the only active interface on the machine, the kernel has no idea that
172.16.1.65 actually refers to itself?! Consequently, the kernel
discards the datagram and returns an error to the application.
This is where the dummy device steps in. It solves the dilemma by
simply serving as the alter ego of the loopback interface. In the case
of vlite, you simply give it the address 172.16.1.65 and add a host
route pointing to it. Every datagram for 172.16.1.65 is then delivered
locally. The proper invocation is:[5]
# ifconfig dummy vlite
# route add vlite
5.7.8. IP Alias
New kernels support a feature that can completely replace the dummy
interface and serve other useful functions. IP Alias allows you to
configure multiple IP addresses onto a physical device. In the
simplest case, you could replicate the function of the dummy interface
by configuring the host address as an alias onto the loopback interface
and completely avoid using the dummy interface. In more complex uses,
you could configure your host to look like many different hosts, each
with its own IP address. This configuration is sometimes called
"Virtual Hosting," although technically it is also used for a variety
of other techniques.[6]
To configure an alias for an interface, you must first ensure that your
kernel has been compiled with support for IP Alias (check that you
have a /proc/net/ip_alias file; if not, you will have to recompile your
<--can't find this, but in
/etc/sysconfig/network-scripts
there are scripts:
ifup-aliases,ifdown-aliases
don't know what these do --->
kernel). Configuration of an IP alias is virtually identical to
configuring a real network device; you use a special name to indicate
it's an alias that you want. For example:
# ifconfig lo:0 172.16.1.1
This command would produce an alias for the loopback interface with
the address 172.16.1.1. IP aliases are referred to by appending :n
to the actual network device, in which "n" is an integer. In our
example, the network device we are creating the alias on is lo, and
we are creating an alias numbered zero for it. This way, a single
physical device may support a number of aliases.