Open System Preferences and select the Network tab. Click on your Ethernet connect in the left window pane (I assume WiFi but if you are connected with Ethernet cable select that one). Look in the right side of the window. You'll see your computer's IP address and in gray text should see at least one IP address next to DNS server. There are two possible explanations for not getting online: Your IP address looks like 169.xx.xx.xx because it isn't getting a valid address from the router or you have no DNS addresses.
If you are seeing what looks like a valid IP address (compare it to the one your iPad is getting) but you have no valid DNS IPs click on advanced, click on the DNS tab along the top and manually enter 8.8.8.8 and 8.8.4.4 - these are Google's public DNS server addresses. I used them for years because my service provider had glacier slow DNS servers.
If however you are seeing an invalid IP address my usual first tactic is to select the service in the left window pane and click the minus button. Then I'd click on the plus button to select a new service. Click on Apply and try connecting again.