通过MDNS发现局域网服务
APPLE的Bonjour
-
dns-sd -B _services._dns-sd._udp
查找所有服务输出结果
Timestamp A/R Flags if Domain Service Type Instance Name 20:00:16.622 Add 2 9 . _tcp.local. _modbustcp
Unix中的avahi
-
avahi-browse -a -r -k
输出结果
+ ens33 IPv6 MODBUS TCP _modbustcp._tcp local + ens33 IPv4 MODBUS TCP _modbustcp._tcp local = ens33 IPv6 MODBUS TCP _modbustcp._tcp local hostname = [ocpp510.local] address = [fe80::c3c:99ff:fea6:e472] port = [502] txt = [] = ens33 IPv4 MODBUS TCP _modbustcp._tcp local hostname = [ocpp510.local] address = [192.168.9.11] port = [502] txt = []