LM7.2: DHCP timeout . help almost solved [devic] [dhcp hostname]

Q: Okay, so my previous problem was that I did not start an IP and DHCP woudld out
Now time to solve, I got an IP and it times out . weird. I read the DHCP mini-HOWTO, and turn the DHCP_HOSTNAME. Now I believe that dhcpcd is twice consecutively? I have a timeout (~ 60sec) and disappears over an IP 15sec later.
In the mini-HOWTO says of the ifup Edit:
elif [$ BOOTPROTO u0026quot; u0026quot; = dhcp-a $ ISALIAS u0026quot; u0026quot; = no] echo-n then
u0026quot; Using DHCP for $ (DEVICE) . u0026quot; 977 503 / sbin / dhcpcd-c / etc / sysconfig / network-scripts / ifdhcpc-done $ (DEVICE) 977 503 u0026quot; echo echo $ $ u003e / $ (DEVICE var/run/dhcp-wait-). pid; exec Drag u0026quot 30; | sh

if [-f / var/run/dhcp-wait- $ (DEVICE). pid]; then
^ ^ ^ ^ 977 503 echo u0026quot; failed. u0026 quot; 977 503 exit 1
to this:
elif [$ BOOTPROTO u0026quot; u0026quot; = dhcp-a $ ISALIAS u0026quot; u0026quot; = no]; then
echo-n u0026quot, using DHCP to $ (DEVICE). . u0026quot; 977 503 / sbin/dhcpcd
u0026quot; echo echo $ $ u003e / $ (DEVICE var/run/dhcp-wait-). pid; exec Drag u0026quot 30; | sh

if [! F / var/run/dhcp-wait- $ (DEVICE). Pid]; then
^^^^^^ echo u0026quot 977,503; fails. u0026quot; 977 503 exit 1

Thing is that this set of lines do not exist in my ifup LM7.2. Anyone know what this line changes and how to use LM7.2?


Re:if I read this right you have your host name set to muohio?

DHCP_HOSTNAME="muohio.edu"

in combo with that, makes no sense. try changing your hostname to bubba or something else unrelated and see if that doesn't fix this and drop the dhcp_hostname line


Re:plz help…I know there's some minor thing I have to do

Re:here is my ifcfg-eth0, the connection is an university T1:
DEVICE="eth0"
IPADDR=""
DHCP_HOSTNAME="muohio.edu"
NETMASK="255.255.255.0"
ONBOOT="yes"
BOOTPROTO="dhcp"
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"

Re:/etc/sysconfig/network-scripts/ifcfg-eth0

what are the contents of this file?


Re:here is part of my message file:
Feb 21 00:03:31 muohio cardmgr[204]: executing: './network start eth0'
Feb 21 00:03:31 muohio network: Setting network parameters: succeeded
Feb 21 00:03:31 muohio cardmgr[204]: + Try `basename –help' for more information.
Feb 21 00:03:31 muohio ifup: Usage: grep [OPTION]… PATTERN [FILE]…
Feb 21 00:03:31 muohio ifup: Try `grep –help' for more information.
Feb 21 00:03:31 muohio ifup: ./ifup: 127.0.0.0: command not found
Feb 21 00:03:31 muohio network: Bringing up interface lo: succeeded
Feb 21 00:03:31 muohio ifup: basename:
Feb 21 00:03:31 muohio ifup: too few arguments
Feb 21 00:03:31 muohio ifup: Try `basename –help' for more information.
Feb 21 00:04:31 muohio dhcpcd[293]: timed out waiting for a valid DHCP server response
Feb 21 00:04:31 muohio dhcpcd[350]: recvfrom: Network is down
Feb 21 00:04:31 muohio dhcpcd[352]: recvfrom: Network is down
Feb 21 00:04:31 muohio cardmgr[204]: start cmd exited with status 1
Feb 21 00:04:31 muohio ifup: Determining IP information for eth0 via …
Feb 21 00:04:37 muohio ifup: done.
Feb 21 00:04:37 muohio network: Bringing up interface eth0: succeeded
Feb 21 00:04:37 muohio portmap: portmap startup succeeded

Re:here is my ifup:
#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin

cd /etc/sysconfig/network-scripts
. network-functions

need_hostname

CONFIG=${1}

[ -z "${CONFIG}" ] && {
echo &quot;usage: ifup <device name>&quot; >&amp;2
exit 1
}

[ -f &quot;${CONFIG}&quot; ] || CONFIG=ifcfg-${CONFIG}
[ -f &quot;${CONFIG}&quot; ] || {
echo &quot;usage: ifup <device name>&quot; >&amp;2
exit 1
}

if [ ${UID} != 0 ]; then
if [ -x /usr/sbin/usernetctl ]; then
if /usr/sbin/usernetctl ${CONFIG} report ; then
exec /usr/sbin/usernetctl ${CONFIG} up
fi
fi
echo &quot;Users cannot control this device.&quot; >&amp;2
exit 1
fi

source_config

if [ &quot;foo$2&quot; = &quot;fooboot&quot; -a &quot;${ONBOOT}&quot; = &quot;no&quot; -o &quot;${ONBOOT}&quot; = &quot;NO&quot; ]
then
exit
fi

IPSETUP=no

DEVICETYPE=`echo ${DEVICE} | sed &quot;s/[0-9]*$//&quot;`
REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
if echo ${DEVICE} | grep -q ':' ; then
ISALIAS=yes
else
ISALIAS=no
fi

if [ &quot;$BOOTPROTO&quot; = &quot;dhcp&quot; ];then
BOOTPROTO=dhcp
DYNCONFIG=true
fi

# Old BOOTP variable
if [ &quot;$BOOTP&quot; = &quot;yes&quot; ]; then
BOOTPROTO=bootp
fi

if [ &quot;$BOOTPROTO&quot; = &quot;bootp&quot; ]; then
DYNCONFIG=true
DHCP_CLIENT=/sbin/pump
fi

if [ -x /sbin/ifup-pre-local ]; then
/sbin/ifup-pre-local ${DEVICE}
fi

OTHERSCRIPT=&quot;/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}&quot;

if [ -x $OTHERSCRIPT ]; then
exec $OTHERSCRIPT $CONFIG $2
fi

# is this device available? (this catches PCMCIA devices for us)
/sbin/ifconfig ${REALDEVICE} 2>&amp;1 | grep -s &quot;not found&quot; > /dev/null
if [ &quot;$?&quot; = &quot;0&quot; ]; then
echo &quot;Delaying ${DEVICE} initialization.&quot;
exit 1
fi

if [ &quot;${SLAVE}&quot; = yes -a &quot;${ISALIAS}&quot; = no -a &quot;${MASTER}&quot; != &quot;&quot; -a \
-x /sbin/ifenslave ]; then
RFLAG=&quot;&quot; ; [ &quot;$RECEIVE-ONLY&quot; = yes ] &amp;&amp; RFLAG=&quot;-r&quot;

ifconfig ${DEVICE} down
echo &quot;Enslaving $DEVICE to $MASTER&quot;
ifenslave $RFLAG &quot;$MASTER&quot; &quot;$DEVICE&quot;

exit 0
fi

if [ -n &quot;$MACADDR&quot; ]; then
ifconfig ${DEVICE} hw ether ${MACADDR}
fi

if [ -n &quot;$DYNCONFIG&quot; -a &quot;XXX$DHCP_CLIENT&quot; = &quot;XXX&quot; ];then
if [ -x /sbin/dhcpcd ];then
DHCP_CLIENT=/sbin/dhcpcd
elif [ -x /sbin/pump ];then
DHCP_CLIENT=/sbin/pump
elif [ -x /sbin/dhcpxd ];then
DHCP_CLIENT=/sbin/dhcpxd
elif [ -x /sbin/dhclient ];then
DHCP_CLIENT=/sbin/dhclient
else
echo &quot;Can't find a dhcp client&quot;
exit 1;
fi
fi

DHCP_ARGS=
if [ &quot;XXX$DHCP_CLIENT&quot; != &quot;XXX&quot; ];then
case $(basename $DHCP_CLIENT) in
dhcpcd)
[ -n &quot;$DHCP_HOSTNAME&quot; ] &amp;&amp; DHCP_ARGS=&quot;-h $DHCP_HOSTNAME&quot;
[ -n &quot;$NEEDHOSTNAME&quot; ] &amp;&amp; DHCP_ARGS=&quot;$DHCP_ARGS -H&quot;
DHCP_ARGS=&quot;$DHCP_ARGS $DEVICE&quot;
;;
pump)
[ -n &quot;$DHCP_HOSTNAME&quot; ] &amp;&amp; DHCP_ARGS=&quot;-h $DHCP_HOSTNAME&quot;
[ -n &quot;$NEEDHOSTNAME&quot; ] &amp;&amp; DHCP_ARGS=&quot;$DHCP_ARGS –lookup-hostname&quot;
DHCP_ARGS=&quot;$DHCP_ARGS -i $DEVICE&quot;
;;
dhcpxd)
# Dhcpxd don't support NEED_HOSTNAME ? guess i need time to patch
# this animal
[ -n &quot;$DHCP_HOSTNAME&quot; ] &amp;&amp; DHCP_ARGS=&quot;-H $HOSTNAME&quot;
DHCP_ARGS=&quot;$DHCP_ARGS $DEVICE&quot;
;;
dhclient)
# Can't specify a host with dhclient ? same remark for
# $NEEDHOSTNAME this client suck !!!
DHCP_ARGS=&quot;$DEVICE&quot;
;;
esac
fi

if [ -n &quot;$DYNCONFIG&quot; ]; then
echo -n &quot;Determining IP information for $DEVICE via $(basename
$DHCP_CLIENT)…&quot;
if $DHCP_CLIENT $DHCP_ARGS ; then
echo &quot; done.&quot;
else
echo &quot; failed.&quot;
exit 1
fi
else
if [ -z &quot;$NETMASK&quot; ]; then
eval `/bin/ipcalc –netmask ${IPADDR}`
fi

if [ -z &quot;$BROADCAST&quot; ]; then
eval `/bin/ipcalc –broadcast ${IPADDR} ${NETMASK}`
fi

if [ -z &quot;$NETWORK&quot; ]; then
eval `/bin/ipcalc –network ${IPADDR} ${NETMASK}`
fi

ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
${ARP:+arp} ${MTU:+mtu $MTU}
# don't re-add subnet route on 2.2 kernels, but add a route
# to a non-local subnet.
# stupid hack, but it should work
if [ &quot;$ISALIAS&quot; = no ] &amp;&amp; [ -z &quot;`route -n | sed &quot;s/ .*//&quot; | grep
${NETWORK}`&quot; ]; then
route add -net ${NETWORK} netmask ${NETMASK} dev ${DEVICE}
fi

. /etc/sysconfig/network

if [ &quot;${GATEWAYDEV}&quot; = &quot;&quot; -o &quot;${GATEWAYDEV}&quot; = &quot;${DEVICE}&quot; ]; then
# set up default gateway
if [ &quot;${GATEWAY}&quot; != &quot;&quot; ]; then
route add default gw ${GATEWAY} ${DEVICE}
DEFGW=${GATEWAY}
elif [ &quot;${GATEWAYDEV}&quot; = &quot;${DEVICE}&quot; ]; then
route add default ${DEVICE}
fi
fi
fi

. /etc/sysconfig/network

if [ &quot;${IPX}&quot; = yes ]; then
/etc/sysconfig/network-scripts/ifup-ipx ${DEVICE}
fi

exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}


Re:Post the script please.

Related posts

Leave a comment

0 Comments.

Leave a Reply


click to changeSecurity Code

[ Ctrl + Enter ]