28 Mayıs 2020 Perşembe

Wifi - Genel Bilgiler

Wifi ne demek
Aslında Wifi hiç bir şeyin kısaltması değil. 1999 yılında uydurulan bir kelime.
Wi-Fi doesn't stand for anything. It is not an acronym. There is no meaning.
Wireless Fidelity kelimesi ise sonradan çıkarılmış.
The current confusion seems to stem from a brief period early in the days of the Wi-Fi Alliance when a regrettable tag line was added that stated, "The Standard for Wireless Fidelity." This was not part of the original name and was not created by Interbrand, but it was added as an afterthought in an attempt to help users make sense of the new and somewhat nonsensical word, "Wi-Fi."...
OSI Mimarisi
Wifi, 802.11 ailesine ait protokolleri kullanır. Bu protokoller hakkında daha detaylı bilgi için IEEE 802.11 yazısına bakabilirsiniz.

 OSI mimarisinde Layer 1 ve Layer 2'yi tanımlar. Hızı Bluetooth'a göre çok daha fazladır.

Layer 3 ve üstünü tanımlamadığı için TCP ve diğer protokollerle gelen overhead yani header to payload ratio tanımlı değildir.

Wifi Layer 3 ve üstünü tanımlamasa bile Access Point "hotspot" olarak kullanılabilir. Yani ağa girmek isteyenlere DHCP ile IP adresi verebilir.

Dual band hem 2.4 hem de 5 GHz ile çalışabilen cihaz anlamına gelir. Bu cihazda iki tane alıcı/verici bulunur.

Wifi Her Yerde
Wifi çok enerji tükettiği için elektrik şebekesine bağlı cihazlarda tercih ediliyor. Pil ile çalışan akıllı cihazlarda tercih edilmiyor. Açıklaması şöyle
"Wi-Fi is a whole-home network,” says Chris Coley, principle engineer and architect with Logitech. Primarily used for media streaming, browsing the web, and other data-heavy activities, it’s a high-bandwidth network that’s power-intensive — just watch how fast your laptop battery dies when you’re watching a video on Netflix.
Many smart home products eschew Wi-Fi-connectivity because it would require their devices to have a dedicated power source or a long-lasting battery.
Wifi ilginç bir şekilde uçakların içinde yolcuların hizmetinde. Boeing 787'de araca (802.11 b/g) bazı yazılım bileşenlerini ve Electronic Flight Bag bilgisini yüklemek için kullanılıyor.

Wifi-Direct
Aynı Bluetooth gibi noktadan noktaya çalışan Wifi anlamına gelir.

Wifi Mesafe
Wifi mesafesi örneğin LTE'ye (Long Term Evolution) göre daha kısa. Açıklaması şöyle.
As with any radio receiver, if it can handle a higher data rate, then it is usually burdened with having a higher RF bandwidth and this inevitably means more received background noise i.e. a wider BW lets in more noise and hence, you need a higher received signal level to operate with a decent SNR (signal to noise ratio).

Therefore WiFi is at a significant disadvantage because it has a wider RF bandwidth than LTE (normally) and needs a higher signal level to operate at a decent bit-error-rate (BER).
Throughput - Net Yük
Bir soru ve cevap şöyle. Modülasyon içinde point. gönderiliyor. Her point içinde belli sayıda bit var. Ayrıca MIMO ile farklı antenler kullanılıyor.
Q : How is Wi-Fi throughput so high?
A : You're correct that the actual bandwidth for a single WiFi stream is rather narrow, ranging between 20 MHz for older specs and 160 MHz for 802.11ax. However, the spectral efficiency of WiFi is often significantly more than 1 (bit/sec)/Hz.

For example, take the fastest modulation option of 802.11ax, which is 1024QAM on a 160MHz channel. 1024QAM implies that the constellation diagram of the modulation contains 1024 points, meaning that there are 1024 possible symbols and each symbol carries 10 bits. Assuming that the level of noise and interference is low enough, this is fairly plausible to achieve. In practice, this yields up to 1134 MBps after considering error correction, guard intervals, etc.

Furthermore, WiFi is able to take advantage of MIMO (multiple-input, multiple-output), where separate streams, each carrying up to 1024QAM constellations with up to 160 MHz of bandwidth, are simultaneously transmitted from multiple antennas that are separated in space.

While the two streams do "interfere" and add with each other, sophisticated signal processing techniques are able to pick the two streams apart from each other, since they arrive slightly differently at the multiple antennas that the receiver is using to receive the streams.

In doing this, you've doubled the achievable performance, with a 2x2 MIMO system handling up to 1134 MBps * 2 as long as the signal-to-noise ratio is good enough to sustain that rate without unacceptable bit error.

On the other hand, if things aren't looking good (e.g. high noise, low signal power, unable to pick out the two MIMO streams), the router and your wireless card will happily fall back to lower speeds by using a smaller constellation, shutting off MIMO, or using a more powerful but higher-overhead error correction code. You may find that depending on your home, your neighbors' WiFi use, and your specific devices, you may only be able to achieve the maximum performance in some cases.
Wifi Modülasyon
Modülasyonu anlatan basit bir şekil şöyle

2.4 GHz
Wifi 2.4 GHz taşıyıcı frekansını kullanır. Yani 2.4 GHz ve 2.5 GHz aralığındadır. Bandın dalgaboyu 12.5 cm civarındadır. Kanallar arasındaki aralık (Channal Spacing) 5 MHz büyüklüğündedir.
Bant 14 kanala bölünmüştür. Her kanalın genişliği 22 MHz'dir. Dolayısıyla bazı kanallar üst üste binerler. Birbirleri ile hiç çakışmayan kanallar 1,6,11 ve 14'tür. Aşağıdaki şekilde 1,6, ve 11 koyu renk ile gösteriliyor.


Kanal Seçimi
Çoğu cihaz en uygun kanalı seçmek için uğraşmıyor. Açıklaması şöyle.
-Most only pick a channel at boot time, but a channel that was good when the AP was last rebooted may have become a poor choice days, weeks, or months later.

-Most do not want to delay booting by spending long enough to truly evaluate every channel, so they use poor heuristics like "just pick the channel where we see the fewest APs", which doesn't necessarily correlate to which channel will provide the best throughput and reliability. Even worse, these oversimplified heuristics can cause problems like choosing a channel that partially overlaps with channels other APs are on, which will cause APs to interfere with each other without being able to cooperate with each other like they would if they were on the exact same channel.

-Most don't even have the spectrum analyzer hardware necessary to truly evaluate the RF interference on each channel; they have Wi-Fi radios and focus on interference from other Wi-Fi devices, and are fairly ignorant of interference caused by non-Wi-Fi devices such as Bluetooth, microwave ovens, cordless phones, wireless subwoofers, baby monitors, wireless cameras, and more.

-Creating an AP that has the hardware and the algorithms to choose channels well not just at boot, but to keep re-evaluating the channel choices later, and change channels when there would be benefit to do so, is both expensive and fraught with potential interop problems. Not all clients are great at honoring channel switch announcements from the AP, so an AP that changes channels on the fly risks having clients fall off the network every time it does so.
Guard Boşluğu
22 MHz genişliğin sadece 20 MHz'si veri taşır. 2 MHz guard içindir. Açıklaması şöyle.
Wifi Channel 6 is centered at 2437Mhz and is 22Mhz large, so ranging from 2426 to 2448 as you stated (well that would rather be 23Mhz large, so not sure if it is 2427-2448 or 2426-2447).

But data is actually transmitted along a 20 MHz bandwidth, the remaining 2Mhz are used as a guard band so there's enough attenuation along the edge channel.

So there's no data transmitted at 2426 Mhz when using Wifi Channels 1 or 6 (1, 6 and 11 are the most used since they are non-overlapping)
List of WLAN channels bağlantısında bant genişliği görsel ve tablo olarak bulunabilir. Diğer özellikleri şöyle.
  • indoor range: 15m
  • outdoor range: 40m
  • frequency: 2.4GHz
  • power consumption: 100mW
  • throughput: 5Mbps
5 GHz
Kanallar arasındaki aralık (Channal Spacing) 20 MHz büyüklüğündedir. 5 GHZ aralığındaki U-NII-2B bandı (5350- 5470) kullanılmaz.

Neden Bluetooth ve Wifi 2.4 GHz'yi Kullanıyor?
2.4 GHz Industrial, Scientific and Scientific (ISM) bandıdır. Bu bandın lisansı yoktur ve dünyanın her yerinde kullanımı serbesttir. WiMax ise özel izne tabi frekansları kullanır. Açıklaması şöyle
WiMax operates in spectra that needs to be licensed from the FCC (or the corresponding body if you're not in the US). Depending on the frequency in use the licensing process may- or may not- be an issue, but it's not a situation where you can simply buy the gear and start using it the same day.

In contrast, the 802.11 standards operate in unlicensed frequencies and don't require a special license.
ABD'de WiMax sağlayıcısı olarak sadece Spring var ve o da bu hizmeti yavaş yavaş kapatıyor.

Wifi Sağlığa Zararlı mı ?
Wifi non-ionasing radition denilen dalga türünde. Kullandığı dalga boyu itibariyle mutfaktaki mikrodalga cihazına ve cep telefonlarına yakın. Bu tür dalgalar ısınma etkisi yaratıyor. Wifi sinyalinin enerjisi düşük olduğu için ısınma etkisi az ama ölçülebilir. Sağlığa zarar verip vermediği, veriyorsa ne kadar verdiği halen araştırılıyor. Burada ve burada linkler var.

Mikrodalga ve görünür ışığı (visible light) karşılaştıran bir açıklama şöyle.
Microwaves do not have less energy than visible light per se. They only have less energy per photon, as per the Planck–Einstein relation, E=hf. In other words, you can raise the power of electromagnetic radiation to a dangerous level at any wavelength, if only you generate enough photons – as your microwave oven does.
Wifi sinyali ve diğer sinyalleri karşılatıran bir tablo şöyle.
+----------------+-----------+-----------+
|     Source     | Power (W) | Frequency |
+----------------+-----------+-----------+
| Sun            | 1000/m^2  | optical   |
| Light bulb     | 2.5       | optical   |
| Cell phone     | 1         | microwave |
| WiFi router    | 0.1       | microwave |
| Microwave oven | 700       | microwave |
+----------------+-----------+-----------+

CSMA/CA
CSMA/CA yazısına taşıdım.

Wifi Regular Mode veya Infrastructure Mode
A (STA - Station) ve B konuşmak isterse, A önce paketi Access Point'e (AP) gönderir. AP daha sonra B'ye gönderir. Paketin multicast veya broadcast olması fark etmez. Tüm paketler AP üzerinden geçer. Açıklaması şöyle.
The CSMA/CA algorithm requires the AP to "coordinate" all the clients. If clients talked with other APs or with each other, it would be impossible to prevent interference.
Açıklaması şöyle.
Wi-Fi has an infrastructure mode, where all frames must pass through the WAP, and an ad hoc mode, where frames are sent directly to another host. You must use one or the other.

Wifi Promiscuous Mode
Wifi cihazını bu moda geçirirsek cihaz ağa dahil olur yani STA - Station kabul edilir ve duyabildiği tüm paketleri okuyabiliriz.

Wifi Monitor Mode
Wifi cihazı ağa dahil olmadan tüm paketleri okuyabilir. Paketler muhtemelen şifreli olacaktır.

Wifi Multicast
Henüz gerçek anlamda multicast yok. Multicast olarak gönderilen mesajlar, AP tarafından unicast olarak dağıtılır. 802.11aa ile multicast kullanıma girecek. Açıklaması şöyle
Unfortunately, multicast or broadcast on Wi-Fi is a problem. Your WAP will send multicast and broadcast at the lowest possible rate. This is part of the Wi-Fi standard. There is a proposed standard that is supposed to fix some of the problems with multicast on Wi-Fi, but nothing currently supports it, as far as I can tell.

For example, if you have a WAP that supports 802.11b , it will send multicast traffic at 1 Mbps.
...
From the perspective of layer-2 (what the WAP works with), you don't have many options for prioritizing traffic. The WAP, like a switch, does not look at the packets, only the frames. It doesn't matter what marking you have on the packets if the devices doesn't look at the packets in order to treat the packets differently.
SSID Nedir
Açıklaması şöyle. Ağı belirten isim anlamına gelir.
The Service Set Identifier (SSID) defines what is thought of as the wireless network. So if you have an SSID that is called Apple and your neighbor’s SSID is called Orange, people can connect to either the Apple or Orange wireless network.
Bazı Wifi cihazları 2 tane SSID tanımlanmasına izin verir

Gizli SSID
Gizli SSID bir güvenlik önlemi değil. Wifi ağının herkese görünmesi gerekmediği bazı durumlarda kullanılıyor. Açıklaması şöyle
It would be unsafe to rely on hidden SSID as your primary security mechanism instead of WPA2.
...
Hidden SSID is more appropriately used for point-to-point links where the client devices are statically configured for a specific network and having it show up in everyone's network list would only be unnecessary clutter (e.g. in a city there might be 10-20 Wi-Fi-based PtP links running above your head).

BSSID Nedir
Açıklaması şöyle. Aynı ağ içinde farklı Access Point'leri belirtmek için kullanılır.
Most often, there are different BSSIDs on an access point for each WLAN configured on a radio. ...
Açıklaması şöyle. Eğer ağ gizli ise Wifi kartımız bildiği BSSID'leri sürekli sorgular.
If you have previously connected to a "hidden" wireless network, your NIC may continuously broadcast their BSSID's in hopes of connecting to them. It's the only way to "automatically" connect to a hidden network, because there is otherwise no way for the card to know when it is in range to a known hidden network.
Bu durum şöyle görünür.
Hello, 'Home Network'? Are you there?
Hello, 'Office W-Lan'? Are you there?
Hello, 'Home Network'? Are you there?
Hello, 'Office W-Lan'? Are you there
...
Wifi'da kullanılan Mesajlar Nelerdir
Management Frame, Control Frame ve Data Frame olmak üzere 3 tip frame var.

a. Management Frame'ler
Wifi Management Frameleri yazısına taşıdım.

b. Control Frame'ler şöyle
1. Request to Send (RTS) frames
2. Clear to Send (CTS) frames
3. Acknowledgement (ACK) frames

c. Data Frame şöyle
1. Data Frame

Data Frame
802.11 her türlü zorlu koşulda çalışmak üzere tasarlanmıştır. Bu yüzden Her data frame için acknowledgement bekler. Aynı TCP gibi acknowledgement alınmayan frame'ler bir daha gönderilir. Online oyun oynayanlar için wifi kötü bir seçim olabilir. Eğer gönderilen paket broadcast ise sadece Access Point, ACK gönderir. Geri kalan alıcılar ACK göndermezler.

Request To Sent - Control Frame
Açıklaması şöyle
If you lower RTS threshold value too much, you can introduce more latency into the network, as Requests to Send are increased so much that the shared medium is reserved more often than necessary


Hiç yorum yok:

Yorum Gönder