ctdb w/ per_ip_routing

Martin Schwenke martin at meltin.net
Fri Jan 10 16:08:07 MST 2014


Hi Bill,

On Fri, 10 Jan 2014 16:53:05 -0600, William Marshall
<bmarsh at us.ibm.com> wrote:

> I am trying to setup ctdb on Red Hat 6.4. The system has 2 interfaces and
> I'm want to have some public addresses on each interface. I don't know how
> typical it is, but my networks require me to respond to the packets on the
> interface they arrived on.

Which version of CTDB are you running?  The per-ip-routing support has
been substantially rewritten in the 2.x series.  However, it won't
directly change the answer since the behaviour hasn't changed much.

> I was able to modify /etc/ctdb/events.d/13.per_ip_routing so that a default
> entry was created in addition to the IP route add command that was already
> there, but I'd like to know if this change makes sense.

I don't think you need to do that...
> 
> All the IPs on my eth0 (10.10.227.x) were working fine. Today I was adding
> a public IP on eth1 (10.10.228.x)
> 
> Here's some of the settings I have. Initially I tried the
> auto_routing_conf, but that didn't work. It might work now w/ the added
> default.
> 
> CTDB_PER_IP_ROUTING_CONF="/etc/ctdb/per_ip_routing.conf"
> CTDB_PER_IP_ROUTING_TABLE_ID_LOW=240
> CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=246
> CTDB_PER_IP_ROUTING_RULE_PREF=100
> CTDB_PER_IP_ROUTING_DEBUG=yes

Your LOW and HIGH setting are nice and conservative, so you're unlikely
to accidentally stomp on any other tables by accident.  However, if you
add IP addresses in the future and forget to expand that range then you
might see weird failures.  I'd suggest a wider range somewhere
between 1000 and 9000...

> # cat /etc/ctdb/per_ip_routing.conf	     (this doesn't have entries for the
> other public addresses, since they were routing OK via the default. I will
> add them.)
> # <public_ip_address> <network> [<gateway>]
> 10.10.228.49 10.10.228.0/25 10.10.228.1
> 
> Initially, I was only getting the 1st line in my route table, I added a
> line to the /etc/ctdb/events.d/13.per_ip_routing to create the default
> line.
> #  ip route show table 241
> 10.10.228.0/25 via 10.10.228.1 dev eth1
> default via 10.10.228.1 dev eth1

Instead of modifying 13.per_ip_routing, does adding the follow to
per_ip_routing.conf give you what you want?

  10.10.228.49 0.0.0.0/0 10.10.228.1

peace & happiness,
martin


More information about the samba-technical mailing list