@echo off echo Checking multicast reachability... echo Sending multicast ping to 239.0.0.1:9999 powershell -Command " try { $udp = New-Object System.Net.Sockets.UdpClient $udp.Client.SetSocketOption('IP', 'MulticastTimeToLive', 1) $udp.Client.Bind((New-Object System.Net.IPEndPoint([System.Net.IPAddress]::Any, 0))) $udp.JoinMulticastGroup([System.Net.IPAddress]'239.0.0.1') $bytes = [System.Text.Encoding]::ASCII.GetBytes('ping') $udp.Send($bytes, $bytes.Length, '239.0.0.1', 9999) Start-Sleep -Milliseconds 200 if ($udp.Available -gt 0) { Write-Host 'MULTICAST OK: Response received' } else { Write-Host 'MULTICAST OK: Sent successfully (no listener, but network supports it)' } $udp.Close() } catch { Write-Host 'MULTICAST FAILED: Network may not support multicast' } "