Our terriers are from proper working parents, meaning they're good above and below ground. Dogs like that are a natural for something as comparatively easy as ratting; it's mostly instinct. That said, even the farm collie can and will grab the odd rat but it takes a certain type of dog to ignore the repeated bites and not get put off, but rather become all the more enraged and enthusiastic!
Anything with terrier blood, some of the smallish bull & terriers (pits, staffies, English bulls), teckels, whippets, lurchers and so on. Those are the dogs who tend to shine. That said, as with any working dog, genetics and bloodlines play a huge role, but a good one is where you find it!
You can't really beat a well bred terrier though. Busting vermin and going to ground is their sole reason for existing, so they tend to be very good at it
Some dogs get bitten and decide/pretend from then on that they "can't" find or see rats anywhere

Most however become suitably enraged at the audacity of the biting rat and decide from there-on-in that it's their sole mission in life to find and eradicate every single rat, period. Those are the keepers