[erlang-questions] Multiple SCTP associations

Serge Aleynikov <>
Tue Apr 22 03:48:00 CEST 2008


All SCTP message types are defined in sctp_inet.hrl.  I also recall we 
had quite some trouble a couple of years ago getting our M3UA 
implementation working before figuring out that ppid needed to be set...

In SCTP an association is a unique identity of an endpoint.  A single 
socket can have a large number of associations, and they are dynamically 
assigned by the stack when a new client is connected.

Please share your experience with the throughput involving multiple 
client associations on a single SCTP socket.  I expect it to be not 
worse than of TCP.

Regards,

Serge

Kenneth Flanagan wrote:
> Hi Serge,
> Thanks for that. It's multiple single homed I trying to use and I've
> worked out what I'm doing wrong. Initially I had problems sending h.248
> because I couldn't find hrl's for record #sctp_sndrcvinfo where you need
> to change the ppid (7 for h.248). I eventually copied in the structure
> to my own hrl and set assoc_id = 1 by default, so every instance of my
> MGW tried to use the same.
> 
> Once I make assoc_id dynamic (i.e. different for every instance of the
> MGW) it works fine. Thanks again for the mail. I've muddled my own way
> with SCTP_o_erlang up to now. Nice to know someone can help out :)
> 
> Best Regards,
> Ken.
> 
> -----Original Message-----
> From: Serge Aleynikov [mailto:] 
> Sent: 20 April 2008 03:02
> To: Kenneth Flanagan
> Cc: 
> Subject: Re: [erlang-questions] Multiple SCTP associations
> 
> I am not able to reproduce your problem on Fedora Core 8, R11B-5.  Note
> that for the sake of example I opened the multi-homed server socket on
> two IPs, though this works even if you augment the IPs (e.g. 
> gen_sctp:open(1234)).
> 
> NodeA:
> 
> 4> f(S), {ok, S} =
> gen_sctp:open([{port,1234},{ip,{192,168,0,14}},{ip,{192,168,0,13}}]).
> {ok,#Port<0.97>}
> 5> gen_sctp:listen(S, true).
> ok
> 6> gen_sctp:recv(S).
> {ok,{{192,168,0,14},32785,[],{sctp_assoc_change,comm_up,0,10,10,4}}}
> 7> gen_sctp:recv(S).
> {ok,{{192,168,0,13},32786,[],{sctp_assoc_change,comm_up,0,10,10,7}}}
> 8> gen_sctp:recv(S).
> {ok,{{192,168,0,14},
>       32785,
>       [{sctp_sndrcvinfo,3,0,[],0,0,0,2115484281,0,4}],
>       <<"Test">>}}
> 
> 
> NodeB:
> 1> f(S), {ok, S} = gen_sctp:open([{ip, {192,168,0,14}}]).
> {ok,#Port<0.100>}
> 2> f(A), {ok, A} = gen_sctp:connect(S, {192,168,0,13}, 1234, []).
> {ok,{sctp_assoc_change,comm_up,0,10,10,2}}
> 
> NodeC:
> 1> f(S), {ok, S} = gen_sctp:open([{ip,{192,168,0,13}}]).
> {ok,#Port<0.101>}
> 2> f(A), {ok, A} = gen_sctp:connect(S, {192,168,0,13}, 1234, []).
> {ok,{sctp_assoc_change,comm_up,0,10,10,6}}
> 
> NodeB:
> 3> gen_sctp:send(S, A, 3, <<"Test">>).
> ok
> 
> 
> Kenneth Flanagan wrote:
>> Hello,
>> I have written a very simple H.248/SCTP Media Gateway application for 
>> loading up our Gateway Controller. Initially I had a lot of problems 
>> getting SCTP working, and finally it did with Debian Linux and Erlang 
>> OTP R11B-5. It works fine simulating one MGW, accepting over a 1000 
>> calls/second, but I need to simulate multiple MGWs (to show calls 
>> between MGWs, and I have enough processor capacity & bandwidth to do 
>> it).
>>
>> There is only 1 network card available for SCTP, and I have multiple 
>> virtual interfaces. The problem is when I open another association and
> 
>> try to send data I get error "epipe". It does not matter if I open 
>> another erlang node, or try it on the same node. The IP addresses work
> 
>> individually, i.e. it's not the address that has the problem.
>>
>> I would appreciate any help/comments on this, Best Regards, Ken.
>>
>> ----------------------------------------------------------------------
>> --
>> ----------------------------------------------------------------------
>> --
>> ----------------------------------------------------------------------
>> -
>> LM Ericsson Limited
>> Registered Office: Beech Hill, Clonskeagh, Dublin 4 Registered Number 
>> in Ireland : 21679
> 




More information about the erlang-questions mailing list