LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Not getting DHCP assignment at boot (http://www.linuxquestions.org/questions/fedora-35/not-getting-dhcp-assignment-at-boot-889392/)

smallpond 07-01-2011 09:42 AM

Not getting DHCP assignment at boot
 
Hi,
Just installed Fedora 15, updated to latest and most everything is working. One weird problem is that I am not getting an IP assigned on eth0 on boot, but if I do systemctl network restart it does.

This is my firewall so eth0 (DHCP) is connected to cable modem,
p3p1 (static) is connected to my internal LAN.

After boot, ifconfig shows eth0 UP but no IP assigned. No errors in the log, just looks like dhclient didn't run.

/etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=smallpond
NTPSERVERARGS=iburst
FORWARD_IPV4="yes"
NETWORKING_IPV6=no

/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=00:30:1b:b0:49:8a
TYPE=Ethernet
USERCTL=no
PEERDNS=no
IPV6INIT=no

/etc/dhcp/dhclient.conf:
send dhcp-client-identifier = hardware;

I'm also running dhcpd (on p3p1), ddclient and openvpn. Those all run fine once eth0 is up. Of course, until I get an IP assigned nothing works.

T3RM1NVT0R 07-01-2011 02:27 PM

@ Reply
 
Hi there,

I do not see one line in /etc/sysconfig/network

NETWORKING_IPV4=yes

I am not sure what the following entry FORWARD_IPV4="yes" doing in /etc/sysconfig/network because you configure packet forwarding in /etc/sysctl.conf

Also when the system comes up check if dhclient is loaded or not.

Run: ps -eaf | grep dhclient

I hope this helps.

smallpond 07-03-2011 06:07 AM

Quote:

Originally Posted by T3RM1NVT0R (Post 4401665)
Hi there,

I do not see one line in /etc/sysconfig/network

NETWORKING_IPV4=yes

I am not sure what the following entry FORWARD_IPV4="yes" doing in /etc/sysconfig/network because you configure packet forwarding in /etc/sysctl.conf

I went looking for valid options in network and I don't think FORWARD_IPV4, NETWORKING_IPV6 or NETWORKING_IPV4 are valid. They don't hurt anything since its just a file included in other scripts, but they don't mean anything either so I took them out. I do have forwarding set in /etc/sysctl.conf and it does come up correctly.

Quote:

Also when the system comes up check if dhclient is loaded or not.

Run: ps -eaf | grep dhclient

I hope this helps.
dhclient is not running when the system boots with no IP.
After it came up I ran:

Code:

/etc/sysconfig/network-scripts/ifup-eth eth0
That started dhclient and acquired an IP address. Now I need to figure out why it failed during boot.
Other thing I forgot to mention is that I am not running NetworkManager because I don't want it changing my scripts.

T3RM1NVT0R 07-03-2011 09:48 AM

@ Reply
 
Check the status of network and network manager using chkconfig. I turned both of them off on my RHEL6 system and was not able to get dhclient loaded. Even if your network service is set to be on and NetworkManager not then you won't be able to get dhclient loaded.

Run the following commands to check their status:

chkconfig --list network
chkconfig --list NetworkManager (case sensitive)

Run the following commands to turn them on at startup:

chkconfig network on
chkconfig NetworkManager on

I hope this helps.

smallpond 07-03-2011 10:21 AM

That was it. Turning off NetworkManager I think had also turned off networking.
Now reboot brings everything up.

Thanks!


All times are GMT -5. The time now is 11:41 AM.