Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Network configuration

Fri Jun 13, 2014 9:31 pm

I haven't used my pi for a while as I've been away. I couldn't get it to connect to my network so loaded a new image onto the SD card. The router can see the pi - I recognise the mac address in the list of devices the router sees. ifconfig hasn't set an ip address for eth0 so pinging out from the pi fails to any other machine on the network, including the router. The router thinks dhcp has set an address - 192.168.1.70 which is sensible, but pinging that doesn't get a response.

interfaces has eth0 as dhcp, but it doesn't seem to talk to the router.

having added ip=192.168.1.199 to /boot/cmdline.txt I get no response when I ping from my laptop. If I connect the pi direct to my laptop, I get a successful ping to above address. Does this mean my network isn't playing fair? For info, it is a Technicolor gateway TG582n router doing the dhcp.

Help appreciated!

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Fri Jun 13, 2014 10:30 pm

Have you checked the wire? Do you get lots of lights on both ends?

Are you sure you've got the subnet right? Check with an ipconfig /all command on Windows.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Sat Jun 14, 2014 9:24 pm

Subnet is 255.255.255.0 on the network, I've not actively set it on the pi, shouldn't dhcp look after that?
I've tried three wires, the two I've just swapped in were taken from known working machines. The lights on the pi are pretty much solid with just occasional flashes on the link led.

the only clue I have that there is any network communication is on the router which lists the pi as inactive, although I'm not sure when that was picked up. I'm also pretty sure the router has indicated more than one mac address for the pi .

Thanks!

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Sun Jun 15, 2014 12:16 am

255.255.255.0 is NOT the subnet, that's the netmask.

The subnet is the first 24 bits of your IP address.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Sun Jun 15, 2014 1:26 pm

Ah, sorry, I am a beginner! Sub net is same on all devices, router included. - 192.168.1

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Sun Jun 15, 2014 3:53 pm

A bit more info..... I've got another sd card, with xbmc installed on it - clean image again. It seems to negotiate an ip address - both the router and pi have same 192.168.1.237 ip adress for it. Mac address is reported as busy; I've no idea what that means. However, I can't get a response from pinging that adress from laptop.

At one stage, Fing saw the pi, from my ipad. Not sure what that uses to look for devices. That was probably when xmbc first ran, or soon after.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Sun Jun 15, 2014 5:05 pm

I've left the raspbmc xbmc powered on, showing the network iformation screen. It shows MAC address:busy and Internet: busy for most of the time. Every few minutes, for a few seconds, the mac address of the pi appears! Wehn this happens internt:Not connected. Check network settings is also reported. Are these two messages consistent, or is something changing on my network? Not sure what though.

Thanks!

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Mon Jun 16, 2014 10:35 pm

With a 24-bit netmask you can have addresses from 192.168.1.1 to 192.168.1.254 for the devices on your network (.255 is the broadcast address and it's not a good idea to use the .0 address).

Every one of those 253 devices needs to have a unique address within your LAN/intranet or things WILL go badly wrong. You should also avoid using static addresses that overlap with your DHCP (dynamic host configuration protocol) pool of addresses.

Start at your router, reduce the range for DHCP. If your router supports static address assignment then add the MAC addresses for EVERY system that needs a static address to that static address assignment table.

Restart everything (including the router) so that all existing DHCP leases expire and you should be good to go.

If your router doesn't support static address assignment then you'll need to do the static addresses by editing configuration files. On your RPi running Raspbian that's /etc/network/interfaces.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Tue Jun 17, 2014 7:50 pm

Thanks for the reply but still no network.

DHCP is limited from 160 to 252
I have a few devices with static IP in the 150's
I have set the pi to 192.168.1.50
Router dhcp leases have all been renewed and router was re-started.
the pi still cannot ping anything and I cannot ping the pi.
The router can see the pi - the mac address is reported on the correct port of the switch, but the ip address is set to 0.0.0.0
The link LED on the pi is on, but blinks of maybe once a second.
What next, (Oh, and thanks so much for your help :) )

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Tue Jun 17, 2014 8:21 pm

Can you post the output from
cat /etc/network/interfaces
route -n
ping -c3 192.168.1.150 # pick one of the machines with a static address
ping -c3 8.8.8.8
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Tue Jun 17, 2014 9:21 pm

For info, leaving the pi connected to the network, the ip address eventually (2 hours since previous post) is stored in the router, but no pings either way get returned. The frustration is that this worked just great previously.
Is there an easy way to save output from pi screen when not networked? I've (obviously) typed the following outputs, so apologies for typos.

interfaces:
auto lo

iface lo inet loopback

iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.254
network 192.168.1.0

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface

ping 192.168.1.150 [a media streaming device which i get normal Pings back from laptop]
connect: Network is unreachable
(This works OK from laptop)

ping -c3 8.8.8.8
connect: Network is unreachable

Thanks again :)

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Tue Jun 17, 2014 9:31 pm

Are you using ethernet or WiFi?

Add
auto eth0
if you're trying to use ethernet.

To get the network running right now use
sudo ifup eth0
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Tue Jun 17, 2014 10:06 pm

I'm still using ethernet. (We talked about changing leads earlier up the thread)

I've added the auto eth0

I tried the ifup command but didn't get much further.

The routing table now has:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

I still can't ping in or out.

Thanks for the support, you've got some patience!

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Tue Jun 17, 2014 10:09 pm

Is 192.168.1.254 your gateway?
Can you ping that machine?
ping -c3 192.168.1.254

Have you looked at other machines on your network to check what gateway and what netmask they're using?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Tue Jun 17, 2014 10:31 pm

Yes, 192.168.1.254 is the router.
destination Host unreachable when I ping it from pi.
normal response when I ping it from laptop.

Another machine with fixed ip has
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.152
gateway 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

I've tried the ping from the pi twice more. Once I got 0 responses from destination. Third time I got some responses, and some destination host unreacables giving 96% packet loss. Something is really inconsistent.

any ideas?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Tue Jun 17, 2014 11:21 pm

Try a new cat5 cable.
Try the cable wired directly from your RPi to your laptop.
Try your laptop wired to your router.
Check for green lights on both ends in all cases.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Wed Jun 18, 2014 8:28 pm

Using the pi's network lead connected into the laptop (wireless turned off) I'm able to use this connection with no problems at all, this post sent this way - to me this says everything up to the pi is OK. So is the pi faulty?

New lead from router to pi, destination host unreachable when pinging out, but later gives occasional returned pings, seems to be about 95% packet loss

With cable to laptop direct, i can ping both ways with 0 packets lost. So this further confirms the cable is ok.

so, any thoughts on a possible cause of the problem?
thanks!

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Network configuration

Wed Jun 18, 2014 8:33 pm

Have you checked that the power supply is really giving you the volts/amps that it claims to provide? Have you tried an alternative USB-A to microUSB cable (to eliminate any losses in that one).

When nothing makes sense the first thing to check is the power supply for your RPi.
The second thing is the X1 crystal. It sometimes needs a sharp tap to get it oscillating.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Wed Jun 18, 2014 9:31 pm

I've got 4.9V across tp1 and tp2, so no problems with power supply. I've tried a couple of others just to make sure.

I've just been reading up on X1 issues. I've got keyboard and mouse working ok on the usb, which I wouldn't have if x1 was stuck?

the frustration is that it was all working fine but stopped with no apparent changes and wont get going again, despite all of your assistance!

Pooh_r
Posts: 14
Joined: Fri Jun 13, 2014 9:07 pm

Re: Network configuration

Mon Jun 23, 2014 5:40 pm

Hi dougie,

Just a quick note to express my thanks for your help! :)
I have now confirmed that there is a hardware fault, having been able to borrow another pi from a collegue, which works perfectly with my power supply, network leads and SD card. I'll be looking for a replacement tomorrow.

Thanks again for eliminating many other possibilities :D

Pooh

Return to “Beginners”