The trade means the Stars have three picks in the second round of this year's draft (Nos. 43, 54 and 61), which began Friday night in Pittsburgh.
Ribeiro, 32, played six seasons for the Stars (461 games) and recorded 123 goals and 284 assists. He had 18 goals and 45 assists in 74 games last season.
"We'd like to thank Mike for his contributions the last six years with the Dallas Stars and wish him well with the Washington Capitals," Stars general manager Joe Nieuwendyk said in a press release.
Eakin, 21, was a third-round pick of Washington in the 2009 draft. He started the season with the Hershey Bears of the AHL, and had 13 goals and 14 assists to go along with a plus-4 rating in 43 games.
Eakin made his NHL debut on Nov. 1, 2011, against the Anaheim Ducks. In his second game, he recorded his first two NHL points with a goal and an assist against the Carolina Hurricanes. He ended up with eight points in 30 games for the Capitals last season.
The 6-foot, 190-pound center spent five seasons in the WHL with the Swift Current Broncos. His best season was in 2009-10, when he had a team-high 47 goals and 91 points in 70 games.
"Cody Eakin is a young, competitive player who we've had our eye on for some time," Nieuwendyk said. "He plays a solid two-way game and epitomizes the 'hard to play against' mentality we're building our team around. Cody's future is bright, and we're excited to add him to our club."