Wednesday, February 11, 2009

Multicast TTL-Threshold

Maybe I am misunderstanding some things, but documents and books always say that the TTL of a packet must be higher than the threshold to be forwarded. From the 12.4 command reference:

ip multicast ttl-threshold

Usage Guidelines

"Only multicast packets with a TTL value greater than the threshold are forwarded out the interface."

Oh yeah?! I guess it depends on when you look at the TTL. Consider the network:

R1----R2----R3----R4

PIM-DM is enabled everywhere.
R4 has joined 239.0.0.1
R1 is sending pings which have 255 TTL when sent from R1.
R2 receives the PING, decrements the TTL to 254 before sending to R3.

So if we set TTL threshold to 254 on R2's interface to R3, it should block it right? No:

R2(config)#int s1/0
R2(config-if)#ip multicast ttl-threshold 254

R1#ping 239.0.0.1

Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 239.0.0.1, timeout is 2 seconds:

Reply to request 0 from 192.168.34.4, 164 ms
R1#

The router will still pass packets that have a TTL equal to the threshold if it was the router that decremented the TTL to reach that value. Here we see 255 will fail:

R2(config)#int s1/0
R2(config-if)#ip multicast ttl-threshold 255

R1#ping 239.0.0.1

Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 239.0.0.1, timeout is 2 seconds:
.
R1#

4 comments:

  1. Interesting - I'm just experiencing some odd issues with mcast whilst trying to play with scopes (on Mapping Agent). In your experience, have you consistently found multicast with TTL 0 will send or is this technically an illegal packet?

    ReplyDelete
  2. Hello, If a packet has a TTL of 0 it is dropped and an icmp time exceeded is sent back. So if a router sends a packet with a TTL of 1, the next router receives it, decrements it and then drops it before sending it because TTL is now 0.

    I have never seen an application that would send a packet with TTL 0. I don't know if it is valid to do so, although maybe if you only wanted connected hosts to see it...then I think you still need it to be 1. But that would be a good lab :)

    ReplyDelete
  3. The default value is 0, which means that all multicast packets are forwarded out the interface.

    ref: http://www.cisco.com/en/US/docs/ios/ipmulti/command/reference/imc_03.html#wp1059709

    ReplyDelete
  4. That is right, to what are you replying?

    ReplyDelete

Note: Only a member of this blog may post a comment.