How does DHCP work in wireless router?

Thanks for asking this question. First a bit of background.

A modern wireless device like a wifi router is responsible for implementing all 4 layers of TCP/IP stack.

The link, internet, transmission and application are all implemented in the same box.

Of these 4 layers only the link is the actual physical component. Rest all the layers are logical and as such they are provided by the software inside the router.

A router has its own operating system that manages these software services automatically.

DHCP or dynamic host configuration protocol is one such service. It works on the application layer of the stack. When the router turns on, it automatically starts the DHCP server. From that point DHCP leases local IP addresses to each connected device. When a device is no longer connected to the network of that router that IP address is reclaimed.

As you might have guessed Opensource router operating systems give you a lot of freedom in configuring DHCP server. Where as closed source systems are a bit limited in this regard,but still good enough for normal use cases.

By the way, there is no difference between working of DHCP on a wired/wireless router. The protocol is independent of the link layer. Whether it’s a wired network or a wireless it’s all the same as far as DHCP is concerned.

Workrock Engineering

WRE

workrockin@gmail.com

Does wifi extender affect speed?

Thanks for asking this question.

In a wifi setup the internet speed depends on

  1. The main connection speed. How fast the line at your place actually is?

  2. The speed of devices. Do they support the latest standard? Are they capable of processing max throughput?

  3. How many devices are accessing the medium at once? Wifi is a shared access protocol. For small number of devices the waiting time is negligible and can be safely ignored. But as the devices increase the channel may get congested and you may feel the speed going down even though max amount of time is spent waiting to get the access of the network.

Now with these points in mind it’s easy to see that wifi can’t possibly increase the line speed. Assuming that you have the best client as well as access point hardware, wifi extender will increase the perceived speed by decongesting the channel.

Think of it as increasing the number of queues at a ticket counter. A single queue will have the longest waiting time. 2 queues will halve the waiting time and so on.

With an extender your client devices will have more communication paths to talk with your main line internet.

In the best case you want your extender to be connected via a cable to your modem. Although it can also be connected wirelessly (provided that the wireless connection does not use the same channel as used by other client devices)

On the flip side if you extended your WiFi with the same channel that other client devices are using then you simply add a bottleneck. Instead of adding 2 queues you double the length of your first queue.

Workrock Enterprise

WRE

workrockin@gmail.com

How does wifi work behind the scenes?

The Physics

All wireless communication including wifi occurs due to electromagnetic interactions which is one of the four fundamental interactions in nature.

In simplest terms this means that a moving charged particle will have a magnetic field associated with it which will be perpendicular to the direction of charge.

[If charge is moving up and down the magnetic force will move sideways. If charged particle is moving sideways magnetic force will move up and down]

Similarly a changing magnetic field will have an electric force associated with it that will be perpendicular to the direction of the magnetic field.

[In the figure above the electric charge represented by E in red moves up and down the magnetic field represented by B in blue moves sideways]

As a result of electromagnetism the charged and magnetic particles move forever. On and on like a wave. An electromagnetic wave.

This wave exhibits both electric and magnetic properties.

So that if you transmit a wave ,generated by an oscillating current, through an antenna at point “a” you can receive it ,as an oscillating current, from another antenna at point “b”.

The Mathematics

Now an electromagnetic wave has certain properties that can be represented mathematically. These are

  1. Wavelength — Length of the wave between to symmetric points. Such as length between highs and lows.
  2. Frequency — Number of times the wave oscillates/repeats.
  3. Amplitude — The max height of the wave. How high/low can it go. Amplitude is related to strength of the wave.
  4. Phase — The value of a wave at a particular time and a point. A wave is constantly changing. The phase determines it at a particular instant.

These properties allow us to perform calculations on waves. We can add,subtract and compare waves just like we do with real numbers.

The engineering

Engineering solves the practical problem of transmitting useful information on a wireless wave.

It does that by modulating the signal with information before transmitting it via an antenna.

The receiving antenna extracts the current from the wave which can then be demodulated into the information that was transmitted.

Wifi is concerned with providing the physical channel for transmission of information and a mechanism for accessing that channel.

[In osi model this corresponds to layer 1 and layer 2]

Some points to note

  1. Wifi frequency like 2.4 gHz causes the current to oscillate 2.4 billion times per second before the wave is transmitted. At the receiver this oscillating current is converted into digital bits that can be understood by computer.
  2. Most modern wifi devices use QAM to modulate (or transmit useful information on) both Amplitude and Phase of the wave.
  3. Wifi is a shared channel access. Meaning a single channel is shared by multiple devices (known as carrier sense multiple access) but only one at a time (for collision avoidance)

References

Nice video explaining the engineering behind wifi modulation

https://youtu.be/NbrRGBRk5fM

And some more articles explaining the engineering behind wifi

How does Wi-Fi modulate the electro-magnetic wave?

Wireless Fundamentals: Modulation

Design a site like this with WordPress.com
Get started