Jump to content

Will my ip changes?

Oren Dekel

If my server is connected to the router lan port and i'll switch router will it ip change?

Link to comment
Share on other sites

Link to post
Share on other sites

That depends on whether your server gets an IP from DHCP or has a static IP address. A server should normally use a static IP address for exactly this reason, it should have a well known IP inside the network (or you can set up DDNS and use it's host name).

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Eigenvektor said:

That depends on whether your server gets an IP from DHCP or has a static IP address. A server should normally use a static IP address for exactly this reason, it should have a well known IP inside the network (or you can set up DDNS and use it's host name).

Lazy way I do it, set DHCP range on router to something like 2-200. 201-255 are unused. Set IP on device you want to be static and magic. 

Be sure to @Pickles von Brine if you want me to see your reply!

Stopping by to praise the all mighty jar Lord pickles... * drinks from a chalice of holy pickle juice and tossed dill over shoulder* ~ @WarDance
3600x | NH-D15 Chromax Black | 32GB 3200MHz | ASUS KO RTX 3070 UnderVolted and UnderClocked | Gigabyte Aorus Elite AX X570S | Seasonic X760w | Phanteks Evolv X | 500GB WD_Black SN750 x2 | Sandisk Skyhawk 3.84TB SSD 

Link to comment
Share on other sites

Link to post
Share on other sites

But the static IP is only in the old router, if i'll buy a new one it gonna give it a new IP address, doesn't it?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Oren Dekel said:

But the static IP is only in the old router, if i'll buy a new one it gonna give it a new IP address, doesn't it?

If you set a static IP on the server, changing your router won't do anything. If the static IP is assigned by the DHCP, then you'd have to configure the new router to hand the same IP to the same MAC address as the old one did.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Oren Dekel said:

But the static IP is only in the old router, if i'll buy a new one it gonna give it a new IP address, doesn't it?

Well, yes, but you can just reassign it the old static IP. Just setup DHCP as normal, then there should be an area in the route to do DHCP reservations. You just reserve the server's address there. 

Be sure to @Pickles von Brine if you want me to see your reply!

Stopping by to praise the all mighty jar Lord pickles... * drinks from a chalice of holy pickle juice and tossed dill over shoulder* ~ @WarDance
3600x | NH-D15 Chromax Black | 32GB 3200MHz | ASUS KO RTX 3070 UnderVolted and UnderClocked | Gigabyte Aorus Elite AX X570S | Seasonic X760w | Phanteks Evolv X | 500GB WD_Black SN750 x2 | Sandisk Skyhawk 3.84TB SSD 

Link to comment
Share on other sites

Link to post
Share on other sites

Or just change the IP settings in Windows to be static and the DHCP server on the router will always give it that IP (unless its already assigned in which case you'll get a conflict).

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Oren Dekel said:

But the static IP is only in the old router, if i'll buy a new one it gonna give it a new IP address, doesn't it?

Yep. You'll have to reconfigure the router with which ever configuration you used on the old router. You can reserve an IP for the server via MAC address or do as Pickles - Lord of the Jar suggested and shrink the DHCP pool then assign a static IP on the server.

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, Oren Dekel said:

If my server is connected to the router lan port and i'll switch router will it ip change?

Most likely, yes. If you are replacing an old router with a new brand router, the new router would not be aware that you purchased it for the purpose of replacing an old router, let alone what settings you used previously with the old router. You have to handle this disconnect yourself, so you have to plan ahead what router to replace the old router with and how to replicate the settings from the old router.

 

One way would be for you to export your old router settings, and then import these settings to the new router. That's basically all you would have to do to make the new router behave like the old router. But for this to work, you need to make sure that the old and new router are compatible. They may need to be of the same brand and series, or at very least use the same software and data format for its configuration settings. That's why you need to plan ahead.

 

Link to comment
Share on other sites

Link to post
Share on other sites

WAN, if DHCP, yes, new MAC.

LAN, no if you configured the server with a static address.

LAN, yes if your server is configured to use DHCP for addressing.

PC : 3600 · Crosshair VI WiFi · 2x16GB RGB 3200 · 1080Ti SC2 · 1TB WD SN750 · EVGA 1600G2 · Define C 

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Pickles - Lord of the Jar said:

Lazy way I do it, set DHCP range on router to something like 2-200. 201-255 are unused. Set IP on device you want to be static and magic. 

So you would statically set the server IP to something in the 201-255 range? (This is done on the server, not the DHCP obviously.)

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, rnd42 said:

So you would statically set the server IP to something in the 201-255 range? (This is done on the server, not the DHCP obviously.)

 

Correct. Lazy man's way but it works. 

Be sure to @Pickles von Brine if you want me to see your reply!

Stopping by to praise the all mighty jar Lord pickles... * drinks from a chalice of holy pickle juice and tossed dill over shoulder* ~ @WarDance
3600x | NH-D15 Chromax Black | 32GB 3200MHz | ASUS KO RTX 3070 UnderVolted and UnderClocked | Gigabyte Aorus Elite AX X570S | Seasonic X760w | Phanteks Evolv X | 500GB WD_Black SN750 x2 | Sandisk Skyhawk 3.84TB SSD 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Pickles - Lord of the Jar said:

Correct. Lazy man's way but it works. 

I see. That's a cool trick! And I like cool tricks! 🤓

 

But surely this can only be guaranteed to work well with a single static IP client (such as a server in this example)? If you start piling on one and two, and three static IP clients in the 201-255 range, surely they will run into a conflict eventually at some point in time when two or more of them try to use the same IP.

 

Link to comment
Share on other sites

Link to post
Share on other sites

38 minutes ago, rnd42 said:

I see. That's a cool trick! And I like cool tricks! 🤓

 

But surely this can only be guaranteed to work well with a single static IP client (such as a server in this example)? If you start piling on one and two, and three static IP clients in the 201-255 range, surely they will run into a conflict eventually at some point in time when two or more of them try to use the same IP.

 

That is why you don't use the same IP. NEVER USE THE SAME IP! If you got 3 devices, they get 3 IPs. It is how they are identified on the network. If you have a room full of guys named Bob and yell, "BOB!" They all look at you. Computers don't like that. 

Be sure to @Pickles von Brine if you want me to see your reply!

Stopping by to praise the all mighty jar Lord pickles... * drinks from a chalice of holy pickle juice and tossed dill over shoulder* ~ @WarDance
3600x | NH-D15 Chromax Black | 32GB 3200MHz | ASUS KO RTX 3070 UnderVolted and UnderClocked | Gigabyte Aorus Elite AX X570S | Seasonic X760w | Phanteks Evolv X | 500GB WD_Black SN750 x2 | Sandisk Skyhawk 3.84TB SSD 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Pickles - Lord of the Jar said:

Correct. Lazy man's way but it works. 

The true lazy man solution is to just set the server to use a static IP and don't touch the router at all, DHCP is more than capable of assigning a requested IP via auto negotiation. Heck some modern routers will move existing clients to another free address if a connecting client requests an address that's already assigned.

 

1 hour ago, rnd42 said:

I see. That's a cool trick! And I like cool tricks! 🤓

 

But surely this can only be guaranteed to work well with a single static IP client (such as a server in this example)? If you start piling on one and two, and three static IP clients in the 201-255 range, surely they will run into a conflict eventually at some point in time when two or more of them try to use the same IP.

 

See my above post, there's ZERO need to touch the router at all. Simply set the server to a static IP and the router will ALWAYS assign it that IP via DHCP. Doing it this way will avoid conflicts as DHCP will never assign an address that's already in use by another client. Its good practice to use an address thats high in the range (so 192.168.x.250 for example) as its very unlikely that IP will be in use by anything already and once the server is connected and is requesting a static IP the router will never assign that address to another device.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Master Disaster said:

The true lazy man solution is to just set the server to use a static IP and don't touch the router at all, DHCP is more than capable of assigning a requested IP via auto negotiation. Heck some modern routers will move existing clients to another free address if a connecting client requests an address that's already assigned.

 

See my above post, there's ZERO need to touch the router at all. Simply set the server to a static IP and the router will ALWAYS assign it that IP via DHCP. Doing it this way will avoid conflicts as DHCP will never assign an address that's already in use by another client. Its good practice to use an address thats high in the range (so 192.168.x.250 for example) as its very unlikely that IP will be in use by anything already and once the server is connected and is requesting a static IP the router will never assign that address to another device.

I have had DHCP NOT do that and cause havoc many many times. 

Be sure to @Pickles von Brine if you want me to see your reply!

Stopping by to praise the all mighty jar Lord pickles... * drinks from a chalice of holy pickle juice and tossed dill over shoulder* ~ @WarDance
3600x | NH-D15 Chromax Black | 32GB 3200MHz | ASUS KO RTX 3070 UnderVolted and UnderClocked | Gigabyte Aorus Elite AX X570S | Seasonic X760w | Phanteks Evolv X | 500GB WD_Black SN750 x2 | Sandisk Skyhawk 3.84TB SSD 

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Pickles - Lord of the Jar said:

I have had DHCP NOT do that and cause havoc many many times. 

Then you have an issue somewhere else because that functionality is built into DHCP as a service.

Quote

A DHCP client can select, manipulate and overwrite parameters provided by a DHCP server.

https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Client_configuration_parameters

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

Personally, I don't like the idea of setting static IP-address on the devices themselves and instead prefer to assign static DHCP-leases on the router. This way, I don't need to touch any of my devices if I decide to redo some parts of my network, if I decide to split it into different subnets or whatever -- just log into the router and adjust the leases, if need be. There's also the benefit of the devices sending a preferred hostname when doing a DHCP-request, which causes the router to cache that hostname and its associated IP-address and from there on allowing for local DNS-resolution for it, so I can just address that device with the hostname instead of having to type its IP-address.

 

Then there's the more advanced stuff, like e.g. sending PXE-information over DHCP, additional static routes and all that -- no need to manually configure those on any of the devices, when the router can just do it via DHCP.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, Master Disaster said:

Simply set the server to a static IP and the router will ALWAYS assign it that IP via DHCP.

If you set a static IP on the device, DHCP isn't involved at all, so no.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, WereCatf said:

Personally, I don't like the idea of setting static IP-address on the devices themselves and instead prefer to assign static DHCP-leases on the router. This way, I don't need to touch any of my devices if I decide to redo some parts of my network, if I decide to split it into different subnets or whatever -- just log into the router and adjust the leases, if need be. There's also the benefit of the devices sending a preferred hostname when doing a DHCP-request, which causes the router to cache that hostname and its associated IP-address and from there on allowing for local DNS-resolution for it, so I can just address that device with the hostname instead of having to type its IP-address.

I don't see how splitting into subnets is any more difficult with DHCP? (BTW that's a genuine question, I'm not trying to be funny or anything).

 

As for hostname caching, I use hostnames every day. My Ras Pi 4 is on \\RaspberryPi, my NAS is on \\NAS and Pi Hole (running on the NAS via Docker) is on \\PiHole. All work perfectly. Mind you I am using the NAS as my DNS for Pi Hole to work.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, WereCatf said:

If you set a static IP on the device, DHCP isn't involved at all, so no.

What? Of course it is. DHCP still has to keep a record of that address being assigned and to what device. The client tells DHCP what address it wants and DHCP assigns it.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Master Disaster said:

I don't see how splitting into subnets is any more difficult with DHCP? (BTW that's a genuine question, I'm not trying to be funny or anything).

You misread something. I said it's far EASIER to use DHCP than manually setting static settings on every single device. With DHCP, I can push additional static routes and all sorts of extra information to all the devices any time I feel like, instead of having to go and log into every device and manually changing the settings.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Master Disaster said:

What? Of course it is. DHCP still has to keep a record of that address being assigned and to what device. The client tells DHCP what address it wants and DHCP assigns it.

No. If you set a static IP on a device, it doesn't make a DHCP-request at all. I mean, why would the DHCP-server have to be involved at all, if the device is set to manually use whatever IP-address it likes?

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, WereCatf said:

No. If you set a static IP on a device, it doesn't make a DHCP-request at all. I mean, why would the DHCP-server have to be involved at all, if the device is set to manually use whatever IP-address it likes?

Because otherwise DHCP could try to assign an address that's already in use and create a conflict. To be fair its possible DHCP doesn't technically assign the address (I don't know that much about DHCP) but it 100% does have to keep a record of all connected clients so it doesn't create conflicts.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Master Disaster said:

Because otherwise DHCP could try to assign an address that's already in use and create a conflict. To be fair its possible DHCP doesn't technically assign the address (I don't know that much about DHCP) but it 100% does have to keep a record of all connected clients so it doesn't create conflicts.

No, that is NOT how it works. DHCP is only in control of IP-address given by DHCP, it is NOT in control of IP-addresses that have been statically assigned by the devices themselves and YES, it can cause conflicts. That's how it all works. If you want the DHCP-server to be aware of all the devices, then you need the DHCP-server to assign the IP-addresses. If you want a device to always get the same IP-address and the DHCP-server being aware of it, then you set up a static DHCP-lease on the DHCP-server.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×