Robust local algorithms for communication and stability in distributed networks