### Description
I prefer to use interface name for `listen`
*example* ``` listen=udp:eth0:5060 ```
When `kamailo` started then bounded only to IPv4 address. Could be added feature dual-stack bounding when used interface name.
tested latest master.
for dual-stack Kamailio may be used `advertise` option like ``` listen=udp:eth0:5060 advertise "dual-stack.kamailio.org" ```
I haven't worked with this one, but have you set:
https://www.kamailio.org/wiki/cookbooks/devel/core#auto_bind_ipv6
Look as good approach but now has some error I configured ``` listen=udp:eth0:5060 auto_bind_ipv6=1 bind_ipv6_link_local=0 ``` And when start kamailio get error ``` / # kamailio -DD -E Listening on udp: 192.168.2.10:5060 udp: 2600:70FF:B0CF:0:6C3E:2B62:BA0C:A6CC:5060 udp: FE80:0:0:0:B951:EF1F:76C8:E5A2:5060 Aliases: udp: fe80::b951:ef1f:76c8:e5a2:5060 udp: 2600:70ff:b0cf:0:6c3e:2b62:ba0c:a6cc:5060 udp: kazoo.aio:5060
0(32) INFO: <core> [core/tcp_main.c:4982]: init_tcp(): using epoll_lt as the io watch method (auto detected) 0(32) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded 0(32) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available 0(32) INFO: <core> [main.c:2834]: main(): processes (at least): 33 - shm size: 67108864 - pkg size: 8388608 0(32) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 0(32) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 0(32) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 0(32) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 0(32) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 0(32) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 0(32) ERROR: <core> [core/udp_server.c:401]: udp_init(): bind(a, 0x7fcb12d1da08, 28) on FE80:0:0:0:B951:EF1F:76C8:E5A2: Invalid argument 0(32) ERROR: <core> [core/udp_server.c:407]: udp_init(): might be caused by using a link local address, is 'bind_ipv6_link_local' set? 0(32) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized ```
From log messages it looks like you have to set `bind_ipv6_link_local=1`.
Regarding the ipv6 params default values: not sure about others, but I haven't seen relevant increase in SIP over IPv6 and turning auto-binding will use more resources on server side (creating children processes) without being used. Before next major release we can have another round of how default config should be updated. But, again, it should not become something complex for new comers. There is always the `misc/examples/pkg/kamailio-oob.cfg` which aims to be a more complete/complex `out-of-box` config, you can add there.
Did `bind_ipv6_link_local=1` make it work?
yes, that works but local link address is also present ```sh / # kamailio -DD -E Listening on udp: 192.168.5.7:5060 udp: 2600:70FF:B0CF:0:6C3E:2B62:BA0C:A6CC:5060 udp: FE80:0:0:0:86B7:634:47E:6A56:5060 Aliases: udp: fe80::86b7:634:47e:6a56:5060 udp: 2600:70ff:b0cf:0:6c3e:2b62:ba0c:a6cc:5060 udp: 192.168.5.7:5060
0(16) INFO: <core> [core/tcp_main.c:4982]: init_tcp(): using epoll_lt as the io watch method (auto detected) 0(16) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded 0(16) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available 0(16) INFO: <core> [main.c:2834]: main(): processes (at least): 33 - shm size: 67108864 - pkg size: 8388608 0(16) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 0(16) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 0(16) INFO: <core> [core/udp_server.c:324]: udp_init(): setting scope of 2600:70FF:B0CF:0:6C3E:2B62:BA0C:A6CC 0(16) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 0(16) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 0(16) INFO: <core> [core/udp_server.c:324]: udp_init(): setting scope of FE80:0:0:0:86B7:634:47E:6A56 0(16) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 0(16) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 29(45) INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/45 31(47) INFO: ctl [io_listener.c:213]: io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config) ```
Yes, the supported mode is bind to all available IPv6 and IPv4 interfaces (like it is also done for loopback interfaces in such case), or explicitly set the listen sockets.
If someone wants to filter out some interfaces in auto bind mode, just make a PR.
Closed #2404.
why kamailio not start if "bind_ipv6_link_local=0"?
Because you have link local addresses -- if you are not familiar with, read about the scopes of IPv6 addresses. If they are not needed in your server, try to remove them (if possible, because link local is automatically assigned).