[BlueOnyx:21954] Re: Blueonyx 5209R - strange behavior. Server sends mails from wrong IP

Michael Stauber mstauber at blueonyx.it
Thu Apr 19 01:29:14 -05 2018


Hi Dirk,

> Here are the outputs:
> 
> ip -o addr show
> 1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
> 1: lo    inet6 ::1/128 scope host \       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.193/24 brd xx.xx.91.255 scope global eth0:0\       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.194/24 brd xx.xx.91.255 scope global secondary eth0:1\       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.195/24 brd xx.xx.91.255 scope global secondary eth0:2\       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.192/24 brd xx.xx.91.255 scope global secondary eth0\       valid_lft forever preferred_lft forever
> 2: eth0    inet6 fe80::250:xx:xx:7123/64 scope link \       valid_lft forever preferred_lft forever
> 
> ip -o route show
> default via xx.xx.91.1 dev eth0
> 127.0.0.0/8 dev lo scope link
> xx.xx.91.0/24 dev eth0 proto kernel scope link src xx.xx.91.193
> xx.xx.91.192 dev eth0 scope link
> xx.xx.91.193 dev eth0 scope link

Thank you. That is useful. Yeah, it shows clearly that eth0:0 has the
"scope link" in the route output, so it's being used as outbound IP.
Also interesting is the sort order for "ip -o addr show". It lists
eth0:0 first instead of eth0.

> Here are the same commands from another server without the issues
> 
> ip -o addr show
> 1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
> 1: lo    inet6 ::1/128 scope host \       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.153/24 brd xx.xx.91.255 scope global eth0\       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.154/24 brd xx.xx.91.255 scope global secondary eth0:0\       valid_lft forever preferred_lft forever
> 2: eth0    inet xx.xx.91.155/24 brd xx.xx.91.255 scope global secondary eth0:1\       valid_lft forever preferred_lft forever
> 2: eth0    inet6 fe80::250:56ff:fe80:73a2/64 scope link \       valid_lft forever preferred_lft forever
> 
> ip -o route show
> default via xx.xx.91.1 dev eth0
> xx.xx.91.0/24 dev eth0 proto kernel scope link src 213.198.91.153

This is *not* a 5209R, correct? The thing here is that 5207R/5208R had a
long standing "specialty" that it didn't set up all routes that it
should have set up. This actually goes way back and I'm no longer even
sure if BlueQuartz also had the issue or if the bug was introduced with
CentOS 5.

As you can see the route for 127.0.0.0/8 is missing as well as the
routes for the individual IPs. And that should not be the case.

On 5209R I fixed that bug when I patched in the IPv6 support. Which
makes me wonder if this indeed is the root cause of the problem: The
fact that we now have routes for the alias IP's, which we didn't have
before.

Could you please check if your /etc/sysconfig/network does have this
line in it:

GATEWAYDEV="eth0"

Additionally please check of it has ...

GATEWAY="xx.xx.91.1"

... in it. I'd like to know if it has one or the other or both. Because
depending on what /usr/sausalito/handlers/base/network/change_route.pl
finds it does things a bit different.

Speaking of which, there is another thing I'd like you to do:

Edit /usr/sausalito/handlers/base/network/change_route.pl and turn on
debugging by changing ...

$DEBUG = "0";

... to this:

$DEBUG = "1";

Then run the handler this way from the command line as root:

/usr/sausalito/handlers/base/network/change_route.pl -c 2

Please report back what it shows on the shell.

FWIW: It might be worth a try to edit that handler and to comment out
the "if"-condition right under this comment:

# Make sure all IPv4 extra-IPs have routes:

That should be lines 230-267 and this deals with the routes for the
alias IP's (anything but the primary IPv4 IP).

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list