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

External Network Cannot Discover Devices on Thread Network via mDNS #2528

Open
dsyx opened this issue Oct 8, 2024 · 3 comments
Open

External Network Cannot Discover Devices on Thread Network via mDNS #2528

dsyx opened this issue Oct 8, 2024 · 3 comments

Comments

@dsyx
Copy link

dsyx commented Oct 8, 2024

I am experiencing an issue where devices within the Thread network cannot be discovered by external networks using mDNS. Below are the details regarding my OTBR build command and the outputs from the relevant commands.

OTBR Build Command:

sudo INFRA_IF_NAME=eth0 \
     RELEASE=1 REFERENCE_DEVICE=1 BACKBONE_ROUTER=1 BORDER_ROUTING=1 WEB_GUI=1 \
     OTBR_OPTIONS="-DOT_THREAD_VERSION=1.3 \
                   -DOT_POSIX_RCP_SPI_BUS=ON \
                   -DOT_PLATFORM_CONFIG=openthread-core-silabs-posix-config.h \
                   -DOTBR_DUA_ROUTING=ON -DOTBR_DNSSD_DISCOVERY_PROXY=ON -DOTBR_SRP_ADVERTISING_PROXY=ON" \
    ./script/setup

Output from ot-ctl srp server service:

MGM240_3425B4FFFE31F455._prv._tcp.default.service.arpa.
    deleted: false
    subtypes: (null)
    port: 10250
    priority: 0
    weight: 0
    ttl: 7200
    lease: 7200
    key-lease: 680400
    TXT: [EUI64=33343235423446464645333146343535]
    host: MGM240_3425B4FFFE31F455.default.service.arpa.
    addresses: [fd0f:211:2328:1:1f19:c502:101:f961]

MGM240_3425B4FFFE0E86D9._prv._tcp.default.service.arpa.
    deleted: false
    subtypes: (null)
    port: 10250
    priority: 0
    weight: 0
    ttl: 7200
    lease: 7200
    key-lease: 680400
    TXT: [EUI64=33343235423446464645304538364439]
    host: MGM240_3425B4FFFE0E86D9.default.service.arpa.
    addresses: [fd0f:211:2328:1:ddee:38f1:1bfe:8b14]
Done

Despite the above configurations, when I try to ping the device using the command ping MGM240_3425B4FFFE0E86D9.local, I receive the following error:

ping: MGM240_3425B4FFFE0E86D9.local: Name or service not known

Thanks

@jwhui
Copy link
Member

jwhui commented Oct 8, 2024

Does your ping command support IPv6? Depending on your system, you may need to add -6 or use ping6.

You may also find the OpenThread Border Router guide useful. Specifically, the steps:

@dsyx
Copy link
Author

dsyx commented Oct 8, 2024

Hi @jwhui ,

The ping command supports ipv6, because pinging the ipv6 address directly is normal. Even when I use avahi-browse on the OTBR host, I can't find any Thread related services.

In addition to OTBR_DNSSD_DISCOVERY_PROXY and OTBR_SRP_ADVERTISING_PROXY, what other macros control the mDNS and SRP behavior of OTBR?

There is also a strange phenomenon: using a Linux host, you can directly ping the Thread device's ipv6 address, but the Windows host cannot ping. They are all in the same LAN (no subnet).

Thanks

@dsyx
Copy link
Author

dsyx commented Oct 9, 2024

Refer to Ping the hostname or IPv6 address, add mdns6_minimal to /etc/nsswitch.conf and restart the machine. Now the ping command can find the appropriate IPv6 address through the mDNS domain name.

But the windows machine still cannot ping the Thread device.

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

2 participants