Assigning a custom ip address

Daave_

Prominent
May 15, 2017
7
0
510
I need to assign an ip address outside of the DHCP range. Basically, my routers ip is 192.168.0.1, subnet mask is 255.255.255.0 and my servers ip is 192.168.0.14 and 192.168.0.61 The DHCP range is 192.168.0.2 to 192.168.0.254 I was wondering how i would correctly assign an ip address of for example 10.10.10.10 to a computer/ server.
Thanks
 
Solution


At the router and at all static IP confgiured PCs you will need 255.255.0.0 configured for subnet.
Now to forewarn you, some applications can be coded poorly and only look for computers in 255.255.255.0 subnet.
Thus if you dont NEED the pcs on different subnet then it is still better to be on same subnet and just have them outside DHCP pool (which is the standard configuration that any network guru would use for say a business too small for VLANs to be worthwhile)...
A 10.10.10.10 would require configuring a 2nd net

It's usually easier to just assign an IP address that's within the dhcp range but so high it won't get automatically assigned (highly doubt you'll have 200 different devices assigned within 24h)
Or limit the DHCP range (for example limiting it to .2 to .100, leaving you 101-254 for manual assignment)
That's usually easier than setting up a whole different network
 
You are not just going outside your DHCP range, you are going outside your subnet.
You can manually assign the device that IP, but it wont communicate with anything because it is outside of the subnet.

What is your actual goal so maybee we can offer you a better solution.
 

Daave_

Prominent
May 15, 2017
7
0
510
Just as an example, if i got a new router and switch.

How would i set it up so it would have a Avalibility of say 10.10.*.* and a dhcp range of 10.10.4.*

If that makes sense? So i could give manual ips of say 10.10.66.666 and get auto assigned ips of something like 10.10.4.6

Thanks
 
Given your examples it doesn't work that way. All addresses must be in the same network. Just set everything up for DHCP and assign address reservations on the router. Or, reduce the scope of the DHCP range and assign your fixed addresses outside that scope.
 
just set your dchp range on your router to like 192.168.0.2 to 192.168.0.100

then on the the deivces you want to be static set on the device to static and assign it to 192.168.0.(some number over 100 but below 254)

the server will then have a fixed ip and you dchp server will not try to assign it an ip or try giving the ip to another device as it will only use between 2 and 100 for auto config
 

Daave_

Prominent
May 15, 2017
7
0
510


Yes but, would i be able to just change the default subnet to 10.10 and just use that one, therefore eliminating the need for a second subnet, then i could setup DHCP for 10.10.4.3 to 10.10.4.254 etc etc
 
Again depends on your router and the access you got on your router and the limits your ISP is setting.

If your router has a subnet hardcoded or your ISP's modem or.your ISP's circuit doesn't allow for a different subnet then you're screwed
If your router supports the change then it's of course possible.

In the end I don't really get what difference it makes if the server got the internal IP 192.168.1.101 or if it got 10.10.10.12 but who am I to judge..
 

Daave_

Prominent
May 15, 2017
7
0
510



True, but custom :p
Its a sky q router if that helps?
 
What exactly are you trying to do (so what reason do you have for a different subnet and does that data need to go between subnets)?
If you have something on an IP outside of your subnet then they wont connect to one another, is that what you want?

The pro way to do this is to have VLANs and setup firewall rules that either allow all inter-vlan routing or just a specific IP address. Now it is highly doubtful that your router supports this.
You can have different subnets for organaziation purposes like server on 192.168.0.x and PCs on 192.168.10.x and set DHCP to 192.168.10.100-.x and then set your subnet to 255.255.0.0; but this still depends on capability of router.
If all you want is static IPs then simply tweak DHCP so that it starts much latter (so instead of starting at 192.168.1.2 set it to say 192.168.1.125) then set your static IPs to something NOT in the DHCP range but still in that subnet.

 

Daave_

Prominent
May 15, 2017
7
0
510


Noooooo,

But reading boosted1g's reply. I could change the subnet to 255.255.0.0 and then use 192.168.*.* right?

so like DHCP 192.168.10.5 - 192.168.10.254

and then have my static stuff on for example 192.168.666.*
 


Why exactly do you want your static stuff on a different subnet vs just shrinking your DHCP range?
If you set your router and EVERY static device subnet to 255.255.0.0 then it should work, but auto-discovery of other computer's will be unreliable at best so plan on using static IP instead of hostname for any network shares, webgui's, rdp, etc.

Also, no you cant use 192.168.666 because IP address can only go up to .254
Each one of those 4 sets of numbers is called an octet, as 8 bits in binary equals 256 (so 0-255 because 0 is counted), but in networking 0 and 255 is reserved for bind/broadcast and thus only .1-.254 is usable.
 

Daave_

Prominent
May 15, 2017
7
0
510


Ok so in theory, if (when this new router came) i was the first to connect and change the subnet to 255.255.0.0
I could have a dhcp of 192.168.1.5 - 192.168.1. 250
and use 192.168.2.8 for a server and 192.168.2.6 for another, and they would all still be linked etc?
 
Why do things the hard way? Just reduce the DHCP scope, hardcode the server IP addresses in that excluded zone, set everything else to DHCP and be done with it.

Alternatively, if the router supports reservations (most, if not all do) set everything to DHCP and assign, on the router (by MAC) addresses to those nodes that require fixed addresses.
 


At the router and at all static IP confgiured PCs you will need 255.255.0.0 configured for subnet.
Now to forewarn you, some applications can be coded poorly and only look for computers in 255.255.255.0 subnet.
Thus if you dont NEED the pcs on different subnet then it is still better to be on same subnet and just have them outside DHCP pool (which is the standard configuration that any network guru would use for say a business too small for VLANs to be worthwhile).

Now if your new router has the ability for VLANs (or if you can flash it to DD-WRT/Tomato firmware) then that would be better, and then you can bridge the networks and it will function smoother.



 
Solution


Agreed. As I stated, the standard configuraiton is to just set static IP devices outside DHCP scope.
And setting static at router (if router has that ability) is much nicer, and easier to manage.
 
You could also plug in a router behind your router and configure a net for your desired 10.10.10.10 address.
However all of that makes very little sense and is very complicated and potentially creates a lot of problems where no problems need to be.

Limiting your DHCP range to 100 devices (192.168.0.2-192.168.0.101) should give you more than enough addresses for devices to connect and leave enough static IPs (192.168.0.102-192.168.0.254, mostly due to ISP restrictions .253) for you to assign.

Everything else you wanna do is advanced networking and given from the way you're asking out of your skill set for now (or for anyone to tell you how to set it up with an unknown router)

Furthermore you didn't give a reason yet why your server has to be in a different net than your other devices as that doesn't make much sense unless you're a company with sensitive data, in which you'd be setting up the whole thing very differently anyway.