We establish a duality between index coding and locally repairable codes. We use this duality to obtain a new bound for the multiple unicast network coding problem.