Russia has been benefiting from the NATO's presence in Afghanistan because they contain Taliban from expanding into the Middle Eastern states which Russia considers (don't know whether rightfully) it's sphere of influence.
At the same time, Russia has been loosing due to the heroin trafficing. Taliban in fact decreased the drugs production when it was in power (due to their religious views, I suppose).
It looks like the NATO forces control very little of the situation. The numbers of troops stationed there is ridiculously small. A mountaionous area cannot be easily isolated so I doubt there is an alternative to the occupation.
I personally see no way out. And the US governmeent doesn't see it either, I think.