ok so I connected ethernet cable it shows connected but not working ping Google not working but ping 22.214.171.124 is working how can I fix it?
So many unknowns in this question. Try to get more information Like do you have the firewall turned on ? is it blocking port 53? try to see if you have a default route to it with traceroute which uses a udp packet and a unprivileged port
traceroute -4 -n 126.96.36.199
Should tell you something then to see if you have a tcp route to it which requires root privilege with
sudo traceroute -4 -n -T -p 53 188.8.131.52
One or both of these should tell you if your being blocked.
What is it that's failing ? if both the traceroutes work did you try nslookup with a third argument ?
nslookup google.com 184.108.40.206
if that works then you have to look at /etc/resolv.conf to see what your default nameserver is set to, sounds like it should have a line something like
refer to man resolv.conf if it's not