<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I am doing some tests with asterisk on a dual-stack environment. I
have some doubts regarding asterisk binding addresses on a server
with 2 network cards.<br>
<br>
According to asterisk documentation:<br>
<blockquote><i><small>; With the current situation, you can do one
of four things:</small></i><br>
<i><small>; a) Listen on a specific IPv4 address. Example:
bindaddr=192.0.2.1</small></i><br>
<i><small>; b) Listen on a specific IPv6 address. Example:
bindaddr=2001:db8::1</small></i><br>
<i><small>; c) Listen on the IPv4 wildcard. Example:
bindaddr=0.0.0.0</small></i><br>
<i><small>; d) Listen on the IPv4 and IPv6 wildcards. Example:
bindaddr=::</small></i><br>
<i><small>; (You can choose independently for UDP, TCP, and TLS,
by specifying different values for</small></i><br>
<i><small>; "udpbindaddr", "tcpbindaddr", and "tlsbindaddr".)</small></i><br>
<i><small>; (Note that using bindaddr=:: will show only a single
IPv6 socket in netstat.</small></i><br>
<i><small>; IPv4 is supported at the same time using IPv4-mapped
IPv6 addresses.)</small></i><br>
<i><small>;</small></i><br>
<i><small>; You may optionally add a port number. (The default is
port 5060 for UDP and TCP, 5061</small></i><br>
<i><small>; for TLS).</small></i><br>
<i><small>; IPv4 example: bindaddr=0.0.0.0:5062</small></i><br>
<i><small>; IPv6 example: bindaddr=[::]:5062</small></i><br>
<i><small>;</small></i><br>
<i><small>; The address family of the bound UDP address is used to
determine how Asterisk performs</small></i><br>
<i><small>; DNS lookups. In cases a) and c) above, only A records
are considered. In case b), only</small></i><br>
<i><small>; AAAA records are considered. In case d), both A and
AAAA records are considered. Note,</small></i><br>
<i><small>; however, that Asterisk ignores all records except the
first one. In case d), when both A</small></i><br>
<i><small>; and AAAA records are available, either an A or AAAA
record will be first, and which one</small></i><br>
<i><small>; depends on the operating system. On systems using
glibc, AAAA records are given</small></i><br>
<i><small>; priority.</small></i><br>
</blockquote>
<br>
Lets say that I have two network cards: A and B. <br>
Both interfaces have IPv4 and IPv6 addresses: IPv4 A, IPv6 A, IPv4 B
and IPv6 B.<br>
<br>
How can I make asterisk to run only on B network addresses (IPv6 and
IPv4)? <small><big>The </big></small><i><small><big>bindaddr=[::]
</big></small></i><small><big>config parameter tells asterisk to
run on all available addresses, including the addresses on the A
network. But that's not exactly what I want.<br>
<br>
- Miguel Baptista<br>
<br>
</big></small>
</body>
</html>