Default interface for Broadcast
When sending a broadcast to 255.255.255.255 on a vista computer with two or more NICs, the broadcast will only be sent on one NIC. How does Vista determine which NIC is the default for broadcast?I have tried changing metrics in the routing table, but vista still uses the same NIC. I've also tried to change the order of the NICs in "Network Connections->Advanced", but without luck. I need to change the default NIC for broadcast without disabling any NICs (and I don't have to source code for the software, so I cannot change it to do subnet broadcasts on each NIC).
December 31st, 2008 2:08pm

Hi,Generally speaking, it is the by-designed and expected behavior that the broadcast packet is sent via only one interface (instead of via all interfaces simultaneously). Also, the system checks the local route table, to determine which network interface (if mutiple exist) will be used. To view the local route table, you can just run "route print" from a command prompt.For more information, please refer to:Microsoft Windows 2000 TCP/IP Implementation Details (The "Routing" section)http://technet.microsoft.com/en-us/library/bb726981.aspxHope this helps. Nicholas Li - MSFT
Free Windows Admin Tool Kit Click here and download it now
January 2nd, 2009 5:31pm

Hi,According to the routing table, the limited broadcast address should be the interface I want (lowest metric) but still the other interface is used (same routing entries, higher metrics). I will post a screenshot of the routing table.I have tried to change the metrics of each route etry, but the result is the same.
January 6th, 2009 6:07pm

Here is a screenshot of my routing table:http://farlig.org/route/route.jpgWith this table, 10.10.10.20 is used as the limited broadcast address, not 192.168.10.50 (which has the lowest metric). If I change metrics and 192.168.10.50 has the highest metric, 10.10.10.20 is still used (which means that the metric does not count when vista selects nic for the limited broadcast address).
Free Windows Admin Tool Kit Click here and download it now
January 6th, 2009 10:45pm

Hi, Thank you for your update. I noticed there is a Persistent Router entry in the route table. If it is not necessary, please just delete this entry and reboot the computer to see if it helps. To delete the entry, please refer to the steps below: 1. Open an elevated command prompt. 2. Type the following command, and then press ENTER: route delete 169.254.0.0 3. Reboot the computer and run route print again to check if it works. For more information, please also refer to the following document: Route http://technet.microsoft.com/en-us/library/bb490991.aspx Meanwhile, as we know, the 169.254.0.0 is an APIPA (Automatic Private IP Addressing) address. Generally, if the system cannot successfully get a valid IP lease from the DHCP server, an APIPA address is used. Therefore, I suspect the NIC may failed to get the valid IP address and connect to the network abnormally. Thus, we need more information to identify our issue. Please run CMD and then ipconfig /all to export all the network settings and post the information to this thread. Thank you for your cooperation. Nicholas Li - MSFT Nicholas Li - MSFT
January 7th, 2009 2:03pm

Hi,I have (again) tried to change the routing table with no luck. I wrote this one manually to avoid any traffic on 10.10.10.20 nic (but still be able to ping remote host 10.10.10.2):IPv4RouteTable===========================================================================ActiveRoutes:NetworkDestinationNetmaskGatewayInterfaceMetric10.10.10.2255.255.255.255On-link10.10.10.2026192.168.10.0255.255.255.0On-link192.168.10.60257192.168.10.60255.255.255.255On-link192.168.10.60257192.168.10.255255.255.255.255On-link192.168.10.60257255.255.255.255255.255.255.255On-link192.168.10.602===========================================================================PersistentRoutes:NoneIPv6RouteTable===========================================================================ActiveRoutes:NonePersistentRoutes:None..and guess what - limited broadcast address (255.255.255.255/255.255.255.255) still goes out on 10.10.10.20. Clearly vista does not even read the routing table when using the limited broadcast address. I have changed the metrics on all interfaces and on all routing entries but the result is the same. I can even delete all routes on the 10.10.10.20 interface, and vista will still use it. Here is my ipconfig:EthernetadapterLocalAreaConnection:Connection-specificDNSSuffix.:Description...........:BroadcomNetLink(TM)FastEthernetPhysicalAddress.........:00-FF-DD-BF-98-96DHCPEnabled...........:NoAutoconfigurationEnabled....:YesIPv4Address...........:10.10.10.20(Preferred)SubnetMask...........:255.255.255.0DefaultGateway.........:DNSServers...........:NetBIOSoverTcpip........:EnabledWirelessLANadapterWirelessNetworkConnection:Connection-specificDNSSuffix.:Description...........:Intel(R)WirelessWiFiLink4965AGNPhysicalAddress.........:00-13-E8-80-99-ABDHCPEnabled...........:NoAutoconfigurationEnabled....:YesIPv4Address...........:192.168.10.60(Preferred)SubnetMask...........:255.255.255.0DefaultGateway.........:DNSServers...........:192.168.10.10NetBIOSoverTcpip........:EnabledIt seems that vista somewhere/somehow decides that nic1 is my default nic, disregards the routing table, disregards the binding order in "network connections->advanced" and uses nic1 as long as it is alive. Does anyone know when/where this decision is made and how to affect the result?
Free Windows Admin Tool Kit Click here and download it now
January 10th, 2009 12:33am

Hi, Thank you for your response. To make the issue clear, could you please let me know how you perform the test to send the broadcast traffic, and how you noticed the traffic is sent from the unexpected interface? Once I get the information, I will check if I can reproduce the issue and perform some further researches. Thanks.Nicholas Li - MSFTNicholas Li - MSFT
January 12th, 2009 2:13pm

Hi,I created my own app for testing (since I don't have the source code for the original software):usingSystem;usingSystem.Net;usingSystem.Net.Sockets;usingSystem.Text;namespaceBroadCastTest{classProgram{staticvoidMain(string[]args){UdpClientudp=newUdpClient(12345);byte[]sendbuf=Encoding.ASCII.GetBytes("Helloworld");IPEndPointep=newIPEndPoint(IPAddress.Broadcast,12345);Console.WriteLine("Pressakeytosendbroadcastmessage.Pressescapetoquit");while(Console.ReadKey().Key!=ConsoleKey.Escape){udp.Send(sendbuf,sendbuf.Length,ep);Console.WriteLine("Messagesenttothebroadcastaddress");}}}}I used wireshark to see where the packets went:http://www.wireshark.org/Thanks for helping me :)
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2009 3:52pm

Here is a compiled test app:http://farlig.org/route/BroadCastTest.zip
January 13th, 2009 10:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics