openSUSE Forums > Archives > Novell Archives » /etc/hosts question

Go Back   openSUSE Forums > Archives > Novell Archives
Forums FAQ Members List Search Today's Posts Mark Forums Read


Novell Archives Archived content from Novell openSUSE support forums

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 26-Apr-2007, 19:12
Bob
Guest
 
Posts: n/a
Default /etc/hosts question

Hello,

I have seen several SuSE systems (9.x, 10.x) with a pair of entries like
these in /etc/hosts:

127.0.0.2 aaa.bbb.com aaa
192.169.0.15 aaa.bbb.com aaa

Note that both lines have the exact same host names.

I don't know how these systems were set up but since I have seen several
like this I am guessing that YAST did this during the install process.

I need to run some test suites on these systems and that kind of thing in
/etc/hosts confuses some of the network tests -- they don't know which IP
address to work with or to expect in various output.

So, my questions are:

Is the above "legal"? If it is, what should be the expected resonse to,
for example, "hostneme -i"?

On multi-homed systems should all IPs have unique host names?

Bob
  #2 (permalink)  
Old 28-Apr-2007, 06:08
Mark Robinson
Guest
 
Posts: n/a
Default Re: /etc/hosts question

On Fri, 27 Apr 2007 00:12:05 +0000, Bob wrote:

> Hello,
>
> I have seen several SuSE systems (9.x, 10.x) with a pair of entries like
> these in /etc/hosts:
>
> 127.0.0.2 aaa.bbb.com aaa
> 192.169.0.15 aaa.bbb.com aaa
>
> Note that both lines have the exact same host names.
>
> I don't know how these systems were set up but since I have seen several
> like this I am guessing that YAST did this during the install process.
>
> I need to run some test suites on these systems and that kind of thing in
> /etc/hosts confuses some of the network tests -- they don't know which IP
> address to work with or to expect in various output.
>
> So, my questions are:
>
> Is the above "legal"? If it is, what should be the expected resonse to,
> for example, "hostneme -i"?
>
> On multi-homed systems should all IPs have unique host names?


Remember that 127 is for loopback only - it can never make it on to the
wire. A linux box really needs to know who it is, so these entries are
expected.

As for multi-homed, yes, I would create an entry in the hosts file for
each NIC.

--
Mark Robinson
Novell Volunteer SysOp
www.nds8.co.uk
One by one the penguins steal my sanity...

  #3 (permalink)  
Old 28-Apr-2007, 06:39
Bob
Guest
 
Posts: n/a
Default Re: /etc/hosts question

On Sat, 28 Apr 2007 11:08:34 +0000, Mark Robinson wrote:

> On Fri, 27 Apr 2007 00:12:05 +0000, Bob wrote:
>
>> Hello,
>>
>> I have seen several SuSE systems (9.x, 10.x) with a pair of entries like
>> these in /etc/hosts:
>>
>> 127.0.0.2 aaa.bbb.com aaa
>> 192.169.0.15 aaa.bbb.com aaa
>>
>> Note that both lines have the exact same host names.
>>
>> I don't know how these systems were set up but since I have seen several
>> like this I am guessing that YAST did this during the install process.
>>
>> I need to run some test suites on these systems and that kind of thing
>> in /etc/hosts confuses some of the network tests -- they don't know
>> which IP address to work with or to expect in various output.
>>
>> So, my questions are:
>>
>> Is the above "legal"? If it is, what should be the expected resonse to,
>> for example, "hostneme -i"?
>>
>> On multi-homed systems should all IPs have unique host names?

>
> Remember that 127 is for loopback only - it can never make it on to the
> wire. A linux box really needs to know who it is, so these entries are
> expected.
>
> As for multi-homed, yes, I would create an entry in the hosts file for
> each NIC.


Well, my thoughts exactly and thus my questions. WHY does YAST set
things up that way? (Assuming it really does.) And, when having "an entry
.... for each NIC" should the assigned names be *different* for each?

Googling for "multihomed" I have seen examples both ways. Although almost
all had unique names some showed the same name for multiple IPs. These
seemed to have something to do with either dynamic load-balancing or
fallover redundancy and also seemed to require complex nameserver set-ups
and other configuration to make that work, or at least to *try* to make it
work as all the examples I saw were people having trouble with that
configuration and many suggestions for help that I thought looked a little
off-base (but I am not an expert here).

Bob
  #4 (permalink)  
Old 29-Apr-2007, 16:25
Mark Robinson
Guest
 
Posts: n/a
Default Re: /etc/hosts question

On Sat, 28 Apr 2007 11:39:41 +0000, Bob wrote:

> On Sat, 28 Apr 2007 11:08:34 +0000, Mark Robinson wrote:
>
>> On Fri, 27 Apr 2007 00:12:05 +0000, Bob wrote:
>>
>>> Hello,
>>>
>>> I have seen several SuSE systems (9.x, 10.x) with a pair of entries
>>> like these in /etc/hosts:
>>>
>>> 127.0.0.2 aaa.bbb.com aaa
>>> 192.169.0.15 aaa.bbb.com aaa
>>>
>>> Note that both lines have the exact same host names.
>>>
>>> I don't know how these systems were set up but since I have seen
>>> several like this I am guessing that YAST did this during the install
>>> process.
>>>
>>> I need to run some test suites on these systems and that kind of thing
>>> in /etc/hosts confuses some of the network tests -- they don't know
>>> which IP address to work with or to expect in various output.
>>>
>>> So, my questions are:
>>>
>>> Is the above "legal"? If it is, what should be the expected resonse to,
>>> for example, "hostneme -i"?
>>>
>>> On multi-homed systems should all IPs have unique host names?

>>
>> Remember that 127 is for loopback only - it can never make it on to the
>> wire. A linux box really needs to know who it is, so these entries are
>> expected.
>>
>> As for multi-homed, yes, I would create an entry in the hosts file for
>> each NIC.

>
> Well, my thoughts exactly and thus my questions. WHY does YAST set things
> up that way? (Assuming it really does.) And, when having "an entry ... for
> each NIC" should the assigned names be *different* for each?


Basically, if you are using two NICs with different IP address to run
different services on then I would have different hostnames...

> Googling for "multihomed" I have seen examples both ways. Although
> almost all had unique names some showed the same name for multiple IPs.
> These seemed to have something to do with either dynamic load-balancing
> or fallover redundancy and also seemed to require complex nameserver
> set-ups and other configuration to make that work, or at least to *try*
> to make it work as all the examples I saw were people having trouble
> with that configuration and many suggestions for help that I thought
> looked a little off-base (but I am not an expert here).


If you are looking for NIC redundancy, then you should look at channel
bonding (NIC teaming to MS users :-).

--
Mark Robinson
Novell Volunteer SysOp
www.nds8.co.uk
One by one the penguins steal my sanity...

  #5 (permalink)  
Old 29-Apr-2007, 23:10
Bob
Guest
 
Posts: n/a
Default Re: /etc/hosts question

Please see
http://www-1.ibm.com/support/docview...ss=ct1066other
for a discussion that answers my questions.

  #6 (permalink)  
Old 30-Apr-2007, 08:43
Mark Robinson
Guest
 
Posts: n/a
Default Re: /etc/hosts question

On Mon, 30 Apr 2007 04:10:53 +0000, Bob wrote:

> Please see
> http://www-1.ibm.com/support/docview...ss=ct1066other
> for a discussion that answers my questions.


OK, that makes sense for that scenario, but I usually use secondary
NICs/IP addresses for additional apps like mail servers etc - in this case
I always use a different address, and Lotus Domino, for example, likes to
have its hostname set up for the second NIC.

--
Mark Robinson
Novell Volunteer SysOp
www.nds8.co.uk
One by one the penguins steal my sanity...

 

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2