Networking in Sec
IP Addresses
The command ifconfig on Linux displays an inet — IPV4 address(in decimal notation) & inet6 — IPV6 address(in hexadecimal notation). IP address is essential in communication. (We communicate over layer 3)
2 ^ 32 = 4,294,967,296 → The possible number of IPV4 address we can have
2 ^ 128 = 3.402823669×1⁰³⁸ → The possible number of IPV6 address we can have
We still use IPV4 even after exhausting the possible addresses due to the presence of NAT-Network address Translation which allows assigning of Private IP addresses that passes through the Public IP addresses
MAC Address
MAC — Media access control /Physical address that allows us to communicate when using switches. It is a layer 2.
They have identifiers, take the first 3 pair of two out of the 6 pair of the mac addrress and paste it https://aruljohn.com/mac.pl to see the vendor(Company).
TCP, UDP, and The three-way-handshake
This is layer 4.
TCP — Transmission Control Protocol ,connection oriented protocol
UDP — User Datagram protocol , connectioneless protocol
TCP works in a three way handshake ;
SYN > SYN ACK > ACK.
A way to capture traffic from the internet is using wireshark.
Common Ports & Protocols
The OSI Model
- Physical layer— data cables, cat6
- Data layer — Switching, MAC addresses
- Network layer — IP addresses, routing
- Transport layer — TCP/UDP
- Session layer— Session management
- Presentation layer — JPEG, MOV, WMV
- Application layer — HTTP, SMTP