Closed teamblubee closed 2 years ago
Running pimd on the same machine that needs to create a gre tunnel.
Please tell me a bit more about your setup, I don't understand what you mean. How's the setup, what are you trying to do, where are your senders and receivers of multicast? Maybe a topology, ascii art is fine as long as you surround it in backticks (Markdown).
my machine creates an ipsec tunnel to the server. I also have to setup a gre tunnel through this ipsec tunnel.
┌───────────────────┐
│ │
│ │
┌──────────────┐ │ │
│ │ ipsec tunnel │ │
│ ─┼─────────────────────────┼─ │
│ ├─────────────────────────┤ │
│ my machine │ gre tunnel │ server │
│ ├─────────────────────────┤ │
│ ─┼─────────────────────────┼── │
│ │ │ │
└──────────────┘ │ │
│ │
│ │
└───────────────────┘
my machine first sets up an ipsec tunnel to the server; this part is configured correctly.
Next I will need to bring up a GRE tunnel inside the ipsec tunnel; These routes are being advertised from the server across the ipsec tunnel and I can examine the GRE broadcast messages in tcpdump.
On my machine I've built and installed pimd version 3.0-beta1, used the basic pimd.conf and started pimd. I can see the server broadcasting on my machine. I try to bring up a gre tunnel from my machine to the server but this is where I am having difficulties.
Multicast Routing Table
Source Group RP Address Flags
Number of Groups : 0
Number of Cache MIRRORs : 0
PIM Candidate Rendez-Vous Point Table
Group Address RP Address Prio Holdtime Expires
232/8 169.254.0.1 1 Static Never
224/4 192.168.47.65 20 75 0h1m10s
Current BSR address: 192.168.47.65
PIM Rendez-Vous Point Set Table
Group Address RP Address Prio Holdtime Type
232/8 169.254.0.1 1 Forever Static
224/4 192.168.47.65 20 70 Dynamic
Trying to bring up the GRE tunnel fails. I think I need to have pim-sm correctly working. Looking at tcpdump I see the server sending igmp query v2 and pimv2 hello messages. My machine isn't responding.
on my machine, scanning the interface that I assigned to the GRE tunnel, I see this output, it just repeats
23:16:25.125573 IP 10.10.17.65 > 224.0.0.1: igmp query v3
23:16:25.125593 IP 10.10.1.234 > 224.0.0.1: igmp query v3
23:16:28.591113 IP 10.10.17.65 > 224.0.0.22: igmp v3 report, 3 group record(s)
23:16:29.592398 IP 10.10.17.65 > 224.0.0.13: PIMv2, Hello, length 26
23:16:29.592413 IP 10.10.1.234 > 224.0.0.13: PIMv2, Hello, length 26
23:16:39.904570 IP 10.10.17.65 > 224.0.0.1: igmp query v3
23:16:39.904625 IP 10.10.1.234 > 224.0.0.1: igmp query v3
23:16:43.439168 IP 10.10.17.65 > 224.0.0.22: igmp v3 report, 3 group record(s)
23:16:54.821550 IP 10.10.17.65 > 224.0.0.1: igmp query v3
With the tunnel setup like this
ip tun add tunnel mode gre local x.x.x.x remote x.x.x.x
ip link set multicast on tunnel
ip addr add 10.10.17.65 dev tunnel
I can tcpdump physical nic and see the server sending the hello messages, they do not make it to the tunnel interface. I can also tcpdump the gre tunnel interface and see that one doing hello broadcasts, but it doesn't make it to the server.
pimd is running, but it outputs
pimd: 23:26:40.270 For src 169.254.0.1, iif is 1, next hop router is 10.1.0.1: NOT A PIM ROUTER
can I make some configuration changes to pimd on my local machine so that it can listen to the pim-sm broadcasts and build the routing table?
Still not sure I understand what it is you want to achieve. You don't need PIM to establish a GRE tunnel. Nor does it seem you need PIM to receive generic multicast data from your server, because it's locally attached to the server. The server of course needs to listen to all its interfaces and support IGMP join, or flood multicast as broadcast.
Do you have control over both 'my machine' and 'server', or are you setting up 'my machine' as en end-device for multicast reception? Multicast routing daemons route multicast data between interfaces, you have not mentioned between which interfaces you expect the routing to happen.
If your setup is more along the lines of the following, and 'my machine' wants to receive multicast data from 'sender':
[my machine]----------[server]----------[sender]
Then you only need a multicast router on 'server'.
I have no control over the remote server, only my machine. Lets assume that their server is configured correctly. I have just one host with a default interface eth0. I make an ipsec connection from my [host] -> [server]
once that tunnel is up, I see messages like these from the server `21:24:22.587555 IP 192.168.254.1 > 192.168.0.60: GREv0, length 62: IP 192.168.4.233 > 224.0.0.13: PIMv2, Hello, length 38 21:24:45.670504 IP 192.168.254.1 > 192.168.0.60: GREv0, length 36: IP 192.168.4.233 > 224.0.0.1: igmp query v2 21:24:51.787331 IP 192.168.254.1 > 192.168.0.60: GREv0, length 62: IP 192.168.4.233 > 224.0.0.13: PIMv2, Hello, length 38
21:25:20.887682 IP 192.168.254.1 > 192.168.0.60: GREv0, length 62: IP 192.168.4.233 > 224.0.0.13: PIMv2, Hello, length 38 21:25:45.670673 IP 192.168.254.1 > 192.168.0.60: GREv0, length 36: IP 192.168.4.233 > 224.0.0.1: igmp query v2 `
at this point, the remote server is sending igmp and gre messages to my host address 192.168.0.60
do I use pimd to turn my host machine into a pimd server to accept and join the remote servers pim-sm network?
I see. Well you don't need PIM. PIM is for routers only. You need a client that can do an IGMP join (assuming IPv4). You need to know the multicast group to join (via IGMP). The router/server then registers your request and possibly forwards it out on networks it knows of as either a "PIM join" or if it has the group locally, sets up a multicast route towards you for the group you requested.
monitoring my network I am seeing messages like these
x.x.x.x -> 224.0.0.13 pimv2 96 hello x.x.x.x -> 224.0.0.13 pimv2 96 hello x.x.x.x -> 224.0.0.1 igmpv2 70 membership query, general
those three lines just repeats.
Are you saying that I do not need pimd but instead I need an application that reads the location to join from the igmp packets, then make a join request?
To be perfectly honest, I still don't really understand what it is you want to do yet. A PIM Hello message is the initial message in a PIM router peering - "Hi, I'm a PIMv2 router with the following capabilities ...". An IGMP Query is akin to a newspaper salesman calling you up asking if you want to subscribe to any newspaper. None of those messages contain any information about what's available on the other side of the server/router -- that you need to know beforehand.
An IGMP join is sent either as a (*,G) or an (S,G) membership report. I.e., either source-specific or any-source. The G is the IP multicast group to join, e.g. 225.1.2.3 or something. What is it you want to do, watch movies, listen to music, record sensor data, or what? In any even, I suggest you seek help from another source, because I'm pretty sure this project is not the place to teach you about IP multicast networking.
Thank you for the clarification, it's my duty as the host to acknowledge the salesman to start listening to their offer so to speak.
That means I will need to either find a program that already speaks multicast or write one to initiate and maintain the conversation until Leaving.
Thanks again.
Exactly that. Good luck!
I am using debian with ip, route, pimd. Running pimd on the same machine that needs to create a gre tunnel.
I have a network connection where I need to bring up a GRE tunnel but I am getting routing information broadcast.
Scanning with tcdump I am getting this loop
pimd -n
is showing this outputWill I be able to run pimd on the same virtual machine that I am currently trying to bring up the GRE tunnel? If not, what are some suggestions to re-architect the program?