[asterisk-users] IPv6 and IPv4 binding address on a server with 2 network cards

Olle E. Johansson oej at edvina.net
Wed Mar 13 04:06:14 CDT 2013


; With the current situation, you can do one of four things:
;  a) Listen on a specific IPv4 address.      Example: bindaddr=192.0.2.1
;  b) Listen on a specific IPv6 address.      Example: bindaddr=2001:db8::1
;  c) Listen on the IPv4 wildcard.            Example: bindaddr=0.0.0.0
;  d) Listen on the IPv4 and IPv6 wildcards.  Example: bindaddr=::


From the configuration file - you can do "ONE" of four things, but only one. You can not have multiple bindaddr= settings.

/O
11 mar 2013 kl. 11:03 skrev Miguel Baptista <miguel.baptista at uninett.no>:

> Hi Asghar,
> 
> Thanks for you reply. Which Asterisk version are you using? 
> 
> I am using Asterisk 11.1.0 
> when I use the bindaddr  parameters with specific IP addresses, Asterisk will listen only on the last entry. 
> 
> For example, when I have 
> bindaddr=ipv4A:port 
> bindaddr=[ipv6A]:port 
> 
> it will listen only on the IPv6A address
> 
> and when I have the other way around:
> 
> bindaddr=[ipv6A]:port 
> bindaddr=ipv4A:port 
> 
> Asterisk will only listen on the IPv4A address.
> 
> The only way I found to force asterisk to listen on both IPv4A and IPv6 A was to use bindaddr=[::] but it makes asterisk to listen also on the other IP addresses.
> 
> Maybe this is fix on a newer Asterisk version.
> 
> - Miguel Baptista
> 
> On 3/10/2013 8:04 PM, Asghar Mohammad wrote:
>> 
>> hi,
>> i am using similer setup just put  bindaddr=ipv4A:port and bindaddr=[ipv6A]:port ans it should work.
>> 
>> On Sun, Mar 10, 2013 at 3:04 PM, Miguel Baptista <miguel.baptista at uninett.no> wrote:
>> Hello,
>> 
>> 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.
>> 
>> According to asterisk documentation:
>> ; With the current situation, you can do one of four things:
>> ;  a) Listen on a specific IPv4 address.      Example: bindaddr=192.0.2.1
>> ;  b) Listen on a specific IPv6 address.      Example: bindaddr=2001:db8::1
>> ;  c) Listen on the IPv4 wildcard.            Example: bindaddr=0.0.0.0
>> ;  d) Listen on the IPv4 and IPv6 wildcards.  Example: bindaddr=::
>> ; (You can choose independently for UDP, TCP, and TLS, by specifying different values for
>> ; "udpbindaddr", "tcpbindaddr", and "tlsbindaddr".)
>> ; (Note that using bindaddr=:: will show only a single IPv6 socket in netstat.
>> ;  IPv4 is supported at the same time using IPv4-mapped IPv6 addresses.)
>> ;
>> ; You may optionally add a port number. (The default is port 5060 for UDP and TCP, 5061
>> ; for TLS).
>> ;   IPv4 example: bindaddr=0.0.0.0:5062
>> ;   IPv6 example: bindaddr=[::]:5062
>> ;
>> ; The address family of the bound UDP address is used to determine how Asterisk performs
>> ; DNS lookups. In cases a) and c) above, only A records are considered. In case b), only
>> ; AAAA records are considered. In case d), both A and AAAA records are considered. Note,
>> ; however, that Asterisk ignores all records except the first one. In case d), when both A
>> ; and AAAA records are available, either an A or AAAA record will be first, and which one
>> ; depends on the operating system. On systems using glibc, AAAA records are given
>> ; priority.
>> 
>> Lets say that I have two network cards: A and B. 
>> Both interfaces have IPv4 and IPv6 addresses: IPv4 A, IPv6 A, IPv4 B and IPv6 B.
>> 
>> How can I make asterisk to run only on B network addresses (IPv6 and IPv4)? The bindaddr=[::] 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.
>> 
>> - Miguel Baptista
>> 
>> 
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>> 
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>> 
>> 
>> 
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>> 
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130313/752b26df/attachment.htm>


More information about the asterisk-users mailing list