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 "usage: ifup <device name>" >&2
exit 1
}
[ -f "${CONFIG}" ] || CONFIG=ifcfg-${CONFIG}
[ -f "${CONFIG}" ] || {
echo "usage: ifup <device name>" >&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 "Users cannot control this device." >&2
exit 1
fi
source_config
if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]
then
exit
fi
IPSETUP=no
DEVICETYPE=`echo ${DEVICE} | sed "s/[0-9]*$//"`
REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
if echo ${DEVICE} | grep -q ':' ; then
ISALIAS=yes
else
ISALIAS=no
fi
if [ "$BOOTPROTO" = "dhcp" ];then
BOOTPROTO=dhcp
DYNCONFIG=true
fi
# Old BOOTP variable
if [ "$BOOTP" = "yes" ]; then
BOOTPROTO=bootp
fi
if [ "$BOOTPROTO" = "bootp" ]; then
DYNCONFIG=true
DHCP_CLIENT=/sbin/pump
fi
if [ -x /sbin/ifup-pre-local ]; then
/sbin/ifup-pre-local ${DEVICE}
fi
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}"
if [ -x $OTHERSCRIPT ]; then
exec $OTHERSCRIPT $CONFIG $2
fi
# is this device available? (this catches PCMCIA devices for us)
/sbin/ifconfig ${REALDEVICE} 2>&1 | grep -s "not found" > /dev/null
if [ "$?" = "0" ]; then
echo "Delaying ${DEVICE} initialization."
exit 1
fi
if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" -a \
-x /sbin/ifenslave ]; then
RFLAG="" ; [ "$RECEIVE-ONLY" = yes ] && RFLAG="-r"
ifconfig ${DEVICE} down
echo "Enslaving $DEVICE to $MASTER"
ifenslave $RFLAG "$MASTER" "$DEVICE"
exit 0
fi
if [ -n "$MACADDR" ]; then
ifconfig ${DEVICE} hw ether ${MACADDR}
fi
if [ -n "$DYNCONFIG" -a "XXX$DHCP_CLIENT" = "XXX" ];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 "Can't find a dhcp client"
exit 1;
fi
fi
DHCP_ARGS=
if [ "XXX$DHCP_CLIENT" != "XXX" ];then
case $(basename $DHCP_CLIENT) in
dhcpcd)
[ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-h $DHCP_HOSTNAME"
[ -n "$NEEDHOSTNAME" ] && DHCP_ARGS="$DHCP_ARGS -H"
DHCP_ARGS="$DHCP_ARGS $DEVICE"
;;
pump)
[ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-h $DHCP_HOSTNAME"
[ -n "$NEEDHOSTNAME" ] && DHCP_ARGS="$DHCP_ARGS –lookup-hostname"
DHCP_ARGS="$DHCP_ARGS -i $DEVICE"
;;
dhcpxd)
# Dhcpxd don't support NEED_HOSTNAME ? guess i need time to patch
# this animal
[ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-H $HOSTNAME"
DHCP_ARGS="$DHCP_ARGS $DEVICE"
;;
dhclient)
# Can't specify a host with dhclient ? same remark for
# $NEEDHOSTNAME this client suck !!!
DHCP_ARGS="$DEVICE"
;;
esac
fi
if [ -n "$DYNCONFIG" ]; then
echo -n "Determining IP information for $DEVICE via $(basename
$DHCP_CLIENT)…"
if $DHCP_CLIENT $DHCP_ARGS ; then
echo " done."
else
echo " failed."
exit 1
fi
else
if [ -z "$NETMASK" ]; then
eval `/bin/ipcalc –netmask ${IPADDR}`
fi
if [ -z "$BROADCAST" ]; then
eval `/bin/ipcalc –broadcast ${IPADDR} ${NETMASK}`
fi
if [ -z "$NETWORK" ]; 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 [ "$ISALIAS" = no ] && [ -z "`route -n | sed "s/ .*//" | grep
${NETWORK}`" ]; then
route add -net ${NETWORK} netmask ${NETMASK} dev ${DEVICE}
fi
. /etc/sysconfig/network
if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
# set up default gateway
if [ "${GATEWAY}" != "" ]; then
route add default gw ${GATEWAY} ${DEVICE}
DEFGW=${GATEWAY}
elif [ "${GATEWAYDEV}" = "${DEVICE}" ]; then
route add default ${DEVICE}
fi
fi
fi
. /etc/sysconfig/network
if [ "${IPX}" = yes ]; then
/etc/sysconfig/network-scripts/ifup-ipx ${DEVICE}
fi
exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}
Re:Post the script please.
0 Comments.