Libp2p "peer discovery not working"

I am new to libp2p protocols, i am trying to implement distributed network using 0x-mesh without a bootstrap server or rendezvous server. I am initiating two peer nodes(behind NAT but both are in same LAN) which are calling the same rendezvous point but the peers don’t find each other. We have tried the below mentioned configuration for our p2plib:

connManager := connmgr.NewConnManager(peerCountLow, peerCountHigh, peerGraceDuration) opts = append(opts, []libp2p.Option{ libp2p.Routing(newDHT), libp2p.ConnectionManager(connManager), libp2p.Identity(config.PrivateKey), libp2p.EnableAutoRelay(), libp2p.EnableRelay(), libp2p.BandwidthReporter(bandwidthCounter), libp2p.Filters(filters), //nolint:staticcheck libp2p.Security(secio.ID, secio.New), }...) if config.Insecure { opts = append(opts, libp2p.NoSecurity) }

// Initialize the host.
basicHost, err := libp2p.New(ctx, opts...)
if err != nil {
	return nil, err

I have also faced similar issues, may be someone from libp2p team. Please assist here?

I think this is what mDNS is for, sorry nobody seemed to help.

Does your definition of LAN include a reasonable definition for subnet, I.E. The hosts share a broadcast address on at least one interface each?