LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2016, 08:02 AM   #1
PencilBob
LQ Newbie
 
Registered: Oct 2016
Posts: 4

Rep: Reputation: Disabled
Set multicast UDP hop value or TTL


I need to know what file contains the default hop value or TTL (time to Live) for multicast UDP packets.
I know that it is not /proc/sys/net/ipv4/ip_default_ttl, which sets the TTL for TCP packets.
I don't want to use some tool, like traceroute that "figures it out".
I need to set it manually for a closed network. The current default value is 64. I need it to be 1 to keep the message traffic local.
 
Old 10-15-2016, 08:54 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
I don't want to use some tool, like traceroute that "figures it out".
I need to set it manually for a closed network. The current default value is 64. I need it to be 1 to keep the message traffic local.
You may control the packet TTL from the multicast application in a way to pass parameter IP_MULTICAST_TTL (u_char ttl = 1) to kernel before sending it. Or set the interface TTL (easily done through the router configuration) to "1" (or try highest value 255) it will be restricted to the same subnet because routers only forward packets with TTLs higher that it is set, thus, the router will not forward it.

Hope that helps. Good luck and enjoy.

m.m.
 
Old 10-17-2016, 07:54 AM   #3
PencilBob
LQ Newbie
 
Registered: Oct 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by malekmustaq View Post
You may control the packet TTL from the multicast application in a way to pass parameter IP_MULTICAST_TTL (u_char ttl = 1) to kernel before sending it. Or set the interface TTL (easily done through the router configuration) to "1" (or try highest value 255) it will be restricted to the same subnet because routers only forward packets with TTLs higher that it is set, thus, the router will not forward it.

Hope that helps. Good luck and enjoy.

m.m.
Where is the IP_MULTICAST_TTL variable located? What is the Linux path? I can't change the router configuration as there are other messages, sent from other devices on the system that need to make the hop.
 
Old 10-17-2016, 09:15 AM   #4
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
I don't want to use some tool, like traceroute that "figures it out"
Try this
Code:
less /proc/net/igmp
it will tell you which multicast group your interface is subscribed. But again this will not answer the question. It was an obstacle indeed that multicast traffic is handled at transport layer in UDP how to float it over TCP connections dominated by IP routers, although, since it is confined in a class D IP range simple internal routing solved localhost traffic handling.
Quote:
What is the Linux path?
Interesting question.

I don't pretend to know everything nor assume to comprehend entirely the problem currently pressing you. I am also a beginner wishing to put up my multicast traffic at my own learning pace. To get acquainted at Linux kernel multicast implementation take a short read here and here too; it might not say completely but you shall have enough which APIs to handle your application.

BTW de Goyeneche has a skilled overview about multicast implementation here; he touches as well how TTL is handled and even virtual multicast network and multicast backbone.

Hope that helps. Good luck and enjoy.

m.m.
 
1 members found this post helpful.
  


Reply

Tags
ttl, udp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Receiving UDP multicast GordonAkst Linux - Software 2 11-08-2010 02:37 PM
multicast udp packets lost in the kernel woodhead99 Linux - Networking 3 08-14-2010 08:08 PM
C++ Multicast UDP send with errno 11 kurtwagner Programming 4 05-07-2009 02:41 AM
kernel and multicast udp traffic zeebu Linux - Networking 5 06-02-2007 09:22 AM
PVR with udp multicast streams? Fredde87 Linux - Software 1 08-20-2005 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration