Network Refresher – Practical Ethical Hacking by TCM

by Kal Bartal

IP Addresses

inet is my IPV4 IP address in 32-bit decimal notation
inet6 is my IPV6 IP address in 128-bit hexadecimal notation
ether is my MAC address

IPV4 is made up of 4 octets which equals 4 bytes (32 bits).

Possible IPV4 (32 bit) addresses is 4,294,967,296
Possible IPV6 (128 bit ) is addresses3.4028236692093846346337460743177e+38

Private IP addresses are passed through a public IP address.

Typical class C private IP addresses are 192.168.0.0 to 192.168.255.255

Network Mask 255.255.255.0
No. of Networks 2,097,151
No.of Hosts per Network 254

IPV4 and IPV6 IP addresses are layer 3 protocols of the OSI model.

MAC Addresses

MAC stands for Media Access Control. MAC Address is the physical address of my device.

MAC addresses have identifiers.

The first 3 pairs of 2s can identify the device in a MAC address lookup tool.

MAC addresses are layer 2 protocols of the OSI model.

TCP, UDP and the Three-Way Handshake

Layer 4 is the transport layer of the OSI model.

TCP is the Transmission Control Protocol which is a connection-oriented protocol.
UDP is the User Datagram Protocol which is a connectionless protocol.

TCP – high reliability (HTTP, HTTPS, SSH, FTP)
UDP – (DNS, etc)

Three-Way Handshake

SYN > SYN ACK > ACK

SYN ~ ‘Hello’
SYN ACK ~ ‘Hello back’
ACK ~ Acknowledgement

Common Ports and Protocols

TCP

  • FTP (21) File Transfer Protocol
  • SSH (22) Secure Shell
  • Telnet (23)
  • SMTP (25) Simple Mail Transfer
  • DNS (53) Domain Name System
  • HTTP (80) / HTTPS (443) Hypertext Transfer Protocol / Secure
  • POP3 (110) Post Office Protocol
  • SMB (139 + 445) Server Message Protocol
  • IMAP (143) Internet Message Access Protocol

UDP

  • DNS (53) Domain Name System
  • DHCP (63,68) Dynamic Host Configuration Protocol
  • TFTP (69) Trivial File Transfer Protocol
  • SNMP (161) Simple Network Management Protocol

The OSI Model

1 P Physical – data cables cat6
2 D Data – switching, MAC addresses
3 N Network IP addresses, routing
4 T Transport TCP/UDP
5 S Session management
6 P Presentation – MWV, JPEG, MOV
7 A Application – HTTP, SMTP

Please Do Not Through Sausage Pizza Away

Subnetting

IP addressing guide
https://www.ipaddressguide.com/cidr

Useful subnetting videos

Subnetting for Beginners – Part 1 of 2

Subnetting for Beginners (Part 2 of 2)

Professor Messer – Seven Second Subnetting

Related Posts

Leave a Comment