element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 No IP address via DHCP
  • 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
  • Replies 11 replies
  • Subscribers 666 subscribers
  • Views 3489 views
  • Users 0 members are here
  • raspberry_pi
Related

No IP address via DHCP

Former Member
Former Member over 12 years ago

Hello everyone,

 

I have got two PI’s two weeks ago and yesterday tried to get Ethernet working.

Fresh raspbian OS is used.

I am using a cable modem that is DHCP capable (my laptop gets dynamic IP without problems). Ethernet cable is also fine – tried with the laptop.

Connecting it to PI and booting, I see the “link” light and “100” light ON.

The IP address is not available.

I checked /etc/network/interfaces:

auto lo

 

iface lo inet loopback
iface eth0 inet dhcp

 

Tried to change to:

 

auto eth0
iface eth0 inet dhcp

 

Did not help also.

 

On the booting log I see:

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5

5-6 such messages, then:

No DHCPOFFERS received

 

I tried to reduce power consumed by PI (took away the USB mouse and keyboard), did not change anything. I am using 5V 1A power supply.

 

Any idea what the problem might be?

  • Sign in to reply
  • Cancel
  • wallarug
    wallarug over 12 years ago

    You need to connect your RPi to a TV before you can SSH into it. 

     

    You need to do a first configuration via raspi-config

     

    This will come up on boot.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to wallarug

    No, it is the modem/switch.

    What confused me, that I tried to boot PI connecting it directly to the cable modem and it did not get any IP. I forgot that the IP given before to my laptop, is kept for a while and new IP was obviously not given.

    Power cycle of the cable modem and connecting a PI directly to it or via switch, solved the problem, it got IP. Laptop connected after this, did not get an IP...

    So in reality it is a problem of the cable modem/switch – only one IP via DHCP.

    I have used this switch with several PC those had static IPs and is surprised it does not work with DHCP.

     

    I have a monitor connected to PI.

    One can change raspi-config or /etc/network/interfaces and reboot. The same effect.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Usually, the range of dhcp ip adresses in a router is adjustable. Maybe your modem/router only has one ip available for dhcp.

    A solution could be to place a router behind the existing modem/router combination and connecting your devices to that.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Your laptop may not be configured to send internet connection to your raspberry pi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    I will try to find how to increase the number of IP addresses in this modem.

    One can place a router behind it but one needs to have it first.

    Why a laptop should not be able to send internet connection to PI?

    It can connect via SSH to any host that allows it. Host (PI, in this case), not laptop.

     

    No, the problem is I saw that PI did not get an IP address at all.

     

    I think the case is now clear - I need to increase number of IP addresses in the modem.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GreenYamo
    GreenYamo over 12 years ago in reply to Former Member

    Hi Oleg,

     

    Your problem seems very similar to the one here on the RasPi forum: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=15739

     

    It would appear in both cases this is a hardware problem - a faulty Pi.

     

    I'll be honest and say in all the time I have been messing around with (small)  networks, a lack of available IP addresses via DHCP has never happened to me. Do you have an opportunity to borrow another Raspi and try with your SD card etc ?

     

    Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to GreenYamo

    Hi Steve,

    I actually have two Pi's and tried both. The same problem.

    One needs to to try increasing the range of IP addresses of the cable modem. Hope it is possible.

    I do not remember it was anywere written when I made a contract for Internet connection.

     

    Regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Dear Oleg:

     

    If it were me, I would try this.

     

    1. Write down the ipaddress, netmask, gateway and dns servers (there should be two) given to your laptop and disconnect the laptop.

    2. Using ifconfig, set the Pi to the same address that was assigned to the laptop and command it to be up.

      ifconfig eth0 192.168.x.y netmask 255.255.255.0 up

    3. Ping the gateway, which if you have a home network similar to many will be something like 192.168.1.1 or 192.168.1.254

     

    If this works, then you know the Pi works and the issue is with the home network. If this doesnt work, then more diagnosis of the Pi is indicated.

     

    In California, usually when one subscribes to cable service with a cable modem, one gets 5 DHCP addresses as a default. I would consider it unusual to have only one.

     

    Charles

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gdstew
    gdstew over 12 years ago in reply to Former Member

    The problem you are seeing is in the modem or the way the ISP handles DHCP. I have a Time Warner Cable modem (Motorola SB5100 SurfBoard)

    that makes me do the same power cycle thing whenever I change which computer it is connected to: Rasperry Pi, one of several PCs, or laptop.

    I'm not sure about needing to get another a IP address to fix it. It might be tied to the MAC address as a way to prevent multiple computers using

    the same modem through a simple non-managed Ethernet switch to "encourage " you to rent a router or a modem with a router from the ISP.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    From your decription, you have a cable modem *not* a gateway/router.  For multiple devices to be connected at the same time, you need to have a gateway or router to nat one of the private networks (10.x.x.x/192.168.x.x/172.16.x.x) to the public address you get from the cable modem.  Sometimes the modem/router is combined into a single device.  Provide (or google) the model number of your cable modem to find out if it is a gateway/router or modem.  The most common private range used is 192.168.1.x or in CIDR format 192.168.1.0/24.  It is also possible that you have a gateway but it's configured to only serve up one IP address.  This is sometimes done by providers as a security feature.  If this is the case and you have access to the configuration ui of the cable router, then you should see if the lan dhcp configuration has a limit of number of addresses set to 1.  Good luck.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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