You are not logged in.

#1 2005-08-05 16:27:41

jerrym
Member
From: Kannapolis, NC
Registered: 2005-07-08
Posts: 60

getting new ip from dhcp every boot

just wondering why i am getting a new ip from dhcp on almost every reboot. running .7-current, samba and have eth1 setup for dhcp (eth0 is onboard device and is disabled) and set host name during install

i can reboot my windows box once a month and it will still get the same ip, but if i reboot my arch box a couple of times a day it gets different ip's almost everytime. does arch (or linux) have somewhere to set lease times that would override the dhcp server?

anyone else seen this?


He may look like an idiot and talk like an idiot but don't let that fool you. He really is an idiot.
- - - Groucho Marx

Registered Linux User #319935
Registered Linux Machine #204881

Offline

#2 2005-08-05 16:42:47

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: getting new ip from dhcp every boot

a) why is getting a different IP through dhcp a bad thing? that's what dhcp does? if you want a static IP, use a static IP
b) the dhcp cache is recorded on the client, not the server.  on shutdown, the network daemon issues a dhcpcd -K which "kills" the cache, and cleans it up.  This is proper functionality for dhcp

Offline

#3 2005-08-05 16:48:20

jerrym
Member
From: Kannapolis, NC
Registered: 2005-07-08
Posts: 60

Re: getting new ip from dhcp every boot

i found the dhcpd-eth1.info file and it shows the release times and stuff like that. if the renewal time is set to 1209600 (14 days) which is half the lease time, then why would i get a new ip when i reboot? that is what does not make since. i understand that it may be "working correclty" but it isnt desireable. i mean like i said on my windows box, this doesnt happen

im on a company network, cant set a static smile

if i use dns to browse a computer name though it shouldnt matter what the ip is, right?
\machinenameshare, should not matter what the ip is


He may look like an idiot and talk like an idiot but don't let that fool you. He really is an idiot.
- - - Groucho Marx

Registered Linux User #319935
Registered Linux Machine #204881

Offline

#4 2005-08-05 17:00:06

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: getting new ip from dhcp every boot

jerrym wrote:

i found the dhcpd-eth1.info file and it shows the release times and stuff like that. if the renewal time is set to 1209600 (14 days) which is half the lease time, then why would i get a new ip when i reboot? that is what does not make since. i understand that it may be "working correclty" but it isnt desireable. i mean like i said on my windows box, this doesnt happen

because that file is deleted on shutdown

jerrym wrote:

im on a company network, cant set a static smile

sure you can, just ask them for their dhcp range - tell them you're making a script or something, and set a static IP outside that dhcp range

jerrym wrote:

if i use dns to browse a computer name though it shouldnt matter what the ip is, right?
\machinenameshare, should not matter what the ip is

that's not dns at all.  that's NetBIOS or whatever the hell it's called - it's part of samba.  and in that case, the IP address can be anything, because netbios actually sends messy broadcast messages every couple of minutes (watch your traffic on a large company network, it's kinda funny to see those messages so often)

Offline

#5 2005-08-05 18:26:33

jerrym
Member
From: Kannapolis, NC
Registered: 2005-07-08
Posts: 60

Re: getting new ip from dhcp every boot

phrakture wrote:

because that file is deleted on shutdown

why that file? i could understand the cache file being deleted but not the info file

phrakture wrote:

sure you can, just ask them for their dhcp range - tell them you're making a script or something, and set a static IP outside that dhcp range

wish it was that easy smile

phrakture wrote:

that's not dns at all.  that's NetBIOS or whatever the hell it's called - it's part of samba.  and in that case, the IP address can be anything, because netbios actually sends messy broadcast messages every couple of minutes (watch your traffic on a large company network, it's kinda funny to see those messages so often)

oh yeah, netbios. so if i have a netbios name set in smb.conf, then technically the ip address would not matter right?


He may look like an idiot and talk like an idiot but don't let that fool you. He really is an idiot.
- - - Groucho Marx

Registered Linux User #319935
Registered Linux Machine #204881

Offline

#6 2005-08-05 20:40:11

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 160

Re: getting new ip from dhcp every boot

I have a similiar problem.

It has been my experience that dhcp generaly does issue the same IP address to the same host over and over again. However I have had the issue of the ip address changing not only at reboot, but even in the middle of operation.

I'm not having this problem now, but I do have something screwed up with dhcpcd.

On my system this problem now leads to the inability to resolve the host via dns (the host is arch, not windoze, and the dhcp and dns server is a freebsd box). A redundant entry in the dynamic zone?

I have one new clue: I found I have 2 dhcpcd daemons running on my arch workstation host!

I believe this is because there is a dhcpcd startup in /etc/rc.d/network and also a dhcpcd entry in the /etc/conf.d directory.

phrakture (or other interested party), could you render an opinion on this?

Will these two entries cause the dhcpcd daemon to run twice?

Is this something left over in my system from before the transition to the /etc/conf.d directory?

Changing the network script is involved, eliminating the conf.d entry is easy. Is eliminating this entry a deviation from current arch practice?

I also wonder how this fits in with the current transition to dhclient (which I think is highly recommended, dhclient is much more configurable to work with bind).

Thanks 10^6 for your expertise!

android

Offline

#7 2005-08-05 20:49:41

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: getting new ip from dhcp every boot

android wrote:

I have one new clue: I found I have 2 dhcpcd daemons running on my arch workstation host!

I believe this is because there is a dhcpcd startup in /etc/rc.d/network and also a dhcpcd entry in the /etc/conf.d directory.

phrakture (or other interested party), could you render an opinion on this?

Will these two entries cause the dhcpcd daemon to run twice?

The conf.d entry is for configuration of the arguments to dhcpcd when run at boot time.  Having 2 daemons may be related to hotplug (which will load your interface for you).  Try disabling your eth0 in the INTERFACES array (prefix it with a !) but leave all your settings there - this way hotplug will be able to start your network, but the network daemon won't start it afterwards.

@jerrym:
Can you try editing the /etc/rc.d/network script and commenting out the "dhcpcd -k" line? then reboot and see if the IP is the same?

What router do you have?

Offline

#8 2005-08-05 22:49:30

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 160

Re: getting new ip from dhcp every boot

hotplug! damn that daemon...

my USB doesn't work either 8-(

(I've modprobe'd so many modules in and still I've never gotten a single usb device to work.)

I'll turn off hotplug (since it's not working anyway)

So listing network as a daemon, doesn't conflict with the conf.d/dhcpcd ?

Thanks Again...

android

Offline

#9 2005-08-06 03:10:25

jerrym
Member
From: Kannapolis, NC
Registered: 2005-07-08
Posts: 60

Re: getting new ip from dhcp every boot

phrakture wrote:

@jerrym:
Can you try editing the /etc/rc.d/network script and commenting out the "dhcpcd -k" line? then reboot and see if the IP is the same?

What router do you have?

i'll have to wait until monday at work to test it, not sure what the router is at work either, i work for a large company and as i do pc support, i dont do network support so i am not sure what any of that equipment is, but it is probably cisco stuff

i do have a small network at home with a netgear wireless mr814v2 router that i could see if i have the same issue here. i will let you all know tomorrow (saturday)


He may look like an idiot and talk like an idiot but don't let that fool you. He really is an idiot.
- - - Groucho Marx

Registered Linux User #319935
Registered Linux Machine #204881

Offline

#10 2005-08-07 15:46:36

renners1
Member
From: Thailand
Registered: 2004-11-03
Posts: 71

Re: getting new ip from dhcp every boot

I had this problem and found the simplest way to fix it was to lock an IP address to the mac address of my eth card in the router config.

Kinda defeats the purpose of DHCP but hey, it works!

Cheers, Renners


Microsoft stole my computer, Linux gave it back.

Offline

Board footer

Powered by FluxBB