我有一个关于SCTP多宿主心跳行为的查询。请考虑以下示例 -
Host_A (IP a(Primary), IP b(secondary)) : Local MultiHomed endpoint
Host_B (IP c(Primary), IP d(secondary)) : Remote multiHomed endpoint
初级 - 次级之间是否存在心跳通信,即& d& d; ℃下; - > B'如果没有,那么我们可以进行这样的设置吗?
在我的情况下,我只看到2个原色和&之间的HB SEND / ACK消息。 2个辅助,但不是主要和辅助之间次要的。
编辑: -
我做了一个小测试。我在两个相互连接的系统上运行了sctp_darn。
主机A:主IP 172.29.11.43;次要IP 172.29.11.75 主机B:主IP 172.29.11.40;次要IP 172.29.11.72
在主机A上,我跑了 - > sctp_darn -s -p 4445 -h 172.29.11.40 -P 4444 -H 172.29.11.43 -B 172.29.11.75 在主机B上,我跑了 - > sctp_darn -l -P 4445 -H 172.29.11.40 -B 172.29.11.72
我没有从A-> B发送任何数据来监控HB行为。这是我从tcpdump输出得到的。
root@base0-0-0-4-0-11-1:/root> tcpdump -ni bond1 sctp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bond1, link-type EN10MB (Ethernet), capture size 65535 bytes
17:09:23.856688 IP 172.29.11.43.4444 > 172.29.11.40.4445: sctp (1) [INIT] [init tag: 368944998] [rwnd: 63488] [OS: 10] [MIS: 65535] [init TSN: 2410047720]
17:09:23.856893 IP 172.29.11.40.4445 > 172.29.11.43.4444: sctp (1) [INIT ACK] [init tag: 797255774] [rwnd: 63488] [OS: 10] [MIS: 10] [init TSN: 659191795]
17:09:23.856988 IP 172.29.11.43.4444 > 172.29.11.40.4445: sctp (1) [COOKIE ECHO] , (2) [DATA] (B)(E) [TSN: 2410047720] [SID: 0] [SSEQ 0] [PPID 0x0]
17:09:23.857410 IP 172.29.11.40.4445 > 172.29.11.43.4444: sctp (1) [COOKIE ACK] , (2) [SACK] [cum ack 2410047720] [a_rwnd 63486] [#gap acks 0] [#dup tsns 0]
17:09:25.880280 IP 172.29.11.75.4444 > 172.29.11.72.4445: sctp (1) [HB REQ]
17:09:25.880519 IP 172.29.11.72.4445 > 172.29.11.75.4444: sctp (1) [HB ACK]
17:09:27.951827 IP 172.29.11.72.4445 > 172.29.11.75.4444: sctp (1) [HB REQ]
17:09:27.951868 IP 172.29.11.75.4444 > 172.29.11.72.4445: sctp (1) [HB ACK]
17:09:56.520282 IP 172.29.11.75.4444 > 172.29.11.72.4445: sctp (1) [HB REQ]
17:09:56.520526 IP 172.29.11.72.4445 > 172.29.11.75.4444: sctp (1) [HB ACK]
17:09:56.534773 IP 172.29.11.40.4445 > 172.29.11.43.4444: sctp (1) [HB REQ]
17:09:56.534797 IP 172.29.11.43.4444 > 172.29.11.40.4445: sctp (1) [HB ACK]
17:09:57.748715 IP 172.29.11.43.4444 > 172.29.11.40.4445: sctp (1) [HB REQ]
17:09:57.749006 IP 172.29.11.40.4445 > 172.29.11.43.4444: sctp (1) [HB ACK]
17:09:59.026986 IP 172.29.11.72.4445 > 172.29.11.75.4444: sctp (1) [HB REQ]
17:09:59.027013 IP 172.29.11.75.4444 > 172.29.11.72.4445: sctp (1) [HB ACK]
17:10:27.129950 IP 172.29.11.40.4445 > 172.29.11.43.4444: sctp (1) [HB REQ]
17:10:27.129982 IP 172.29.11.43.4444 > 172.29.11.40.4445: sctp (1) [HB ACK]
17:10:27.220294 IP 172.29.11.75.4444 > 172.29.11.72.4445: sctp (1) [HB REQ]
17:10:27.220576 IP 172.29.11.72.4445 > 172.29.11.75.4444: sctp (1) [HB ACK]
17:10:29.076286 IP 172.29.11.43.4444 > 172.29.11.40.4445: sctp (1) [HB REQ]
17:10:29.076582 IP 172.29.11.40.4445 > 172.29.11.43.4444: sctp (1) [HB ACK]
17:10:30.402389 IP 172.29.11.72.4445 > 172.29.11.75.4444: sctp (1) [HB REQ]
17:10:30.402430 IP 172.29.11.75.4444 > 172.29.11.72.4445: sctp (1) [HB ACK]
^C
24 packets captured
24 packets received by filter
0 packets dropped by kernel
root@base0-0-0-4-0-11-1:/root>
正如您所看到的,HBs来自初级 - 初级和初级中学,但不是从小学到中学,反之亦然。
感谢。
答案 0 :(得分:1)
引用RFC 4960:
如果没有可用于更新路径RTT的新块(通常包括第一次传输DATA,INIT,COOKIE ECHO,HEARTBEAT等)并且没有发送任何HEARTBEAT,则目标传输地址被视为“空闲”该地址的当前心跳周期。
换句话说,只要有其他块可用于确定RTT,心跳就不是必需的。
所以在你的情况下,活跃的连接是a-> d和c-> b,它们有足够的流量来使它们的心跳多余吗?
编辑以回应作者的更多详情
根据Experimental studies of SCTP multi-homing中的图1,每个方向4 possibly independent paths
分别有2个NIC,if the routing is configured in such a way that these IP addresses are accessible through different paths
。而且我认为为了确定每条路径的表现,他们必须心脏跳动。
查看主要路径和心跳的配对,这总是
172.29.11.x? < - > 172.29.11.x?
即。 a .7?永远不会与.4?配对,这可能是路由配置和/或子网的问题(并且SCTP实现在其配对决策中考虑了这些信息?)。只是一个猜测。