[erlang-questions] Multiple SCTP associations

Serge Aleynikov <>
Sun Apr 20 04:02:19 CEST 2008


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