0

即使我为接口配置了 IP 地址,我仍不断收到错误消息 (VI_1) 进入 FAULT 状态(接口没有 IPv4 地址)。我配置错了什么?

这是我的接口配置:

3: eno4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 24:6e:96:22:63:25 brd ff:ff:ff:ff:ff:ff
    inet 10.20.20.205/24 brd 10.20.20.255 scope global eno4
       valid_lft forever preferred_lft forever
    inet6 fe80::266e:96ff:fe22:6325/64 scope link 
       valid_lft forever preferred_lft forever
# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      dhcp4: true
    eno3:
      dhcp4: no
      dhcp6: no
      addresses: [10.20.20.204/24]
      nameservers:
        addresses: [8.8.8.8,8.8.8.4]
    eno4:
      dhcp4: no
      dhcp6: no
      addresses: [10.20.20.205/24]
      nameservers:
        addresses: [8.8.8.8,8.8.8.4]
  version: 2
  renderer: networkd

这是我的keepalived状态:

● keepalived.service - Keepalive Daemon (LVS and VRRP)
     Loaded: loaded (/lib/systemd/system/keepalived.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-02-01 18:57:02 UTC; 6s ago
   Main PID: 3350 (keepalived)
      Tasks: 2 (limit: 154493)
     Memory: 1.9M
     CGroup: /system.slice/keepalived.service
             ├─3350 /usr/sbin/keepalived --dont-fork
             └─3354 /usr/sbin/keepalived --dont-fork

Feb 01 18:57:02 inginiousserver1 Keepalived[3350]: WARNING - keepalived was build for newer Linux 5.4.151, running on Linux 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022
Feb 01 18:57:02 inginiousserver1 Keepalived[3350]: Command line: '/usr/sbin/keepalived' '--dont-fork'
Feb 01 18:57:02 inginiousserver1 Keepalived[3350]: Opening file '/etc/keepalived/keepalived.conf'.
Feb 01 18:57:02 inginiousserver1 Keepalived[3350]: Starting VRRP child process, pid=3354
Feb 01 18:57:02 inginiousserver1 Keepalived_vrrp[3354]: Registering Kernel netlink reflector
Feb 01 18:57:02 inginiousserver1 Keepalived_vrrp[3354]: Registering Kernel netlink command channel
Feb 01 18:57:02 inginiousserver1 Keepalived_vrrp[3354]: Opening file '/etc/keepalived/keepalived.conf'.
Feb 01 18:57:02 inginiousserver1 Keepalived_vrrp[3354]: (VI_1) entering FAULT state (no IPv4 address for interface)
Feb 01 18:57:02 inginiousserver1 Keepalived_vrrp[3354]: (VI_1) entering FAULT state
Feb 01 18:57:02 inginiousserver1 Keepalived_vrrp[3354]: Registering gratuitous ARP shared channel

“错误”是:(VI_1)进入 FAULT 状态(接口没有 IPv4 地址)

最后但并非最不重要的是,这是我的 keepalived 配置:

掌握:

vrrp_instance VI_1 {
    state MASTER
    interface eno4
    virtual_router_id 101
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        10.20.20.205/24
    }
}

奴隶:

vrrp_instance VI_1 {
    state MASTER
    interface eno4
    virtual_router_id 101
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        10.20.20.205/24
    }
}
4

0 回答 0