Russia has no entrance to Afghanistan, unless the Central Asian states open their borders. An Invasion of Afghanistan takes away resources from Chechnya.
That might be a good thing, as invading Afghanistan doesn't actually bring any benefit.
It seems odd to say, but the response might actually be pretty subdued despite the huge tragedy. The Chechen war intensifies, an intelligence manhunt for OBL begins, but they aren't going to be invading anybody. 9/11 becomes just yet another on the long list of tragedies, atrocities, and insults carried upon the Russian state by outsiders, as said by Russian state media. The Muslim states of Central Asia might feel a bit of influence and pressure to not offend the Russian Federation in any way in the near future though.
The Russian government rams through the Duma massive funding for the military and intelligence services, likely more than they know what to do with besides siphoning a bit (a lot) off the top. Alternatively a smart Russian government could also use this is catalyst to ram through military reforms and purges virtually unquestioned.
Rapprochement with the west might be possible, but equally likely for the west to shrug and think no skin off my nose. Europe is likely to be sympathetic, but it's hard to understand the scale of the threat if it's not directly in your face.
America still seems likely to invade Iraq in a preemptive war at the urging of the Rumsfeld-Cheney clique, without the diversion of Afghanistan.