Skip to content

feat: mdns #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 25, 2023
Merged

feat: mdns #260

merged 11 commits into from
Feb 25, 2023

Conversation

salmad3
Copy link
Member

@salmad3 salmad3 commented Dec 5, 2022

Context

Notes

  • Section this document lives under will become populated with corresponding PRs
  • Discovery section initiated in feat: rendezvous #259

Latest preview

Please view the latest Fleek preview here. (preview outdated as not against master anymore)

@salmad3 salmad3 marked this pull request as draft December 5, 2022 04:59
@salmad3 salmad3 linked an issue Dec 5, 2022 that may be closed by this pull request
6 tasks
@salmad3 salmad3 added the ready for review PR is ready for review label Dec 5, 2022
@salmad3 salmad3 marked this pull request as ready for review December 5, 2022 09:11
@p-shahi p-shahi requested review from jxs and removed request for marten-seemann December 6, 2022 05:08
@p-shahi
Copy link
Member

p-shahi commented Dec 6, 2022

@jxs can you help review this?

(Took liberty of unassigning Marten to help spread the load.)

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be useful if you could run a kubo node and inspect the mDNS query and response using wireshark, and add (the relevant parts) to this document.

@marten-seemann
Copy link
Contributor

(Took liberty of unassigning Marten to help spread the load.)

@p-shahi Thank you, but I had already started my review, so I'm posting it anyway.

@salmad3 salmad3 added change request PR requires changes. and removed ready for review PR is ready for review labels Dec 6, 2022
@salmad3 salmad3 added ready for review PR is ready for review and removed change request PR requires changes. labels Dec 7, 2022
Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some misunderstanding of how mDNS works and what we're trying to achieve.

@DannyS03, have you tried Wiresharking the mDNS traffic originating from an IPFS node, and inspecting the packets? I think this could be really instructive. I also think (as I mentioned in my last review) that we should add some of that Wireshark output here as examples.

@salmad3 salmad3 added change request PR requires changes. and removed ready for review PR is ready for review labels Dec 8, 2022
@salmad3 salmad3 marked this pull request as draft January 3, 2023 10:33
@salmad3 salmad3 changed the base branch from master to init/discovery-sec January 15, 2023 18:23
@salmad3 salmad3 marked this pull request as ready for review January 15, 2023 18:29
@salmad3 salmad3 added ready for review PR is ready for review and removed change request PR requires changes. labels Jan 23, 2023
Comment on lines 54 to 59
| No. | Time | Source IP | Destination IP | Protocol | Length | Info |
|-----|------------|--------------------------|------------------------|----------|--------|---------------------------|
| 1 | 0.000000 | 10.0.0.25 | 224.0.0.251 | MDNS | 75 | Standard query 0x7d14 PTR _p2p._udp.local, "QM" question |
| 2 | 0.000130 | fe80::8d9:f02f:717f:2c03 | ff02::fb | MDNS | 95 | Standard query 0x7d14 PTR _p2p._udp.local, "QM" question |
| 3 | 0.002497 | 10.0.0.25 | 224.0.0.251 | MDNS | 918 | Standard query response 0x7d14 PTR vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn._p2p._udp.local SRV 0 0 4001 vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn.local TXT A 127.0.0.1 AAAA ::1 |
| 4 | 0.002507 | fe80::8d9:f02f:717f:2c03 | ff02::fb | MDNS | 938 | Standard query response 0x7d14 PTR vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn._p2p._udp.local SRV 0 0 4001 vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn.local TXT A 127.0.0.1 AAAA ::1 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't show the multiaddr, does it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to show this, we may as well show the multiaddr result of the query.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was my motivation when I asked for including a Wireshark capture.

Maybe this could even be a screenshot of Wireshark? No strong opinion in either direction though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not include this? Why have wireshark output for mDNS and not for other protocols?

I'm in favor of removing this and the following paragraphs.

Instead we can describe the peer discover section https://github.com/libp2p/specs/blob/master/discovery/mdns.md#peer-discovery in two sentences and point to the spec

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcoPolo @marten-seemann please re-review. I removed the wireshark section and instead linked to the specs

@salmad3 salmad3 added change request PR requires changes. P1 High and removed ready for review PR is ready for review labels Jan 24, 2023
Copy link
Contributor

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tapping marten out, and I'll review from here on out.

Comment on lines 54 to 59
| No. | Time | Source IP | Destination IP | Protocol | Length | Info |
|-----|------------|--------------------------|------------------------|----------|--------|---------------------------|
| 1 | 0.000000 | 10.0.0.25 | 224.0.0.251 | MDNS | 75 | Standard query 0x7d14 PTR _p2p._udp.local, "QM" question |
| 2 | 0.000130 | fe80::8d9:f02f:717f:2c03 | ff02::fb | MDNS | 95 | Standard query 0x7d14 PTR _p2p._udp.local, "QM" question |
| 3 | 0.002497 | 10.0.0.25 | 224.0.0.251 | MDNS | 918 | Standard query response 0x7d14 PTR vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn._p2p._udp.local SRV 0 0 4001 vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn.local TXT A 127.0.0.1 AAAA ::1 |
| 4 | 0.002507 | fe80::8d9:f02f:717f:2c03 | ff02::fb | MDNS | 938 | Standard query response 0x7d14 PTR vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn._p2p._udp.local SRV 0 0 4001 vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn.local TXT A 127.0.0.1 AAAA ::1 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to show this, we may as well show the multiaddr result of the query.

Comment on lines 54 to 59
| No. | Time | Source IP | Destination IP | Protocol | Length | Info |
|-----|------------|--------------------------|------------------------|----------|--------|---------------------------|
| 1 | 0.000000 | 10.0.0.25 | 224.0.0.251 | MDNS | 75 | Standard query 0x7d14 PTR _p2p._udp.local, "QM" question |
| 2 | 0.000130 | fe80::8d9:f02f:717f:2c03 | ff02::fb | MDNS | 95 | Standard query 0x7d14 PTR _p2p._udp.local, "QM" question |
| 3 | 0.002497 | 10.0.0.25 | 224.0.0.251 | MDNS | 918 | Standard query response 0x7d14 PTR vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn._p2p._udp.local SRV 0 0 4001 vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn.local TXT A 127.0.0.1 AAAA ::1 |
| 4 | 0.002507 | fe80::8d9:f02f:717f:2c03 | ff02::fb | MDNS | 938 | Standard query response 0x7d14 PTR vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn._p2p._udp.local SRV 0 0 4001 vmvokx8c0b7rcjtx4e14iyaxw7otg05xyg954y5fnh1a9rderxtxycicgtj3nn.local TXT A 127.0.0.1 AAAA ::1 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not include this? Why have wireshark output for mDNS and not for other protocols?

I'm in favor of removing this and the following paragraphs.

Instead we can describe the peer discover section https://github.com/libp2p/specs/blob/master/discovery/mdns.md#peer-discovery in two sentences and point to the spec

@p-shahi p-shahi requested a review from MarcoPolo February 13, 2023 20:12
@p-shahi p-shahi removed P1 High change request PR requires changes. labels Feb 23, 2023
Copy link
Contributor

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@p-shahi could you please give this a once over before merging. ty!

@p-shahi p-shahi merged commit bfe091d into init/discovery-sec Feb 25, 2023
p-shahi pushed a commit that referenced this pull request Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Done
Development

Successfully merging this pull request may close these issues.

Create and populate discovery & routing section
4 participants