dj777
Posts: 5
Joined: Sun Mar 11, 2018 1:38 pm
Location: UK

Pi with a static IP and replacing my router

Wed Mar 14, 2018 12:21 pm

Hi everyone,

I apologise in advance for (another) dumb question. I'll start by stressing that I'm not asking how to set a static IP....

I'm in the process of setting up a Pi3 as a Plex media server. I have set the Pi to a static IP with no problems. However in a few weeks I'll be changing my internet service provider and I'll be getting a new modem/router. Will I have to edit the Pi's IP and Gateway settings to suit? Or will the new router be ok with the current settings? The Pi is running Raspian, and is (and will continue to be) connected via Ethernet.

If I need to provide more info please let me know. Thanks!

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi with a static IP and replacing my router

Wed Mar 14, 2018 12:27 pm

Depends on the router. It could use any of many local subnets on the localnet.

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: Pi with a static IP and replacing my router

Wed Mar 14, 2018 12:31 pm

SurferTim wrote:
Wed Mar 14, 2018 12:27 pm
Depends on the router. It could use any of many local subnets on the localnet.
You may be able to get round it by setting the netmask to /16 (255.255.0.0) (rather than /24 (255.255.255.0)) as that will work with any 192.168.xxx.yyy address.

Once you know what IP range your new router uses you can change back to /24.

No guarantees that will work, my network uses 10.x.x.x/8 so I can have 16 million local devices.
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.

dj777
Posts: 5
Joined: Sun Mar 11, 2018 1:38 pm
Location: UK

Re: Pi with a static IP and replacing my router

Wed Mar 14, 2018 12:35 pm

Wow, that was quick! Thanks guys. I guess I'll wait and see what happens when I get the new router.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi with a static IP and replacing my router

Wed Mar 14, 2018 12:35 pm

DougieLawson wrote:
SurferTim wrote:
Wed Mar 14, 2018 12:27 pm
Depends on the router. It could use any of many local subnets on the localnet.
You may be able to get round it by setting the netmask to /16 (255.255.0.0) (rather than /24 (255.255.255.0)) as that will work with any 192.168.xxx.yyy address.

Once you know what IP range your new router uses you can change back to /24.

No guarantees that will work, my network uses 10.x.x.x/8 so I can have 16 million local devices.
Only if the gateway remains the same. Otherwise problems accessing the internet.

Edit: You would need to change the router also, or if a different subnet, you would get a "no route to host" or "timeout" if the OP tries to ssh.

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: Pi with a static IP and replacing my router

Wed Mar 14, 2018 1:18 pm

OK then a switch back to DHCP makes most sense. Set the current fixed IP address in the current router. When the new router arrives do the fixed IP stuff in that one.
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.

Return to “Networking and servers”