I am trying to develop a network monitoring windows application. Is there any way to detect whether physical firewall, routers and switches are running properly and not switched off or not working? Also I need to detect this from a client system connected to the LAN.
I guess for the switch a ping to its IP address is necessary?
For pinging switch, here is my code,
void PingSwitch()
{
var ping = new Ping();
if (!string.IsNullOrEmpty(this.IPV4Address))
{
PingReply pingReply = ping.Send(this.IPV4Address);
if (pingReply.Status == IPStatus.Success)
this.Background = Brushes.Green;
else
this.Background = Brushes.Red;
}
}
How do I do with router and firewall?