Sabtu, 13 Maret 2010

How to Set Up SCTP in Linux

Before we start to set up SCTP in Linux, Fedora 12 with kernel over 2.6.31 should be prepared. Because Fedora 12 has SCTP kernel as the kernel module, kernel recompile is not needed for our case. Instead, the SCTP kernel module is simply needed to be loaded into the RAM memory on the Fedora 12 with the command ‘modprobe’. The command ‘modprobe SCTP’ plays a role on loading SCTP module into the RAM; see Figure 1

Figure 1 Load SCTP module into the kernel

The SCTP module should be loaded on both the server and the client. After that, it can be assumed that both the server and client have already configured theLinux platform so that they are capable of supporting the SCTP protocol. The next step is to activate the DAR extension of SCTP, to ensure that mSCTP is supported by Linux. The parameter ‘addip_enable’ is the indicator whether DAR extension is active or not. When ‘addipenable’ is 0, Add-IP extension is inactive while it is active when ‘addip-enable’ is 1.

Command ‘echo 1>/proc/sys/net/sctp/addip_enable’ is used to make Linux support mSCTP. Command ‘more /proc/sys/net/sctp/addip_enable’ approves the information.

See Figure 2:

Figure 5.3 Active Add-IP extension of SCTP

One problem with the SCTP protocol in Linux is that it does not support SCTP APIs itself, while SCTP APIs are required to be used for coding the mSCTP handover. At this point, we downloaded an additional tool from called LKSCTP, which is able to provide SCTP API functions. There are many versions of the LKSCTP tool, the latest one is 1.0.11. The one used in our testbed is version 1.0.10. The following steps have been taken to build LKSCTP in Linux:
  • Become root user to install LKSCTP by command: su –
  • Enter the LKSCTP directory containing the download RPM files of LKSCTP by command cd /root/fde13 (my own directory).
  • Install the RPM flies by command: rpm *.lksctp-tools-1.0.10-1.rpm
  • Untar the LKSCTP tools directory from the gzipped tarball by command: tar –xzvf lksctp-tools-1.0.10.tar
  • Enter the LKSCTP tool directory by command: cd /lksctp-tools-1.0.10
  • configure LKSCTP by command: ./configure
  • make LKSCTP by command: make
After the success of “make” operation, the LKSCTP tools has been loaded into the Linux
kernel. The following Figure shows how to check whether LKSCTP is supported by
Linux or not.

Figure 5.4 LKSCTP tools for Linux

In Figure 5.4, the command ‘checksctp’ indicates whether the server and the client support LKSCTP or not. The result shows that both of them support LKSCTP.

2 komentar:

  1. Respected Sir.

    I am doing Research on SCTP.

    and I have Configure SCTP(LKSCTP) in Ubuntu.

    and i have test SCTP protocol using this code.......

    Codes at the client:

    $ ./iperf -c -w 32M -t 60 -i 10 –z

    Codes at the server for testing purpose:

    $ ./iperf -s -w 32M –z

    I have get Outout Like this....

    Server listening on TCP port 5001
    TCP window size: 256 KByte (WARNING: requested 32.0 MByte)

    Instead of this..

    Server listening on SCTP port 5001
    TCP window size: 61.8 MByte (WARNING: requested 32.0 MByte)

    So, how I can configure SCTP Protocol in ubuntu ?

    Your Review is very important more me.........


  2. Hi,

    Any idea to disable the heartbeat option in SCTP kernel?

    I am sending video stream but it close automatic.