Network Refresher

Hi there. Before we dive into the fun part, as promised we’ll be starting from the very basics. Here is a basic network refresher, that I think is absolutely needed to build the rest our learning on.

IP address:

Having IPv4 even though we’re out of address space, using something called NAT (Network Address Translation)
With NAT, private address spaces are assigned. Addresses that start with 192,168, are private IP addresses and are passed out to public addresses.

IP addresses, (IPv4, IPv6) are layer 3 protocols. Layer 3 is a router, so when traffic is routed, it’s through an IP address.

MAC address:

Layer 2, MAC address or a physical address. MAC (Media Access Control), it’s a physical address used in communicating when using switches, knowing what devices are which.
MAC adresses have identifiers, (to view vendors, copy the first 3 pairs of characters and look them up in a MAC address look up on Google), they are the identifiers. They are used to find what devices are using the MAC address.
MAC addresses are layer 2 and related to switching.

TCP/UDP:

Layer 4, is the transport layer of the OSI model. TCP vs UDP.
TCP (Transmission Control Protocol): a connection oriented protocol.It is best suited when it comes to high reliability,it’s connection oriented. Making connections, we need high relibility. Eg: a website which is http, https, or SSH, or FTP (File Transfer Protocol), these are all utilized TCP.
TCP is the most comonly used and scanned protocol. It works on what is called a three (3) way handshake.
The 3 way handshake looks like this: send out a SYN packet, recieve back a SYN ACK packet and then send an ACK packet.

Ports are items that can be open on a machine, it’s a way to communicate with certain protocols. Eg: hhtp is over port 80, https is over port 443, etc

Layman explanation: want to connect tp port 443 on a website, (1) send out a SYN packet to website, saying “I want to connect to you on port 443”, if 443 is open and availablefor connection,(2) the website says “sure, you can connect to me and it send the SYS ACK (Acknowledgement packet), (3) when connection is to be established, ACK (Acknowledgement packet) is sent back to website.

UDP (User Datagram Protocol): a connectionless protocol. Eg: streaming service or DNS or voice over IP.

Ports and Protocols:

TCP:
FTP (21) = File Transfer Protocol (put or get a file of the server)
SSH (22) = Encrypted version of Telnet
Telnet (23) = Log into a machine remotely
SMTP (25) = Mail
DNS (53) = resolve IP addresses to names (Domain Name System). Eg: Google is the DNS for its IP address
HTTP (80) HTTPS (443) = Website. http is the non-secure version of the protocol, https is encrypted an secure.
POP3 (110) = Mail
SMB (139 + 445) – The most common ports and are linked to file shares.
IMAP (143) = Mail
UDP:
DNS (53)
DHCP (67,68) = Associates you with an IP address at random. The opposite is a static IP address.
TFTP (69) = Trivial FTP. The UDP version of the FTP.
SNMP (161) = Simple Network Managment Protocol, occasionally encountered on networks.

OSI model:

  1. P = Please : Physical Layer. Eg: data cables, cat6 pluggis
  2. D = Do : Data Layer. Eg: switching, MAC addresses
  3. N = NOT : Network Layer. Eg: routing, IP addresses.
  4. T = Throw : Transport Layer. Eg: TCP/UDP
  5. S = Sausage : Session Layer. Eg: session managment.
  6. P = Pizza : Presentation Layer. Eg: jpeg, wmv, mov, MEDIA.
  7. A = Away : Application Layer. Eg: HTTP, SMTP, utilized application.

In the OSI moel, when data is recieved, it flows from the physical layer through to the application layer. When data is transmitted, it flows from the application layer through to the physical layer.
When troubleshooting, it is best to go from yhe physical layer through to the application layer.

Please Do Not Throw Sausage Pizza Away -@The Cyber Mentor (twitter)
OR
All People Seem To Need Data Processing (from the bottom up)

There are definitely a lot more to know and learn but this is the absolutely basic. If you need extra materials to learn and refresh on networking, hit me up on Discord https://discord.com/ my username is Phenix#3599 OR on twitter/IG, my username is @CS_Phenix.

Until nest time. Keep learning. Keep hacking! And don’t forget to breathe.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.