element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Raspberry Pi 2, B, 1gb. Raspbian date 5.5.15. DHCP request for IP times out in init. Unable to access net
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 8 replies
  • Subscribers 665 subscribers
  • Views 486 views
  • Users 0 members are here
  • raspberry_pi
Related

Raspberry Pi 2, B, 1gb. Raspbian date 5.5.15. DHCP request for IP times out in init. Unable to access net

Former Member
Former Member over 10 years ago

Trying to find 'netctl / Ethernet-dhcp' to add 'Timeout = 20'. Can't locate 'etc/netctl' folder. I think I just need a little more time to get an IP from the router. I've looked over 'ifconfig', it's missing an IP for eth0.

 

When I watch the initialize text, I get a lot of 'naks', and finally branches somewhere, I don't remember the exact text. (CRS disease).

 

Thanks,

 

Joe

  • Sign in to reply
  • Cancel
  • clem57
    0 clem57 over 10 years ago

    20 seconds is plenty. I would check the cable for kinks or bad connections. Make sure the cable clicks when inserted.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    Hi Clem,

    Twenty seconds would be plenty, if I could find where to add the command. As it is the DHCP request times out at about ten seconds. I've tried three other known good cables. I have another older PI on the same system running xastir for APRS with no problems. Noob here, so be kind. I found a reference about adding the command 'timeout = 20' in another discussion, the file was supposed to be in 'etc / netctl', but I can't find 'netctl'.

     

    ifconfg lacks an IP address for eth0.

     

    sudo apt-get update don't work, ping 8.8.8.8 yields 'network unavailable'

     

    Joe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to Former Member

    Please try to do this: http://www.suntimebox.com/raspberry-pi-tutorial-course/week-3/day-5/

    You need to know what is the router IP and set that as the gateway address.

    Netmask is almost always 255.255.255.0

    Pick some IP that you KNOW is not used. Usually your raouter can show all used IP's

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    Thanks Clem, but, this Pi is going to a remote location at a repeater site. I do not have access to the building at all times. I can't use a static IP because other equipment comes and goes. I'm still looking for an answer to my original question, the location of the DHCP file 'Ethernet-DHCP' which was reported in etc / netctl, but no such folder (netctl) exists in the file folder of my PI. The goal is to add a command that would extend the DHCP resolve time for obtaining an IP from the router. (timeout = 20). The present setup may work fine with the router at the repeater location, but I will have limited time to install everything, and I want it to work the first time.

     

    Joe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    There no such folder (/etc/netctl) nor file (Ethernet-DHCP) any where under the root ( / ) file system in the latest Raspbian based on Wheezy 7.8.

     

    Could you share your /etc/network/interface file contents?

     

    Also, share the output of `grep eth0 /var/log/syslog*`.  Ditto for /var/log/dmesg.

     

    Have you tried switching Ethernet cables with the Pi (or other computer) that is working okay?  Does the issue switch?  If so,it would be a hardware cable problem.

     

    ------------------------------------------------------

     

    Found a reference with the DHCP client parameters here: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/dhclient.conf.5?query=dhclient.conf&sec=5

    This applies to file /etc/dhcpcd.conf.

    Experiment with that file, assuming that you are using a good cable.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    By the way, I found the dhcpcd.conf parameter documentation by googling dhcp client parameters.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    And do not forget to restart the dhcp client daemon after editing that configuration file before re-testing:

    sudo service dhcpcd restart

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 10 years ago in reply to Former Member

    Joe,

     

    You seem to think that adding the longer timeout is going to solve all your problems. It is not.

     

    Ten seconds is PLENTY time for a router to respond to DHCP requests. ten seconds is PLENTY for everybody else.

     

    So when clem suggests that you try a static IP address that is to help you diagnose the real problem. We're hoping that using a static IP address works-or-not.

     

    If it works, that means that the hardware is working fine. So we can concentrate on helping you find why your router is not giving your pi an IP address.

     

    If it doesn't work, that is a valid result too. It means we can concentrate on hardware problems that prevent your pi from reaching your router.

     

    A "hypothesis" of mine that is compatible with the observed facts is that both your pi and the router do not offer auto-crossover-cable-detection. (Most modern routers/hubs do, I don't know if the 'pi does. ) And then you've used a crossover cable where you shouldn't have. (or the other way around). Whereas, the other devices you used to test that cable DID do automatic crossover-compensation...... It's an unlikely scenario, but possible. It's worth considering after you've tested you're unable to communicate after setting the IP address manually.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube