This project is read-only.

checking for network connection

Mar 7, 2011 at 6:05 AM

Is there any function to check if ethernet port is connected to any network or anything equivalent to that?


Mar 11, 2011 at 12:08 PM

Hi kushalv5678,


Look at PacketDevice's Addresses attribute and see the values you get.

You can also get the Device's MacAddress by using the extension method GetMacAddress().


I hope this helps,



Mar 12, 2011 at 6:45 PM

Thanks Boaz. In my project I am developing an embedded system which could be silent for some period of time, during which the PC sends some query packets of broadcast or IPv6 multicast MAC address. So we can't solely depend on GetMacAddress(). So please let me know if there is any other way to find out if the ethernet port of the computer is physically connected to any valid network (even if it is silent) in the physical layer?

Thanks once again.


Mar 12, 2011 at 7:17 PM

What about the PacketDevice's Addresses?

Obviously the computer doesn't know what physically is connected, only what the software (including OS/drivers) states.

Mar 16, 2011 at 8:20 PM

thank u