IP address, subnet mask, gateway, DNS: these words appear on every router screen, every VPS welcome email and every "set up your domain" guide. This guide explains each term in plain English, shows how they fit together when you open a website, and gives the commands to see them on your own computer.
An IP address identifies a device on a network. The subnet mask (or CIDR prefix such as /24) says which part of that address is the network and which part is the device. The gateway is the router your device sends traffic to when the destination is outside its own network. DNS turns names like example.com into IP addresses, and NAT lets many private devices share one public IP.
1. IP addresses: IPv4 and IPv6
An IP address is the number that identifies a device on a network, so data can be delivered to it. There are two versions in use.
| Version | Looks like | Size | Notes |
|---|---|---|---|
| IPv4 | 203.0.113.45 | 32 bits, about 4.3 billion addresses | Still the most used; addresses are scarce and shared through NAT |
| IPv6 | 2001:db8::1 | 128 bits, practically unlimited | Growing fast, especially on Indian mobile networks |
IPv6 addresses are written as eight groups of hexadecimal digits. Leading zeros can be dropped and one run of zero groups can be written as ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1.
Public and private addresses
Some IPv4 ranges are reserved for private networks. They work inside your home or office but are never routed on the internet.
| Range | CIDR | Typical use |
|---|---|---|
| 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | Large offices, cloud networks |
| 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | Offices, Docker networks |
| 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | Home and small-office routers |
| 100.64.0.0 to 100.127.255.255 | 100.64.0.0/10 | Carrier-grade NAT used by many ISPs |
| 127.0.0.0 to 127.255.255.255 | 127.0.0.0/8 | Loopback: the device itself (127.0.0.1) |
A public IP is reachable on the internet and is assigned by your ISP or hosting provider. If your router's "WAN IP" starts with 100.64 to 100.127, your ISP is using carrier-grade NAT, and you cannot open ports at home for a server.
Static and dynamic addresses
A dynamic address is handed out automatically by DHCP and can change. Home connections and laptops usually get dynamic addresses. A static address stays the same, which servers need: your domain's DNS records point at a fixed address.
2. Subnets, netmasks and CIDR
A subnet is a block of addresses that belong to the same local network. Devices in the same subnet talk to each other directly; anything else goes through the gateway.
The netmask marks where the network part of an address ends. The CIDR prefix is the same idea written as a number of bits: /24 means the first 24 bits are the network.
Worked example: 192.168.1.25/24
- Netmask: 255.255.255.0
- Network address: 192.168.1.0 (identifies the subnet itself)
- Broadcast address: 192.168.1.255
- Usable device addresses: 192.168.1.1 to 192.168.1.254, so 254 devices
| CIDR | Netmask | Addresses | Usable hosts | Common use |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 | A single IP in a firewall rule |
| /30 | 255.255.255.252 | 4 | 2 | A link between two routers |
| /29 | 255.255.255.248 | 8 | 6 | A small block of server IPs |
| /24 | 255.255.255.0 | 256 | 254 | A typical home or office LAN |
| /16 | 255.255.0.0 | 65,536 | 65,534 | A large private network |
Usable hosts are the total minus the network and broadcast addresses. In IPv6, a normal LAN is always a /64, and there is no broadcast address.
Subnetting is also how firewalls are written. Allowing 203.0.113.0/29 allows eight addresses in one rule.
3. The default gateway
The default gateway is the router your device sends traffic to when the destination is not in its own subnet. At home it is your Wi-Fi router, often 192.168.1.1 or 192.168.0.1. On a server it is the provider's router, given to you with the IP address.
If the gateway is wrong or unreachable, you can reach devices on your local network but nothing on the internet. That is a classic symptom when you set a static IP by hand and mistype the gateway.
"Gateway" is also used loosely for other things, such as a payment gateway or an email gateway. In network settings it always means the router.
4. NAT: how many devices share one public IP
Your ISP gives your router one public IP. Every phone and laptop at home has a private IP. Network Address Translation (NAT) on the router rewrites outgoing traffic so it appears to come from the public IP, and keeps a table so replies go back to the right device.
Two practical effects:
- A website sees your public IP, not your device's private one. That is the address to give support when you are blocked by a firewall.
- Nobody on the internet can start a connection to a device behind NAT unless you set up port forwarding on the router.
5. DNS: names to numbers
People remember names; networks route numbers. The Domain Name System translates between them.
- You type
www.example.comin the browser. - Your device asks a resolver, usually your ISP's or a public one such as 1.1.1.1 or 8.8.8.8.
- The resolver finds the domain's nameserversand asks them for the record.
- The nameserver answerswith an IP address, for example 203.0.113.45.
- The browser connectsto that IP and loads the site. The answer is cached for the record's TTL.
The records you meet most often:
| Record | What it does |
|---|---|
| A | Points a name to an IPv4 address |
| AAAA | Points a name to an IPv6 address |
| CNAME | Makes one name an alias of another name |
| MX | Says which servers receive email for the domain |
| TXT | Holds text such as SPF, DKIM and verification codes |
| NS | Lists the nameservers that answer for the domain |
For more, read What is a nameserver and why do I need it.
6. Ports, MAC addresses and other terms you will meet
- Port: a number that picks the service on a device. The IP gets you to the server; the port gets you to the web server (80 and 443), SSH (22) or email (587, 993). See Domain India hosting port numbers.
- MAC address: the hardware address of a network card, used only inside the local network. Switches forward traffic by MAC; routers forward by IP.
- Switch and router: a switch connects devices in one network; a router connects different networks and is usually the gateway.
- Firewall: filters traffic by address, port and protocol.
- VPN: an encrypted tunnel that makes your device appear to be inside another network.
- Latency and TTL: latency is the delay a packet takes; TTL limits how long something lives, whether a packet's hops or a DNS record in a cache.
7. See your own network settings
These commands show your IP, netmask, gateway and DNS.
# Windows (Command Prompt or PowerShell)
ipconfig /all
# Linux
ip addr show # IP addresses and prefixes
ip route # "default via ..." is the gateway
resolvectl status # DNS servers (systemd-based systems)
# macOS
ifconfig
netstat -rn | grep default
scutil --dns
# Any system: look up a domain's DNS records
nslookup example.com
dig example.com A +short # Linux and macOSTo see your public IP, search "what is my IP" in any search engine.
8. How this applies to your website
- Your domain's A record (and AAAA, if the server has IPv6) points visitors to your hosting server's IP.
- On shared hosting, many websites usually share one server IP. The web server picks the right site from the domain name in the request, so sharing an IP does not affect how your site works.
- A VPS comes with its own IP address, which you configure, secure and firewall yourself.
- When your domain points somewhere new, cached DNS answers can take a while to expire. Changes are not instant everywhere.
To connect a domain to your hosting, follow How to change your domain DNS settings.
9. Where Domain India fits
Domain India is a NIXI-accredited .IN registrar and also sells hosting. You can register a domain and host the website with us, so the DNS and the server are managed in one account. Domain India list prices on 19 September 2026, excluding 18% GST: DirectAdmin Starter hosting is ₹100 a month and cPanel Starter ₹125 a month. A VPS with its own IPv4 address starts at ₹552 a month, for when you need to manage the network settings yourself.
What is the difference between a subnet mask and CIDR?
They describe the same thing in two formats. The subnet mask 255.255.255.0 and the CIDR prefix /24 both mean the first 24 bits of the address identify the network and the last 8 bits identify devices.
How many devices fit in a /24 network?
A /24 has 256 addresses. The first is the network address and the last is the broadcast address, so 254 can be given to devices.
What is a default gateway?
It is the router a device sends traffic to when the destination is outside its own subnet. At home it is usually the Wi-Fi router, at an address such as 192.168.1.1.
Is 192.168.1.10 a public IP address?
No. 192.168.0.0/16 is a private range. It works only inside a local network, and the router uses NAT to share its public IP with devices in that range.
What does DNS do?
DNS translates domain names into IP addresses. When you type a website name, a resolver asks the domain's nameservers for its A or AAAA record and returns the IP address the browser should connect to.
What is a 100.64.x.x address on my router?
Addresses from 100.64.0.0 to 100.127.255.255 are used for carrier-grade NAT. Your ISP shares one public IP among many customers, so you cannot accept incoming connections at home without the ISP's help.
Why do I need a static IP for a server?
Your domain's DNS records point to a fixed address. If the server's IP changed, visitors would be sent to the wrong place until the records were updated.
Ready to put it into practice? Register a domain, compare cPanel hosting, or choose a VPS if you want to manage the network yourself.
Register your domain with a NIXI-accredited .IN registrar and point it at your hosting from one account.
Search domains