VRRP ICMP source address

Hi,

I wonder how VyOS selects the IP with which it responds in a traceroute when VRRP is configured.

My gateways have native IPv4 and IPv6 configured (194.156.22.121 and .121 as well as 2001:678:ddc::ff01 and 2001:678:ddc::ff02). VRRP is configured to .1 and ::1 in the same subnet.

For IPv4 it seems to be the physical (aka non-VRRP) address as one can see in this traceroute from a host with the default pointint to the VRRP IP:

# mtr -n -w 8.8.8.8
Start: 2020-10-12T09:44:13+0200
HOST: gw31            Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 194.156.22.121   0.0%    10    1.1   0.6   0.4   1.1   0.2
  2.|-- 185.1.74.31      0.0%    10    2.2   1.3   1.0   2.2   0.4
  3.|-- 212.227.112.41   0.0%    10    1.4   2.9   1.1  16.3   4.8
  4.|-- 108.170.251.193  0.0%    10    0.8   2.1   0.7  12.8   3.8
  5.|-- 216.239.40.59    0.0%    10    0.8   2.2   0.7  14.7   4.4
  6.|-- 8.8.8.8          0.0%    10    0.9   0.7   0.6   0.9   0.1

However for IPv6 it responds with the VRRP IP:

# mtr -n -w 2001:4860:4860::8888
Start: 2020-10-12T09:47:13+0200
HOST: gw31                  Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 2001:678:ddc::1        0.0%    10    0.6   1.2   0.5   4.5   1.5
  2.|-- 2001:7f8:a5::4:7147:1  0.0%    10    0.9   1.1   0.7   1.8   0.3
  3.|-- 2001:4860:1:1::6bc     0.0%    10    7.6   2.4   0.7   9.1   3.2
  4.|-- 2001:4860:0:11e1::1   20.0%    10    4.6   2.4   1.8   4.6   0.9
  5.|-- 2001:4860:0:1::4935   20.0%    10   13.9  13.8  13.6  13.9   0.1
  6.|-- 2001:4860:4860::8888   0.0%    10    1.0   1.0   0.9   1.1   0.1

I wonder if this behaviour is by design or by chance? Is there any way to configure with which IP my router will respond in traceroutes? If not would it be wise to open a topic as feature request or create a ticket in phabricator?

Hi,

in the IPv4 world, the VRRP address is a secondary address on the interface, i don’t know a related RFC but i think i remember always the primary IP will be used as source address.

ipv6 have a different implementation for multiple IPs on one interface.
there is an RFC which explain the source address selection.

So it is possible to influence the IPv6 source address selection by setting e.g. perferred_lft to 0, which would result in it being treaded similarly to an IPv4 secondary address.

Is it possible that this (or something better) could be configured as a setting in the vrrp config tree?