Results 1 to 6 of 6
Hi all sorry for the silly question but i know very little about networking and i want to ask a simple question about hosts in
Code:
/etc/hosts
file.I with 2 ...
- 06-19-2005 #1Linux Newbie
- Join Date
- Apr 2004
- Location
- Greece
- Posts
- 187
/etc/hosts question
Hi all sorry for the silly question but i know very little about networking and i want to ask a simple question about hosts in
file.I with 2 friends of mine are sharing an adsl connection(I ran gentoo one friend fedora and the other slackware and windows) with a dhcp modem and a network switch where we connect the modem and the 3 PCs of ours.So we have a dynamic ip which have the modem from our isp and then a subnet where we get 3 dynamics ips (Am i right?).I have setup samba in my pc and i share one directory.Then when i test to connect to the share throw my pc or one from my friends PCs i use the ip that ifconfind is showing for my eth0 device but i wonder if that ip change i will have to change it also from /etc/hosts and replace the old one with the new one?Is there a way to setup a hostname for my pc that will not be affected from my ip's change?Also can anyone point me a good site with tutorials for networking newbies?Code:/etc/hosts
Q: what\'s tiny and yellow and very, very, dangerous?
A: a canary with the super-user password.
- 06-19-2005 #2
The /etc/hosts file basically allows you to alias IPs. This is for ease of use/remembering. It's also useful if you don't want to worry about using BIND to do your own DNS in your private LAN. If your IP is dynamic, don't put that IP in /etc/hosts. It doesn't have any bearing unless you try to resolve your hostname.

For additional info, check out 'man hosts'"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 06-20-2005 #3Linux Newbie
- Join Date
- Apr 2004
- Location
- Greece
- Posts
- 187
Well and how can i then or my friends access my samba share without caring about the changes of mine ip?Is there any way?
Q: what\'s tiny and yellow and very, very, dangerous?
A: a canary with the super-user password.
- 06-20-2005 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
I believe you can configure one of your machines as a samba server in which case, it can function as a Domain Controller. In this case all servers will be controlled by this server, possibly with users authenticating to this server though this will depend on your configuration. The server would then be in a good position to act as a DNS server also.
- 06-21-2005 #5You could also use dyndns to get a DNS name for free. There are scripts to update your IP with their service, so you can throw one of these in your crontab and not have to worry about it.
Originally Posted by paulmedic555
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 06-21-2005 #6Linux Newbie
- Join Date
- Jun 2005
- Posts
- 181
Why use a cronjob for it, mine just starts with the system and checks every half hour for an IP change :P


Reply With Quote