General manager Reggie McKenzie announced the deal Wednesday. Barnes is the first of Oakland's 17 unrestricted free agents to re-sign with the team.
Barnes has spent the past four seasons with the Raiders. He has played 47 games and started 30 over that span. He has started 25 games at right tackle the past two years, missing seven games in 2012 with a groin injury.
Barnes was originally drafted in the second round by Jacksonville in 2005. He first signed with Oakland in 2009 as an unrestricted free agent and has re-signed each offseason to stay with the Raiders.