0

I have set of interfaces in my linux based box which has a lo interface with 127.0.0.1

I wanted to create a set of other local network (not visible outside). And i plan to assign like 127.10.10.100/24 and 127.10.10.110/24. Is anything fundamentally wrong with this ?

While i don't see any error with this in configuration i cannot ping these 2 guys. I get error like the following :

[root~]# ping 127.10.10.100
connect: Invalid argument

When i ping the other side it is basically the same error.

In one side:

[root~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 172.25.26.169  netmask 255.255.252.0  broadcast 172.25.27.255
    inet6 fe80::2a0:a5ff:fe89:f966  prefixlen 64  scopeid 0x20<link>
    ether 00:a0:a5:89:f9:66  txqueuelen 1000  (Ethernet)
    RX packets 8467  bytes 4268110 (4.0 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 210  bytes 29833 (29.1 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device memory 0xfb680000-fb6fffff

eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 127.10.10.110  netmask 255.255.255.0  broadcast 127.10.10.255
    inet6 fe80::2a0:a5ff:fe89:f965  prefixlen 64  scopeid 0x20<link>
    ether 00:a0:a5:89:f9:65  txqueuelen 1000  (Ethernet)
    RX packets 13291  bytes 1275006 (1.2 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 14377  bytes 1313050 (1.2 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1  (Local Loopback)
    RX packets 1838  bytes 205800 (200.9 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 1838  bytes 205800 (200.9 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

In other side :

[root~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 172.25.26.4  netmask 255.255.252.0  broadcast 172.25.27.255
    inet6 fe80::2a0:a5ff:fe89:f996  prefixlen 64  scopeid 0x20<link>
    ether 00:a0:a5:89:f9:96  txqueuelen 1000  (Ethernet)
    RX packets 196  bytes 77545 (75.7 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 93  bytes 10274 (10.0 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device memory 0xfbb80000-fbbfffff

eth4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 127.10.10.100  netmask 255.255.255.0  broadcast 127.10.10.255
    inet6 fe80::10:18ff:feb4:2335  prefixlen 64  scopeid 0x20<link>
    ether 02:10:18:b4:23:35  txqueuelen 1000  (Ethernet)
    RX packets 43  bytes 4082 (3.9 KiB)
    RX errors 0  dropped 6  overruns 0  frame 0
    TX packets 28  bytes 2756 (2.6 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1  (Local Loopback)
    RX packets 551  bytes 88209 (86.1 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 551  bytes 88209 (86.1 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
SSS
  • 1
  • Surely not [tag:c] and OT on SO. – LPs Aug 02 '16 at 06:54
  • 1
    Packets sent to addresses in the loopback range are never sent outside. https://en.m.wikipedia.org/wiki/Localhost (or if they are they should be rejected immediately) – Joni Aug 02 '16 at 07:08
  • Take a look to [RFC5735](https://tools.ietf.org/html/rfc5735) (which obsoletes [RFC3330](http://www.ietf.org/rfc/rfc3330.txt)). In short, yes full 127 is reserved (see [RF1122](https://tools.ietf.org/html/rfc1122#section-3.2.1.3)) but only 127.0.0.0/8 should be used for loopback. From [ping source code](https://github.com/iputils/iputils/blob/master/ping.c) you see error is raised by [connect(2)](http://man7.org/linux/man-pages/man2/connect.2.html) and from `ip(7)` we know that `EINVAL` is also for _"For send operations this can be caused by sending to a blackhole route"_. Not sure, BTW – Adriano Repetti Aug 02 '16 at 08:25

0 Answers0