It will certainly work with unshielded ethernet cables, but you should go with Jonny Electron's advice and instal shielded cables.
The main reason is, that you are less likely to have errors due to EMI. On most boats, many different cables run through the same ducts and some may carry a lot of noise, that could induce interference to the ethernet transmissions. All industrial installations require shielded ethernet cabling for that reason.
In my experience, shielding together with proper grounding of the equipment, may safe it in case of a near by lightning strike. The very strong magnetic impulse induces damaging voltages in any longer cable run and in the shielded case the shield protects the signal lines and thus the transceivers that are usually what burns out on such a strike.
I have been fixing electronics on two of my friends boats, after they had such a nearby lightning strike. Ports that had shielded cables were usually fine, unshielded ones, like some NMEA0183 ports or old SeaTalk were blown. One radar dome wasn't grounded, but had a shielded cable that connected to signal ground which was grounded at the display side. That burned out the ground connection on the PCB, but left the radar otherwise unharmed.
So it is really important, that the devices at which the shielded cables terminate, are properly grounded on their solid ground bolt. Note that ground should be separate from -12V or-24V and should be well earthed.
Note also that most of the shelf ethernet routers have no shield connection. (Shields of incoming cables are not connected). But this may not be a problem, if all devices that use shielded cables are properly grounded and connect to their cable shield. If fact, that way you get the EMI protection of the shield, but you avoid potential ground loops.