Network Fundamentals

Let's aim to describe the basic components of modern computer networking and outline some topics to structure/guide our study with

OSI Model - Open Systems Interconnection Model

Think of it as an effort to explain how networks work. It sorts functionality in the form of layers.

If you master it, you may have an understanding of how networks work at each layer and how data is communicated and transferred between layers.

There are 7 Layers, you may remember them with the following mnemonic device:

Please Do not throw sausage pizza away for:

(layer - protocol data unit*)

  • Application - DATA - End user layer - HTTP, FTP, IRC, SSH and DNS... etc - Application Layer

  • Presentation - DATA - Syntax Layer - SSL, SSH, IMAP, FTP, MPEG, JPEG, PDF - Data representation and encryption

  • Session - DATA - Synchronize and send to port - APIs, Sockets, WinSock... Facilitates Inter-host communications

  • Transport - SEGMENT - End-to-End connections - TCP, UDP...

  • Network - PACKET - End-to-End routing and addressing - IP, ICMP, IPSec, IGMP... IP Addresses live here

  • Data Link - FRAME - Provides error free transmission and access to the media - ARP, CDP, Ethernet, HDLC, IEEE 802.11 WLAN, LLDP , MPLS , SDN , PPP , UDLD... Physical Addressing of links

  • Physical - BIT - Physical structure - Coax, Fiber, Wireless, Repeaters...

TCP/IP stack

  • Application

  • Transport

  • Internet

  • Network Access

Network Layer

Used for the transfer or flow of packets across the network.

To specify the format of packets and provide an addressing system that enables packets to be routed to the correct destination and a response to be routed back to the source of the communication, two main addressing schemes are in use today, which in reality are two iterations of the same protocol: Internet Protocol - IP:

Please perform all exercises in the website linked in Subnet Masks title above: https://subnettingpractice.com

Table below from Cisco's documentation should provide a quick reference in binary and dotted decimal notation

IPv4 Packet Header

Many different fields are defined in the packet header of an IPv4 packet. These binary values are referenced as the packet is forwarded across the network.

  • IP Source Address of the packet

  • IP Destination Address of the packet

  • Time-to-live (TTL) - 8-bit value indicating the remaining life of the packet

  • Type-of-Service (ToS) - 8-bit binary value used to determine the priority of a packet

  • Protocol - 8-bit value indicating the data payload type that the packet is carrying

Contains Source and Destination IP addresses in the packet as well as flags and Differentiated Services Field codes for Quality of Service purposes.

"IPv6 addresses are represented as eight groups, separated by colons, of four hexadecimal digits. The full representation may be simplified by several methods of notation; for example, 2001:0db8:0000:0000:0000:8a2e:0370:7334 becomes 2001:db8::8a2e:370:7334." (Wikipedia)

Some statistics by google on its world-wide adoption, up to you is to decide when the well announced final cut over is happening.

Transport Layer

Facilitates end-to-end connections that transmit data between hosts via the use of protocols like TCP and UDP

Every machine has ports open as means to provide services to other machines in the network.

The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) are two Transport Layer protocols that use port numbers that corresponding to services or applications communicating in said ports. These are two common but not the only Layer 4 (transport) protocols.

Internet Assigned Numbers Authority (IANA) maintains port assignments.

TCP Header

Contains Source Port, Destination Port, TCP Flags and options as well as sequence and timestamp information used for TCP reliable transmission features as well as information regarding the size of the TCP payload.

TCP Header Flags

Responsible for the transmission and flow of packets across the network. Port scanning methods involve techniques that employ packets with specially selected TCP flags to determine the targets OS, service versions and alert about the presence of a firewall or packet filtering methods.

Transmission Control Protocol - TCP

TCP "3-way" handshake

Describes an interaction between two systems, often performing the roles of client and server in which the following exchange occurs: (diagram from Medium)

  1. Client starts connection by sending packet with a SYN flag. This indicates to the server that the client wishes to start a connection

  2. Server responds with another packet that has both the SYN and ACK flags activated indicating to the client that it accepts the invitation to establish a connection. The sequence and acknowledge numbers increase and expected next numbers are included in packets.

User Datagram Protocol - UDP

Connection-less protocol used to transmit data in an unordered manner. Examples of appropriate use include low latency data transmission in audio & video calls.

UDP Header

Includes Source and Destination Port since this is a much simpler protocol that lacks many of the reliable transmission features TCP offers. Since there is no sequencing of data it is appropriate for applications like voice over IP, video conference... etc.

Low-Latency applications are called as such because of their nature, the speed of the transmission and delivery of data is more important than its reliable transmission or even complete arrival. Think of when the video glitches/freezes green and the image in a video call comes back pixelated until it recovers and you can see your significant other clearly again.

Last updated