Disable/Enable of port

Hi there,

Is there a way to restart (disable/enable) the wan port (in this case ether2) when the connection is lost?

Thank you!

This will disable interface and wait two seconds before it set to enable when there are noe link.
I would have examined what the problem is and try to solve it before adding some script like this.
Schedule it to run every 1 min (f.eks)

/interface ethernet monitor ether3 once do={
	:if ($status = "no-link") do={ 
		/interface set [find name=ether3] disabled=yes
		:delay 2s
		/interface set [find name=ether3] disabled=no
		:log error message="Interface lost connection"
	}
}

Some variation:

:local IF "ether3"
/interface ethernet monitor $IF once do={
	:if ($status = "no-link") do={ 
		set [find name=$IF] disabled=yes
		:delay 2s
		set [find name=$IF] disabled=no
		:log error message="Interface lost connection"
	}

}

Nearly same code post here:
http://forum.mikrotik.com/t/interface-rate-script/147093/1