Why IPv6 virtual_ipaddress of keepalived is selected as source?

Solution Unverified - Updated -

Issue

  • Why IPv6 virtual_ipaddress of keepalived is selected as source?
  • How to change it to a NIC's IPv6 address.

Sample configuration:

# nmcli con show ens3 | grep ipv6.addresses
ipv6.addresses:                         2001:db8:0:1::1/64
# cat /etc/keepalived/keepalived.conf
vrrp_instance TEST {
    state MASTER
    interface ens3
    virtual_router_id 1
    virtual_ipaddress {
        2001:db8:0:1::100/64 dev ens3
    }
}
# ip -6 addr show dev ens3
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2001:db8:0:1::100/64 scope global nodad 
       valid_lft forever preferred_lft forever
    inet6 2001:db8:0:1::1/64 scope global tentative noprefixroute dadfailed 
       valid_lft forever preferred_lft forever
    inet6 fe80::ea7e:d3bc:7601:8eb6/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
# 
# telnet 2001:db8:0:1::2
Trying 2001:db8:0:1::2...
telnet: connect to address 2001:db8:0:1::2: Connection refused
# 

On another terminal
# tcpdump -i ens3 -nn port 23 2> /dev/null 
15:56:14.450567 IP6 2001:db8:0:1::100.55836 > 2001:db8:0:1::2.23: Flags [S], seq 3490211945, win 28800, options [mss 1440,sackOK,TS val 1176158 ecr 0,nop,wscale 7], length 0
15:56:14.450986 IP6 2001:db8:0:1::2.23 > 2001:db8:0:1::100.55836: Flags [R.], seq 0, ack 3490211946, win 0, length 0
# 

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content