Reconnect to Internet?
Chris Mahoney (1684) 2100 posts |
Apparently the Ethernet cable on my Pi is a bit loose – the cable had become unplugged and I didn’t notice until today when I tried to use NetSurf. I’ve reconnected the cable but it seems that while I have a local network connection, I can’t get much further. *DHCPExecute -b ej0 succeeds and I have a local IP address. I can ping other machines on my network without trouble, and I can do DNS lookups. However, NetSurf reports “Couldn’t connect to server” for any external site. Pinging any external site (whether by name or IP address) reports “sendto: No route to host”. I’m sure that I can fix this by rebooting, but I’m just wondering whether there’s a better way. Is there some command/setting I can use to force RISC OS to reconnect “fully”? |
Chris Mahoney (1684) 2100 posts |
I’ve noticed that Configure/Network/Internet/Interfaces/Status has “Gateway: Unset”. This should be picked up via DHCP – does it look like this is the problem or does it normally report Unset for a DHCP connection? |
Chris Evans (457) 1614 posts |
I know Gateway MUST be left blank in !Configure if DHCP is in use. Sounds like *DHCPExecute -b ej0 doesn’t set the Gateway. I wonder if the right DHCP command will set it or it could be manually set until the next boot? |
Chris Mahoney (1684) 2100 posts |
I rebooted. The Status window now shows the gateway IP address, and not “Unset”. It looks like that was indeed the issue, but I didn’t see any way to manually set it without disabling DHCP entirely. |
Chris Hall (132) 3504 posts |
I found this too: unset DHCP, set gateway manually, then reset to DHCP worked. Pure DHCP sometimes didn’t. Lord knows why. |
Steve Pampling (1551) 7932 posts |
Strange. The only time I’ve seen that type of thing is when the DHCP server was the other side of a gateway that didn’t have a fully working DHCP broadcast relay setup.1 The result being that a machine with a manually set IP that was switched to DHCP could communicate by IP using the ‘legacy’ of the manually assigned IP – even one that wasn’t native to that network segment2 but the normal D.O.R.A sequence starting with a broadcast didn’t work. Set the relay correctly and it all worked every time If you have a PC handy run wireshark on it and capture the traffic with a display filter of BOOTP 3 and check the fail sequence and success sequence. 1 DHCP starts by the client broadcasting a request for an IP so if the DHCP server is elsewhere the gateway has to encapsulate the request and forward it as an IP packet to the server. |