WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: uDHCP suddenly chatty after loading extensions  (Read 2297 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
uDHCP suddenly chatty after loading extensions
« on: December 28, 2017, 04:45:16 PM »
Is it me (likely), or is it something to do with BusyBox's udhcp that makes it chatty upon every reboot after extensions are loaded?

Installed TC 8.2.1 from the coreplus iso to a flash disk - no problems.  If you don't mess around with any network or service settings, after TC loads extensions, there is no chat from udhcp.

BUT, when testing, I turned off dhcp in either way:  System Tools > Services, OR System Tools > Network, "use dhcp broadcast - no / apply" and reboot.  (backup enabled)

After changing dhcp on or off again, seems like no matter what I do, udhcp is suddenly chatty upon rebooting with either:

udhcp sending discover
or
cannot assign requested address

It isn't that I totally mind these notifications after the extensions are loaded during boot, I'm just wondering why it is being so chatty about it when a default installation where the op doesn't muck with the network settings is totally quiet. :)

« Last Edit: December 28, 2017, 04:47:22 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: uDHCP suddenly chatty after loading extensions
« Reply #1 on: December 28, 2017, 05:33:08 PM »
AHA!  found it - I have TWO instances of udhcp running now!

Ok, boot from the CD and run a ps shows:

/sbin/udhcpc -b -i eth0 -x hostname:box -p /var/run/udhcpc.eth0


Boot from my flash disk after I toggled dhcp on and off graphically it seems to now start TWO instances of dhcp.  Here's the ps listing:

udhcpc -b -i eth0 -x hostname:box -p /var/run/udhcpc.eth0
/sbin/udhcpc -b -i eth0 -x hostname:box -p /var/run/udhcpc.eth0

Maybe this explains some of the connectivity weirdness I was seeing with my own install (but only after playing with the services / network settings), but not from CD!

I'll just kill the redundant dhcp process for now.

« Last Edit: December 28, 2017, 05:36:55 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11699
Re: uDHCP suddenly chatty after loading extensions
« Reply #2 on: December 28, 2017, 07:55:53 PM »
Hi PDP-8
If you don't want  DHCP  running when you boot up, add the  nodhcp  boot code to your boot loader.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: uDHCP suddenly chatty after loading extensions
« Reply #3 on: December 29, 2017, 06:59:55 AM »
Thanks Rich - your suggestion is helping me troubleshoot - but here is where it gets stranger.  That option works fine with a non-persistent CD.

But, with TC installed to my flashdisk, if I use the nodhcp option in my /mnt/sda1/boot/extlinux/extlinux.conf file, (I verified it got tickled on reboot by also taking out the quiet option) I get this:

I can STILL connect automatically to a network via dhcp even with nodhcp specified in the bootloader!

To connect via static, I have to go into the control panel's network utility and force it to use a static address and hit apply.
 
So it seems that merely by using the Network control panel, AND having a persistent store (backup enabled upon reboot), the system seems to be activating two instances of udhcp, or in the case of using nodhcp in the bootloader, not being recognized as nodhcp and having to force it to go to static.

Quick recap of actual incidents - this has happened on more than one install:

1) Installed TC to flashdisk or other medium.

2) I normally use dhcp on my local network.  No problem.  No need to even touch the network control panel.

3) Had to configure an external device via a static address.  Used the network control panel to do so.

4) When finished configuring the device via a static address, I used the network control panel to put it back to dhcp to join the local network.

5) Now every reboot seems to have two instanced of udhcp running - one of which goes chatty and some long random network hangs happen every now and then from the two infighting with each other.

6) Using "nodhcp" in the bootloaders extlinux.conf file seems to confuse the system even further.

I'll try to narrow it down even further.  I kind of lost track of all the variables during testing - but appreciate the help!  Strange enough, this is kind of fun.  On any other distro - it would be a chore. :)




That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11699
Re: uDHCP suddenly chatty after loading extensions
« Reply #4 on: December 29, 2017, 09:35:43 AM »
Hi PDP-8
Quote
4) When finished configuring the device via a static address, I used the network control panel to put it back to dhcp to join the local network.
DHCP is for automatic address assignment, static is for manual address assignment. Pick one, not both.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: uDHCP suddenly chatty after loading extensions
« Reply #5 on: December 29, 2017, 08:00:39 PM »
For sure only pick one! :)

Sorry I wasn't more explicit - I was configuring a stand-alone scientific instrument that needed me to run a static ip to get into it to change it's own internal operational configuration menu.  After that was done, I went back to using TC on the network like normal with dhcp for my own general purpose use.  That's when I noticed the dual dhcp going chatty upon reboot and can't seem to click my way out of that.

I'll keep digging.  Happy new years to all!!


That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11699
Re: uDHCP suddenly chatty after loading extensions
« Reply #6 on: December 29, 2017, 08:31:32 PM »
Hi PDP-8
Take a look inside  /opt/bootlocal.sh.  When you set up the static IP, the network tool created a  /opt/eth0.sh  script and added
a call to it in  /opt/bootlocal.sh. Check if it created some kind of  DHCP  entry when you used it to switch back.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: uDHCP suddenly chatty after loading extensions
« Reply #7 on: December 30, 2017, 06:12:01 AM »
Rich - you ***ROCK*** !

That was exactly it!  Sure enough, bootlocal.sh was calling up eth0.sh, which was unneccessary for me, so I just deleted out those unwanted lines in bootlocal.sh as root and I was back in business - but there's more!

I should have just rebooted without doing any backup to get back to the normal state after I configured those other device projects.

While playing in the /opt directory, I took advantage of changing all those options in the fltk network gui interface to see how the system would rewrite eth0.sh.  Fascinating.  Learned a LOT from that.

Heh, also learned that when you delete the now unnecessary eth0.sh file, my backup would fail of course since it was now part of the backup list!  So in addition to cleaning up bootlocal.sh, and deleting eth0.sh, I had to remove eth0.sh from the backup file list too.

And, <gulp>, it was ifconfig, not dhcp that was being chatty about things failing.

I guess on the bright side, if ifconfig suddenly goes chatty on you (or if it goes by too fast after loading extensions, just pull up your first virtual terminal ctrl-alt-f1 and it might be staring you in the face), it's a good indicator that you (me), kids or co-workers may have gotten into the system to play around.  Check bootlocal.sh!

Back to a pristine state and learned a lot from your help.  Thank man - drinks (or pizza) are on me!

« Last Edit: December 30, 2017, 06:16:33 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth