f



ping to non-existent addresses on the local loopback succeed!

Can someone explain to me why?

E.g.

$ ping 127.0.2.1
PING 127.0.2.1 (127.0.2.1) 56(84) bytes of data.
64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
....

Or

$ sudo ifconfig lo:130 10.1.35.130

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 10.1.35.130/24 scope global lo:130
       valid_lft forever preferred_lft forever
    inet 10.1.35.131/24 scope global secondary lo:131
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
....

>ping 10.1.35.144
PING 10.1.35.144 (10.1.35.144) 56(84) bytes of data.
64 bytes from 10.1.35.144: icmp_seq=1 ttl=64 time=0.062 ms
....
0
Charles
11/2/2016 3:19:13 PM
comp.os.linux.networking 15677 articles. 0 followers. Post Follow

6 Replies
403 Views

Similar Articles

[PageSpeed] 44

On 2016-11-02 16:19, Charles T. Smith wrote:
> Can someone explain to me why?
> 
> E.g.
> 
> $ ping 127.0.2.1
> PING 127.0.2.1 (127.0.2.1) 56(84) bytes of data.
> 64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
> ...

Works as expected.
All 127.*.*.* addresses do exist.

-- 
Cheers, Carlos.
0
Carlos
11/2/2016 3:26:58 PM
On Wed, 02 Nov 2016 16:26:58 +0100, Carlos E.R. wrote:

> On 2016-11-02 16:19, Charles T. Smith wrote:
>> Can someone explain to me why?
>> 
>> E.g.
>> 
>> $ ping 127.0.2.1
>> PING 127.0.2.1 (127.0.2.1) 56(84) bytes of data.
>> 64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
>> ...
> 
> Works as expected.
> All 127.*.*.* addresses do exist.

Thank you.

But why?

Where would I look for an explanation of that?

Is there a keyword for that phenomena that I can use to search the internet?
0
Charles
11/2/2016 3:39:07 PM
Charles T. Smith wrote:
> On Wed, 02 Nov 2016 16:26:58 +0100, Carlos E.R. wrote:
>
>> On 2016-11-02 16:19, Charles T. Smith wrote:
>>> Can someone explain to me why?
>>>
>>> E.g.
>>>
>>> $ ping 127.0.2.1 PING 127.0.2.1 (127.0.2.1) 56(84) bytes of
>>> data. 64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
>>> ...
>>
>> Works as expected. All 127.*.*.* addresses do exist.
>
> Thank you.
>
> But why?
>
> Where would I look for an explanation of that?
>
> Is there a keyword for that phenomena that I can use to search the
> internet?

https://en.wikipedia.org/wiki/Localhost

"The IPv4 loopback addresses are reserved within the IPv4 namespace by
the IETF Special Use IPv4 Addresses standard (RFC 5735).[4] The
reservation can be traced back to the November, 1986 Assigned Numbers
standard (RFC 990), which was issued at a time when the first byte of
the IP address was a signed network number that was the only portion of
the address assigned by the IETF. Reserving its highest possible network
number (127) for loopback testing eventually resulted in the excessive
reservation of 16,777,214 loopback addresses."
0
Andy
11/2/2016 3:52:39 PM
On Wed, 02 Nov 2016 15:52:39 +0000, Andy Furniss wrote:

> Charles T. Smith wrote:
>> On Wed, 02 Nov 2016 16:26:58 +0100, Carlos E.R. wrote:
>>
>>> On 2016-11-02 16:19, Charles T. Smith wrote:
>>>> Can someone explain to me why?
>>>>
>>>> E.g.
>>>>
>>>> $ ping 127.0.2.1 PING 127.0.2.1 (127.0.2.1) 56(84) bytes of
>>>> data. 64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
>>>> ...
>>>
>>> Works as expected. All 127.*.*.* addresses do exist.
>>
>> Thank you.
>>
>> But why?
>>
>> Where would I look for an explanation of that?
>>
>> Is there a keyword for that phenomena that I can use to search the
>> internet?
> 
> https://en.wikipedia.org/wiki/Localhost
> 
> "The IPv4 loopback addresses are reserved within the IPv4 namespace by
> the IETF Special Use IPv4 Addresses standard (RFC 5735).[4] The
> reservation can be traced back to the November, 1986 Assigned Numbers
> standard (RFC 990), which was issued at a time when the first byte of
> the IP address was a signed network number that was the only portion of
> the address assigned by the IETF. Reserving its highest possible network
> number (127) for loopback testing eventually resulted in the excessive
> reservation of 16,777,214 loopback addresses."

:-)  Okay, that's good to know - it's just a fact of life.  Thank you very much!
0
Charles
11/2/2016 4:32:59 PM
Le 02/11/2016 à 16:26, Carlos E.R. a écrit :
> On 2016-11-02 16:19, Charles T. Smith wrote:
>> Can someone explain to me why?
>>
>> E.g.
>>
>> $ ping 127.0.2.1
>> PING 127.0.2.1 (127.0.2.1) 56(84) bytes of data.
>> 64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
>> ...
>
> Works as expected.

As per the following route in the "local" routing table :

ip route show table local
....
local 127.0.0.0/8 dev lo  proto kernel  scope host  src 127.0.0.1
....

Note that all these addresses are reserved to the local host, but a host 
does not have to use them all. Linux does.
0
Pascal
11/3/2016 6:41:59 AM
On Thu, 03 Nov 2016 07:41:59 +0100, Pascal Hambourg wrote:

> Le 02/11/2016 à 16:26, Carlos E.R. a écrit :
>> On 2016-11-02 16:19, Charles T. Smith wrote:
>>> Can someone explain to me why?
>>>
>>> E.g.
>>>
>>> $ ping 127.0.2.1
>>> PING 127.0.2.1 (127.0.2.1) 56(84) bytes of data.
>>> 64 bytes from 127.0.2.1: icmp_seq=1 ttl=64 time=0.064 ms
>>> ...
>>
>> Works as expected.
> 
> As per the following route in the "local" routing table :
> 
> ip route show table local
> ...
> local 127.0.0.0/8 dev lo  proto kernel  scope host  src 127.0.0.1
> ...
> 
> Note that all these addresses are reserved to the local host, but a host 
> does not have to use them all. Linux does.

Thank you.


0
Charles
11/3/2016 8:51:54 AM
Reply: