SCTP Multihoming Heartbeat ACK Behavior
TO: Mr. Borkmann
Good day!
Thank you very much for your quick reply.
I need to confirm if your environment there with 2 machines with 5 interfaces each have the same RHEL and LKSCTP versions with the ones we are using?
If you are using the latest RHEL and LKSCTP versions and HB-ACKS are doing fine there, we might think that our older LKSCTP version has something to do with the abnormal HB-ACK behavior.
Thanks,
W. Tizon
Quoted 64 lines · On Mon, 30 Jun 2014 10:24:09 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 37 lines · Winston V. Tizon
Hello everyone!
We are having some issues regarding SCTP multihoming and we would like to ask your opinion on this matter. We have two RHEL6.4 (2.6.32-358.el6.x86_64, lksctp-tools -1.0.10-5(64 bit)) machines connected by two L2 switch and a L3 switch (please see "Environment Setup" below). When we execute SCTP connection (using multihoming) between the two machines, the following behavior occurred:
CLIENT L2 and L3 SERVER
Secondary Primary | Primary Secondary| | | | | | | | | | | |INIT-INIT_ACK | | | | |<-------------|--------->| | | |COOKIE_ECHO-COOKIE_ACK | | | | | | | | |<-------------|--------->| | | |HB/HB_ACK | | | | | | | | |<-------|--------------|----------| | | | | HB | | | |--------------|--------->| | | |HB_ACK | | | | | : | | | | | : | | |INIT/INIT_ACK handshake occurred in the primary path of both machines which is expected. When a Primary path sends HEARTBEAT to another Primary,
HEARTBEAT_ACKwas returned to the sender. But when a Primary path sends HEARTBEAT to a Secondary path, theHEARTBEAT_ACKchunk was sent by the Primary path. We expect that theHEARTBEAT_ACKwould come from the Secondary.Quoted 2 lines
[Questions]
1. Is this a normal behavior with regards to SCTP multihoming?So looking at the RFC, it says (RFC4960, 3.3.6. + 6.4.) ...
An endpoint should send this chunk to its peer endpoint as a response to a HEARTBEAT chunk (see Section 8.3). A HEARTBEAT ACK is always sent to the source IP address of the IP datagram containing the HEARTBEAT chunk to which this ack is responding.
[...]
An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK, etc.) to the same destination transport address from which it received the DATA or control chunk to which it is replying. This rule should also be followed if the endpoint is bundling DATA chunks together with the reply chunk.
... it would be more correct to reply via the same transport, imho. I just checked upstream kernel with multihoming on 2 machines with 5 interfaces each, and HB, HB-ACK replies seem to be fine there, that is, HB-ACKs go via same transports.
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · On Mon, 30 Jun 2014 11:27:35 +0200 Daniel Borkmann <[email protected]> wrote:
Note, I said, I was using latest upstream kernel, didn't check yet with RHEL.
My mistake. If in case you will encounter the same Multihoming Heartbeat ACK Behavior using RHEL 6, any information from you would be of great help to us.
Again, thank you for the replies.
Quoted 8 lines · On Mon, 30 Jun 2014 08:30:20 -0400 Neil Horman <[email protected]> wrote:
How are you determining which transport is getting used to send the HEARTBEAT ACK? Are you looking at the chunks destination IP address? Looking at
sctp_outq_flushin RHEL6 it appears we should always use the inbound transport to send the response, which is the correct thing to do. Sometimes however, while the destination ip address is correct, funny routing tables can lead to a single source address getting selected.Neil
Thanks for the reply Neil.
We've just performed test to check if Multihoming Heartbeat ACK Behavior I've mentioned is related to routing table configuration or
SCTP Primary IP address setting. Please see below test information and results.
"Test case1" (Set the primary in "172.168.39.2")
[client]
# sctp_darn -H 172.168.39.2 -B 172.168.39.3 -P 9099 -h 172.168.39.4 -p 9099 -s
[server]
# sctp_darn -H 172.168.39.4 -B 172.168.39.5 -P 9099 -l
[result]
172.168.39.2(client) 172.168.39.4(server) INIT 172.168.39.4(server) 172.168.39.2(client) INIT_ACK 172.168.39.2(client) 172.168.39.4(server) COOKIE_ECHO 172.168.39.4(server) 172.168.39.2(client) COOKIE_ACK 172.168.39.4(server) 172.168.39.2(client) HB 172.168.39.2(client) 172.168.39.4(server) HB_ACK 172.168.39.4(server) 172.168.39.3(client) HB
172.168.39.2(client) 172.168.39.4(server) HB_ACK (***)
172.168.39.2(client) 172.168.39.4(server) DATA 172.168.39.4(server) 172.168.39.2(client) SACK
"Test case2" (Set the primary in "172.168.39.3")
[client]
# sctp_darn -H 172.168.39.3 -B 172.168.39.2 -P 9099 -h 172.168.39.4 -p 9099 -s
[server]
# sctp_darn -H 172.168.39.4 -B 172.168.39.5 -P 9099 -l
[result]
172.168.39.3(client) 172.168.39.4(server) INIT 172.168.39.4(server) 172.168.39.3(client) INIT_ACK 172.168.39.3(client) 172.168.39.4(server) COOKIE_ECHO 172.168.39.4(server) 172.168.39.3(client) COOKIE_ACK 172.168.39.4(server) 172.168.39.3(client) HB 172.168.39.3(client) 172.168.39.4(server) HB_ACK 172.168.39.4(server) 172.168.39.2(client) HB
172.168.39.3(client) 172.168.39.4(server) HB_ACK (***)
172.168.39.3(client) 172.168.39.4(server) DATA 172.168.39.4(server) 172.168.39.3(client) SACK
Based on results, SCTP kernel always choose Primary IP address so I think this is not related to routing table configuration problems.
(***) -> Based on SCTP RFC4960, expected behavior is secondary IP address
should be used as path in sending the HB_ACK.
Wins
Quoted 21 lines · On Tue, 1 Jul 2014 07:20:01 -0400 Neil Horman <[email protected]> wrote:
Actually, its quite the opposite, this confirms that the sctp protocol is functioning normally. RFC 4960 says this about HB_ACK's:
3.3.6. Heartbeat Acknowledgement (HEARTBEAT ACK) (5)
An endpoint should send this chunk to its peer endpoint as a response to a HEARTBEAT chunk (see Section 8.3). A HEARTBEAT ACK is always sent to the source IP address of the IP datagram containing the HEARTBEAT chunk to which this ack is responding.
The only thing that a peer has to do regarding a HB frame is sent an
HB_ACKto the source ip address of the corresponding HB frame (in this case172.168.39.4), which we do my recording the inbound transport that the HB frame arrived on. The source address selection is made during L3 packet routing, which, according tosctp_transport_routeis made by querying the route tables.The only thing thats a bit odd is the fact your not taking what is likely the selected source address from the default route. That usually indicates that you're using path mtu features, and you're routing based on a locally selected source and destination address.
Quoted 7 lines
The point however is, that a transport is only defined by a destination address within an association, not by a source and a destination, the source address selection is made by the local peer, and should not be relevant to the peer receiving the data.
Neil
TO: Neil, Daniel, Michael
Thank you very much for your answers. I misunderstood the SCTP RFC statement regarding reply Chunks in a multi-homed association. I thought reply chunks should be sent always to the same path from where DATA or Control chunks were received.
I'm sorry if I haven't explained yet the other details of our problem using the following "Environment Setup" below.
CLIENT SERVER
172.168.39.91 172.168.40.93 +-----------+ +------+ +-----------+ | eth0|----| L2 |----|eth0 | | | +------+ | | | | | | | | | +----------+ | | | | | L3 | | | | | +----------+ | | | | | | | | | +------+ | | | eth1|----| L2 |----|eth1 | +-----------+ +------+ +-----------+ 172.168.39.92 172.168.40.94
Our problem goes like this. Normal sequence is shown in "[NORMAL]" sequence. While our problem started when we've performed "[ABNORMAL]"sequence below.
[NORMAL]
SERVER L2 and L3 CLIENT
Secondary Primary | Primary Secondary
| | | | |
| | | | |
| |INIT-INIT_ACK | | |
| |<-------------|--------->| |
| |COOKIE_ECHO-COOKIE_ACK | |
| | | | |
| |<-------------|--------->| |
| |HB/HB_ACK | | |
| | | | |
|<-------|--------------|----------| |
| | | HB | |
| |--------------|--------->| |
| |HB_ACK | | |
| | : | | |
| | : | | | [ABNORMAL]
SERVER L2 and L3 CLIENT
Secondary Primary | Primary Secondary
| | | | |
| | | | |
| |INIT-INIT_ACK | | |
| |<-------------|--------->| |
| |COOKIE_ECHO-COOKIE_ACK | |
| | | | |
| |<-------------|--------->| |
| |HB/HB_ACK | | |
| | | | |
|<-------|--------------|----------| |
| | | HB | |
| |---->X | | |
| |HB_ACK | | |
| | : | | |
|<-------|--------------|----------| | ABORT
X -> LAN cable unplug, cannot send HB_ACK to Client
Based on what happened in our environment, the Client sent ABORT chunk to Secondary IP address of Server causing this path to be closed.
We don't want this to happen in our environment.
It would be of great help to us if you have any idea on how we could solve question #3 below.
[Question]
3. Is there a solution to force Server to use its Secondary path in sending the HEARTBEAT_ACK chunk to Client's primary?
Wins