  We consider the problems of reaching average consensus and solving
consensus-based optimization over unreliable communication networks wherein
packets may be dropped accidentally during transmission. Existing work either
assumes that the link failures affect the communication on both directions or
that the message senders {\em know exactly}, in each iteration, how many of
their outgoing links are functioning properly. In this paper, we consider
directed links, and we {\em do not} require each node know its current outgoing
degree.
  First, we propose and characterize the convergence rate of reaching average
consensus. Then we apply our robust consensus update to the classical
distributed dual averaging method wherein the consensus update is used as the
information aggregation primitive. We show that the local iterates converge to
a common optimum of the global objective at rate $O(\frac{1}{\sqrt{t}})$, where
$t$ is the number of iterations, matching the failure-free performance of the
distributed dual averaging method.
