Networking Forums

Networking Forums > Computer Networking > Linux Networking > Struggling with DHCP

Reply
Thread Tools Display Modes

Struggling with DHCP

 
 
raffelm
Guest
Posts: n/a

 
      02-05-2004, 01:22 AM
I am running Mandrake 9.1 hooked up to a Netgear RT314 router. The
router assigns the IP address.

Apparently the router is also assigning the hostname for my linux box
which is getting set to dhcppc2 at the moment. When I call
hostname from a shell, I see dhcppc2 returned. When I browse to the
linux box from my W2KP box (linux box is running samba), I can see
that the name is dhcppc2. Of course, if I clear the DHCP tables in
the router, the computer name will change depending on who requests an
IP first. My windows box maintains its name that I set for it. So, I
figure this has to be a linux configuration issue. So,

I added a line to dhclient-eth0.conf:
send host-name "AMDGhz20".

I also added a line to /etc/sysconfig/network:
DHCP_HOSTNAME=AMDGhz20

Rebooted after each change...so far no luck.

I set /etc/HOSTNAME to:
AMDGhz20

again after reboot no luck...changes seem to be ignored to.

Then I noticed in /etc/sysconfig/network-scripts/ifcfg-eth0 a variable
NEEDHOSTNAME=yes. So I changed that to:
NEEDHOSTNAME=no

And of course, after a reboot, no luck. machine name still dhcppc2

So, what do I change to make sure my linux box has a "static" name
that I assign instead of getting something from the router?

I appreciate anyone who is able or willing to help....

Matt
 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      02-05-2004, 01:39 AM
On 4 Feb 2004 18:22:08 -0800, raffelm wrote:
> I am running Mandrake 9.1 hooked up to a Netgear RT314 router. The
> router assigns the IP address.
>
>
> So, what do I change to make sure my linux box has a "static" name
> that I assign instead of getting something from the router?


You can find hostname configuration files with this command
find /etc -type f -name "*" -print | xargs grep -I $(hostname)

For Redhat/Makdrake here are snippets from some of my Mandrake files
which set hostname, ip address, or used in resolving/setting
hostnames/ip addresses.



cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=fw.invalid <==============
GATEWAY=12.209.206.1
GATEWAYDEV=eth0

cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.10 fw.invalid fw <==============

 
Reply With Quote
 
Cameron Kerr
Guest
Posts: n/a

 
      02-05-2004, 03:13 AM
[Followups set to COLN]

In comp.os.linux.networking raffelm <(E-Mail Removed)> wrote:
> I am running Mandrake 9.1 hooked up to a Netgear RT314 router. The
> router assigns the IP address.
>
> Apparently the router is also assigning the hostname for my linux box
> which is getting set to dhcppc2 at the moment. When I call
> hostname from a shell, I see dhcppc2 returned. When I browse to the
> linux box from my W2KP box (linux box is running samba), I can see
> that the name is dhcppc2. Of course, if I clear the DHCP tables in
> the router, the computer name will change depending on who requests an
> IP first. My windows box maintains its name that I set for it. So, I
> figure this has to be a linux configuration issue. So,
>
> I added a line to dhclient-eth0.conf:
> send host-name "AMDGhz20".


If dhclient is running, remove the "host-name" from the line that says
"request ... host-name" in /etc/dhclient.conf.

If you're using pump, I think you may be out of luck. On second thought,
you might try using pump instead of dhclient, as pump doesn't seem to be
able to configure the hostname (or at least, you can't tell it not to).

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
raffelm
Guest
Posts: n/a

 
      02-06-2004, 02:04 AM
Bit Twister <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>.. .
> On 4 Feb 2004 18:22:08 -0800, raffelm wrote:
> > I am running Mandrake 9.1 hooked up to a Netgear RT314 router. The
> > router assigns the IP address.
> >
> >
> > So, what do I change to make sure my linux box has a "static" name
> > that I assign instead of getting something from the router?

>
>
> cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=fw.invalid <==============
> GATEWAY=12.209.206.1
> GATEWAYDEV=eth0


It seems that adding the HOSTNAME line to my /etc/sysconfig/network
file set the hostname correctly.

Thanks for the help
Matt
 
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struggling with unlocked dongle Lobster Broadband 6 07-20-2011 07:18 PM
Newbie struggling withwireless jobbers Wireless Networks 2 07-13-2006 04:50 PM
still struggling with DHCP..please help Rick Dilley Windows Networking 1 08-21-2005 09:01 AM
Struggling with Wireless network. OC11 Wireless Networks 2 06-09-2005 07:15 PM
struggling with permissions HowburyPete Home Networking 2 11-18-2004 01:37 PM



1 2 3 4 5 6 7 8 9 10 11