It will take at least ten years of soft play and terrible tackling for the Baltimore Ravens to shed the reputation of being one of the league’s best defensive teams. Just show the color combination of black and purple to an NFL fan and they’ll immediately think of Ray Lewis crushing running backs and Ed Reed returning interceptions for touchdowns.

It’s a reputation that’s well deserved, as the Ravens have finished in the top 10 in yards allowed and/or points allowed every year since 1999 except for 2002, when Ray Lewis missed 11 games and the Ravens finished 19th in points allowed and 22nd in yards allowed.

Lewis is dealing with turf toe this week, and even though (1) he missed last week’s game against the Bengals and (2) John Harbaugh called Lewis’ availability a gametime decision, he’s probably going to suit up against a 9-1 team featuring Patrick Willis on national TV.

A couple days ago I looked at how the Ravens’ offense compared to the offense of the New York Giants, the last division-leading perennial contender the Niners faced. Will playing the Ravens in Baltimore be a tougher test than facing the Giants at Candlestick? While the Giants are a little deeper at receiver and more polished offensively than the dink-and-dunk Ravens, defense has long been Baltimore’s forte.

Rushing Defense

Even without Lewis last week the Ravens still held Cedric Benson to 41 yards on 15 carries (2.7), although the Bengals rushed for 119 yards on the day on 30 carries and Benson had two touchdowns. Baltimore leads the NFL in yards allowed per carry (3.3), much better than the Giants’ 4.5 ypc allowed, and they’ve allowed 6 rushing touchdowns (By comparison, the 49ers have allowed 3.6 ypc and 0 rushing TD).

When the 49ers played the Giants, they barely ran at all in the beginning because they knew the Giants didn’t respect Alex Smith and their scheme consisted of doing whatever it took to stop Frank Gore. The Ravens won’t do that, because their ability to defend the run isn’t dependent on bringing both safeties up to combat Gore. Also, Ed Reed and Bernard Pollard are needed to help with…

Passing Defense

This is where the Ravens look like a better defensive unit than the Giants, the 49ers and most other teams in the league. The Ravens have been holding quarterbacks to 6.8 yards per attempt, 211 yards per game and a woeful 53.3% completion rate. They’ve given up 7 passing touchdowns to go with 11 INT and 29 sacks. The only area where the Giants’ pass defense is superior is in the sack category (31), and sacks are one of the most misleading stats out there, even though when your team sacks someone it’s REALLY cool.

But the Ravens’ pass defense is a tad inconsistent. They started out well, intercepting Ben Roethlisberger three times in Week 1. Then in Tennessee they gave up 358 yards to Matt Hasselbeck in a surprising loss to the Titans. In the five weeks after that loss, the Ravens surrendered only 150.2 yards per game to the likes of Sam Bradford (166), Mark Sanchez (119), Matt Schaub (220 — without Andre Johnson), Blaine Gabbert (93) and Kevin Kolb (153).

Since then it’s been a little more of a struggle for the Ravens. The Steelers amassed 330 yards passing in their rematch, but committed 2 turnovers (an INT by Roethlisberger and a fumble by Mike Wallace) in Baltimore’s 23-20 victory. A week later the Ravens lost in Seattle in a game where Tarvaris Jackson played a mistake-free game (17-for-27 for 217 yards, 0 TD and 0 INT; by comparison Flacco went 29-for-a-ridiculous-52 for 255 yards with a TD and an INT). Last week, the Ravens let Andy Dalton pass all over the field (373 yards), but it didn’t lead to a loss in part because they intercepted Dalton three times.

Familiar story? The 49ers have allowed two 400-yard passing games and Eli Manning got them for 302 yards a couple weeks ago. And in each of those three games San Francisco took the ball from the other team at least twice.

The Ravens still got it…

If Lewis plays, and there’s no reason to believe he won’t if he’s upright and moving, the Ravens have a significantly better defense than the Giants. Besides Terrell Suggs, Baltimore doesn’t have the glamour pass rushers the Giants do (because for the rest of our lives every Giants pass rusher will be celebrated as if he’s Michael Strahan). But like the 49ers, the Ravens are very physical and don’t need to keep eight guys in the box to stop the run.

It’s too early to know if the 2011 Baltimore Ravens defense is as good or better than the 2011 San Francisco 49ers defense, but it seems like if they switched uniforms tomorrow night and didn’t do any closeup shots of their faces, a lot of people watching on TV would be fooled:

– Both units force loads of turnovers, both via interceptions and fumbles forced.

– They both have outstanding defensive tackles who’ll likely be competing for a First-Team All-Pro nod this year (Justin Smith and Haloti Ngata).

– Everyone already knows about the middle linebackers. (However, besides Lewis the Ravens don’t have anyone in the same class as either Patrick Willis or NaVorro Bowman. Jameel McClain’s a good inside linebacker, but there’s no way he’d start in San Francisco.)

– The Ravens’ safeties have more name value (Reed made First-Team All-Pro last year even though he only played 10 games), but at this point the 49ers (with quiet assassin Donte Whitner and Dashon Goldson, who was not suspended for throwing hands with Early Doucet on Sunday) are doing pretty well in that department.

– Both teams are so good at stopping the run that opposing teams give up and pass the ball almost exclusively, which is why each team has given up a few big-yardage games through the air.

If Lewis is healthy the 49ers are going to have to get creative in the passing game. If he isn’t, they’re either going to attack Lewis directly or, if the Ravens overcompensate to stop Gore, attack Baltimore with downfield strikes to Michael Crabtree and Kyle Williams. Jerome Simpson went for 150 yards last week against Baltimore, and those two seem like they’re knocking on the door…