In the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, krsyoung wrote:
>I am currently trying to set up a load balancing application which
>requires an alias to be made for the loopback device.
Bizarre.
>However, as soon as I create the device the network stops working.
>
>Initially (network works fine):
>eth0 - 192.168.1.1
>lo - 127.0.0.1
>
>Run these (the network immediately stops working):
>ifconfig lo:0 192.168.1.2
>ifup lo:0
Yup - look at your routing table. The "last" route overrides any previous
routes of the same value, and you've just set the route to the 192.168.1.0
network to be on the loopback.
>For some reason it seems like it might be horribly illegal what I need to
>do, but I'm wondering if anyone could help with an explanation.
I dunno - you might try deleting the _route_ after you bring up the
alias. Try
route del -net 192.168.1.0 netmask 255.255.255.0 lo
and see if that does the trick. Another thing that might work is to make
your alias a host route (add the 'netmask 255.255.255.255' to your ifconfig
command).
Used to was, when you ran the ifconfig command, it handled the interface
only. Some time in the mid-late 1990s, the behavior of the command changed
to add a network route automagically with the ifconfig command. I think
that's what is biting you now.
Old guy
|