Transmission? on 1996 Audi A6

So today my car started hesitating to shift and did not want to go more than 40 mph. Once it got over that, it was shifting hard and revving up to 3000 rpm while doing 20 mph. What could be causing this?

Asked by for the 1996 Audi A6
Is there a check engine light on? If so check the stored codes in case its engine related. If its transmission related best to bring it to a transmission specialist preferably with Audi or European experience.