← Back to list

What Really Happens When You Turn On Wi-Fi? (The Invisible 5-Step Process Explained)

You use Wi-Fi? well everyone use it these days but what happens when you turn on Wi-Fi ? How you suddenly connect to internet by just…

akatsync · 2026-03-04 08:13 · 0 claps · 5.3 min read
#wifi #networking #technology #curiosity #explained
Open on Medium ↗

What Really Happens When You Turn On Wi-Fi? (The Invisible 5-Step Process Explained)

You use Wi-Fi? well everyone use it these days but what happens when you turn on Wi-Fi ? How you suddenly connect to internet by just pressing a button?

The moment you turn on Wi-Fi, more than a dozen invisible networking processes begin working in perfect coordination — all within seconds.

But what actually happens in those few milliseconds before you see the Wi-Fi symbol light up?

Well above question might seems meaningless and less important we don’t even think about how to connect to internet nowadays we just open our phone or laptop and connect to Wi-Fi or connect to mobile network in phones. and done we ready to use internet.

But what happens when you turn on your mobile network or connect to a Wi-Fi? how suddenly you are able to access the internet? I am pretty sure this question might have came into your head once or twice if not then it should be in your head now.

So in this article I will be explain in detail what happens when you turn on your Wi-Fi till you connect to internet.

Ok so lets start without wasting any time.

Step 1: Your Device Starts Listening

When anyone turn on there Wi-Fi router it start to broadcast there SSID information via radio waves using protocol 802.11 MAC protocol and keep broadcasting.

So as soon as you turn on your Wi-Fi option in your device it start listening for those signals sent by routers and your device will give you a list of routers SSIDs it can get some signal from and there strength like below.

Everyone who use Wi-FI gonna be familiar with above list its list of Wi-Fi network available in my windows laptop in phone or in laptop it can look little different but info is same it will give you a list of routers SSID’s (available the names are the SSIDs )

So now you chose the Wi-Fi specifically the SSID you want to connect with.

Step 2: The Four-Way Handshake (Authentication)

Once you select a network, your device and the router perform a “four-way handshake.” They prove to each other that they know the password without actually sending the password over the air.

and how they prove it? lets get deeper ( I am gonna be a bit technical so hang on).

Four-way-handshake

  1. when you chose a network SSID your Wi-FI router will send you a random number string called Anonce(Authenticator Nonce)
  2. your device will receive it and will generate its own random number called Snonce(Supplicant Nonce) and your device will combine Anonce, Snonce your Wi-Fi password and mac address of your device and your router to generate a secret hash the PTK ( Pairwise Transient Key ) then your device will use the PTK and Snonce ( the random number device generate) and use some special math formula to generate a code number which is called MIC (Message Integrity Code) which is like a digital stamp and then your device will send MIC and the Snonce to your router.
  3. Your router will use same logic it will combine Snonce , Anonce( the number it send before ) , client and router mac addresses and the Wi-Fi password to generate its PTK and then it will use same mathematical formula to generate MIC and if it matches with the MIC send by your device. and if it matches it send you a acknowledgment that we are good and installs the encryption key
  4. Your device will receive it and send a acknowledgment back to your router

and the handshake is done now and the PTK is known by both device and router

Even though the PTK was created during the handshake, it wasn’t actually being used to scramble your internet traffic yet.

  • Key Installation: The Wi-Fi chip in your phone and the router “install” the TK (Temporal Key) — which is a specific slice of the PTK — into the hardware encryption engine (usually an AES chip).
  • Unblocking the Port: Up until this microsecond, the router was blocking all “Data Frames” from your phone. Now, it flips a virtual switch to allow non-management traffic (like your actual internet data) to pass through.

Now you are connected you can send and receive data with your router and its encrypted but now your phone is like a person who has a secure phone line but doesn’t have a phone number or a map.

What happens next is called DHCP DORA process

Step 3: DHCP — Getting Your Digital Identity

Your phone needs an IP Address to communicate on the network. It uses the DHCP protocol. Even though the messages below are “broadcasts,” they are all encrypted by the PTK you just created.

  • D — Discover: Your phone broadcasts a packet to every device on the Wi-Fi. It says: “I’m new! I don’t have an IP. Is there a DHCP server (landlord) here?” It includes a random Transaction ID to keep track of the conversation.
  • O — Offer: The router sees the “Discover” and looks at its list of available addresses. It replies: “I’m the landlord. I can give you IP 192.168.1.15." It sends this specifically to your phone's MAC Address.
  • R — Request: Your phone replies: “I like that address! Please lock in 192.168.1.15 for me."
  • A — Acknowledge: The router sends the final confirmation. It says: “Done. Here is your ‘Welcome Kit’ — your IP is 192.168.1.15, my address (the Gateway) is 192.168.1.1, and here is the DNS server address to look up websites, subnet mask and lease time "

Step 4: ARP — Finding the Router’s Physical Address

Now your phone has an IP, but it has a problem. It knows the IP of the router (192.168.1.1), but it doesn't know the MAC Address (the physical hardware ID) of the router. In networking, you can't send a packet to an IP without knowing the MAC address.

  • The ARP Request: Your phone sends a message: “Who has the IP 192.168.1.1? Tell 192.168.1.15."
  • The ARP Reply: The router replies: “That’s me! My physical MAC address is AA:BB:CC:11:22:33."
  • The Cache: Your phone saves this in its ARP Table. Now, every time it wants to go to the internet, it knows exactly which physical “door” (the router) to throw the data at.

Step 5: Internet Connectivity Check

Your phone now tries to see if this Wi-Fi actually has internet access (to avoid that “Connected, no internet” message).

  • It sends a tiny “Ping” or a request to a famous server (like connectivitycheck.gstatic.com for Android).
  • If the router passes this through to the real world and a reply comes back, your phone finally shows the Wi-Fi symbol with the arrows.

and hence with that you are connected to the world.

It’s fascinating to realize how many complex processes happen in just a few seconds when we turn on Wi-Fi. With a single tap, an entire chain of events takes place behind the scenes — seamlessly and almost instantly — connecting us to the internet without us ever noticing the effort involved.

To quickly recap, here’s what happens:

You turn on Wi-Fi → Four-Way Handshake → DHCP (DORA process) → ARP hardware mapping → Gateway connectivity check → You’re connected.

All of this occurs in the blink of an eye, making modern networking feel almost magical.

If you enjoyed this breakdown and found it helpful, let me know! I’d love to explore more concepts like this or dive deeper into any of these steps in future posts. Follow along for more insights and updates — and feel free to suggest what you’d like to learn about next.


메타데이터
post_id
c35d92cb5dd2
slug
what-really-happens-when-you-turn-on-wi-fi-the-invisible-5-step-process-explained-c35d92cb5dd2
url
https://medium.com/@akatsync/what-really-happens-when-you-turn-on-wi-fi-the-invisible-5-step-process-explained-c35d92cb5dd2
canonical_url
https://medium.com/@akatsync/what-really-happens-when-you-turn-on-wi-fi-the-invisible-5-step-process-explained-c35d92cb5dd2
author_url
https://medium.com/@akatsync
status
ok
fetched_at
2026-06-17 08:20:12