Skip to content
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

Query packets aren't received by other hosts on local network #14

Closed
mtharrison opened this issue Sep 13, 2015 · 1 comment
Closed

Query packets aren't received by other hosts on local network #14

mtharrison opened this issue Sep 13, 2015 · 1 comment

Comments

@mtharrison
Copy link

Firstly, I apologise that this is a really basic question. I have two machines on the same network. On machine 1 I have this script, which just listens for all queries:

var mdns = require('multicast-dns')()

mdns.on('query', function (query) {
  console.log('got a query packet:', query)
});

On the other machine I have this script, which makes a query every second:

var mdns = require('multicast-dns')()

mdns.on('response', function(response) {
  console.log('got a response packet:', response)
})

setInterval(function () {
    mdns.query({
      questions:[{
        name: 'myservice.local',
        type: 'A'
      }]
    })
}, 1000);

I was expecting the query from machine 2 to be received at machine 1 but there's no output at all from machine 1. I can see the DNS packets being sent from machine 2 in Wireshark:

screen shot 2015-09-13 at 09 42 27

Any pointers on why this doesn't work as I was expecting?

@mtharrison
Copy link
Author

I messed around with my router settings for a while, flipped a bunch of buttons, went a bit crazy and then it just worked! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant