Initializing connection...

Mitro Vaskela

Tracing a packet through the network — from the application layer to the physical wire. Scroll down to advance layer by layer.

[ TECHNICAL_BLOG ]
LAYER 7
PDU: Data

Application

"Where data meets the model. ETL, training, inference."

Data/AI Engineering — Python, Pandas, NumPy, Scikit-Learn

user@portfolio:~/data
{
  "student": {
    "name": "Mitro Vaskela",
    "program": "B.Eng ICT — Data/AI Engineering",
    "university": "Kajaani University of Applied Sciences",
    "year": 2,
    "current_ects": 84,
    "current_gpa": 4.71,
    "interests": [
      "AI-Driven Development",
      "C++ & Python Systems",
      "Computer Networking",
      "Embedded Systems & Hardware (Raspberry Pi, Arduino)"
    ],
    "core_languages": ["Python", "C++", "SQL"],
    "stack_philosophy": "AI-adaptive: solid foundation in Python & C++, tools selected per project",
    "certifications": [
      "CCNA (in progress)"
    ],
    "approach": "AI-driven development",
    "location": "Finland",
    "contact": {
      "email": "mitrovaskela1@gmail.com",
      "github": "https://github.com/mitro54",
      "linkedin": "https://fi.linkedin.com/in/mitro-vaskela-53a90a2a7"
    },
    "response_code": 200,
    "status": "available"
  }
}
LAYER 6
PDU: Data

Presentation

"Encoding, serializing, and compressing data for transport."

Data Serialization & Encoding — PyArrow, Parquet, Protobuf, JSON

user@portfolio:~/encoding
#!/usr/bin/env python3
"""L6 Presentation — Data Serialization Pipeline

The Presentation Layer handles data encoding,
format conversion, and compression — transforming
application data into a standardized wire format.
"""

import os
import pyarrow as pa
import pyarrow.parquet as pq
import pandas as pd
import json

def csv_to_parquet(input_path: str, output_path: str):
    """Convert CSV to compressed Parquet format.

    Parquet uses columnar storage with built-in
    encoding (dictionary, RLE, delta) and compression.
    """
    df = pd.read_csv(input_path)

    # Convert to Arrow table for efficient columnar
    # serialization (L6 data format translation)
    table = pa.Table.from_pandas(df)

    # Write with Snappy compression (L6 compression)
    pq.write_table(
        table,
        output_path,
        compression="snappy",
        use_dictionary=True,
        write_statistics=True
    )

    original = os.path.getsize(input_path)
    compressed = os.path.getsize(output_path)
    ratio = (1 - compressed / original) * 100
    print(f"✓ Serialized: {ratio:.1f}% smaller")

def to_json_bytes(data: dict) -> bytes:
    """Encode Python dict → UTF-8 JSON bytes."""
    return json.dumps(
        data, ensure_ascii=False, indent=2
    ).encode("utf-8")

if __name__ == "__main__":
    csv_to_parquet(
        "./raw/dataset.csv",
        "./encoded/data.parquet"
    )
LAYER 5
PDU: Data

Session

"Establishing and managing communication sessions."

C++ & Network Programming — POSIX Sockets, OOP, gRPC

user@portfolio:~/sessions
/**
 * TCP Session Manager — POSIX Sockets
 * OSI Layer 5: Session establishment & teardown
 */

#include <iostream>
#include <cstring>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>

class TcpSession {
private:
    int sock_fd;
    bool connected;
    struct sockaddr_in server_addr;

public:
    TcpSession() : sock_fd(-1), connected(false) {
        std::memset(&server_addr, 0, sizeof(server_addr));
    }

    // Disable copy constructor and assignment (Rule of Five for RAII resource handle)
    TcpSession(const TcpSession&) = delete;
    TcpSession& operator=(const TcpSession&) = delete;

    bool establish(const char* host, int port) {
        // Create L4 transport endpoint
        sock_fd = socket(AF_INET, SOCK_STREAM, 0);
        if (sock_fd < 0) {
            std::cerr << "Socket creation error\n";
            return false;
        }

        server_addr.sin_family = AF_INET;
        server_addr.sin_port = htons(port);
        if (inet_pton(AF_INET, host, &server_addr.sin_addr) <= 0) {
            std::cerr << "Invalid IP address format\n";
            close(sock_fd);
            sock_fd = -1;
            return false;
        }

        // TCP 3-way handshake: SYN → SYN-ACK → ACK
        if (connect(sock_fd, (struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) {
            std::cerr << "Connection failed\n";
            close(sock_fd);
            sock_fd = -1;
            return false;
        }

        connected = true;
        std::cout << "Session established → " << host << ":" << port << "\n";
        return true;
    }

    ssize_t send_data(const void* buf, size_t len) {
        if (!connected) return -1;
        return send(sock_fd, buf, len, 0);
    }

    ssize_t recv_data(void* buf, size_t len) {
        if (!connected) return -1;
        return recv(sock_fd, buf, len, 0);
    }

    void teardown() {
        if (connected) {
            shutdown(sock_fd, SHUT_RDWR);
            close(sock_fd);
            sock_fd = -1;
            connected = false;
        }
    }

    ~TcpSession() { teardown(); }
};
LAYER 4
PDU: Segment

Transport

"Ensuring reliable delivery."

CCNA: Transport & Security — TCP/UDP, NAT/PAT, Stateful Firewalls

fw-edge-01#
! ══════════════════════════════════════════
! Access Control List Configuration
! Firewall: fw-edge-01 | Policy: STRICT
! ══════════════════════════════════════════

ip access-list extended INBOUND_FILTER
 10 permit tcp any host 10.0.1.100 eq 443
 20 permit tcp any host 10.0.1.100 eq 80
 30 permit tcp host 192.168.1.10 any eq 22
 40 permit icmp any any echo-reply
 50 deny   tcp any any eq 23 log
 60 deny   tcp any any eq 3389 log
 70 deny   ip any any log

ip access-list extended OUTBOUND_FILTER
 10 permit tcp 10.0.0.0 0.0.255.255 any eq 443
 20 permit tcp 10.0.0.0 0.0.255.255 any eq 80
 30 permit udp 10.0.0.0 0.0.255.255 any eq 53
 40 permit icmp any any echo
 50 deny   ip any any log

! Applied to interface
interface GigabitEthernet0/0
 ip access-group INBOUND_FILTER in
 ip access-group OUTBOUND_FILTER out
LAYER 3
PDU: Packet

Network

"Finding the best path through the logical topology."

CCNA, Routing & Subnetting — OSPF, BGP, IPv4 Subnetting

router-core-01#
router-core-01# show ip route
Codes: C - connected, S - static, R - RIP,
       O - OSPF, B - BGP, * - candidate default

Gateway of last resort is 203.0.113.1 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 203.0.113.1, 2d04h
C     10.0.1.0/24 is directly connected, GigabitEthernet0/0
O     10.0.2.0/24 [110/20] via 10.0.1.2, 00:45:12, Gi0/1
O     10.0.3.0/24 [110/30] via 10.0.1.2, 00:45:12, Gi0/1
O IA  10.0.10.0/24 [110/40] via 10.0.1.3, 01:12:33, Gi0/2
B     172.16.0.0/16 [20/0] via 203.0.113.5, 1d08h
S     192.168.100.0/24 [1/0] via 10.0.1.254
C     203.0.113.0/24 is directly connected, GigabitEthernet0/3
LAYER 2
PDU: Frame

Data Link

"Node-to-node delivery on the local network."

Switching, VLANs & STP — 802.1Q Trunks, Rapid PVST+, Port Security

switch-access-01#
switch-access-01# show vlan brief

VLAN  Name                       Status    Ports
────  ─────────────────────────  ────────  ──────────────────
1     default                    active    Gi0/24
10    MGMT                       active    Gi0/1, Gi0/2
20    SERVERS                    active    Gi0/3, Gi0/4, Gi0/5
30    WORKSTATIONS               active    Gi0/6-Gi0/12
40    VOIP                       active    Gi0/13-Gi0/18
50    GUEST                      active    Gi0/19-Gi0/22
99    NATIVE_TRUNK               active    
999   BLACKHOLE                  active    

switch-access-01# show interfaces trunk

Port      Mode    Encapsulation  Status    Native VLAN
Gi0/23    on      802.1q         trunking  99
Gi0/24    on      802.1q         trunking  99
LAYER 1
PDU: Bits

Physical

"The raw physical transmission."

CCNA: Physical Layer — Fiber Optics, Transceivers, Structured Cabling

TRANSMISSION STREAM
01001000 01100101 01101100 01101111
user@datacenter:~/physical
$ show interface status

Port      Name               Status  Speed    Duplex  Type
────────  ─────────────────  ──────  ───────  ──────  ─────────────
Gi0/1     MGMT-UPLINK        Up      1 Gbps   Full    1000BASE-T
Gi0/2     MGMT-BACKUP        Up      1 Gbps   Full    1000BASE-T
Gi0/3     SRV-WEB-01         Up      10 Gbps  Full    10GBASE-SR
Gi0/4     SRV-DB-01          Up      10 Gbps  Full    10GBASE-SR
Gi0/5     SRV-APP-01         Up      10 Gbps  Full    10GBASE-SR
Fo0/1     CORE-UPLINK-1      Up      40 Gbps  Full    40GBASE-LR4
Fo0/2     CORE-UPLINK-2      Up      40 Gbps  Full    40GBASE-LR4
Gi0/23    TRUNK-TO-DIST      Up      1 Gbps   Full    1000BASE-LX

Transceiver Status:
  Gi0/3  SFP+:  10GBASE-SR  | Rx: -3.2 dBm | Tx: -2.1 dBm
  Fo0/1  QSFP+: 40GBASE-LR4 | Rx: -8.1 dBm | Tx: -1.5 dBm

Environment:
  Temperature: 32°C (Normal) | Fan: OK (4200 RPM)
  Uptime: 247 days, 14:32:08