On 25-Jul-11 16:56:19, steve-ALUG@hst.me.uk wrote:
Hi all,
I was trying to add a extra IP address to my server's localhost because I wanted to run a apache virtual host on a separate IP address.
I used sudo ip addr add 127.0.0.5/32 dev lo
and then I could ping 127.0.0.5 successfully. When I'd finished, I ran
sudo ip addr del 127.0.0.5/32 dev lo
which didn't return any error messages.
I than ran ping 127.0.0.5 and still got responses.
I ran sudo ip addr del 127.0.0.5/32 dev lo again and it told me that it could not do it "RTNETLINK answers: Cannot assign requested address"
It may be that the ip addr add has nothing to do with it, but on this machine, my server, I can ping any address I've tried in the 127.*.*.* range and get a response. Is this normal, or have I messed something up? If so, what have I messed up? Is there anything I can run that show's what's providing these ports?
It's an Ubuntu machine, running dnsmasq, apache.
Ubuntu 10.04.3 LTS
Any ideas? Or am I being thick??? Steve
A curious query!
To start with, the loopback device "lo" is by default assigned to IP address 127.0.0.1 which, again by default, is given the name "localhost" in /etc/hosts.
So I doubt the wisdom of assigning "lo" to 127.0.0.5 while it is still assigned to 127.0.0.1!
Next, I think you will find that, even without any messing around, any IP address in the 127.0.0.* range is pingable (e.g. I just pinged 127.0.0.57 on my machine, and I haven't fiddled with this at all, and this address is certainly not explicitly assigned to anything).
So perhaps it is not surprising that you got ping responses from 127.0.0.5, since it would do that anyway.
I suspect you have wandered into a hall of mirrors. Watch out, or you may blunder into one and break it! (Or several).
However, I'm no deep expert on these things, so would the real gurus please come in?
Best wishes to all, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) ted.harding@wlandres.net Fax-to-email: +44 (0)870 094 0861 Date: 25-Jul-11 Time: 19:42:28 ------------------------------ XFMail ------------------------------