host name and ip address from DHCP server

This is a discussion on host name and ip address from DHCP server within the Linux Administration forums, part of the Linux Forums category; Hello, I have just added a Linux (SuSE 9.1) machine to an existing home network with two Win98 computers. ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-05-2004
A. Naim
 
Posts: n/a
Default host name and ip address from DHCP server

Hello,

I have just added a Linux (SuSE 9.1) machine to an existing home
network with two Win98 computers. The router assigns IP addresses on a
first-come-first-serve basis, so the IP of each machine depends on the
boot order. However, while the Win98 machines "know their name", and
are therefore always guaranteed to be identifiable by it, it seems
that my linux machine gets its name from the DHCP server (the router),
so occasionally it ends up with a host name that belongs to one of the
Win98 machines (because the DCHP client table has that name against
the IP that was allocated to the linux machine). This means that I get
the same name assigned to two different machines at the same time.

How do I convince my machine to have its own name? just typing
"hostname linmachine" does not solve the problem, because I can only
do this after logging in, and by then the host name was already
acquired from the router. Can anyone advise?
Reply With Quote
  #2 (permalink)  
Old 07-05-2004
R. G. Newbury
 
Posts: n/a
Default Re: host name and ip address from DHCP server

Change to static IP addresses for all three machines.
This will effectively also force 'static hostnames'.
You will have to add a default route to the router on each machine.
Whether you turn off the DHCP server on the router is up to you, but
it would only be needed if you had for example a neighbour coming and
plugging in.
Geoff

On Mon, 5 Jul 2004 15:16:19 UTC, naima@bigfoot.com (A. Naim) wrote:

> Hello,
>
> I have just added a Linux (SuSE 9.1) machine to an existing home
> network with two Win98 computers. The router assigns IP addresses on a
> first-come-first-serve basis, so the IP of each machine depends on the
> boot order. However, while the Win98 machines "know their name", and
> are therefore always guaranteed to be identifiable by it, it seems
> that my linux machine gets its name from the DHCP server (the router),
> so occasionally it ends up with a host name that belongs to one of the
> Win98 machines (because the DCHP client table has that name against
> the IP that was allocated to the linux machine). This means that I get
> the same name assigned to two different machines at the same time.
>
> How do I convince my machine to have its own name? just typing
> "hostname linmachine" does not solve the problem, because I can only
> do this after logging in, and by then the host name was already
> acquired from the router. Can anyone advise?



Reply With Quote
  #3 (permalink)  
Old 07-06-2004
Nicolas
 
Posts: n/a
Default Re: host name and ip address from DHCP server

A. Naim wrote:
> Hello,
>
> I have just added a Linux (SuSE 9.1) machine to an existing home
> network with two Win98 computers. The router assigns IP addresses on a
> first-come-first-serve basis, so the IP of each machine depends on the
> boot order. However, while the Win98 machines "know their name", and
> are therefore always guaranteed to be identifiable by it, it seems
> that my linux machine gets its name from the DHCP server (the router),
> so occasionally it ends up with a host name that belongs to one of the
> Win98 machines (because the DCHP client table has that name against
> the IP that was allocated to the linux machine). This means that I get
> the same name assigned to two different machines at the same time.
>
> How do I convince my machine to have its own name? just typing
> "hostname linmachine" does not solve the problem, because I can only
> do this after logging in, and by then the host name was already
> acquired from the router. Can anyone advise?


You can specify a host name in Suse 9.1 while keeping getting all other
"stuff" (IP, gateway, DNS...) from the DHCP Server.

Just go to Yast, "Network Services", "DNS & Host Name", enter your
desired hostname.
Any field with no value will be queried from the DHCP server at boot time.

Nicolas

Reply With Quote
  #4 (permalink)  
Old 07-06-2004
Nuno Paquete
 
Posts: n/a
Default Re: host name and ip address from DHCP server

A. Naim wrote:

> Hello,
>
> I have just added a Linux (SuSE 9.1) machine to an existing home
> network with two Win98 computers. The router assigns IP addresses on a
> first-come-first-serve basis, so the IP of each machine depends on the
> boot order. However, while the Win98 machines "know their name", and
> are therefore always guaranteed to be identifiable by it, it seems
> that my linux machine gets its name from the DHCP server (the router),
> so occasionally it ends up with a host name that belongs to one of the
> Win98 machines (because the DCHP client table has that name against
> the IP that was allocated to the linux machine). This means that I get
> the same name assigned to two different machines at the same time.
>
> How do I convince my machine to have its own name? just typing
> "hostname linmachine" does not solve the problem, because I can only
> do this after logging in, and by then the host name was already
> acquired from the router. Can anyone advise?


Hi.
Configure mac address of Win hosts on your dhcpd.conf file.
Here is my dhcpd.conf file:

option subnet-mask 255.255.255.0;
option domain-name "my_domain.net";
option domain-name-servers 192.168.1.1;

subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
range 192.168.1.11 192.168.1.99;
}

group {
use-host-decl-names true;
host portatil {
hardware ethernet 00:0e:7f:73:97:a2;
fixed-address 192.168.1.5;
}
}

ddns-update-style ad-hoc;
Reply With Quote
  #5 (permalink)  
Old 07-08-2004
A. Naim
 
Posts: n/a
Default Re: host name and ip address from DHCP server

Nicolas <nicolas@somewhere.net> wrote in message news:<ccdcq1$8tj$1@apollon.grec.isp.9tel.net>...
> A. Naim wrote:
> > Hello,
> >
> > I have just added a Linux (SuSE 9.1) machine to an existing home
> > network with two Win98 computers. The router assigns IP addresses on a
> > first-come-first-serve basis, so the IP of each machine depends on the
> > boot order. However, while the Win98 machines "know their name", and
> > are therefore always guaranteed to be identifiable by it, it seems
> > that my linux machine gets its name from the DHCP server (the router),
> > so occasionally it ends up with a host name that belongs to one of the
> > Win98 machines (because the DCHP client table has that name against
> > the IP that was allocated to the linux machine). This means that I get
> > the same name assigned to two different machines at the same time.
> >
> > How do I convince my machine to have its own name? just typing
> > "hostname linmachine" does not solve the problem, because I can only
> > do this after logging in, and by then the host name was already
> > acquired from the router. Can anyone advise?

>
> You can specify a host name in Suse 9.1 while keeping getting all other
> "stuff" (IP, gateway, DNS...) from the DHCP Server.
>
> Just go to Yast, "Network Services", "DNS & Host Name", enter your
> desired hostname.
> Any field with no value will be queried from the DHCP server at boot time.
>
> Nicolas



Hi,

Thanks for the messages. I should apologise for any silly mistakes I
make - I am new to this. However, having tried all of the methods
suggested, the first thing that happened is that I lost internet
connectivity, and have not managed to recover it whatever I do. This
is what happened in detail:

- static IP addresses: as soon as I fixed the addresses and disabled
DHCP on the router I lost internet connectivity. Presumably this does
not sit well with my ISP (or perhaps with the Linksys router) although
these are LAN IPs and should not affect the dynamically-set IP of my
router.I did supply the IP of the gateway in both Linux abd Win98
machines, but this did not help. I had to go back to dynamic (DHCP)
mode to regain internet access on the Win98 machines. The Linux one
still has no internet access.

- dhcpd.conf: I did not have such a file, but created it in /etc and
typed in information as suggested in the sample file (thanks for
that). Unfortunately, this did not do the trick and after rebooting I
still have no internet access.

- Using YaST I managed to rename my host. However, I have no internet
access. Also, the topology of my LAN appears to have changed - for
example, the linux machine can only access one of the Win98 machines
if the other Win98 machine is up and running. It seems that it does
not go through the router alone anymore, and I know that I did not
change any routing data.

I am a bit confused as to what went wrong. Perhaps there is a
step-by-step guide somewhere starting from scratch? I will be grateful
for any pointers.

Thanks again,

A. Naim
Reply With Quote
  #6 (permalink)  
Old 07-08-2004
Nicolas
 
Posts: n/a
Default Re: host name and ip address from DHCP server

Well, I am confused too. Maybe something with the Linksys Router (there
can be many options in the info provided in DHCP...), but I'm not
familiar whith this one.

I suggest that you post more info on your problem.
For example, the output of "ifconfig eth0" and "route" commands, when in
DHCP, and when trying to force the config, either with YaST or the
/etc/dhcp.conf.

Also, you can start "WINIPCFG" on your Win98 system, and write down the
output, so we can check what info the DHCP provides & if it is
consistent with what the Linux system receives.

Nicolas


A. Naim wrote:
> Nicolas <nicolas@somewhere.net> wrote in message news:<ccdcq1$8tj$1@apollon.grec.isp.9tel.net>...
>
>>A. Naim wrote:
>>
>>>Hello,
>>>
>>>I have just added a Linux (SuSE 9.1) machine to an existing home
>>>network with two Win98 computers. The router assigns IP addresses on a
>>>first-come-first-serve basis, so the IP of each machine depends on the
>>>boot order. However, while the Win98 machines "know their name", and
>>>are therefore always guaranteed to be identifiable by it, it seems
>>>that my linux machine gets its name from the DHCP server (the router),
>>>so occasionally it ends up with a host name that belongs to one of the
>>>Win98 machines (because the DCHP client table has that name against
>>>the IP that was allocated to the linux machine). This means that I get
>>>the same name assigned to two different machines at the same time.
>>>
>>>How do I convince my machine to have its own name? just typing
>>>"hostname linmachine" does not solve the problem, because I can only
>>>do this after logging in, and by then the host name was already
>>>acquired from the router. Can anyone advise?

>>
>>You can specify a host name in Suse 9.1 while keeping getting all other
>>"stuff" (IP, gateway, DNS...) from the DHCP Server.
>>
>>Just go to Yast, "Network Services", "DNS & Host Name", enter your
>>desired hostname.
>>Any field with no value will be queried from the DHCP server at boot time.
>>
>>Nicolas

>
>
>
> Hi,
>
> Thanks for the messages. I should apologise for any silly mistakes I
> make - I am new to this. However, having tried all of the methods
> suggested, the first thing that happened is that I lost internet
> connectivity, and have not managed to recover it whatever I do. This
> is what happened in detail:
>
> - static IP addresses: as soon as I fixed the addresses and disabled
> DHCP on the router I lost internet connectivity. Presumably this does
> not sit well with my ISP (or perhaps with the Linksys router) although
> these are LAN IPs and should not affect the dynamically-set IP of my
> router.I did supply the IP of the gateway in both Linux abd Win98
> machines, but this did not help. I had to go back to dynamic (DHCP)
> mode to regain internet access on the Win98 machines. The Linux one
> still has no internet access.
>
> - dhcpd.conf: I did not have such a file, but created it in /etc and
> typed in information as suggested in the sample file (thanks for
> that). Unfortunately, this did not do the trick and after rebooting I
> still have no internet access.
>
> - Using YaST I managed to rename my host. However, I have no internet
> access. Also, the topology of my LAN appears to have changed - for
> example, the linux machine can only access one of the Win98 machines
> if the other Win98 machine is up and running. It seems that it does
> not go through the router alone anymore, and I know that I did not
> change any routing data.
>
> I am a bit confused as to what went wrong. Perhaps there is a
> step-by-step guide somewhere starting from scratch? I will be grateful
> for any pointers.
>
> Thanks again,
>
> A. Naim

Reply With Quote
  #7 (permalink)  
Old 07-11-2004
A. Naim
 
Posts: n/a
Default Re: host name and ip address from DHCP server

The problem is finally solved.It appears that my resolv.conf file had
some strange content. Once I renamed it and stopped and started the
networking service a new (and proper) resolv.conf was created and
access to the internet was restored.

Thanks for all the help,

Abe.


Nicolas <nicolas@somewhere.net> wrote in message news:<cckf08$aal$1@apollon.grec.isp.9tel.net>...

> Well, I am confused too. Maybe something with the Linksys Router (there
> can be many options in the info provided in DHCP...), but I'm not
> familiar whith this one.
>
> I suggest that you post more info on your problem.
> For example, the output of "ifconfig eth0" and "route" commands, when in
> DHCP, and when trying to force the config, either with YaST or the
> /etc/dhcp.conf.
>
> Also, you can start "WINIPCFG" on your Win98 system, and write down the
> output, so we can check what info the DHCP provides & if it is
> consistent with what the Linux system receives.
>
> Nicolas

Reply With Quote
Reply


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

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



All times are GMT +1. The time now is 02:13 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0