When I type ifconfig, I see that my server has an new ip address each day. The ip addresses belong to a set of ip addresses.
How do I find out all the ip addresses of my server?
|
|
|||||
|
|
Ask the people who adminster the dhcp server which assigns addresses to your server, it's the only way to know for sure. You can relatively safely assume that your ipaddress always will be within ip-address binary-and netmask, there's however no guarantee of this behaviour, and chances are that the dhcp-servers address pool will be a subset of ipaddress & netmask. Now, extrapolating, if you want to find out all the possible ip-addresses for your server because you want to be able to find it even after it has changed it's ip-address, I'd suggest checking out one of the dynamic dns providers on the internet. |
||||
|
|
|
I'm assuming you mean your server's IP address is assigned dynamically each day, and you want to know the pool of possible addresses your server can have. In that case, you can contact whoever is managing the DHCP server that assigns addresses in your network (or your ISP if the server is directly connected to the internet). If you want to know all the IPs your server has had int he past, you can put Lennart's answer in a cronjob.
Or some such thing. |
||||
|
|
|
Or
|
||||
|
|
|
A very simple way that prints all your IPv4 and IPv6 addresses:
|
||||
|
|
|
or:
found here. |
||||
|
|
|
This will print all ip's except the 127.0.0.1 for localhost.
|
||||
|
|