Author Topic: The big 'ole Raspberry Pi topic  (Read 26912 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6558
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #165 on: April 21, 2015, 12:11:29 am »
Ehm, Cue, save yourself some trouble;  set the static ip's at router/AP level.
It'll be better for your sanity, trust me.
You're (as TB-AV noted) seemingly dealing with separate subnets here, which is odd.
And it will complicate things.

As a question : why in the name of RNGsus' joynuggets is the router outside ?
And to pose another one : why are there several routers/AP's in the network ?

Hell, if you need more personal help in Dutch, you know how to contact me  8)
"You need a little bit of insanity to do great things"
--Henry Rollins

Offline Cue Zephyr

  • All Time Legend
  • *******
  • Posts: 6972
  • Good Vibes 90
  • Who's picking the banjo here?
    • Ezyo Music
Re: The big 'ole Raspberry Pi topic
« Reply #166 on: April 21, 2015, 09:32:20 am »
"Outside" means outside the front door, that's where the power control and fuses are located, as well as the fiber connection box.

Note that home1 and home2 are different networks in different locations. ;)
For home1, the dhcp pool is 0.2 to 0.100, for home2 the pool is from 1.2 to 1.100 so yes you are right, but it doesn't matter for now. I will see if I can reconfigure one of the routers to match the subnets to make life easier.

As for router-level static IP assigning, one of the routers can do this, the other is so non-feature packed that it can't do that (it's a xx--xx ass Davolink box).

So from what I understand, if I want this to work from the Pi, regardless of which network I'm on, I should add the subnet (like 255.255.255.0) and gateway (like 192.168.1.1 or 0.1) IPs, correct?
Guitar, banjo, mandolin and piano, bass and percussion only when needed
Production and mixing

Offline Majik

  • Stadium Superstar
  • ******
  • Posts: 1930
  • Good Vibes 107
Re: The big 'ole Raspberry Pi topic
« Reply #167 on: April 21, 2015, 10:11:56 am »
Dan is right: you are far better off configuring the IP address with DHCP and fixing the IPs from the router if you can.

By the sound of it you can't with one of your routers, but it's going to make your life a lot easier if you can replace it with something better. ADSL routers are pretty cheap these days, especially on ebay.

One problem with manually configured addresses, as you have found, is that it's not practical to move a device with a static address to a new network with a different IP address range. Yes, changing the two addresses so the ranges match should work, but it's a bit of a hack. DHCP is the real answer here.

I've only been looking at it in more depth on one router, but when it's set to dhcp, virtual hosts (port forwarding) works, but once I set "address" to something like 192.168.1.113 (outside the dhcp pool), I can find it on LAN (from my computer or from my phone), but the router doesn't want to forward to it (so I can't access it from outside the network unless it's set to dhcp)

...

route -n says the gateway is 0.0.0.0, so that basically means it's got no gateway to the outside world, right?

I think you are on the right track here (although all would be solved by using DHCP).

I'm guessing your subnet is 192.168.1.xxx in which case 192.168.1.113 is fine as an IP address.

The route appears to be the problem, which is why you can find it on your LAN but not communicate beyond that.

Regarding the netmask, this is used in conjunction with the IP address to determine which other IP addresses are in the same subnet (assumed to be on the same LAN). For those IP addresses it will communicate directly on the LAN without using routing tables. For all other IP addresses it will use routing tables. Under normal circumstances you should have the same netmask for all computers on your LAN.

In your case the netmask is probably 255.255.255.0 (also known as "/24").

Your netmask is almost certainly correct. Unless you've configured it otherwise, as the default for the 192.168.x.x range is normally 255.255.255.0 but it's worth checking.

The real problem appears to be routing (used when the IP address is outside your LAN range). For your purposes you need a "default route"  which points at the IP address of your router (aka "gateway"). This is basically saying "for all other addresses send it to the router to deal with".

You can configure that temporarily using:

sudo route add default gw 192.168.1.1

(assuming 192.168.1.1 is your router IP address).

However, that will not survive a reboot.  To make it survive a reboot you need to a configuration to the configuration files somewhere, such as /etc/network/interfaces where something like this should do it:

gateway 192.168.1.1

Or get a better router and just use DHCP which does this stuff automagically.

Cheers,

Keith
Guitars: PRS Singlecut S2, Fender Tele Lite Ash, G&L Legacy Tribute, Freshman Apollo 2 OCBX
Amps: Bugera G5 Head, Boss Katana 100
All sorts of other stuff.

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 14966
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #168 on: April 21, 2015, 01:30:00 pm »
http://www.instantsupportsite.com/self-help/raspberry-pi/raspberry-configure-static-ip-eth0/

https://www.raspberrypi.org/forums/viewtopic.php?f=27&t=18907

http://www.megaleecher.net/Fixed_IP_For_Raspberry_Pi


Cue, I think you are just missing your gateway... IOW, the address is just sitting there not knowing what else is out there.

I would try
192.168.1.113
255.255.255.0
192.168.1.1

192.168.0.113
255.255.255.0
192.168.0.1

but those links seem to have a few other settings you may try as well.
Gone

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6558
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #169 on: April 21, 2015, 05:47:38 pm »
What you can try to find things in the network is a simple app for your phone;  Fing works well for me on Android https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en and i hear the apple version works just as well : https://itunes.apple.com/en/app/fing-network-scanner/id430921107?mt=8
"You need a little bit of insanity to do great things"
--Henry Rollins

Offline Cue Zephyr

  • All Time Legend
  • *******
  • Posts: 6972
  • Good Vibes 90
  • Who's picking the banjo here?
    • Ezyo Music
Re: The big 'ole Raspberry Pi topic
« Reply #170 on: April 21, 2015, 10:40:27 pm »
Great explanatory work Majik, that's extremely clear - thanks!

The problem is, is that I do have a spare router (NetGear, useful little box), but the ISP (Tele2, Dan may have heard of it) requires login that is embedded within the firmware of the Davolink router and I'm not sure if it's worth having a swing at hacking it so another router can be used with the same credentials.

The router on the 0.x network may be advanced enough to set static IPs at router level. I think it's a fairly recent (<5 years old) Sitecom model.

I'll try to set a static IP at router level on the Sitecom. The online Davolink manual says to do it on the device itself. So I might end up with just one primitive static IP setting.

Once I get that to work, I have to figure out how to make the Pi autoconnect to the nearest known network instead of attempting to connect to the first one in the list (which it does now).
Guitar, banjo, mandolin and piano, bass and percussion only when needed
Production and mixing

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 14966
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #171 on: April 21, 2015, 10:44:56 pm »
The links I gave above show you how to set priority as to which will connect first.
Gone

Offline Cue Zephyr

  • All Time Legend
  • *******
  • Posts: 6972
  • Good Vibes 90
  • Who's picking the banjo here?
    • Ezyo Music
Re: The big 'ole Raspberry Pi topic
« Reply #172 on: April 22, 2015, 05:49:41 pm »
AV,
Thanks. I've consulted that topic before. Turns out the "disabled" attribute was set for some reason.
After adding netmask and gateway IPs, it seems to autoconnect which i tested with a few wlan0 re-initializations.
I might however still attempt to hack the Davolink and swap it out for the NetGear just for the heck of it. :P


Sent from my iPhone using Tapatalk
Guitar, banjo, mandolin and piano, bass and percussion only when needed
Production and mixing

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 14966
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #173 on: April 22, 2015, 05:56:37 pm »
If you are switching out a router that your ISP 'controls' be sure you can register the new MAC address with them. Also, a lot of times, they will tell you what to get or may even give you a more modern router just for asking.
Gone

Offline Cue Zephyr

  • All Time Legend
  • *******
  • Posts: 6972
  • Good Vibes 90
  • Who's picking the banjo here?
    • Ezyo Music
Re: The big 'ole Raspberry Pi topic
« Reply #174 on: April 22, 2015, 08:57:53 pm »
I think the credentials are there to lock you into using that router. The 'hack' that I found is actually quite a hack; it requires hard-resetting the router and re-installing firmware. Whilst doing that you have to monitor through FTP to intercept a file that is only momentarily available, which contains the credentials that can be plugged into a different router.
Guitar, banjo, mandolin and piano, bass and percussion only when needed
Production and mixing

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 14966
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #175 on: April 22, 2015, 09:23:38 pm »
Seems like it would be a lot easier to just have them upgrade the router. If it's that old it probably doesn't even support newer standards they may be using.

Plus if you have to flash it you also run the risk of bricking it... and bricking your new router.

I've almost done that with one I'm using now.... I had to 'catch' the router at just the right time... and I actually got lucky but it's easy to basically render them useless.

Gone

Offline Majik

  • Stadium Superstar
  • ******
  • Posts: 1930
  • Good Vibes 107
Re: The big 'ole Raspberry Pi topic
« Reply #176 on: April 22, 2015, 09:33:34 pm »
I think the credentials are there to lock you into using that router.

It's actually nothing do do with restricting you to their router (although they may be taking advantage of the mechanism to do that).

If it's ADSL then it works in a very similar way to an old-school dial-up modem, using PPP protocol.

The line and the core network equipment is often provided by the local telephone company who resell the capability to various ISPs.

When you connect, the ADSL modem creates a PPP connection with the telephone company's "BRAS" (Broadband Remote Access Server) which uses the domain part of the username in the credentials to work out which ISP to connect you to. The credentials are then used to validate and select your account (e.g. for billing purposes) with the ISP.

This is different from "DOCSIS" Cable modem type service where you connect to a shared access network (shared with your neighbourhood). In that case they use the modem MAC address to tie you to the network. With ADSL there is no MAC address so they have to use PPP credentials.

Cheers,

Keith
Guitars: PRS Singlecut S2, Fender Tele Lite Ash, G&L Legacy Tribute, Freshman Apollo 2 OCBX
Amps: Bugera G5 Head, Boss Katana 100
All sorts of other stuff.

Offline Cue Zephyr

  • All Time Legend
  • *******
  • Posts: 6972
  • Good Vibes 90
  • Who's picking the banjo here?
    • Ezyo Music
Re: The big 'ole Raspberry Pi topic
« Reply #177 on: April 22, 2015, 10:39:11 pm »
Great stuff Majik, thanks.

I'll see if there's a chance to get a new router. The Davolink is a rented router (from the ISP) and AFAIK you don't need to flash the router that replaces it. Bricking it would be a bit of a tricky reason to ask for a new router though. ;D
Guitar, banjo, mandolin and piano, bass and percussion only when needed
Production and mixing

Offline Majik

  • Stadium Superstar
  • ******
  • Posts: 1930
  • Good Vibes 107
Re: The big 'ole Raspberry Pi topic
« Reply #178 on: April 25, 2015, 11:06:33 am »
Cue,
I would check with the ISP, as they may be happy to give you the credentials to use with your own router. ADSL service providers normally seem much happier about doing this than Cable Internet providers in my experience.

Cheers,

Keith

Sent from my Nexus 7 using Tapatalk

Guitars: PRS Singlecut S2, Fender Tele Lite Ash, G&L Legacy Tribute, Freshman Apollo 2 OCBX
Amps: Bugera G5 Head, Boss Katana 100
All sorts of other stuff.

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6558
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #179 on: April 27, 2015, 02:49:36 am »
Don't bother if Tele2 is the ISP cue, these xx--xx are about as cooperative as an observant Jewish man being fed a bacon sandwich...
Why don't you just put the netgear behind the davoxx--xx router, turn off the WiFi on the Tele2 junk, and use the netgear as the AP ?
Also, don't brick the Davolink, they'll just send you another one.
Better yet : ditch Tele2 ASAP and switch to either fibre, cable or a better A(or V)DSL provider.

@ Keith : Unfortunately, Tele2 denies their customers access to the login data for the sole reason of not having to troubleshoot third party hardware, and they're using VERY old Davolink modem/router combo's that are complete and utter xx--xx.
Had cue been with xs4all or KPN he could have used any modem suited to their current standards (ADSL, VDSL, VDSLII), but Tele2 has always been complete and utter xx--xx about this.
Any subscription with them becomes a massive PITA at some point, and their customer service is less helpfull than throwing a rotting kiwi at a brick wall...
"You need a little bit of insanity to do great things"
--Henry Rollins

 

Get The Forum As A Mobile App