The aforementioned 18-year war between the Klingons and Cardassians was actually the Betreka Nebula Incident and not the Battle of Klach D'Kel Bracht, but it was described as happening "ages ago" by Garak, which means Cardassians had been actively involved in Alpha Quadrant affairs for quite some time before the Federation and Cardassians went to war with each other around 2347.
A couple of random points:
1) When our heroes first get an eyeful of Klingon-Cardassian fighting in "Way of the Warrior", Bashir laments that this comes after "twenty years of peace". Since the only peace that has been violated so far is the Klingon-Cardassian one, this sort of suggests that the Betreka Nebula was contested between 2334 and 2352 or thereabouts. Or then significantly earlier, as there's no known limit to Garak's "ages ago" thing (both Klingons and Cardassians apparently being quite long-lived and capable of carrying specific grudges across generations).
2) It seems doubtful the UFP and the Cardassian Union would have gone to war around 2347 already. That's when the insignificant incident at Setlik III takes place, and it doesn't appear to lead to any known consequences, least of all being quoted as casus belli. OTOH, Picard was supposed to be making peace overtures with Cardassia in 2354 - but immediately after the Cardassians (or the Feds?) went to war, or after years, decades or even centuries of fighting, we don't know. Since Cardassians sound like pushovers even when seriously engaging in war, a conflict that drags on and on and on sounds quite plausible - the Feds wouldn't be bothered enough to put an end to it!
3) As of "Way of the Warrior", there doesn't appear to be a meter of actual Klingon-Cardassian border in existence - and indeed the distance between the two empires is so great that the Klingons have to stop at DS9 in neutral space to catch their breath. So it seems the Betreka incident necessarily ended up in either one or both combatants totally withdrawing from Betreka, to quite some distance.
Enterprise got to the Klingons in days, getting to DS9 from Earth was only ever a matter of days even with Runabouts, I think, and Runabouts are only about as fast as the NX-class.
The closest we come to learning about the travel time by runabout is when Bashir in "Defiant" wants something by the end of the week, and Kira says she can't spare a runabout for a trip "all the way to Vulcan". It does sound as if it should take no more than three days for a runabout to travel between DS9 and Vulcan, then. (And the distance between Earth and Vulcan might be insignificant at warp five - but NX-01 was never in that much of a hurry on that stretch so ENT doesn't solidly establish that.)
On the other hand, Kira is not exactly accommodating there. Perhaps a runabout
can't make it to Vulcan and back in seven days, but will take about thirty, and that's the best Kira
can't do for Bashir?
Timo Saloniemi