LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   setting dynamic IP as main domain name (https://www.linuxquestions.org/questions/slackware-14/setting-dynamic-ip-as-main-domain-name-183507/)

e1000 05-19-2004 08:22 PM

setting dynamic IP as main domain name
 
How can I set my ppp0 address as the main host name "e1000.gotdns.com", cause my current /etc/hosts lists my ethernet adress as darkstar, but I want my real domain to work even when im not on the net and connected to the dyndns.com DNS server.

here is my current /etc/hosts

127.0.0.1 localhost
192.167.0.4 darkstar.example.net darkstar <-- my ethernet adress
192.167.0.3 node3

shilo 05-20-2004 11:20 AM

Not sure I understand your question completely, but if I do all you need to do is run
Code:

netconfig
For your hostname, type e1000 . For your domain, type gotdns.com . Of course, it looks like you're using dhcp, so make sure you choose that, too.

Nichole_knc 05-20-2004 08:05 PM

First of all you are using the wrong "private" addresses

TCP/IP addresses reserved for 'private' networks are:

10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255
192.168.0.0 to 192.168.255.255

and as of July 2001

169.254.0.0 to 169.254.255.255 rfc

If you are seting these addys yourself they must be in the range above.
To set your host name
$>hostname myhostname
for more info
$> man hostname

As suggested you should run netconfig to set your network connection up correctly..

e1000 06-27-2004 10:36 PM

I'm talking about a modem, not a ethernet adress. the trick here is that I may have many different IP's in one day because it changes each time I log on and off. but dyndns assigns my host name to the new IP every time.

is there any way to change what IP my host name is bound to each time I connect to the net?

Nichole_knc 06-28-2004 05:30 AM

First if your host file is setting your hostname to "darkstar" (default slack hostname if a hostname is not set) you have not configured a hostname for your machine;
`hostname e1000.gotdns.com`
Then if you want to set your local machines IP addresses that are assigned to devices it is done via rc.inet1.conf located in /etc/rc.d
once you have set the machine hostname and device IP addys you edit them into your hosts file.
example:

192.168.50.5 mymachine.mydomain.myinitials mymachine mybox computer
the mymachine.mydomain.myinitials are for the hostname your assigned to your macine. The namea after including mymachine are aliases you use for your machine.

As for as getting the same IP from your ISP via DCHP the HOWTOs on DCHP and the DCHPD explains how to "request" the same address everytime if available. Now trying this with a dial-up may be quick ineffective as you may not even dial into the same modem pool or comm server.
If this is a cable modem see the setup section for it. Most have the ability to set idle disconnect and/or keep alive timeouts to the tune of 5 digits in minutes/seconds.

Better yet if BellSouth ADSL is available where in the "state of disorder" get yourself the Ultra package with a static IP ($14.00 per month) and then you will not need a dyndns service.
As for use here we have the Extreme package x2 (fiberoptic, PPoE, 3.9mbps down, 500kbps up, bridged, 2 bell assigned statics) (speed averages 4.3-8.7mbps down, 500-2,400kbps up):)

e1000 06-29-2004 03:31 PM

first off, thanks for the heads up; I will change my IP for the private network.

second, if there was even a remote chance that I could have some form of broadband, I would have bought it years ago. as for now Im stuck with 56k wether I like it or not. my ONLY other option is satelite internet service which isnt all that fast and its upward of 100$ per month, not an option on my budget.

back to what I was asking, thanks for the suggestion but does anybody have any Idea on how to assign a domain name (locally) to my dynamic not always existant modem IP.
I already have a remote domain name from dyndns.

Nichole_knc 06-29-2004 08:43 PM

As I stated above IF you assign your own hostname and domain name via the hostname command it WILL be mapped to the dchp assigned IP

man hostname

also see /etc/HOSTNAME

mostly will say darkstar until you set your own

ToothlessRebel 07-18-2004 07:58 PM

I have used hostname <myhostname> and it never would stay. It still uses darkstar.

Nichole_knc 07-18-2004 08:17 PM

did you "man hostname"?
Have you checked the /etc/host.conf?
How about the /etc/HOSTNAME???

ToothlessRebel 07-19-2004 01:40 PM

Seeing as how "man hostname" didn't mention the other two, how was I supposed to know? Unless I just missed that. netconfig worked.

Nichole_knc 07-19-2004 04:08 PM

Maybe you should read it again....

line 84 of man hostname refers to /etc/hostname which is read by /etc/rc.d/rc.net1 at boot. Line 73 of the man hostname refers to the /etc/host.conf as part of hostname configuration.

You could also simply <ls host*> the /etc directory and see these files.
And yes that is why netconfig is there... So ppl you don't know how to do direct edits of configuration scripts and files don't have to.


All times are GMT -5. The time now is 12:17 AM.