Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd problem again
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
aclaunch
Guest





PostPosted: Wed Jun 26, 2002 4:44 pm    Post subject: dhcpcd problem again Reply with quote

I have been trying to get Gentoo set up on my box and so far, things look promising. However, whenever I reboot dhcp does not come up.
I have uncommented the line in /etc/conf.d/net "iface_eth0=dhcp" however I did not edit the following line "dhcpcd_eth0="..." . Is that the problem??? Once I reboot and run "dhcpcd eth0" the connection is recognized/made. But if I do a "rc-update add net.eth0 default" I get a message saying it's all there-but then its gone on reboot.

Any suggestions??
Alan Claunch
Back to top
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Jun 26, 2002 4:57 pm    Post subject: Reply with quote

My dhcpcd_eth0= line is commented out and mine works fine. Here's the start() section of my net.eth0...
Code:
start() {
   checkconfig || return 1
   local iface_args="$(eval echo \$\{iface_${IFACE}\})"
   local dhcp_args="$(eval echo \$\{dhcpcd_${IFACE}\})"
   local retval=0
   ebegin "Bringing ${IFACE} up"
   if [ "$(eval echo \$\{iface_${IFACE}\})" != "dhcp" ]
   then
      /sbin/ifconfig ${IFACE} ${iface_args} >/dev/null || {
         retval=$?
         eend ${retval} "Failed to bring ${IFACE} up"
         return ${retval}
      }
   else
      /sbin/dhcpcd ${dhcp_args} ${IFACE} >/dev/null || {
         retval=$?
         eend ${retval} "Failed to bring ${IFACE} up"
         return ${retval}
      }
   fi
   eend 0

   if [ -n "$(eval echo \$\{alias_${IFACE}\})" ]
   then
      local x=""
      local num=0
      local aliasbcast=""
      local aliasnmask=""

      if [ -n  "`eval echo \$\{broadcast_${IFACE}\}`" ]
      then
         aliasbcast="broadcast `eval echo \$\{broadcast_${IFACE}\}`"
      fi

      if [ -n  "`eval echo \$\{netmask_${IFACE}\}`" ]
      then
         aliasnmask="netmask `eval echo \$\{netmask_${IFACE}\}`"
      fi
      
      ebegin "  Adding aliases"
      for x in $(eval echo \$\{alias_${IFACE}\})
      do
         ebegin "    ${IFACE}:${num}"
         /sbin/ifconfig ${IFACE}:${num} ${x} \
            ${aliasbcast} ${aliasnmask} >/dev/null
         num=$((num + 1))
         eend 0
      done
      save_options "alias" "$(eval echo \$\{alias_${IFACE}\})"
   fi
   
   if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ]
   then
      ebegin "  Setting default gateway"
      /sbin/route add default gw ${gateway#*/} dev ${gateway%/*} \
         netmask 0.0.0.0 metric 1 >/dev/null || {
         
         local error=$?
         ifconfig ${IFACE} down &>/dev/null
         eend ${error} "Failed to bring ${IFACE} up"
         return ${error}
      }
      eend 0
   fi

   #enabling rp_filter causes wacky packets to be auto-dropped by
   #the kernel

   if [ -e /proc/sys/net/ipv4/conf/${IFACE}/rp_filter ]
   then
      echo 1 > /proc/sys/net/ipv4/conf/${IFACE}/rp_filter
   fi
}

Maybe something is missing in yours?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
friley
n00b
n00b


Joined: 27 Jun 2002
Posts: 8

PostPosted: Thu Jun 27, 2002 2:53 am    Post subject: Reply with quote

Did you comment out the "iface_eth0=" line?
Back to top
View user's profile Send private message
entropy
n00b
n00b


Joined: 27 Jun 2002
Posts: 32
Location: Denver, CO

PostPosted: Thu Jun 27, 2002 3:48 am    Post subject: Re: dhcpcd problem again Reply with quote

aclaunch wrote:
I have been trying to get Gentoo set up on my box and so far, things look promising. However, whenever I reboot dhcp does not come up.
I have uncommented the line in /etc/conf.d/net "iface_eth0=dhcp" however I did not edit the following line "dhcpcd_eth0="..." . Is that the problem??? Once I reboot and run "dhcpcd eth0" the connection is recognized/made. But if I do a "rc-update add net.eth0 default" I get a message saying it's all there-but then its gone on reboot.

Any suggestions??
Alan Claunch


iface_eth0="dhcp" should set the interface to use dhcp. The other option dhcpcd_eth0="" is for passing additional commands to dhcpcd. So, I would say that you probably wouldn't need to do anything special.

Try running 'dhcpcd eth0' and see if it's able to pick up an IP address (using ifconfig). If you're not getting an address, I would check to ensure that the nic driver is compiled into the kernel.

Here's what my /etc/conf.d/net looks like, dhcp seems to work fine after I added it to the default runlevel.:

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
#
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
#dhcpcd_eth0="..."

# For adding aliases to a interface
#
alias_eth0="192.168.1.3 192.168.1.4"

# For setting the default gateway
#
#gateway="eth0/192.168.0.1"
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Jun 27, 2002 4:35 am    Post subject: Reply with quote

friley wrote:
Did you comment out the "iface_eth0=" line?

Nope... has to be set for dhcp to work.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Fri Jun 28, 2002 6:51 am    Post subject: Reply with quote

i had this same problem when i installed gentoo on my other computer just now and it turns out it was a small oversight on my part.

at first i hadnt loaded the tulip module so i fixed that. then it turns out that i forgot to uncomment the iface_eth0="etc.etc.etc." line in /etc/make.conf. here's what YOURS should look like:

Code:
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
# dhcpcd_eth0="..."


the iface line should be UNcommented while the dhcpcd line should be COMMENTED.

just for shits and giggles, go ahead and do:

Code:
rc-update add net.eth0 default


dont know if it'll matter or not, but couldnt hurt ;) then go ahead and reboot and see what happens. quick test:

Code:
ping www.gentoo.org


if you get a reply, then yer all set :D

EDIT: dunno how knowledgable you are in linux, but the ping wont ever stop like in windows. you'll have to hit ctrl-c to stop it ;) not to insult you or anything, just that ive been working tech support for too long and it's my job to assume that everyone's technically uninitiated :P if you already knew that, kudos! pay no attention to me ;)

ryan :oops:
_________________
I used gentoo BEFORE it was cool.


Last edited by kraylus on Fri Jun 28, 2002 6:54 am; edited 1 time in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Jun 28, 2002 6:53 am    Post subject: Reply with quote

kraylus wrote:
i had this same problem when i installed gentoo on my other computer just now and it turns out it was a small oversight on my part.

at first i hadnt loaded the tulip module so i fixed that. then it turns out that i forgot to uncomment the iface_eth0="etc.etc.etc." line in /etc/make.conf. here's what YOURS should look like:

Code:
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
# dhcpcd_eth0="..."


the iface line should be UNcommented while the dhcpcd line should be COMMENTED.

just for shits and giggles, go ahead and do:

Code:
rc-update add net.eth0 default


dont know if it'll matter or not, but couldnt hurt ;) then go ahead and reboot and see what happens. quick test:

Code:
ping www.gentoo.org


if you get a reply, then yer all set :D

ryan

Can't hurt to double check, but he did post that he had tried these steps.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Fri Jun 28, 2002 7:02 am    Post subject: Reply with quote

very true, but he stated that he uncommented the line "iface_eth0=dhcp" not what's actually there, which is iface_eth0="dhcp". he may have been calling it from memory, he may not have been. i dunno. i'm a heckler for semantics tho and sometimes it's notta good thing. figured i'd go ahead and clarify anyways.

if he uncommented that line like he says he did, then really there's no reason for it to not work unless he tinkered with the any other files (especially if he can execute dhcpcd eth0 without a hitch) - but he didnt mention that so i assumed he didnt. the only thing that leaves is what's in /etc/make.conf.

which is why i posted what i did. didn't mean to be redundant :(

ryan
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Fri Jun 28, 2002 7:08 am    Post subject: Reply with quote

bahh, bloody netscape 4.7.

dunno if my other post is really here or not. basically, what i meant was to clarify on something. i didnt mean to appear redundant. tho it seems that i did and i apologize.

sorry bout that :( wont let it happen again :oops:

ryan
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Jun 28, 2002 7:32 am    Post subject: Reply with quote

No probs with me... thats why I said it doesn't hurt to double check. I have a tendancy
to assume "things in quotes" are different than quoting just the dhcp word. Probably a
bad habbit on my part. Thats why I try to use the quote or code features for posting.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Hxa. Dismal
Guest





PostPosted: Fri Jun 28, 2002 8:34 pm    Post subject: ether_zones Reply with quote

mrproper -w && | > A R F ?
Redundancy - insistant re-posting as code every prior message line

Syntax correctness - not restricted to command prompts

Guru - ism - not awarded soley as result of English as favoured 2nd language

B.C. web/dev - Grad of U of Ozarks ?

--------------------------------------------------------
The truth is "OUT" there
Back to top
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Jun 28, 2002 8:41 pm    Post subject: Re: ether_zones Reply with quote

Hxa. Dismal wrote:
mrproper -w && | > A R F ?
Redundancy - insistant re-posting as code every prior message line

Syntax correctness - not restricted to command prompts

Guru - ism - not awarded soley as result of English as favoured 2nd language

B.C. web/dev - Grad of U of Ozarks ?

--------------------------------------------------------
The truth is "OUT" there

He's sending secret messages to the evil aliens... GET HIM!!! :D
Just kidding... I didn't understand what you posted.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Hxa. Dismal
Guest





PostPosted: Fri Jun 28, 2002 9:26 pm    Post subject: ln -f /dev/null /boot/.boot.0308 Reply with quote

loopback -tail f
cd /home/zones/ether/twi_lite

bash >
04:19:31.8000000 1.2.3.4 > 192.168.5.5: icmp: echo reply (DF)
4500 0028 b5cb 4000 fe01 b229 0102 0304
c0a8 0505 0000 bc9c bf3c f001 0018 f81b
000d d5f0 000d 63e8 0000 0000

cat kbd_dev |>URL "Code"

cron -daily rm -r /

cd /dev/null
Back to top
ismark
Guest





PostPosted: Sat Jun 29, 2002 3:17 am    Post subject: dhcp option Reply with quote

can i put a option into /etc/conf.d/net -->dhcpcd_eth0="..."?

if yes, what option i need put? (I don't want update resolve.conf when dhcpd get a ip.)

thank you very much
Back to top
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum