Unable to use 127.0.0.0 for Private Networking
I am trying to investigate the possibility of using of the loopback network block (127.0.0.0/8) for private networking.
My system has a set up of multiple processors interconnected by a private IP network via a layer 2 switch. Each processors run Linux and has its own IP stack. The application on these processors exchange packets with private source and destination IP. These packets does not leave the private network to a public IP network.
So my prototype would have change the configuration of the loopback interface in the /etc/rc.sh from this,
%ifconfig lo 127.0.0.1 up
%route add 127.0.0.0 lo,
to this,
%ifconfig lo 127.0.0.1 netmask 255.255.255.255 up
%route add -host 127.0.0.1 lo
And I make further changes to the routing table and interfaces on each processor, specifically:
- I assign a 127.0.0.x address (not 127.0.0.1) to its interface
- Add a route to route 127.x.x.x packets out of the interface.
After these changes, I tried to ping a 127.0.0.x destination of another processor. from one processor to another processor. But it didn't work. The packets with 127.0.0.x destination did not leave the interface as indicated by the routing table.
I checked the system call when running the ping with strace. The sys_sendto() returns successfully.
Can anyone comment on why this 127.0.0.x does not work based on my set up?
Is there anything in the Ethernet Driver that blocks 127.0.0.x address from being routed correctly?
Thanks for the help.
Jason Liang