DHCPCD disable
DHCPCD disable
Hi all,
I want to completely disable DHCPCD from ever running.
I have a machine with three network cards, two of which I want to assign addresses to, and the third is just for monitoring (no IP needed).
The problem I have is that if I use killall dhcpcd in /etc/rc.d/rc.local it comes back anyway, like a wrapper (if I've used that term correctly).
If I set my ip addresses manually, they only stick for a little while, as DHCPCD takes over them again.
I tried making a dummy /sbin/dhcpcd file but that didn't go well, and would have been messy anyway.
I also tried modifying /etc/NetworkManager/NetworkManager.conf by removing the dhcp line in there, but to no avail.
There must be something that stops this machine from ever looking for an address from DHCP.
Also, howcome sometimes between bootups the network cards change their identity. I mean, one time the eth0 card will be a certain physical card, but then it may become the eth2 card on the next boot up.
I hope someone can shed some light on this.
I want to completely disable DHCPCD from ever running.
I have a machine with three network cards, two of which I want to assign addresses to, and the third is just for monitoring (no IP needed).
The problem I have is that if I use killall dhcpcd in /etc/rc.d/rc.local it comes back anyway, like a wrapper (if I've used that term correctly).
If I set my ip addresses manually, they only stick for a little while, as DHCPCD takes over them again.
I tried making a dummy /sbin/dhcpcd file but that didn't go well, and would have been messy anyway.
I also tried modifying /etc/NetworkManager/NetworkManager.conf by removing the dhcp line in there, but to no avail.
There must be something that stops this machine from ever looking for an address from DHCP.
Also, howcome sometimes between bootups the network cards change their identity. I mean, one time the eth0 card will be a certain physical card, but then it may become the eth2 card on the next boot up.
I hope someone can shed some light on this.
- fanthom
- Moderator Team
- Posts: 5588
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: DHCPCD disable
Hi Spice_Boy,
NM is pretty stubborn so you have to terminate it with 'kill -9 ` command and then 'killall dhcpcd'.
or better just use 'nonetwork' cheatcode so they will never be started
Cheers
NM is pretty stubborn so you have to terminate it with 'kill -9 ` command and then 'killall dhcpcd'.
or better just use 'nonetwork' cheatcode so they will never be started

Cheers
Please add [Solved] to your thread title if the solution was found.
Re: DHCPCD disable
That nonetwork did the trick I wanted, thank you.
The second part is still a bit of an annoying issue that makes no sense. One boot (most boots) the network devices are numbered a certain way, but then another boot they might swap around, which makes my setup useless and I have to restart. I'm just baffled as to why hardware that hasn't changed gets its device numbering changed.
I'd like to set the host name too. I can change it with the hostname command, but don't know which file it actually changes to I can make it permanent.
The second part is still a bit of an annoying issue that makes no sense. One boot (most boots) the network devices are numbered a certain way, but then another boot they might swap around, which makes my setup useless and I have to restart. I'm just baffled as to why hardware that hasn't changed gets its device numbering changed.
I'd like to set the host name too. I can change it with the hostname command, but don't know which file it actually changes to I can make it permanent.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: DHCPCD disable
Your devices are changing order because the system discovers your hardware and assigns each device to an alias one every boot, and it assigns them in the order they are discovered. This is basically a race condition -- sometimes one card is discovered first, sometimes another. I'm working through trying to resolve this for sound cards so that users will be able to select a particular card to load first (to act as default). I haven't done enough testing, but here are somethings that might be of interest, and you can test if you're up for it:
http://www.linuxquestions.org/questions ... ux-872850/
set an alias in /etc/modprobe.d/modprobe.conf, e.g.
or
In the second option, you're telling modprobe to load the driver for the device you want to be listed first, whenever it tries to load the device you want to be listed second.
If you have any luck with either of these methods, please let me know (it might save me some testing on my own).
http://www.linuxquestions.org/questions ... ux-872850/
set an alias in /etc/modprobe.d/modprobe.conf, e.g.
Code: Select all
alias eth0 driver_name1
alias eth1 driver_name2
Code: Select all
install module2 /sbin/modprobe module1; /sbin/modprobe --ignore-install module2
If you have any luck with either of these methods, please let me know (it might save me some testing on my own).
Please take a look at our online documentation, here. Suggestions are welcome!
Re: DHCPCD disable
Thank you for your response about this. I can see it's going to have to wait until I have a fair bit of time to play around, which I can't do at the moment.
Oddly enough, I've also found it with sound cards, like in your case and needed them to stay put.
Oddly enough, I've also found it with sound cards, like in your case and needed them to stay put.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: DHCPCD disable
Thanks! I'm now in the process of writing the script for the sound cards. I don't have any hardware with multiple cards, so maybe you can help me test it when I have it ready 

Please take a look at our online documentation, here. Suggestions are welcome!
Re: DHCPCD disable
Mine is the built in sound card, and the microphone of a webcam. I set it up to use the microphone audio to stream its audio, not the sound card.
They sometimes change between boots, but generally the sound doesn't behave as badly as network cards.
They sometimes change between boots, but generally the sound doesn't behave as badly as network cards.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: DHCPCD disable
While operating in virtualbox, I was able to define/redefine device numbering for ethernet cards with a custom udev rule. Here's how:
modify and save this as /etc/udev/rules.d/99-custom-net.rules (the name is somewhat arbitrary but I believe it should have a high number like 99 so it is executed toward the end of the udev initialization):
You can add another line for "eth3". swap out the MAC ID's with the appropriate ones for your devices, which you can see with 'ifconfig -a', e.g.:
There are plenty of examples for this one on the net. Still working on sound cards...
Let me know if this helps or not.
modify and save this as /etc/udev/rules.d/99-custom-net.rules (the name is somewhat arbitrary but I believe it should have a high number like 99 so it is executed toward the end of the udev initialization):
Code: Select all
KERNEL=="eth?", ATTR{address}=="08:00:27:27:99:b4", NAME="eth0" # MAC of first NIC in lowercase
KERNEL=="eth?", ATTR{address}=="08:00:27:2d:fc:17", NAME="eth1" # MAC of second NIC in lowercase
KERNEL=="eth?", ATTR{address}=="08:00:27:ee:7a:5c", NAME="eth2" # MAC of third NIC in lowercase
Code: Select all
eth0 Link encap:Ethernet HWaddr d4:be:d9:05:83:f2
There are plenty of examples for this one on the net. Still working on sound cards...

Let me know if this helps or not.
Please take a look at our online documentation, here. Suggestions are welcome!
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: DHCPCD disable
The discussion about sound card order should have its own topic. I've made one and posted a very preliminary version of my script there: http://forum.porteus.org/viewtopic.php?f=53&t=1676
Thanks!
Thanks!
Please take a look at our online documentation, here. Suggestions are welcome!