mantydad
Posts: 3
Joined: Sat Dec 07, 2013 2:43 pm

Network Access

Sat Dec 07, 2013 2:53 pm

I recently gave my pi a static address on my home network.(192.0.0.0). Well without thinking I moved it to my school network for a school project and of course I was unable to get in because that is a 172.0.0.0 network. Well I thought I would be able to get back in on the home network but I was wrong. I reformatted the sd card and placed a new raspbian image on it. Now for whatever reason I still can not get in. What is the reason for this and is there a way to fix it? iI want to turn it in to an xbian media center but will not work if I can not even get in to it. And yes I know it is a whole different OS but I just wanted to see if the network would work.

notholmen
Posts: 31
Joined: Tue Dec 25, 2012 10:10 am

Re: Network Access

Sat Dec 07, 2013 4:07 pm

Check what local IP ranges there really are. I think you got some of them wrong.
Also I tend to prefer to make a static DHCP lease from the router instead of locking any computer to a static IP.

A list of local IP ranges:
http://www.noah.org/wiki/Private_LAN_IP_addresses

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

Re: Network Access

Sat Dec 07, 2013 4:27 pm

How are you connecting? Wired or WiFi?
Do both of your networks have DHCP servers? (We can be just about 100% sure your home one does.)

Because if it has DHCP then that's a whole bunch easier. DHCP is designed to hand out addresses to anything that legitimately connects to your network.

If you connect to a 192.168.x.y/24 network at home and a 172.[16-31].x.y/16 at school then DHCP will do the right thing. All you'll need to do is a quick ifconfig or ip addr command to see what address you've been assigned.
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 fake doctors are on my foes list.

mantydad
Posts: 3
Joined: Sat Dec 07, 2013 2:43 pm

Re: Network Access

Sun Dec 08, 2013 3:29 am

The addresses given out my the router are in the 192.168.2.2 thru 192.168.2.254. Pi has a 2.12 address. It was also assigned to it by the router. Also an ifconfig will not do any good if i can not get. Believe me i tried

klricks
Posts: 7207
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Network Access

Sun Dec 08, 2013 4:30 am

mantydad wrote:The addresses given out my the router are in the 192.168.2.2 thru 192.168.2.254. Pi has a 2.12 address. It was also assigned to it by the router. Also an ifconfig will not do any good if i can not get. Believe me i tried
As already mentioned.... Use the DHCP reservation feature of your router and assign 192.168.2.12 or whatever IP to the MAC address of the RPi. Then your home router will always give the RPi the same IP and you will have no configuration to change on the RPi itself. (Leave it at default DHCP enabled).

At school unless you have access to the router then you have no choice but to use ifconfig. Or maybe make a program to flash an LED to indicate the last digits of the IP. I think the Pidora OS does that on boot.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

mantydad
Posts: 3
Joined: Sat Dec 07, 2013 2:43 pm

Re: Network Access

Sun Dec 08, 2013 4:58 am

klricks wrote:
mantydad wrote:The addresses given out my the router are in the 192.168.2.2 thru 192.168.2.254. Pi has a 2.12 address. It was also assigned to it by the router. Also an ifconfig will not do any good if i can not get. Believe me i tried
As already mentioned.... Use the DHCP reservation feature of your router and assign 192.168.2.12 or whatever IP to the MAC address of the RPi. Then your home router will always give the RPi the same IP and you will have no configuration to change on the RPi itself. (Leave it at default DHCP enabled).

At school unless you have access to the router then you have no choice but to use ifconfig. Or maybe make a program to flash an LED to indicate the last digits of the IP. I think the Pidora OS does that on boot.
Will not be taking this thing to school anymore. That class is finished so It is staying at home. I will try and set the address into the router. I ran advanced ip scanner and the pi's address is always the same so I am not really sure why i even attempted to set a static address to it. I want to use this as an xmbc. Not sure which one though.

Return to “Troubleshooting”