Local Area Networks (LANs)
The TCP/IP Model and the OSI Model
IPv4 Addresses
-are 32 bits long
-are expressed in Decimal (Base 10, not Hexadecimal like MAC addresses)
-are grouped in four groups separated by dots:
192.168.1.25
Each group is called an “octet” because it consists of 8 bits.
8 bits can express any number from 0 – 255.
The magic 8-bit calculator:
There are 8 bits, each of which can be a 0 or a 1:
0 0 0 0 0 0 0 0
Each bit is worth:
128 64 32 16 8 4 2 1
Use this calculator to translate any number from 0 – 255.
Subnet Mask
Every IP address consists of two parts: the network number (the first part), and the host ID (the second part).
But the IP address doesn’t just divide in half. It can divide at any number. So the network number could be as short as:
10.x.x.x
or as long as:
192.168.254.x
…where x is the space for the host ID.
The subnet mask is a string of 1s, but translated to decimal, for instance 24 1s would be 255.255.255.0. This would mean that the first 24 bits are the network number, and the last 8 bits are for host IDs.
Virtual LANs (VLANs)
APIPA Addresses
Most hosts get an IP address assigned to them by a DHCP server. But if that server is down, hosts won’t have a way to get onto the local network.
Microsoft solved this with a “fall-back” protocol: APIPA. It lets hosts self-assign an IP address in a special range:
169.254.x.x
So if you do an ipconfig and see a host has a 168.254.x.x IP address, that means it failed to get a DHCP assignment. This is a critical testing point.
IPv6 Addresses
Link-local address
-Strictly for LAN communication
–replaces MAC address for local addressing!
–Neighbor Discovery Protocol replaces arp
‘How To “arp -a” In IPv6’
https://www.practicalcodeuse.com/how-to-arp-a-in-ipv6
https://oswalt.dev/2011/10/neighbor-solicitation-ipv6s-replacement-for-arp/
IPv6 ‘arp’ For Windows:
netsh int ipv6 show neigh
IPv6 ‘arp’ For Linux:
ip -6 neigh
-Link-local addresses always starts with fe80::
-which is actually
(64 bits)-expressed in hexadecimal
-followed by the 64-bit host ID
-for example:
fe80::86a:f9d:91ef:4a24
Broadcast vs. Multicast
fe02::02 # the All Routers multicast address
Network Services
DNS – Domain Name Service (matches domain names to IP addresses)
DHCP – Dynamic Host Control Protocol (issues IP address, subnet mask, default gateway and at least 1 DNS server).
TCP vs UDP
TCP communications do lots of error-checking to ensure perfect data transfer. There’s lots of overhead to doing this.
UDP communicates like a fire hose: a jet of information with no error-checking. It’s very fast but nothing is guaranteed.
Network Commands
arp # (Linux and Windows) ping # (Linux and Windows) ipconfig # (Windows) ifconfig # (old Linux command; deprecated) ip # (new Linux command) iwconfig # (Linux wifi) nslookup # (Linux and Windows) dig # (Linux native, Windows installable) traceroute # (Linux) tracert # (Windows) net # (Windows) netstat # (Windows and Linux) nbtstat # (Windows) netsh # (Windows)
Wifi
CompTIA says there are two modes of Wifi:
-
- Infrastructure Mode
- Ad Hoc Mode
There’s actually a difference between peer-to-peer and ad hoc, but not as far as this test goes.
Ad Hoc mode is disabled by default in Windows 8+, but can be enabled at the command line.
Standard | Wifi Version | Frequency | Encryption | Speed | Beams | Multiplexing |
---|---|---|---|---|---|---|
802.11a | WiFi 1 | 5 GHz | – | 54 Mbps | 1 | – |
802.11b | WiFi 2 | 2.4 GHz | WEP | 11 Mbps | 1 | – |
802.11g | WiFi 3 | 2.4 GHz | WPA | 54 Mbps | 1 | – |
802.11n | WiFi 4 | 2.4 GHz, 5 GHz | WPA2 – PSK, Enterprise | ~300 Mbps | 4 | MIMO |
802.11ac | WiFi 5 | 5 GHz | WPA3 – PSK, Enterprise | ~300 Mbps | 8 | MU-MIMO, OFDM |
802.11ax | WiFi 6 | 2.4 GHz, 5 GHz | WPA3 – PSK, Enterprise | ~300 Mbps | 8 | MIMOA, OFDMA |
802.11ax | WiFi 6e | 6 GHz | WPA3 – PSK, Enterprise | ~300 Mbps | 8 | MIMOA, OFDMA |
Textbook Time
Chapters 19 and 20