Hi, Joan and welcome to TP.
Yup, fences can be a pain but do a necessary job. To reduce the impact of the fences on your shots, use as wide an aperture as possible, in your lens's case, f/2.8 which should help reduce the depth of field enough to minimise the distraction of the fencing. Panning will also help blur the fencing but make sure that any horizontal elements of the fencing (straining wires etc.) don't fall on wanted elements. The closer you are to the fences the better too - the further out of focus they'll be when you're concentrating on the on-track action.
As for the other settings, whatever they need to be to get that wide open aperture, so as low an ISO as possible and in Av mode (I think that's the Canonspeak for aperture priority!) the camera will take care of the shutter speed element for you. Of course, for panning you'll probably want a relatively slow shutter speed so you might need to use a filter to get the wide open aperture and slowish shutter speed you want - a polariser will help but might not be enough.
Good luck!