Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
simple hostname question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
pvangarde
n00b
n00b


Joined: 18 May 2005
Posts: 71

PostPosted: Sun May 27, 2007 9:45 pm    Post subject: simple hostname question Reply with quote

Okay, I have two computers on my network connected through a wireless router (dhcp). Their IPs are 192.168.2.3 and 192.168.2.6, and they change often.

I was under the impression that we set the hostname of the machine in the /etc/conf.d/hostname file. So, on both machines, the variable HOSTNAME there is set to foo and bar respectively.

The problem: pinging bar from foo does not work, I get an unknown host deal. I can ping the IP address.

How do I remedy this problem?

/etc/hosts
Code:

127.0.0.1 localhost foo
::1


/etc/conf.d/hostname
Code:

HOSTNAME="foo"
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Sun May 27, 2007 10:25 pm    Post subject: Reply with quote

you either need dns, or the same entries for 192.168.2.x in the hosts file.

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
pvangarde
n00b
n00b


Joined: 18 May 2005
Posts: 71

PostPosted: Sun May 27, 2007 11:14 pm    Post subject: Reply with quote

bunder wrote:
you either need dns, or the same entries for 192.168.2.x in the hosts file.

cheers


I can't have the same entries in the hosts file because the addresses can change.

So if my router was a DNS server, my hostname would change? Can you explain how to set up the dns info in gentoo?
Back to top
View user's profile Send private message
astor84
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2007
Posts: 96
Location: Dallas, Tx

PostPosted: Sun May 27, 2007 11:24 pm    Post subject: Reply with quote

What is the problem with creating address reservations or setting static IPs?

If the IPs are continually changing then there isn't going to be a way for you to set up the hosts file to accomodate that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum