Please find attached a patch to improve RP's behavior when Register
messages are received (improve_register_receive.patch).
With this patch a JOIN will get sent towards S if there are
Joined receivers present at RP.
Register-Stop messages are sent back to the sender of the Registers
for each received one.
A slight disadvantage is that the Register-Stops are sent immediately
as an answer to the Register messages, not after normal multicast
traffic is received (as stated in RFC4601, sec 3.2).
Therefore a certain amount of packet loss will occur.
The other patches cover improvements for logging:
- flatten log output of TX to look similar to RXs
- Avoid double timestamp in logs.
The latter only applies if logging to syslog (has its own timestamp).
So if there are reasons to leave it as it is the patch could safely
be ignored of course.
Best regards,
Holger
Am 13.03.2014 18:44, schrieb Ben Greear:
On 03/13/2014 10:31 AM, Holger Kummert wrote:
Hello,
I do not understand XORP's behavior when running PIM/SM and Register
messages (that encapsulate multicast traffic) are received by the
RP from S.
What I am really missing is the Join msg towards S in order to avoid
the encapsulating overhead. Therefore the Register-Stop (in order to
stop sending the Register msgs) is also not sent by RP.
Shouldn't both messages be sent according to RFC 4601, ch. 3.2?
The only situation where I could force the Register-Stop to be sent
was by enabling and setting 'switch-to-spt-threshold' to '0'.
This sending is independent of any Join'ed receivers and happens
immediately after the receive of the first Register message.
But this is obviously not the intended usage.
Anyhow under no circumstances any Join messages are sent by RP to S.
Could someone give more insight on this?
I'm afraid I never knew much about multicast, and what I did learn
while hacking on xorp mcast logic I have mostly forgotten.
But, if you figure out a patch that makes xorp work better,
please post it and I will try to review it.
Thanks,
Ben
Thanks in advance,
Holger
_______________________________________________
Xorp-users mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
>From 3b1b3acd8e8a75532569008dbcd6a73d91b7e7a6 Mon Sep 17 00:00:00 2001
From: Holger Kummert <[email protected]>
Date: Mon, 24 Mar 2014 10:41:51 +0100
Subject: [PATCH] Improve behaviour when RP receives Register message
When a Register message is received by an RP an (S,G) entry is
always created and SPT bit will be set.
This leads to following behavior:
- When there are Joined receivers, an JOIN is always sent towards S (according to RFC4601)
- Register-Stop is always sent towards S
---
xorp/pim/pim_proto_register.cc | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/xorp/pim/pim_proto_register.cc b/xorp/pim/pim_proto_register.cc
index c0c8536..a75081c 100644
--- a/xorp/pim/pim_proto_register.cc
+++ b/xorp/pim/pim_proto_register.cc
@@ -275,6 +275,15 @@ PimVif::pim_register_recv(PimNbr *pim_nbr,
}
} while (false);
+ // Create an (S,G) entry to send JOIN
+ if (pim_mre_sg == NULL) {
+ pim_mre_sg = pim_node()->pim_mrt().pim_mre_find(inner_src,
+ inner_dst,
+ PIM_MRE_SG,
+ PIM_MRE_SG);
+ pim_mre_sg->set_spt(true);
+ }
+
is_sptbit_set = false;
if ((pim_mre_sg != NULL) && pim_mre_sg->is_spt())
is_sptbit_set = true;
@@ -318,13 +327,8 @@ PimVif::pim_register_recv(PimNbr *pim_nbr,
sent_register_stop = true;
}
if (is_sptbit_set || pim_mre->is_switch_to_spt_desired_sg(0, 0)) {
- // Create an (S,G) entry that will keep the Keepalive Timer running
- if (pim_mre_sg == NULL) {
- pim_mre_sg = pim_node()->pim_mrt().pim_mre_find(inner_src,
- inner_dst,
- PIM_MRE_SG,
- PIM_MRE_SG);
- }
+ // Use (S,G) entry to keep the Keepalive Timer running
+ // This implicitly also sends a JOIN towards S.
if (sent_register_stop) {
// "restart KeepaliveTimer(S,G) to RP_Keepalive_Period"
keepalive_timer_sec = PIM_RP_KEEPALIVE_PERIOD_DEFAULT;
--
1.8.2.3
>From 818fbdee5c9fae7878db7c660b12286f48110477 Mon Sep 17 00:00:00 2001
From: Holger Kummert <[email protected]>
Date: Mon, 24 Mar 2014 10:26:25 +0100
Subject: [PATCH] Flatten log output of TX to look similar to RX.
---
xorp/pim/pim_vif.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xorp/pim/pim_vif.cc b/xorp/pim/pim_vif.cc
index 6b04eaf..cdcf842 100644
--- a/xorp/pim/pim_vif.cc
+++ b/xorp/pim/pim_vif.cc
@@ -897,7 +897,7 @@ PimVif::pim_send(const IPvX& src, const IPvX& dst,
BUFFER_COPYPUT_INET_CKSUM(cksum, buffer, 2); // XXX: the checksum
XLOG_TRACE(pim_node()->is_log_trace(),
- "pim_send: TX %s from %s to %s on vif %s",
+ "TX %s from %s to %s on vif %s",
PIMTYPE2ASCII(message_type),
cstring(src),
cstring(dst),
--
1.8.2.3
>From d71aa0111fe747da37d3d6bbc3fbb216a23c442c Mon Sep 17 00:00:00 2001
From: Holger Kummert <[email protected]>
Date: Mon, 24 Mar 2014 10:39:50 +0100
Subject: [PATCH] Avoid double timestamp in logs.
---
xorp/libxorp/xlog.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/xorp/libxorp/xlog.c b/xorp/libxorp/xlog.c
index 714b138..c8ed51a 100644
--- a/xorp/libxorp/xlog.c
+++ b/xorp/libxorp/xlog.c
@@ -480,16 +480,14 @@ xlog_record_va(xlog_level_t log_level, const char *module_name,
*/
switch (xlog_verbose_level[log_level]) {
case XLOG_VERBOSE_LOW: /* The minimum log information */
- x_asprintf(&buf_preamble_ptr, "[ %s %s %s %s ] ",
- xlog_localtime2string(),
+ x_asprintf(&buf_preamble_ptr, "[ %s %s %s ] ",
xlog_level_names[log_level],
process_name_lead,
module_name);
break;
case XLOG_VERBOSE_MEDIUM: /* Add preamble string if non-NULL */
- x_asprintf(&buf_preamble_ptr, "[ %s %s %s %s %s ] ",
- xlog_localtime2string(),
+ x_asprintf(&buf_preamble_ptr, "[ %s %s %s %s ] ",
preamble_lead,
xlog_level_names[log_level],
process_name_lead,
@@ -498,8 +496,7 @@ xlog_record_va(xlog_level_t log_level, const char *module_name,
case XLOG_VERBOSE_HIGH: /* Most verbose */
default:
- x_asprintf(&buf_preamble_ptr, "[ %s %s %s %s:%d %s %s ] ",
- xlog_localtime2string(),
+ x_asprintf(&buf_preamble_ptr, "[ %s %s %s:%d %s %s ] ",
preamble_lead,
xlog_level_names[log_level],
process_name_lead,
--
1.8.2.3
_______________________________________________
Xorp-users mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users