SCTP has native multi-homing support which if I understand it correctly will automatically reroute your packets over a secondary NIC if the primary interface goes down. I duplicated this functionality with TCP by writing a custom routing deamon to modify the routing tables if my primary NIC goes down. I would like to try using SCTP instead.

In Steven's Unix Network Programming V1 3rd Edition on page 288 it says:

For this example, we use a one-to-many-style server. We make this choice for one important reason. The examples in Chapter 5 can be modified to run over SCTP with one minor change: modify the socket function call to specify IPPROTO_SCTP instead of IPPROTO_TCP as the third argument. Simply making this change, however, would not take advantage of any of the additional features provided by SCTP except multi-homing.

Now I've tried this with fairly poor results.

I'm running on Ubuntu 9.04 with the libsctp1, libsctp-dev, and lksctp-tools packages installed. I've verified with lksctp-tools that SCTP is working properly.

I took the UNP example code and modified as indicated above the ~/unpv13e/tcpcliserv/tcpserv04.c and ~/unpv13e/select/tcpcli02.c programs.

This is a simple echo server / client pair. The server runs apparently listening, but the client exits saying the connection was refused. Since netstat doesn't support SCTP I used lsof -n | grep tcpserv which showed me:

tcpserv04 6208      alice    3u     sock        0,4            33889 can't identify protocol

This doesn't seem to tell me much other than tcpserv04 has some kind of socket open.

Edit
Report