Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have used ethernet cable to connect to a modem for internet connection to my raspberry pi. I am getting error messages when trying to open a page. when i tried sudo ifup eth0 i got this error message:

listening on LPF/eth0/b8:27:eb:82:78:a9
sending on   LPF/eth0/b8:27:eb:82:78:a9
sending on   Socket/Fallback
DHCP discover on eth0 to 255.255.255.255 port 67 interval 6
DHCP discover on eth0 to 255.255.255.255 port 67 interval 12
DHCP discover on eth0 to 255.255.255.255 port 67 interval 15
DHCP discover on eth0 to 255.255.255.255 port 67 interval 20
DHCP discover on eth0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS recieved.
Unable to obtain a lease on first try. Exiting.
Failed to bring up eth0

Thank you.

PS: I wanted to play youtube on my old tv.

share|improve this question

4 Answers 4

up vote 3 down vote accepted

If you get the same error as i got, try these steps:

  1. Start your Raspberry pi with the ethernet connected to your laptop.
  2. Then see that your system is sending packets to the pi. It does not matter if the pi is sending some packets or not.
  3. Then remove the ethernet connected to the end on the laptop and connect to the modem while its still running.
  4. Run this command after few seconds( say 5 seconds ). ifconfig , you can see that the pi is sending packets to your modem as well as it is receiving from the modem. (don't worry if its not, you will get it in the next step).
  5. At last set the ip address of your pi as sudo ifconfig eth0 192.168.1.X netmask 255.255.255.0

I think this issue was because other OS(like linux & others) will set the subnet mask as 255.255.255.0 and send the packets whereas raspberry pi was sending it as 255.255.255.255 which would lead the modem to reject the packet for DHCP configuration. Check for the network by pinging to google or somewhere outside your LAN. This worked for me. Please answer if any solutions found. Thank you.

share|improve this answer
    
and also vote. if you found it helpful. Thanks a lot. –  thanmai Jan 10 '13 at 9:54
    
I tried using your solution, but it didn't work for me. ifup eth0 still pings 255.255.255.255. Is there any other way to change it to 255.255.255.0? –  Arjun Bajaj Nov 13 '13 at 15:09
    
Did you try this: sudo ifconfig eth0 192.168.1.x netmask 255.255.255.0 –  thanmai Nov 15 '13 at 5:08
    
you can edit: /etc/network/interfaces change the netmask to 255.255.255.0. This will change netmask permanently. –  thanmai Nov 15 '13 at 5:11

The DHCP server of your LAN doesn't seem to reply.

You have several solutions:

  • Enable a DHCP server on your LAN. It will return an available local IP address to any device who ask for. Typically, it is already implemented inside your modem. Just check if it is enabled.
    With another computer, please have a look in the web interface of your modem/router: http://192.168.0.1 or http://192.168.1.1 are common IP addresses used for modems/routers.

  • Set a unique IP address to your RPi. But I would not recommend if you are not familiar to network configuration.

share|improve this answer
    
I am not able to login to the modem. It requires a username and password which i don remember. I tried using different ip address, changing to static ip address in the /etc/network/interfaces. In the wiki page elinux.org/RPi_Hardware_Basic_Setup under the Internet Connectivity they have said that "raspbian will interpret that as a 255, not as a '0' " that as in the subnet mask –  thanmai Jan 3 '13 at 16:09
    
@thanmai What IP addresses have you tried? Did you restart the network interface after updating /etc/network/interfaces (sudo ifdown eth0 && sudo ifup eth0)? What is your LAN IP address? –  Morgan Courbet Jan 3 '13 at 16:30
1  
yes i tried restarting it. But that did not work. Now i tried ifconfig eth0 192.168.1.10 subnetmask 255.255.255.0 that also was not working and when i restarting the system. It worked like a charm. I undid the file contents of /etc/network/interfaces one. Thanks for the help. –  thanmai Jan 3 '13 at 16:35
    
@thanmai Maybe the Ethernet wire was not well plugged during startup, so the DHCP server couldn't be reached. –  Morgan Courbet Jan 3 '13 at 16:58
    
@thanmai By the way, could you please post your comment as an answer, and accept it? It will help people with the same problem to have immediately an answer without looking in the comment :) –  Morgan Courbet Jan 8 '13 at 10:05

You might have hardware issues here as well. The one I experienced was about some weird interference between my wi-fi dongle and wireless keyboard/mouse. Basically, wi-fi didn't work until I replaced wireless keyboard with a wired one. Probably that's because of power consumption, but it's not very likely because I use powered USB hub. Maybe it's because of something else... Anyway, in your case I think it's worth to try to use other external devices.

share|improve this answer

I had the same problem, after spending a night with all changes to interfaces file etc, I found it is a network cable problem.

Please check if Link led is glowing on your raspberry, if not, please try changing your network cable before attempting configuration changes. In my case it worked - hop it helps some people.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.