Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ccsupport

#1
Hi

We have a straightforward setup with CARP configured for WAN and LAN which is working fine. We also set up Kia DHCP and failover from Master/primary (when it's switched off) to the backup only occurs after 5-6 unacted clients and never occurs after "sync-timeout": 60000. This was tested a few times.

Config is:

kea-ctrl-agent.conf on both servers:

{
"Control-agent": {
    "http-host": "127.0.0.1",
    "http-port": 8000,
    "control-sockets": {
        "dhcp4": {
            "socket-type": "unix",
            "socket-name": "/var/run/kea4-ctrl-socket"
        },
        "dhcp6": {
            "socket-type": "unix",
            "socket-name": "/var/run/kea6-ctrl-socket"
        },
        "d2": {
            "socket-type": "unix",
            "socket-name": "/var/run/kea-ddns-ctrl-socket"
        }
    },
    "loggers": [
    {
        "name": "kea-ctrl-agent",
        "output_options": [
            {
                "output": "syslog"
            }
        ],
        "severity": "INFO",
        "debuglevel": 0
    }
  ]
}
}


kea-dhcp4.conf on MASTER/primary:

{
    "Dhcp4": {
        "valid-lifetime": 1800,
        "interfaces-config": {
            "interfaces": ["em0"]
        },
        "lease-database": {
            "type": "memfile",
            "persist": true
        },
        "control-socket": {
            "socket-type": "unix",
            "socket-name": "/var/run/kea4-ctrl-socket"
        },
        "loggers": [
            {
                "name": "kea-dhcp4",
                "output_options": [
                    {
                        "output": "syslog"
                    }
                ],
                "severity": "INFO"
            }
        ],
        "subnet4": [
            {
                "id": 1,
                "subnet": "192.168.222.0/24",
                "option-data": [
                    {
                        "name": "domain-name-servers",
                        "data": "192.168.222.1"
                    },
                    {
                        "name": "routers",
                        "data": "192.168.222.1"
                    },
                    {
                        "name": "ntp-servers",
                        "data": "192.168.222.1"
                    },
                    {
                        "name": "domain-name",
                        "data": "citi.intranet"
                    }
                ],
                "pools": [
                    { "pool": "192.168.222.20 - 192.168.222.245" }
                ],
                "reservations": [
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.2",
                        "hostname": "OPNsense1.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.3",
                        "hostname": "OPNsense2.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.6",
                        "hostname": "srvr-2.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.5",
                        "hostname": "srvr-1.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.7",
                        "hostname": "srvr-3.citi.intranet"
                    }
                ]
            }
        ]
        ,"hooks-libraries": [
            {
                "library": "/usr/local/lib/kea/hooks/libdhcp_lease_cmds.so",
                "parameters": { }
            },
            {
                "library": "/usr/local/lib/kea/hooks/libdhcp_ha.so",
                "parameters": {
                    "high-availability": [ {
                        "this-server-name": "OPNsense1",
                        "mode": "hot-standby",
                        "heartbeat-delay": 10000,
                        "max-response-delay": 60000,
                        "max-ack-delay": 5000,
                        "max-unacked-clients": 5,
                        "sync-timeout": 60000,
                        "peers": [
                            {
                                "name": "OPNsense1",
                                "role": "primary",
                                "url": "http://192.168.222.2:8001/"
                            },
                            {
                                "name": "OPNsense2",
                                "role": "standby",
                                "url": "http://192.168.222.3:8001/"
                            }
                        ]
                    } ]
                }
            }
        ]
    }
}


kea-dhcp4.conf on BACKUP:

{
    "Dhcp4": {
        "valid-lifetime": 1800,
        "interfaces-config": {
            "interfaces": ["em0"]
        },
        "lease-database": {
            "type": "memfile",
            "persist": true
        },
        "control-socket": {
            "socket-type": "unix",
            "socket-name": "/var/run/kea4-ctrl-socket"
        },
        "loggers": [
            {
                "name": "kea-dhcp4",
                "output_options": [
                    {
                        "output": "syslog"
                    }
                ],
                "severity": "INFO"
            }
        ],
        "subnet4": [
            {
                "id": 1,
                "subnet": "192.168.222.0/24",
                "option-data": [
                    {
                        "name": "domain-name-servers",
                        "data": "192.168.222.1"
                    },
                    {
                        "name": "routers",
                        "data": "192.168.222.1"
                    },
                    {
                        "name": "ntp-servers",
                        "data": "192.168.222.1"
                    },
                    {
                        "name": "domain-name",
                        "data": "citi.intranet"
                    }
                ],
                "pools": [
                    { "pool": "192.168.222.20 - 192.168.222.245" }
                ],
                "reservations": [
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.2",
                        "hostname": "OPNsense1.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.3",
                        "hostname": "OPNsense2.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.6",
                        "hostname": "srvr-2.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.5",
                        "hostname": "srvr-1.citi.intranet"
                    },
                    {
                        "hw-address": "[mac]",
                        "ip-address": "192.168.222.7",
                        "hostname": "srvr-3.citi.intranet"
                    }
                ]
            }
        ]
        ,"hooks-libraries": [
            {
                "library": "/usr/local/lib/kea/hooks/libdhcp_lease_cmds.so",
                "parameters": { }
            },
            {
                "library": "/usr/local/lib/kea/hooks/libdhcp_ha.so",
                "parameters": {
                    "high-availability": [ {
                        "this-server-name": "OPNsense2",
                        "mode": "hot-standby",
                        "heartbeat-delay": 10000,
                        "max-response-delay": 60000,
                        "max-ack-delay": 5000,
                        "max-unacked-clients": 5,
                        "sync-timeout": 60000,
                        "peers": [
                            {
                                "name": "OPNsense1",
                                "role": "primary",
                                "url": "http://192.168.222.2:8001/"
                            },
                            {
                                "name": "OPNsense2",
                                "role": "standby",
                                "url": "http://192.168.222.3:8001/"
                            }
                        ]
                    } ]
                }
            }
        ]
    }
}


Log extract is attached. Expected behavior - if master/primary is not reachable after 60 seconds switch to Backup. This doesn't happen - it's possibly a bug. Failover only occurs after 5-6 unacted clients.

Thanks.
#2
OK, so we can use 'freeipmi' package instead of 'ipmitool'.

Still don't know how to install 'sysutils/megacli'  :(
#3
Hi

We are currently in testing stage and try to install 'sysutils/megacli' and 'ipmitool' but get "No packages available to install..." for both.

How would we install them 2 packages? Enabling 'usr/local/etc/pkg/repos/FreeBSD.conf' makes 'ipmitool' available but attempting to install it results in 'pkg' update request which we are afraid to do in case it breaks OPNsense update in the future. No solution for getting 'sysutils/megacli' and we are new to FreeBSD distro...

Any help would be appreciated.