Virtuals IP running simultaneously

From: Mauricio Fernandez <mmauricio(dot)fernandez(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Virtuals IP running simultaneously
Date: 2025-02-27 11:23:08
Message-ID: CAMdfv4Vw3Sh_+neRKkW1wVJm92AhzqCe8Peebp0Y3VEmMAuwAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greetings wise community.

I'm implementing a High Availability system using repmgr 5.5.0, Postgresql
17.1 and *Linux OEL 9.5.* All is working fine.

I need to do the next step and implement two virtual ip (VIP) in each node.
Usually the preferred method was replicating the interface scripts in
/etc/sysconfig/network-scripts, but today linux recommends using nmcli.

I have been able to create the VIPs, but I can't achieve both of them
running simultaneously. Any time I try to run one of them, the other falls
down.

I have created the VIP in the following way:

Initially:

*[root(at)oel9base ~]# nmcli conn*
NAME UUID TYPE DEVICE
enp0s3 763e2ff9-0a34-4ff5-b215-db1949d8b30d ethernet enp0s3
lo 1cf316e4-409e-4a4d-8086-d9df2a612a69 loopback lo

*[root(at)oel9base ~]# nmcli connection add type ethernet ifname enp0s3
con-name enp0s3:0 ipv4.method manual ipv4.address 192.168.0.200/24
<http://192.168.0.200/24> ipv4.gateway 192.168.0.1*Connection 'enp0s3:0'
(78526e2b-669b-4e1e-85cb-775cfb0d5630) successfully added.

*[root(at)oel9base ~]# nmcli connection modify enp0s3:0 ipv4.dns "8.8.8.8
8.8.4.4"*

*[root(at)oel9base ~]# nmcli connection add type ethernet ifname enp0s3
con-name enp0s3:1 ipv4.method manual ipv4.address 192.168.0.202/24
<http://192.168.0.202/24> ipv4.gateway 192.168.0.1*Connection 'enp0s3:1'
(53ef8070-7699-4594-b7ef-855551285158) successfully added.

*[root(at)oel9base ~]# nmcli connection modify enp0s3:1 ipv4.dns "8.8.8.8
8.8.4.4"*

*[root(at)oel9base ~]# nmcli conn*NAME UUID
TYPE DEVICE
enp0s3 763e2ff9-0a34-4ff5-b215-db1949d8b30d ethernet enp0s3
lo 1cf316e4-409e-4a4d-8086-d9df2a612a69 loopback lo
enp0s3:0 78526e2b-669b-4e1e-85cb-775cfb0d5630 ethernet --
enp0s3:1 53ef8070-7699-4594-b7ef-855551285158 ethernet --

Even I have added the addresses to the original connection:

[root(at)oel9base ~]# nmcli conn modify enp0s3 +ipv4.addresses 192.168.0.200/24
[root(at)oel9base ~]# nmcli conn modify enp0s3 +ipv4.addresses 192.168.0.202/24

The way I have proceeded is what I've found on the internet, I don't know
what I'm missing.

I would appreciate any suggestions

kind regards

Mauricio Fernández

Browse pgsql-admin by date

  From Date Subject
Next Message Sri Mrudula Attili 2025-02-27 15:54:06 mysql_fdw for postgresql version 16
Previous Message Ron Johnson 2025-02-26 21:01:14 Re: Super user password explicit in patroni yml