UDP broadcast packets across subnets

前端 未结 3 1853
甜味超标
甜味超标 2020-12-03 16:57

Is it possible to send a UDP broadcast packet to a different subnet through a router? I\'m writing an app to discover certain devices on the network, and the PC might be on

3条回答
  •  伪装坚强ぢ
    2020-12-03 17:33

    Short answer: No.

    Long answer: Maybe. DHCP works this way, but the routers are configured to let the UDP broadcast on the DHCP port through. If you had complete control of the network hardware you could open up any/all UDP ports to allow broadcast across subnets. Without control over the configuration of the routers, see the short answer.

提交回复
热议问题