This just happened to me, my setup is:
cpo@CR1# show interfaces loopback lo address 172.16.254.101/32 description Loopback
And I wanted to bind the SNMP server to the IP address 172.16.254.30 which is not available on my system.
set service snmp community VyOSroxx authorization ro set service snmp community VyOSroxx network 172.16.100.0/24 set service snmp contact 'Admin <firstname.lastname@example.org>' set service snmp listen-address 172.16.254.30 port 161 set service snmp location 'Milkyway, Mars, Northpole' commit [[service snmp]] failed Commit failed
When checking the system log I see:
Dec 1 18:14:49 CR1 snmpd: Error opening specified endpoint "udp:172.16.254.30:161" Dec 1 18:14:49 CR1 snmpd: Server Exiting with code 1 Dec 1 18:14:49 CR1 systemd: snmpd.service: control process exited, code=exited status=1 Dec 1 18:14:49 CR1 systemd: Failed to start LSB: SNMP agents. Dec 1 18:14:49 CR1 systemd: Unit snmpd.service entered failed state.
Which halped me alot.
@dmbaturin shouldn't there be a generic way to support only available IP addresses on the system at all, like any +cough+ Perl script?