Voyager, the Olympia, and the Enterprise NX-01 operated completely independent from Starfleet bases for years.
The
Voyager and had to rely on non-Starfleet facilities in order to keep running and came close to being stranded in space more than once because it was out there on its own, and NX-01
Enterprise's mission was never specified to be a multiyear expedition and it needed alien help to keep running more than once as well. The
Olympia's eight-year mission could have easily been like the original
Enterprise's in the sense that it may never have been
too far from Federation space at any given time.
Same with the old Earth Cargo ships.
But, IIRC, most of those cargo ships were on "milk runs" in explored space. In those instances, they were simply slow vessels moving through already settled regions of space.
It was the
Nanut, a Tygarian freighter. It's possible that the freighter was hired to work for a colony in the Gamma Quadrant for two years (it was prior to hostilities with the Dominion).
I think with freighters, it's just a case that they move very slowly, but they probably are no more than a few weeks or months from a Federation world at maximum warp.
From what we've been able to see onscreen, independent operations aren't
that terribly long. Ships seem to be only to go so far without having to stop somewhere for supplies and repairs.
When I say independent, I meant independently from Starfleet or Federation facilities. Those freighters and Starfleet ships can still get supplies from alien ports open to public traffic. Or like Voyager, they can harvest raw resources from planets, nebulas, whatever.
I just can't see that as being standard procedure for Starfleet vessels. It's too much like kicking a starship out there and depending mostly on the kindness of strangers for its success--if it can't, oh well, too bad. I think those are more
emergency contingencies rather the expected way a long-range Starfleet ship is to be normally run, IMO.
The ships mentioned in the encyclopedia, did they mention if any of those ships were away for more than a couple months? The Enterprise was never shown being away for long. They would be exploring deep space in one episode, and the next episode they would be back in Federation space fighting with Klingons or somebody. They were definitely not gone for more than a year.
I think the original
Enterprise is probably the best example of what a multiyear deep-space mission is really like--the ship operates along the farthest reaches, periodically ventures out into unexplored space for a period of time, and then returns back to Federation territory for supplies, upgrades, crew rotations etc., before venturing out into unexplored territory again. Ships like the
Enterprise may be called upon for other duties between "probes." But each time the ship goes out, it goes a little bit deeper and deeper into the unknown and can really explore a lot of space that way over several years.
Another thing to consider is just how much of
Federation space is actually explored. Some sectors of Federation space (especially out along the frontier) may have been annexed or established by treaty, but no one has actually been out that way to explore the planets and star systems there yet. That way, there could be quite a few unexplored systems that may be close to Federation space in one dimension, but actually lie outside of Federation space in another...