Your IPv4 address:
Operating system:

What is a default gateway?

If devices on your own network answer but nothing beyond it does, look at the default gateway first. It is the router your device hands a packet to when the destination lies outside the local network. In IPv4 the device relies on its address, prefix length and gateway, and one wrong value can leave local communication working while breaking access beyond the subnet.

When your device uses the default gateway

Before sending a packet, the device checks whether the destination belongs to its own prefix. If it does, the packet goes directly to that neighbour. Otherwise the device consults its routing table, and the default gateway is used when no more-specific route matches. With the address 192.168.1.20/24 and the gateway 192.168.1.1, a packet for 192.168.1.50 is delivered directly and everything else goes to the gateway. In IPv6 the outcome also depends on address scope and on Neighbor Discovery, through which hosts usually learn their router.

How to check the address, prefix and gateway

Look at the interface address, the prefix, the routing table and the default gateway. On Windows, ipconfig shows the address, mask and gateway. On Linux, ip addr shows the address and prefix, and ip route the routes. The gateway normally has an address reachable on a directly connected local network. To see which addresses a prefix covers, and so whether the gateway falls inside your subnet, enter the address and prefix into the 2ip IP calculator.

Why changing DNS will not fix a wrong gateway

If the default route points at an unreachable gateway, packets never leave the subnet, so they cannot reach an outside DNS resolver either. Changing DNS servers cannot repair that. Do not change a mask or gateway by guesswork. Compare the values with DHCP or the network documentation, make one controlled change and repeat the same test.