some really basic networking questions
Joel Hammer
Joel
Mon May 17 11:34:49 PDT 2004
I'll like to help but I am not sure of what is happening. I usually
wind up throwing away the prepackaged scripts when I am seriously doing
something. They break after a while and they are very complicated to
troubleshoot. (All those dot files and configuration files. How very
clever of them.)
Here is how I understand dhcpcd (not very much).
The command,
dhcpcd interface
will:
1. Configure your interface. It's like running ifconfig with the appropriate variables.
2. It will place your configuration data in /var/run/dhcpcd-interface.info
3. Depending on what options you give dhcpcd, it may or may not change your
/etc/hosts file or /etc/resolv.conf file.
4. It will not change your route configuration. You have to do that with a
route command, using the data in /var/run/dhcpcd-interface.info. I put this
command into the script that dhcpcd runs when it starts up or the ip
number changes:
/etc/sysconfig/network-scripts/dhcpcd-eth1
#! /bin/bash
echo "IP has changed" | mutt -s "IP CHANGED" jlh
. /var/run/dhcpcd-eth1.info
/sbin/route add -net default gw $GATEWAY eth1
dhcpcd must be run against every interface you want it to configure.
You may need to give a -h options. The name likely isn't important.
You can run it at any time.
Have fun.
Joel
More information about the Linux-users
mailing list