ive been chased by dogs quite a few times ont bike – most of them were collies come to think about it! all i do (if ive got time) is jump off and whip the seat/seatpost out – raise it threateningly and shout. 99% buggered off at this point but evry so often you get one determined sod that gets a good whack.
if the owners get arsey then they can get bent – should keep nasty dogs on a lead, its simple as that.
i love dogs too – but ive got no probs with protecting myself against them