you did not say if the dishwasher was connecting to the sink drain
you just said a 2'' pipe
drill a 1 1/4'' hole in counter top
install air gap fitting
run the hose from the washer to the air gap fitting
then run a hose from the air gap to the ptrap
i suggest you buy a 2'' x 3/4'' reducer
and a rubber disposal boot https://www.homedepot.com/p/InSinkE...SinkErator-Garbage-Disposals-DWC-00/100162549 to connect to the 2'' trap