IP changes randomly in VBox
Every so often my router has a blip, disconnects everything and resets itself.
When this happens the IP in my VBox server changes and I can no longer access the server or PWAdmin.
I've had this problem with every server build I've used, so yeah I get that the problem isn't with the server files.
I have tried changing the addresses in the config files to match the new IP but no luck now.
Using Psytrac/343's 1.4.4. server on an Ubuntu VBox.
Could anyone tell me how to stop this happening? Like how to assign a static IP to my PW server with the correct submask and gateway to use?
Googled around a bit and thought I'd made it static but nothing changed when I changed the bottom part of my /etc/network/interfaces to:
Code:
auto eth0
iface eth0 inet static
address 192.168.0.7
netmask 255.255.255.0
gateway 10.0.0.1
My head hurts because this happens just about every time that I think I've got a server working smoothly. The only way I've sorted it out in the past has been a server rollback to the last time it had the first IP or complete re-install.
Any constructive criticism/advice welcome. :blushing:
Re: IP changes randomly in VBox
Try changing the default gateway for the same ip range:
Expemplo:
ip 192.168.1.10
mask 255.255.255.0
gateway 192.168.1.1
Re: IP changes randomly in VBox
Quote:
Originally Posted by
srlinux
Try changing the default gateway for the same ip range:
Expemplo:
ip 192.168.1.10
mask 255.255.255.0
gateway 192.168.1.1
this is correct, if you are using bridged then this will be even easier.
type ifconfig.
you will see your ip..... it will be something like 192.168.0.123
so your gateway would be 192.168.0.1, another useful tip.... the ip you type to access your router is also your gateway ip. hence... gateway. your mask could be different so on a windows machine running ipv4 click run.... type cmd
this will bring up a command prompt.
type ipconfig/all and you will see whatever your lan or wlan connection is. usually 255.255.255.0 some have 255.255.0.0
so now you will write it down like this
auto eth0 <----ifconfig will tell you your eth# it could say eth2 or 3 or whatever... then you have to change that number.
iface eth0 inet static
ip 192.168.0.123
netmask 255.255.255.0
gateway 192.168.0.1