1
it is always said that every host's routing table must have a entry for loop back route as shown below:
Destination Gateway Flags Ref Use Interface
----------- ----------- ----- ---- ----- ---------
127.0.0.1 127.0.0.1 UH 1 298 lo0
My question is why we need to make such an entry in the routing table even if our loop back interface working well without this.
working well here i mean that i can ping on it and even if i am configuring a http server on my machine and trying to test it with localhost, it is also working well.
note:- i am asking this question in regard of Linux OS.
1If it works without the entry, then clearly, its not required. So whom ever said it was required is clearly wrong. – Ramhound – 2013-02-13T14:51:47.760
1Linux has a implicit routes for its local interfaces - loopback host is 127.0.0.1, with a /8 netmask, so 127.0.0.2 will (correctly) go to that interface as well, even if
netstat -r
doesn't show it. Probably whoever told you this has cargo-culted the "knowledge" from some ancient place that no longer exists - there's all sorts of misinformation about networks out there that hasn't been true for 20 years or more. – Gabe – 2013-04-29T11:06:17.957