Across the width, or down the length? Size of the dowel and of the mortise, or the tennon.
Either way, you can cut two 45 degree strips in a 2x4, leaving you with a V groove into which you would clamp the dowel. This would be the basic setup whether you wanted to make a tennon on the end or a mortise in the middle somewhere. How you cut the tennon can vary, from using a Japanese pull saw to using a dado stack. Either way, the V groove and a clamp will stabilize the dowel as you make the cuts.
The simple illustration is the essence. If you're cutting a tennon on the end, let the dowel hang over one edge, put the 2x against your miter gauge and use the TS blade to flatten the tennon, flip the dowel over (measure carefully!) and cut the other side. You'll probably have to do some chisel work to shape from round to square for appearance sake.
If you're cutting a mortise, on a drill press, make sure the cut is made where the 2x supports the dowel.
Clamping could just be a strip of wood across the dowel and a couple of bolts sticking up from the edges of the 2x, through the strip of wood, with butterfly nuts to tighten the wood down. I'm probably use a hardwood for the V piece so it's less likely the wood will split. Pre drill a hole for the bolt and maybe use a fender washer underneath, countersunk a little bit, to spread the force of the tightened bolt across the 2x while keeping the bottom flat. Simple, cheap, make it from scrap.