Stream Control Transmission Protocol (SCTP) is a reliable, message-oriented, multihomed transport protocol. Developed by the IETF SIGTRAN working group to transport SS7 over IP, it is now the third general-purpose transport developed by the IETF.
I am facing a strange issue with SCTP handshake when multihoming(2 IPs configured) is enabled. When a SCTP client is connected with multihomed SCTP server, INIT_ACK(from server) is not having both IPs, hence SCTP connection is not multihomed i.e not highly available. Due to that when server's primary IP is down, SCTP connection is disconnected.
This issue happens when specific set of IPs are configured in SCTP multihomed server i.e 1.0.0.1(a service ip configured as primary ip) and public IP is cofigured as secondary IP. However, when the order of IP configuration is reversed i.e public ip as primary and service ip as secondary, SCTP handshake contains both IPs in INIT_ACK.
I don't see any issue with server not listening on both IPs in any of above scenarios. Both the scenarios, server is binding and listeining on both IPs.
Please help me to resolve this issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to use socket options SCTP_PRIMARY_ADDR to make one of local address of SCTP association as primary and SCTP_SET_PEER_PRIMARY_ADDR to request SCTP server to make one of it's address as primary for SCTP future communication.
structsctp_setprimsetPrimary;memset((void*)&setPrimary, 0, sizeof(structsctp_setprim));setPrimary.ssp_assoc_id=0;structsockaddr_in*in_addr;in_addr=(structsockaddr_in*)&setPrimary.ssp_addr;in_addr->sin_port=htons(localPort);in_addr->sin_family=AF_INET;in_addr->sin_addr.s_addr=localIps[0].Int32NetworkOrder();intrc=setsockopt(m_s, IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &setPrimary, sizeof(structsctp_setprim));Forabovesnippetofcode, Iseesocketerror"Invalid argument". Idon't know the reason behind this error. I have verified ip address.AlsoforSCTP_SET_PEER_PRIMARY_ADDR, belowcodesnippetisadded.
structsctp_setpeerprimsetPeerPrimary;memset((void*)&setPeerPrimary, 0, sizeof(structsctp_setpeerprim));setPeerPrimary.sspp_assoc_id=0;structsockaddr_in*in_addr;in_addr=(structsockaddr_in*)&setPeerPrimary.sspp_addr;in_addr->sin_port=htons(remotePort);in_addr->sin_family=AF_INET;in_addr->sin_addr.s_addr=remoteIps[0].Int32NetworkOrder();intrc=setsockopt(m_s, IPPROTO_SCTP, SCTP_SET_PEER_PRIMARY_ADDR, &setPeerPrimary, sizeof(structsctp_setpeerprim));Forthiscodeblock, Iseeerror"Operation not permitted". Andagain, I'm clueless about this error reason.AmIdoingsomethingreallywrongormysctplibraryisn't supporting above socket options?Pleasehelp.
Last edit: Rajesh Ghildiyal 2020-01-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way after association failure to retrieve UNSENT to peers and UNACKNOWLEDGED by peers Data Chunks ?
I am using RHEL8.4 and sockets are set in NON BLOCKING mode.
Thank you for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi SCTP Experts,
I am facing a strange issue with SCTP handshake when multihoming(2 IPs configured) is enabled. When a SCTP client is connected with multihomed SCTP server, INIT_ACK(from server) is not having both IPs, hence SCTP connection is not multihomed i.e not highly available. Due to that when server's primary IP is down, SCTP connection is disconnected.
This issue happens when specific set of IPs are configured in SCTP multihomed server i.e 1.0.0.1(a service ip configured as primary ip) and public IP is cofigured as secondary IP. However, when the order of IP configuration is reversed i.e public ip as primary and service ip as secondary, SCTP handshake contains both IPs in INIT_ACK.
I don't see any issue with server not listening on both IPs in any of above scenarios. Both the scenarios, server is binding and listeining on both IPs.
Please help me to resolve this issue.
Hi SCTP Experts,
I am trying to use socket options SCTP_PRIMARY_ADDR to make one of local address of SCTP association as primary and SCTP_SET_PEER_PRIMARY_ADDR to request SCTP server to make one of it's address as primary for SCTP future communication.
Last edit: Rajesh Ghildiyal 2020-01-08
Dear experts
Is there a way after association failure to retrieve UNSENT to peers and UNACKNOWLEDGED by peers Data Chunks ?
I am using RHEL8.4 and sockets are set in NON BLOCKING mode.
Thank you for your help