From 8c14a02ca16d9c49d90a5d249fa15bdc83b136cb Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Sun, 4 Dec 2022 23:57:58 -0500 Subject: [PATCH 01/11] add content for mdns --- content/concepts/discovery/mDNS.md | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 content/concepts/discovery/mDNS.md diff --git a/content/concepts/discovery/mDNS.md b/content/concepts/discovery/mDNS.md new file mode 100644 index 00000000..c1074d93 --- /dev/null +++ b/content/concepts/discovery/mDNS.md @@ -0,0 +1,48 @@ +--- +title: "MDNS" +description: "MDNS uses a multicast system of DNS records over a local network to enable peer discovery." +weight: 224 +--- + +## What is mDNS? + +MDNS, or multicast Domain Name System, uses a multicast system of DNS records over a +local network. Nodes broadcast topics they're interested in into the network instead of querying +a central name server. The discovery is limited to the peers in the local network. + +MDNS uses UDP to enable hostname resolution on local networks, allowing it to be used on networks +that support multicast, such as an office. In turn, it can also use DNS to resolve hostnames to +IP addresses on the Internet. MDNS does not require a central DNS server to operate, as a host can +resolve hostnames to IP addresses in a decentralized manner. + +## MDNS in libp2p + +In LibP2P, mDNS can be used as part of the [rendezvous protocol](rendezvous) to enable peers to discover +and connect. When a peer wants to connect to another peer in a LibP2P network, +it can use mDNS to resolve the hostname of the other peer to its multiaddress. + +MDNS follows a request-response model, where a peer broadcasts a request (query) to *find all peers* +on the local network, and receive DNS response messages from peers that contain said peer's information +in the form of a DNS record: ` PTR .`, where `` +is the name of the service that is being advertised, and `` is the name of the peer [that +is providing the service]. The `` part of the record indicates the domain in which the +service and peer are located. + +As responses are received, the peer adds the other peers' information into its local database of peers. +A TXT record contains the multiaddresses that the peer is listening on. Each multiaddress is a TXT +attribute with the form `dnsaddr=/.../p2p/QmId`. +> `dnsaddr` is a protocol that instructs the resolver to look up multiaddr(s) in DNS TXT records for the +> domain name in its value section. To resolve a `dnsaddr` multiaddr, the domain name in the value section +> must first be prefixed with `_dnsaddr.`. Then the peer must make a DNS query to look up TXT records for the domain. +> Learn more about `dnsaddr` [here](https://github.com/multiformats/multiaddr/blob/master/protocols/DNSADDR.md). + +{{< alert icon="💡" context="note" text="Multiple dnsaddr attributes and/or TXT records are allowed." />}} + +A peer sends a query for all peers when it first spawns or detects a network change. + +{{< alert icon="💡" context="note" text="A peer must respond to its own query. This allows other peers to passively discover it." />}} + +An *additional records* record in the response contains a peer's discovery details in the following form: +`. TXT "dnsaddr=..."`. + +{{< alert icon="💡" context="note" text="See the mDNS technical specification for more details." />}} From fc8138af07958a83db2d36deaf270251a386e43b Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Mon, 5 Dec 2022 04:10:38 -0500 Subject: [PATCH 02/11] edits --- content/concepts/discovery/mDNS.md | 43 ++++++++++++++++-------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/content/concepts/discovery/mDNS.md b/content/concepts/discovery/mDNS.md index c1074d93..ba5c3d43 100644 --- a/content/concepts/discovery/mDNS.md +++ b/content/concepts/discovery/mDNS.md @@ -7,42 +7,45 @@ weight: 224 ## What is mDNS? MDNS, or multicast Domain Name System, uses a multicast system of DNS records over a -local network. Nodes broadcast topics they're interested in into the network instead of querying -a central name server. The discovery is limited to the peers in the local network. +local network. Nodes broadcast topics they're interested in into the network instead of +querying a central name server. The discovery is limited to the peers in the local network. -MDNS uses UDP to enable hostname resolution on local networks, allowing it to be used on networks -that support multicast, such as an office. In turn, it can also use DNS to resolve hostnames to -IP addresses on the Internet. MDNS does not require a central DNS server to operate, as a host can -resolve hostnames to IP addresses in a decentralized manner. +MDNS uses UDP to enable hostname resolution on local networks, allowing it to be used +on networks that support multicast, such as an office. In turn, it can also use DNS to +resolve hostnames to IP addresses on the Internet. MDNS does not require a central DNS +server to operate, as a node can resolve hostnames to IP addresses in a decentralized +manner. ## MDNS in libp2p -In LibP2P, mDNS can be used as part of the [rendezvous protocol](rendezvous) to enable peers to discover -and connect. When a peer wants to connect to another peer in a LibP2P network, +In libp2p, mDNS can be used as part of the [rendezvous protocol](rendezvous) to enable peers +to discover and connect. When a peer wants to connect to another peer in a libp2p network, it can use mDNS to resolve the hostname of the other peer to its multiaddress. -MDNS follows a request-response model, where a peer broadcasts a request (query) to *find all peers* -on the local network, and receive DNS response messages from peers that contain said peer's information -in the form of a DNS record: ` PTR .`, where `` -is the name of the service that is being advertised, and `` is the name of the peer [that -is providing the service]. The `` part of the record indicates the domain in which the -service and peer are located. +MDNS follows a request-response model, where a peer broadcasts a query request to *find all peers* +on a local network to receive DNS response messages from peers which contain the peer information +of discovered peers. The response message is in the form of DNS record: + +` PTR .`, + +where `` is the name of the service that is being advertised, and +`` is the name of the peer [that is providing the service]. +The `` part of the record indicates the domain in which the service +and peer are located. As responses are received, the peer adds the other peers' information into its local database of peers. A TXT record contains the multiaddresses that the peer is listening on. Each multiaddress is a TXT attribute with the form `dnsaddr=/.../p2p/QmId`. > `dnsaddr` is a protocol that instructs the resolver to look up multiaddr(s) in DNS TXT records for the > domain name in its value section. To resolve a `dnsaddr` multiaddr, the domain name in the value section -> must first be prefixed with `_dnsaddr.`. Then the peer must make a DNS query to look up TXT records for the domain. +> must first be prefixed with `_dnsaddr.`. Then the peer must make a DNS query to look up TXT records for the domain. Multiple dnsaddr attributes and/or TXT records are allowed. > Learn more about `dnsaddr` [here](https://github.com/multiformats/multiaddr/blob/master/protocols/DNSADDR.md). -{{< alert icon="💡" context="note" text="Multiple dnsaddr attributes and/or TXT records are allowed." />}} - A peer sends a query for all peers when it first spawns or detects a network change. -{{< alert icon="💡" context="note" text="A peer must respond to its own query. This allows other peers to passively discover it." />}} +{{< alert icon="💡" context="info" text="A peer must respond to its own query. This allows other peers to passively discover it." />}} -An *additional records* record in the response contains a peer's discovery details in the following form: -`. TXT "dnsaddr=..."`. +An *additional records* record in the response message contains a peer's discovery details +in the following form: `. TXT "dnsaddr=..."`. {{< alert icon="💡" context="note" text="See the mDNS technical specification for more details." />}} From cefa3b76ba455cfc4472a602cb40354d235d8c08 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Wed, 7 Dec 2022 04:35:53 -0500 Subject: [PATCH 03/11] incorporate PR feedback & simplify --- content/concepts/discovery/mDNS.md | 44 ++++++++++++++---------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/content/concepts/discovery/mDNS.md b/content/concepts/discovery/mDNS.md index ba5c3d43..9cbeed95 100644 --- a/content/concepts/discovery/mDNS.md +++ b/content/concepts/discovery/mDNS.md @@ -1,40 +1,36 @@ --- -title: "MDNS" +title: "mDNS" description: "MDNS uses a multicast system of DNS records over a local network to enable peer discovery." weight: 224 --- ## What is mDNS? -MDNS, or multicast Domain Name System, uses a multicast system of DNS records over a -local network. Nodes broadcast topics they're interested in into the network instead of -querying a central name server. The discovery is limited to the peers in the local network. +mDNS, or multicast Domain Name System, is a way for nodes to use a multicast system +of DNS records over a local network to discover and communicate with nodes. Nodes +broadcast topics they're interested in instead of querying a central name server. +The discovery, however, is limited to the peers in the local network. mDNS is commonly +used on home networks to allow devices such as computers, printers, and smart TVs to +find each other and connect. It uses a protocol called multicast to broadcast messages +on the network, allowing devices to discover each other and exchange information. -MDNS uses UDP to enable hostname resolution on local networks, allowing it to be used -on networks that support multicast, such as an office. In turn, it can also use DNS to -resolve hostnames to IP addresses on the Internet. MDNS does not require a central DNS -server to operate, as a node can resolve hostnames to IP addresses in a decentralized -manner. +## mDNS in libp2p -## MDNS in libp2p - -In libp2p, mDNS can be used as part of the [rendezvous protocol](rendezvous) to enable peers -to discover and connect. When a peer wants to connect to another peer in a libp2p network, -it can use mDNS to resolve the hostname of the other peer to its multiaddress. - -MDNS follows a request-response model, where a peer broadcasts a query request to *find all peers* -on a local network to receive DNS response messages from peers which contain the peer information -of discovered peers. The response message is in the form of DNS record: +In libp2p, mDNS is used for service discovery. +When a peer wants to connect to another peer in a libp2p network, +it can use mDNS to resolve the hostname of the other peer to its multiaddr. +A peer can broadcast a query request to *find all peers* on a local network to +receive DNS response messages from peers, which contain the peer information +of discovered peers. The response message is in the form of a DNS record: ` PTR .`, -where `` is the name of the service that is being advertised, and -`` is the name of the peer [that is providing the service]. -The `` part of the record indicates the domain in which the service -and peer are located. +where `` is `_p2p._udp.local`, the name of the service that is being +advertised. +> `peer-name` is not used for anything and can be filled with a string with random characters. -As responses are received, the peer adds the other peers' information into its local database of peers. -A TXT record contains the multiaddresses that the peer is listening on. Each multiaddress is a TXT +A TXT record contains the multiaddresses that the peer is listening on. A peer +encodes the multiaddr of the other peer into the DNS record. Each multiaddress is a TXT attribute with the form `dnsaddr=/.../p2p/QmId`. > `dnsaddr` is a protocol that instructs the resolver to look up multiaddr(s) in DNS TXT records for the > domain name in its value section. To resolve a `dnsaddr` multiaddr, the domain name in the value section From d69c526d1987e7db0261c8a80877e7571f8e8d20 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Tue, 3 Jan 2023 05:32:30 -0500 Subject: [PATCH 04/11] improve mdns content --- content/concepts/discovery/mDNS.md | 58 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/content/concepts/discovery/mDNS.md b/content/concepts/discovery/mDNS.md index 9cbeed95..6b405e4a 100644 --- a/content/concepts/discovery/mDNS.md +++ b/content/concepts/discovery/mDNS.md @@ -1,6 +1,6 @@ --- title: "mDNS" -description: "MDNS uses a multicast system of DNS records over a local network to enable peer discovery." +description: "mDNS uses a multicast system of DNS records over a local network to enable peer discovery." weight: 224 --- @@ -16,32 +16,34 @@ on the network, allowing devices to discover each other and exchange information ## mDNS in libp2p -In libp2p, mDNS is used for service discovery. -When a peer wants to connect to another peer in a libp2p network, -it can use mDNS to resolve the hostname of the other peer to its multiaddr. -A peer can broadcast a query request to *find all peers* on a local network to -receive DNS response messages from peers, which contain the peer information -of discovered peers. The response message is in the form of a DNS record: - -` PTR .`, - -where `` is `_p2p._udp.local`, the name of the service that is being -advertised. -> `peer-name` is not used for anything and can be filled with a string with random characters. - -A TXT record contains the multiaddresses that the peer is listening on. A peer -encodes the multiaddr of the other peer into the DNS record. Each multiaddress is a TXT -attribute with the form `dnsaddr=/.../p2p/QmId`. -> `dnsaddr` is a protocol that instructs the resolver to look up multiaddr(s) in DNS TXT records for the -> domain name in its value section. To resolve a `dnsaddr` multiaddr, the domain name in the value section -> must first be prefixed with `_dnsaddr.`. Then the peer must make a DNS query to look up TXT records for the domain. Multiple dnsaddr attributes and/or TXT records are allowed. -> Learn more about `dnsaddr` [here](https://github.com/multiformats/multiaddr/blob/master/protocols/DNSADDR.md). - -A peer sends a query for all peers when it first spawns or detects a network change. - -{{< alert icon="💡" context="info" text="A peer must respond to its own query. This allows other peers to passively discover it." />}} - -An *additional records* record in the response message contains a peer's discovery details -in the following form: `. TXT "dnsaddr=..."`. +In libp2p, mDNS is used for peer discovery, allowing peers to find and +communicate with each other on the same local network without any prior configuration. +This is achieved through multicast DNS (mDNS) records, which are sent to all nodes on the +local network. + +To initiate peer discovery, a peer sends a query to all other peers on the network using +a DNS message with the question `_p2p._udp.local PTR`. In response, each peer will send a +DNS message containing their discovery details. These details are stored in the additional +records of the response and include the multiaddresses that the peer is listening on, as +well as other information such as the peer's `` and ``. + +The response message (that is, the answer to the DNS message) is in the form of a +DNS record: ` PTR .`. Additional record in the +response message contains a peer's discovery details in the following form: +`. TXT "dnsaddr=..."` + +- `` is a unique case-insensitive identifier for the peer, although it is not + used for any meaningful purpose in libp2p. Instead, it is simply a string of random ASCII + characters that are required to be sent in the wire format. On the other hand, the +- `` is the fully qualified name of the peer derived from the peer's name and + `p2p.local`. +- ``, meanwhile, is the DNS-SD (DNS Service Discovery) service name for all + peers and is defined as `_p2p._udp.local`. + > If a private network is being used, the `` will contain the base-16 encoding of + > the network's fingerprint as in `_p2p-X._udp.local` to prevent public and private networks from + > discovering each other's peers. + +A peer sends a query for all *other* peers when it first spawns or detects a network change. +A peer must respond to its own query. This allows other peers to passively discover it. {{< alert icon="💡" context="note" text="See the mDNS technical specification for more details." />}} From 1bdc32e4a28fee7edaa33136b202e22b6a072db7 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Sun, 15 Jan 2023 13:29:33 -0500 Subject: [PATCH 05/11] rename dir --- content/concepts/{discovery => discovery-routing}/mDNS.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename content/concepts/{discovery => discovery-routing}/mDNS.md (100%) diff --git a/content/concepts/discovery/mDNS.md b/content/concepts/discovery-routing/mDNS.md similarity index 100% rename from content/concepts/discovery/mDNS.md rename to content/concepts/discovery-routing/mDNS.md From a0a9d4deb6f164d87f058bd07b8d3f6f5bb1c1c1 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Mon, 23 Jan 2023 12:14:57 -0500 Subject: [PATCH 06/11] add missing examples sec --- content/concepts/discovery-routing/mDNS.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/content/concepts/discovery-routing/mDNS.md b/content/concepts/discovery-routing/mDNS.md index 6b405e4a..eab377cf 100644 --- a/content/concepts/discovery-routing/mDNS.md +++ b/content/concepts/discovery-routing/mDNS.md @@ -46,4 +46,25 @@ response message contains a peer's discovery details in the following form: A peer sends a query for all *other* peers when it first spawns or detects a network change. A peer must respond to its own query. This allows other peers to passively discover it. +### Example + +The sample Wireshark output shows the mDNS traffic that is being generated from an IPFS node. +The table includes information about the query and response messages being exchanged via mDNS. + +| 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 | + +The "Info" column provides additional information about the packet, including the type of query +or response message (e.g. Standard query, Standard query response), the DNS record type +(e.g. PTR, SRV, TXT), and any additional details about the query or response. + +The query messages are sent to the multicast IP address 224.0.0.251, and the response messages are +sent back to the source IP address. The DNS records being queried and returned include PTR (pointer) +records, SRV (service) records, and TXT (text) records. These records are used to map domain names +to IP addresses and other information about services and devices on the network + {{< alert icon="💡" context="note" text="See the mDNS technical specification for more details." />}} From ad507f87301062b35749db807bac8f328ff1dda3 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Fri, 27 Jan 2023 06:55:24 -0500 Subject: [PATCH 07/11] simplify in libp2p sec --- content/concepts/discovery-routing/mDNS.md | 27 ++-------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/content/concepts/discovery-routing/mDNS.md b/content/concepts/discovery-routing/mDNS.md index eab377cf..acf49e4d 100644 --- a/content/concepts/discovery-routing/mDNS.md +++ b/content/concepts/discovery-routing/mDNS.md @@ -21,34 +21,11 @@ communicate with each other on the same local network without any prior configur This is achieved through multicast DNS (mDNS) records, which are sent to all nodes on the local network. -To initiate peer discovery, a peer sends a query to all other peers on the network using -a DNS message with the question `_p2p._udp.local PTR`. In response, each peer will send a -DNS message containing their discovery details. These details are stored in the additional -records of the response and include the multiaddresses that the peer is listening on, as -well as other information such as the peer's `` and ``. - -The response message (that is, the answer to the DNS message) is in the form of a -DNS record: ` PTR .`. Additional record in the -response message contains a peer's discovery details in the following form: -`. TXT "dnsaddr=..."` - -- `` is a unique case-insensitive identifier for the peer, although it is not - used for any meaningful purpose in libp2p. Instead, it is simply a string of random ASCII - characters that are required to be sent in the wire format. On the other hand, the -- `` is the fully qualified name of the peer derived from the peer's name and - `p2p.local`. -- ``, meanwhile, is the DNS-SD (DNS Service Discovery) service name for all - peers and is defined as `_p2p._udp.local`. - > If a private network is being used, the `` will contain the base-16 encoding of - > the network's fingerprint as in `_p2p-X._udp.local` to prevent public and private networks from - > discovering each other's peers. - -A peer sends a query for all *other* peers when it first spawns or detects a network change. -A peer must respond to its own query. This allows other peers to passively discover it. + ### Example -The sample Wireshark output shows the mDNS traffic that is being generated from an IPFS node. +The following Wireshark output shows sample mDNS traffic that is being generated from an IPFS node. The table includes information about the query and response messages being exchanged via mDNS. | No. | Time | Source IP | Destination IP | Protocol | Length | Info | From 1fcf7748cbbebab67fd6d29c440f3ce8554923c9 Mon Sep 17 00:00:00 2001 From: Prithvi Shahi <50885601+p-shahi@users.noreply.github.com> Date: Mon, 13 Feb 2023 11:42:40 -0800 Subject: [PATCH 08/11] Update content/concepts/discovery-routing/mDNS.md --- content/concepts/discovery-routing/mDNS.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/concepts/discovery-routing/mDNS.md b/content/concepts/discovery-routing/mDNS.md index acf49e4d..67de74d1 100644 --- a/content/concepts/discovery-routing/mDNS.md +++ b/content/concepts/discovery-routing/mDNS.md @@ -18,8 +18,6 @@ on the network, allowing devices to discover each other and exchange information In libp2p, mDNS is used for peer discovery, allowing peers to find and communicate with each other on the same local network without any prior configuration. -This is achieved through multicast DNS (mDNS) records, which are sent to all nodes on the -local network. From f00409bac8183f04b60eb1206b5e82a4ff2c4878 Mon Sep 17 00:00:00 2001 From: Prithvi Shahi Date: Mon, 13 Feb 2023 12:12:18 -0800 Subject: [PATCH 09/11] remove wireshark --- content/concepts/discovery-routing/mDNS.md | 28 +++------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/content/concepts/discovery-routing/mDNS.md b/content/concepts/discovery-routing/mDNS.md index 67de74d1..180a08f6 100644 --- a/content/concepts/discovery-routing/mDNS.md +++ b/content/concepts/discovery-routing/mDNS.md @@ -17,29 +17,7 @@ on the network, allowing devices to discover each other and exchange information ## mDNS in libp2p In libp2p, mDNS is used for peer discovery, allowing peers to find and -communicate with each other on the same local network without any prior configuration. - +communicate with each other on the same local network without any configuration. +The basic mDNS node discovery flow beings when a peer starts or detects a network change and then sends a query message to all peers. The node adds the responess/information it receives from other peers into a local database. +To learn more about definitions, specific fields, and peer discovery, [visit the mDNS libp2p specification](https://github.com/libp2p/specs/blob/master/discovery/mdns.md). - -### Example - -The following Wireshark output shows sample mDNS traffic that is being generated from an IPFS node. -The table includes information about the query and response messages being exchanged via mDNS. - -| 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 | - -The "Info" column provides additional information about the packet, including the type of query -or response message (e.g. Standard query, Standard query response), the DNS record type -(e.g. PTR, SRV, TXT), and any additional details about the query or response. - -The query messages are sent to the multicast IP address 224.0.0.251, and the response messages are -sent back to the source IP address. The DNS records being queried and returned include PTR (pointer) -records, SRV (service) records, and TXT (text) records. These records are used to map domain names -to IP addresses and other information about services and devices on the network - -{{< alert icon="💡" context="note" text="See the mDNS technical specification for more details." />}} From dc606c9618ba38b54c0232c45705f5f1bde4ec23 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Sat, 25 Feb 2023 00:30:49 +0000 Subject: [PATCH 10/11] Edits --- content/concepts/discovery-routing/mDNS.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/content/concepts/discovery-routing/mDNS.md b/content/concepts/discovery-routing/mDNS.md index 180a08f6..4e0a5950 100644 --- a/content/concepts/discovery-routing/mDNS.md +++ b/content/concepts/discovery-routing/mDNS.md @@ -6,18 +6,22 @@ weight: 224 ## What is mDNS? -mDNS, or multicast Domain Name System, is a way for nodes to use a multicast system -of DNS records over a local network to discover and communicate with nodes. Nodes -broadcast topics they're interested in instead of querying a central name server. -The discovery, however, is limited to the peers in the local network. mDNS is commonly -used on home networks to allow devices such as computers, printers, and smart TVs to -find each other and connect. It uses a protocol called multicast to broadcast messages -on the network, allowing devices to discover each other and exchange information. +mDNS, or multicast Domain Name System, is a way for nodes to use the multicast +system of DNS records [RFC 6762](https://www.rfc-editor.org/rfc/rfc6762) over a +local network to discover and communicate with nodes. Nodes broadcast topics +they're interested in. The discovery, however, is limited to the peers in the +local network. mDNS is commonly used on home networks to allow devices such as +computers, printers, and smart TVs to find each other and connect. It uses a +protocol called multicast to broadcast messages on the network, allowing devices +to discover each other and exchange information. ## mDNS in libp2p In libp2p, mDNS is used for peer discovery, allowing peers to find and communicate with each other on the same local network without any configuration. -The basic mDNS node discovery flow beings when a peer starts or detects a network change and then sends a query message to all peers. The node adds the responess/information it receives from other peers into a local database. -To learn more about definitions, specific fields, and peer discovery, [visit the mDNS libp2p specification](https://github.com/libp2p/specs/blob/master/discovery/mdns.md). +The basic mDNS node discovery flow begins when a peer starts or detects a +network change and then sends a query message to all peers. The node adds the +response it receives from other peers into a local database. To learn more about +definitions, specific fields, and peer discovery, [visit the mDNS libp2p +specification](https://github.com/libp2p/specs/blob/master/discovery/mdns.md). From 21f82ac81f5f5ae1fb1085bd5f83b0193acc34bb Mon Sep 17 00:00:00 2001 From: Prithvi Shahi <50885601+p-shahi@users.noreply.github.com> Date: Fri, 24 Feb 2023 16:42:28 -0800 Subject: [PATCH 11/11] Update mDNS.md --- content/concepts/discovery-routing/mDNS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/concepts/discovery-routing/mDNS.md b/content/concepts/discovery-routing/mDNS.md index 4e0a5950..3ae73796 100644 --- a/content/concepts/discovery-routing/mDNS.md +++ b/content/concepts/discovery-routing/mDNS.md @@ -21,7 +21,9 @@ In libp2p, mDNS is used for peer discovery, allowing peers to find and communicate with each other on the same local network without any configuration. The basic mDNS node discovery flow begins when a peer starts or detects a network change and then sends a query message to all peers. The node adds the -response it receives from other peers into a local database. To learn more about +response it receives from other peers into a local database. + +To learn more about definitions, specific fields, and peer discovery, [visit the mDNS libp2p specification](https://github.com/libp2p/specs/blob/master/discovery/mdns.md).