Source: 49ers retain Carlos Rogers

The San Francisco 49ers and cornerback Carlos Rogers have reached agreement on a four-year deal worth roughly $30 million, a source told ESPN.com senior NFL writer John Clayton.

With escalators and incentives, the deal could max out at $31.3 million, the source said.

Rogers was San Francisco's main priority among its own free agents. His deal means all 11 defensive starters will return to a team that finished 13-3 and lost in the NFC Championship game.

The 30-year-old cornerback had a career-best six interceptions in his first season with the 49ers.

Drafted No. 9 overall by the Redskins in 2005, Rogers never lived up to the team's expectations in Washington that included questions on how he stacked up against fellow defensive backs Shawn Springs, Fred Smoot or DeAngelo Hall.

But Rogers gave San Francisco a reliable, athletic cornerback to replace Nate Clements, who was released by the 49ers last summer in a cost-cutting move before training camp.

It's been quite the week for the 49ers, who are gearing up for another playoff run after losing 20-17 in overtime of the NFC Championship game to the eventual Super Bowl champion New York Giants. On Monday, San Francisco signed wide receiver Randy Moss after he spent 2011 out of football, then brought in cornerback Perrish Cox on Tuesday to join a talented secondary that also includes safety Donte Whitner.

"I'm excited about all the moves they made, especially keeping the defense the same," Pro Bowl running back Frank Gore told The Associated Press on Wednesday in a phone interview from Miami. "It was one of the best defenses last year. If they come back and play together, they can be even better. We're going to be a good team."

Gore is confident the combination of Moss, Michael Crabtree and tight end Vernon Davis will open up the field and keep defenses guessing.

"Signing Randy Moss is really big for us. People have to respect him because of what he's done in this league as one of the best receivers and a future Hall of Famer," Gore said. "It's going to be big. Especially when you've got Vernon Davis, Crabtree, Randy Moss, players who can make plays, that should be easy on me.

Moss vowed to be a positive influence despite his reputation for taking plays off and not going hard in practice. Gore isn't worried about Moss disrupting a strong chemistry.

"I think he will (fit in). I know coach (Jim) Harbaugh and (general manager) Trent Baalke, they have a great eye for talent. If they made that choice, I think that's great," Gore said.

The team is still working to re-sign quarterback Alex Smith, with the sides saying the 2005 No. 1 overall draft pick was weighing a three-year offer. Smith's comeback season in 2011 under former NFL quarterback Harbaugh proved pivotal to the team ending an eight-year drought without a playoff berth or winning record. Smith took his share of boos and criticism during his initial six up-and-down seasons in the league.

The 49ers and Smith made it clear they wanted to get something done during the offseason to keep Smith with his only NFL franchise. Smith is represented by Tom Condon and CAA Sports, and Condon is also working to get Peyton Manning signed with a new team -- so there is some thinking that might happen before Smith re-signs. Condon and others in his agency haven't responded to multiple messages from The AP seeking an update on negotiations.

"Alex, he's a tough guy. I like him a lot, especially with all the stuff he went through and getting put in the situations coach Harbaugh put him in and believing in him," Gore said. "He got the chance he really never had there from an offensive standpoint. It showed he can play ball. He went through a whole lot, man. I think Alex is going to take his game to a whole other level, especially coming off the year he just had."

Information from The Associated Press was used in this report.