Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

switch - how to reboot unresponsive IP camera?

Unanswered Question
Aug 27th, 2012
User Badges:


I have a Synology NAS that is connected to several IP Cameras through a SG300 switch.

From time to time the IP cameras become "disconnected" at random

When I reboot the switch, the access to cameras is re-established.


  1. it requires an external device to reboot the switch
  2. all ports are shutdown while rebooting the switch


Is there a way to program the SG300 to reboot itself automatically every X hours?


Is there a way to automate the following process on the SG300 switch itself.

  1. ping a camera every 1 minutes
  2. after three unresponsive ping, shutdown and restart the port to which the camera is connected


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 2.8 (4 ratings)
Tom Watts Mon, 08/27/2012 - 06:58
User Badges:
  • Green, 3000 points or more

Hi Laurent,

There is not any scripting features supported for the switch. There are outside technologies like "wake on LAN" if your network can support it.

You may want to try to globally and per port base disable the EEE features under port management. This may be the cause of the random disconnects.

Please rate helpful posts

zoumczoumc Mon, 08/27/2012 - 07:07
User Badges:

Hello Tom,

EEE is disabled.

could you explain the WOL part?



Tom Watts Mon, 08/27/2012 - 07:18
User Badges:
  • Green, 3000 points or more

Laurent, I will provide some useful links. WOL is a 3rd party utility.

Here's the wiki link


Here's smallnetbuilder's input


Here's a cnet download for free


Please rate helpful posts

Well, I do the following to cycle the PoE on my SG500-28P switch:

snmpset -v2c -c serverswitch POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.61 i 2

sleep 10

snmpset -v2c -c serverswitch POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.61 i 1

And then call that script from a Perl routine that runs in a cron job:


my $browser = LWP::UserAgent->new;


my $url = 'http://:@garagecam.compusmiths.com/jpg/image.jpg';

my $response = $browser->get( $url );

if (!$response->is_success)


    printf("No image from GarageCam, power cycling it!\n");



Which power cycles it whenever it fails to supply an image to an HTTP request.

You seem to want to turn the port on and off, which is probably something similar but using the administrative up and down commands, IF-MIB::ifAdminStatus.portnumber

If you unplug the network cable and plug it back in, do you get the same result, o do you really have to reboot the switch?

Dunno how much Linux you can run on that NAS box, or if you have another box that's up all the time, or if you want to plug in something like a Raspberry Pi....

zoumczoumc Tue, 08/28/2012 - 02:27
User Badges:

Hi W, Tom

We are nearly there.

When the camera appears disconnected on my Synology, the ping does not work anymore.

You are right,  "unplug the network cable and plug it back in" is working and is the thing I want the SG300 to do for me when it detect that the IP camera traffic is null.

I use a SG300-10, not PoE unfortunately.

If I would know PERL and know how to configure it on Synology, I guess I could program it. But I can't.

This is why I try to have the switch to

  1. SG300-10 detects that the traffic on the IP CAM port is below a threshold or that the device does not respond to a ping
  2. and then perform a  "switchxxxxxx# set interface active gi1" or "switchxxxxxx(config-if)# no shutdown"

I have launched a separate thread https://supportforums.cisco.com/thread/2167753

SG300 - PORT MANAGEMENT - Reactivate Suspended Port - can not activate

to try to solve the same problem in a different way, but the objective is the same


Tom Watts Tue, 08/28/2012 - 08:23
User Badges:
  • Green, 3000 points or more

Laurent, I guess I am a bit more interested in why it is going to this state. If there is a device connecting to the switchport, it should be able to communicate on demand unless there is something going on with that particular device.

If the switch is the cause of the camera communication it is related to spanning tree, port security, and EEE. If the camera is going in to a sleep state and cannot activate by transmission of interesting packet or the switch pretty much needs to yell "Hey, wake up!" by using a shutdown/no shut command or set interface command it seems the camera's conservation setting may be too low or the NIC on this product is not sensitive enough.

Curious enough, if you set a computer on the LAN to continuously ping the camera, does it ever stop working?

ping cameraip -t

If sending a constant stream of traffic to the camera keeps it working, this is an okay work around. But it doesn't resolve the issue of who is doing what. What is the model of the camera?

Please rate helpful posts

I guess I'm less surprised by cameras falling over, Axis at least seems to have outsourced their firmware to Elbonia.

The Axis M1011 camera I have the most trouble with will respond to ping, will open an HTML session, but won't give you a .jpg file.  So I just check it every minute as above and power-cycle the PoE when it doesn't respond.

The 209MFD and M3114 are a little better, but they don't stay up forever either.