Project

General

Profile

Feature #6076

Updated by pespin 8 months ago

The SCTP specs have the concept of "primary path", which is the path expected to be used in general to transmit all data as long as is considered active. Once considered inactive, other paths are selected until the primary path is considered active again (ie HEARTBEAT working again on that path). 

 Right now, in libosmo-sccp we are not explicitly configuring the "primary path" in any way, hence letting the linux kernel SCTP implementation decide the best primary path. That may be good in some cases, but some specific setups may have specific requirements about having a given primary path (well known and deterministic). 

 This ticket consists on 2 tasks: 

 
 h2.    [A] Investigate "implicit" primary path selection  

 Finding out, understanding and documenting the "implicit" primary path selection used by the linux kernel SCTP implementation when no "explicit" primary path is requested by userspace (the app, such as libosmo-sccp/osmo-bsc VTY config). 

 h2. [B]    Allow (optionally) configuring a excplicit "primary path" on libosmo-sccp VTY config 

 Extend the existing "local-ip" and "remote-ip" VTY commands under the "asp" node to have an optional parameter "[primary]" ("local-ip A.B.C.D [primary]" && "remote-ip A.B.C.D [primary]"), which if set, will instruct the kernel SCTP implementation to use that local and remote IP addresses and primary. 
 The last local-ip with "primary" set on it will replace the ones configured as "primary" before it, so that there's only 1 primary configured at any time. Same goes for the "remote-ip" set. 

 This feature is exposed in the socket API through setsockopt() SCTP_PRIMARY_ADDR and SCTP_SET_PEER_PRIMARY_ADDR. 

 Under the hood, this will: 
 - local-ip: Adds the "Set Primary IP Address" TLV (https://www.rfc-editor.org/rfc/rfc5061#section-4.2.4) to INIT/INIT-ACK. "It requests the receiver to mark the specified address as the primary address to send data to (see Section 5.1.2 of [RFC4960]).    The receiver MAY mark this as its primary address upon receiving this request." 
 - remote-ip: Tells the kernel to select that IP address as primary if found in the INIT/INIT-ACK/ASCONF. 


 In theory this should all be feasible by calling setsockopt() after sctp_bind() & sctp_connect(). 
 Dynamic SCTP association reconfiguration of addresses and primary flag through VTY will be described in a separate ticket. 

 Related RFCs: 
 https://datatracker.ietf.org/doc/html/rfc4960 
 https://www.rfc-editor.org/rfc/rfc5061

Back

Add picture from clipboard (Maximum size: 48.8 MB)