Sprocket/Bashguard help please

I have seen a few pictures of bikes where there is the bashguard on the outside, what looks like a metal plate on the inside, and a sprocket between the two. Where would I find the piece that I put on the inside. I want one of these so the chain doesn't fall off the sprocket.