View previous topic :: View next topic |
Author |
Message |
pvangarde n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 May 2005 Posts: 71
|
Posted: Sun May 27, 2007 9:45 pm Post subject: simple hostname question |
|
|
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
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bunder Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Sun May 27, 2007 10:25 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
pvangarde n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 May 2005 Posts: 71
|
Posted: Sun May 27, 2007 11:14 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
astor84 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Feb 2007 Posts: 96 Location: Dallas, Tx
|
Posted: Sun May 27, 2007 11:24 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|