SurgeTechKnow • Technology Journal
Networking

How Computers Communicate on the Internet: A Complete Beginner’s Guide to Packets, IP Addresses, Routers, DNS, TCP and the Journey of Your Data

29 min read • Published Jul 17, 2026
Updated Jul 17, 2026 • SurgeTechKnow Editorial Desk
How Computers Communicate on the Internet: A Complete Beginner’s Guide to Packets, IP Addresses, Routers, DNS, TCP and the Journey of Your Data

When you type a website address into your browser and press Enter, your computer does not simply “open the internet.” It performs a chain of networking tasks involving your Wi-Fi adapter, router, internet service provider, DNS servers, internet routers, security certificates, web servers, and browser.

Most of these events happen in less than a second. Your screen may show only a loading icon, but behind that icon, your device is identifying the destination, finding a route, opening a connection, encrypting the conversation, requesting information,n and rebuilding the returned data into a webpage.

This guide follows that journey from beginning to end. It is written for beginners, ICT students, CCNA learners, support technicians, and anyone who wants to understand what really happens when computers communicate over the internet.

Quick Navigation

Select a topic to jump directly to it.

1. What Happens When You Press Enter?

Assume you type techknowsolution.co.ke in your browser. Your browser first checks whether it already knows the address of that website. It may look in its own cache, the operating system’s DNS cache, or a previously stored connection.

If the address is not known, the device asks a DNS resolver to translate the website name into an IP address. Once the destination IP is found, the computer decides whether that address is inside the local network or somewhere outside it.

Because a public website is outside your home or office network, the traffic is sent to the default gateway, normally your router. The router sends it to your internet service provider. From there, many routers forward it across several networks until it reaches the server hosting the website.

The server receives the request, processes it, and returns information. Your browser then interprets the HTML, CSS, JavaScript, images, and other files and displays the final page.

Laptop or Phone

Wi-Fi Access Point or Ethernet Switch

Home or Office Router

Internet Service Provider

Internet Routers and Networks

Web Server

Response Returns to Your Browser

2. How Computers Identify Each Other

Communication becomes impossible when devices cannot identify the sender and destination. The internet therefore uses several types of addressing.

An IP address identifies a device or network interface logically. A MAC address identifies a network interface on the local network. A port number identifies the application or service receiving the traffic.

A useful way to think about this is:

  • IP address: the building address.
  • MAC address: the specific local delivery point.
  • Port number: the office or department inside the building.

These identifiers work together. An IP address gets the data to the correct host or network. A MAC address helps move the frame across the local link. A port directs the data to the correct application.

3. IP Addresses Explained

An Internet Protocol address is a logical address assigned to a device or interface. The two main versions are IPv4 and IPv6.

IPv4

IPv4 addresses contain 32 bits and are normally written as four decimal numbers, such as 192.168.1.10. Because the global supply of IPv4 addresses is limited, private addressing and Network Address Translation are widely used.

IPv6

IPv6 uses 128-bit addresses, written in hexadecimal. It provides a vastly larger address space and was designed to support the continued growth of the Internet. A typical IPv6 address may look like 2001:db8:1:20::25.

Private and Public IP Addresses

A private IP address is used inside a home, school, office, ice or organisation. It is not normally routed directly across the public internet. Common IPv4 private ranges include 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.

A public IP address can be used across the internet. Your internet provider normally assigns one to your router or connection. Many devices inside your network may share that public address through NAT.

Static and Dynamic Addresses

A static IP stays fixed unless an administrator changes it. A dynamic IP is assigned automatically, usually by DHCP. Homes and small offices commonly use DHCP because it reduces manual configuration.

Address Type Purpose Example
Private IPv4 Communication inside a local network 192.168.1.20
Public IPv4 Communication across the public internet 197.x.x.x
IPv6 Modern internet addressing 2001:db8::10
Loopback Testing the local device 127.0.0.1

4. MAC Addresses and ARP

A Media Access Control address identifies a network interface at the data-link layer. It is mainly used within the local network segment.

When your computer wants to send traffic to the router, it may know the router’s IP address but not its MAC address. It uses the Address Resolution Protocol to ask:

“Who has 192.168.1.1? Tell 192.168.1.20.”

The router replies with its MAC address. Your computer stores that answer temporarily in an ARP cache. It can then build an Ethernet or Wi-Fi frame addressed to the router.

The important detail is that the MAC address normally changes at every routed hop. The IP source and destination generally remain associated with the end devices, but the local frame is rebuilt for each network link.

5. DNS: How Website Names Become IP Addresses

People remember names more easily than numbers. DNS allows us to use names such as techknowsolution.co.ke instead of typing a server’s IP address.

techknowsolution.co.ke

DNS Resolver

Website IP Address

Your device normally sends the query to a DNS resolver provided by the router, internet provider, or a third-party DNS service. If the resolver already has a valid cached answer, it returns it immediately.

When the answer is not cached, the resolver may contact the DNS hierarchy. It can begin with a root server, continue to the appropriate top-level domain servers, and then ask the authoritative name server for the domain.

DNS records serve different purposes. An A record maps a name to an IPv4 address. An AAAA record maps a name to IPv6. A CNAME points one name to another name. MX records identify mail servers, while TXT records can carry verification and security information.

6. The Default Gateway

Your computer uses its subnet mask or prefix length to determine whether another IP address is local. If the destination belongs to the same subnet, the computer can send the frame directly to that device.

If the destination is outside the subnet, the computer sends the traffic to the default gateway. In most homes and small offices, the default gateway is the router.

Suppose your laptop is 192.168.1.20/24 and you want to visit a server with a public IP. The public IP is not in 192.168.1.0/24. Your laptop therefore sends the local frame to the router’s MAC address while keeping the public server’s IP as the packet destination.

7. Switches and Routers

A switch connects devices inside a local network and forwards frames based mainly on MAC addresses. A router connects different IP networks and forwards packets based on IP addresses and routing information.

Feature Switch Router
Main job Connect local devices Connect different networks
Main address used MAC address IP address
Typical location Inside a LAN Between LAN and the internet or between subnets
Common function VLAN switching Routing, NAT, and firewalling

Many home devices combine several functions in one box. A typical “Wi-Fi router” may contain a router, Ethernet switch, wireless access point, DHCP server, firewall, and NAT function.

8. Ethernet, Wi-F, and Fibre

Data must travel through a physical or wireless medium. Inside a home or office, the device may use an Ethernet cable or Wi-Fi. The router may then connect to the internet provider through fibre, copper, coaxial cable, fixed wireless, or mobile broadband.

20260717 094239 Ethernet Wi F and Fibre Ethernet Wi F and Fibre

 

Ethernet usually provides stable performance and low interference. Wi-Fi offers mobility but is affected by distance, walls, channel congestion, device capability,y and interference. Fibre carries light through an optical cable and can support high capacity over long distances.

Wi-Fi is not the internet. Wi-Fi is only one method of connecting your device to the local network. A device can show full Wi-Fi bars while the router itself has lost internet access.

9. How Data Becomes Packets, Frames, and Bits

Applications do not place entire webpages directly onto a cable. Data is divided and wrapped with information needed by different layers of the network.

Application Data

TCP Segment or UDP Datagram

IP Packet

Ethernet or Wi-Fi Frame

Electrical, Radio, or Light Signals

This process is called encapsulation. Each layer adds a header containing information needed for that layer. The receiving device removes the headers in reverse order, a process called de-encapsulation.

Breaking information into smaller units makes communication more manageable. Packets can follow routes independently, be checked for errors, retransmitted when necessary,y and combined again at the destination.

10. TCP and UDP

TCP

Transmission Control Protocol provides reliable, ordered communication. It uses acknowledgements, sequence numbers, flow control,ol and retransmission to help ensure that data reaches the application correctly.

Before normal data transfer, TCP commonly uses a three-way handshake:

Client sends SYN

Server replies SYN-ACK

Client sends ACK

Web browsing, email, SSH, and many file transfers use TCP because missing or incorrectly ordered data would be a problem.

UDP

User Datagram Protocol has less overhead and does not establish a reliable connection in the same way. It does not guarantee delivery, order, or retransmission by itself.

UDP is useful where low delay matters or where the application handles reliability. Examples can include voice calls, live media, online games,s and many DNS queries.

Feature TCP UDP
Connection setup Yes No equivalent handshake
Reliable delivery Built in Not built in
Ordering Maintains order No guarantee
Typical use Web, email, SSH Voice, gaming, streaming, DNS

11. Network Ports

An IP address identifies the device, while a port number identifies the application or service. A server may run several services on one IP because each listens on a different port.

Port Common Service Purpose
22 SSH Secure remote administration
53 DNS Name resolution
80 HTTP Unencrypted web traffic
443 HTTPS Encrypted web traffic
25 SMTP Mail transfer
3389 RDP Remote Desktop

12. NAT: How Many Devices Share One Public IP

Network Address Translation allows a router to change address information as traffic passes through it. In a typical home, phones, televisions, and computers have private IP addresses, but they share one public IPv4 address when accessing the internet.

The router records which internal device and port started each connection. When the response returns, it uses that record to send the traffic to the correct device.

192.168.1.10:51001
192.168.1.11:51002
192.168.1.12:51003

The router performs NAT.

One Public IP Address

NAT helps conserve IPv4 addresses, but it is not the same as a complete security policy. A firewall determines which traffic is allowed or blocked according to rules and connection state.

You May Also Like to Read About

13. HTTPS, TLS, and Digital Certificates

HTTP defines how web browsers and servers exchange requests and responses. HTTPS is HTTP protected by Transport Layer Security.

TLS helps provide encryption, integrity,y and authentication. Encryption makes the data difficult for an unauthorised observer to read. Integrity helps detect alteration. Authentication helps your browser confirm that it is communicating with the holder of a valid certificate for the website name.

When your browser connects to an HTTPS website, the client and server negotiate security settings, verify certificate information, and establish shared encryption keys. The exact process depends on the TLS version and selected algorithms.

HTTPS does not hide every detail. An observer may still see the destination IP address, traffic timing and volume, and in some situations, on the domain name. HTTPS mainly protects the content of the communication between the browser and the HTTPS endpoint.

14. The Journey to TechKnow Solution

Let us combine everything by following a request from a reader in Kenya, openedpens TechKnow Solution.

  1. The browser receives the name. The reader enters techknowsolution.co.ke.
  2. DNS finds the destination. The browser or operating system resolves the domain to the current public address used by the hosting platform.
  3. The laptop checks the route. Because the destination is outside the local subnet, the request is sent to the default gateway.
  4. ARP finds the router’s MAC address. The device builds a frame addressed to the router.
  5. The router performs NAT. The private source address is translated for public internet communication.
  6. The ISP forwards the packet. The packet travels through provider routers and wider internet networks.
  7. The secure connection begins. The browser and website endpoint establish HTTPS protection.
  8. The browser sends an HTTP request. It may request a homepage, article, image, CSS, file, or script.
  9. The hosting platform forwards the request. The request reaches the web application.
  10. The Flask application processes it. It may read article data from PostgreSQL, apply routing logic, and render a template.
  11. The server returns the response. HTML and related assets travel back through the networks.
  12. The browser builds the page. It parses the HTML, applies CSS, runs allowed JavaScript, and displays the article.

Some elements may come from different destinations. Images may be stored in a cloud storage service. Analytics may contact another server. Fonts, adverts, or embedded media may also create additional network requests.

15. The OSI Model in Real Life

The OSI model divides networking into seven conceptual layers. It is useful because it helps learners and technicians isolate where a problem may exist.

Layer Role in the Website Journey
7. Application Browser uses HTTP, HTTPS, P, S S,S S,and DNS-related services
6. Presentation Data formatting, encoding, and encryption concepts
5. Session Maintaining communication sessions
4. Transport TCP or UDP and port numbers
3. Network IP addressing and routing
2. Data Link MAC addresses, switches, Ethernet, and Wi-Fi frames
1. Physical Copper, radio, and light signals

Do not treat the model as seven unrelated definitions. Use it to describe the same communication from different perspectives. A loose cable is a physical-layer problem. A wrong VLAN is a data-link problem. A missing route is a network-layer problem. A blocked TCP port involves the transport layer and firewall policy. A DNS failure is an application-layer service problem.

Common Networking Misconceptions

  • Wi-Fi is not the internet. It is a local wireless connection method.
  • Full Wi-Fi bars do not guarantee internet access. The router may have lost its upstream connection.
  • A faster router cannot exceed the speed or quality supplied by the ISP.
  • NAT is not a complete security system. Firewall rules and secure services still matter.
  • HTTPS does not make a website automatically trustworthy. It protects the connection, not the intentions of the site owner.
  • A VPN does not make a person completely anonymous. It changes who can observe parts of the path and introduces a VPN provider into the trust model.

16. How Professionals Troubleshoot Internet Communication

20260626 091600 Command Prompt network diagnostics demoCommand Prompt network diagnostics demo

Good troubleshooting moves from the nearest component to the farthest. It tests one assumption at a time.

ipconfig, ip and ifconfig

These commands show addressing information. On Windows, ipconfig /all shows the IP address, subnet mask, gateway, DNS servers,s and DHCP details. On modern Linux systems, ip address and ip route are common.

ping

Ping tests reachability using ICMP echo messages. Start with the local interface, then the default gateway, then a known external IP. Remember that some devices block ping, so failure does not always prove that the service is down.

tracert, traceroute and tracepath

These tools reveal the path or sequence of routers toward a destination. They are useful for identifying where delay or packet loss appears, but some routers do not reply to probes.

nslookup and dig

These tools test DNS resolution. If an IP address works but the website name fails, DNS becomes a strong suspect.

arp -a and neighbour tables

These show recently learned mappings between local IP addresses and MAC addresses. On Linux, ip neigh is commonly used.

netstat and ss

These tools show connections, listening sockets, and network statistics. They help determine whether a local service is listening and whether connections are being established.

curl

Curl can test web endpoints and display headers, status codes, redirects,s and TLS-related results. It helps separate browser problems from server or network problems.

A Simple Troubleshooting Order

  1. Confirm that the device is connected to Ethernet or Wi-Fi.
  2. Check the IP address, subnet, gateway, ay and DNS configuration.
  3. Ping the local gateway.
  4. Test a known public IP address.
  5. Test DNS resolution.
  6. Test the required application or port.
  7. Check firewall rules, router status,tus and ISP condition.
  8. Review logs and recent changes before making disruptive changes.

17. Why Websites Sometimes Load Slowly

Slow loading can occur at several points. The Wi-Fi signal may be weak. The wireless channel may be congested. The ISP may have routing or capacity problems. DNS resolution may be delayed. The destination server may be overloaded. Large images, scripts, and advertisements may increase page weight.

Latency and bandwidth are different. Bandwidth describes how much data can be transferred over time. Latency describes the delay before data begins returning. A connection can have high bandwidth but still feel slow when latency, packet loss, or server response time is poor.

Browsers improve performance by caching files, reusing connections, and requesting multiple resources efficiently. Content delivery networks can place copies of static content closer to users, reducing the distance and server load involved.

Frequently Asked Questions

1. Why can Wi-Fi show full bars but no internet?

The bars show signal strength between the device and the access point. They do not prove that the router has a working connection to the ISP.

2. Why is DNS called the phonebook of the internet?

Because it translates memorable names into IP addresses that computers use for routing. The comparison is useful, although DNS provides more than simple name-to-address mapping.

3. Can two computers have the same IP address?

Two devices should not use the same IP on the same network at the same time. Doing so may create an IP conflict. Devices on different private networks can use the same private address.

4. What is packet loss?

Packet loss occurs when packets fail to reach their destination. It may result from congestion, faulty links, weak wireless signals, overloaded equipment, or filtering.

5. What is latency?

Latency is the delay between sending data and receiving a response. Distance, routing, congestion, wireless conditions,s and server processing can affect it.

6. Why does restarting a router sometimes fix the problem?

Restarting can clear temporary software faults, stale state, exhausted resources, or failed connections. It may hide the underlying cause, so repeated problems should still be investigated.

7. Why can ping fail while a website still opens?

The destination or an intermediate firewall may block ICMP echo traffic while allowing HTTPS. Different protocols can receive different treatments.

8. Does every website have only one IP address?

No. Large websites may use several addresses, load balancers, global routing,g and content delivery networks. The returned address can vary by location and time.

9. Can hackers intercept internet traffic?

Traffic can be exposed on insecure networks or compromised devices, which is why encryption, secure Wi-Fi, trusted software, and correct certificate validation matter.

10. What is the internet backbone?

It refers to high-capacity networks and links that carry large volumes of traffic between regions, providers, data centres and major network exchange points.

11. What does an ISP do?

An internet service provider connects customers to its network and onward to other networks. It may also provide DNS, public addressing, customer equipment, and additional services.

12. Is a router the same as a modem?

No. A modem or optical network terminal terminates a provider access technology. A router forwards traffic between networks. Consumer equipment may combine both roles.

Final Takeaway

Computers communicate on the internet through layers of hardware, addressing, protocols, and services. DNS finds the destination. IP provides logical addressing. Routers choose paths. Ethernet and Wi-Fi move frames across local links. TCP and UDP deliver data to applications. Ports identify services. NAT allows private devices to share public IPv4 connectivity. TLS protects web communication.

The process may appear complicated, but it becomes easier when you follow the data one step at a time. Begin with the device, then the local network, gateway, ISP, destination server,r and returning response. That same method also makes troubleshooting faster and safer.

About the author

Caleb Muga is the founder of SurgeTechKnow, an ICT professional and software developer with BBIT, CCNA training, cybersecurity awareness and OPSWAT file-security training. Articles are written to simplify practical technology, cybersecurity, networking and ICT support topics for real users.

Read the full SurgeTechKnow profile →