It is best to use static IP addressess for both your host server and any VPS's you create. So, to prevent collisions between static IP's and dynamic IP's I map out what range of IP's are used for what devices.
To start with, on my router's DHCP server I've reduced the range of possible leases to a hundred. I get a fair number of visitors with wireless devices, and have a fair number of devices myself, but a hundred possible leases is more than enough. I have set the DHCP lease range to 192.168.1.100 - 192.168.1.200. If I need more I can bump the upper range to 192.168.1.255.
I now reserve the first 100 possible IP addresses as static IP addresses. To keep things organized and easier for myself I have divided these 100 up as follows:
192.168.1.xxx
where xxx equals 1 - 20 - network devices [routers, switches, etc]
where xxx equals 21 - 40 - shared devices [printers, NAS, etc]
where xxx equals 41 - 60 - real computers, servers, etc]
where xxx equals 61 - 80 - virtual devices [VPS, etc]
where xxx equals 81 - 99 - future use
Devices on my network are as follows;
192.168.1.1 - default router [DHCP server on]
192.168.1.10 - wireless router [DHCP server off]
192.168.1.21 - my printer
192.168.1.22 - common use printer
192.168.1.30 - NAS
192.168.1.31 - NAS for backups
192.168.1.41 - my computer
192.168.1.50 - VPS host server
192.168.1.61 - VPS 1
To set a static IP on the host VPS server we need to edit /etc/network/interfaces. From a root terminal make the following changes.
nano /etc/network/interfaces
rem out [or delete]
allow-hotplug eth0
iface eth0 inet dhcp
and add
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
Of course you need to restart eth0 to get the new static IP settings assigned. You can do this by stopping and restarting eth0 or by rebooting the machine.
ifconfig eth0 down
ifconfig eth0 up
or
reboot
Next, creating a VPS.
No comments:
Post a Comment