Networking

Here’s a structured, complete roadmap of what you need to learn in Networking, grouped by category (in English). Use it like a checklist: learn top → down, and keep looping back with labs.

1) Foundations (How networks “work”)

  • What a network is: hosts, clients/servers, LAN/WAN, Internet vs intranet
  • Network models:
    • OSI model (Layer 1–7): purpose of each layer, what breaks where
    • TCP/IP model: how it maps to OSI
  • Encapsulation/decapsulation: frames → packets → segments
  • Core concepts: bandwidth vs throughput, latency, jitter, loss, MTU, MSS
  • Duplex & contention: half/full duplex, collisions (historical Ethernet)

2) Physical & Data Link Layer (L1/L2)

Physical (Layer 1)

  • Media: copper (UTP/STP), fiber (SMF/MMF), wireless basics
  • Connectors & standards: RJ45, SFP/SFP+, Ethernet speeds (1G/10G/25G/40G/100G)
  • Signal basics: attenuation, interference, cable categories
  • Topology: star, mesh, spine-leaf (data center concept)

Data Link (Layer 2)

  • Ethernet framing: MAC addresses, unicast/multicast/broadcast
  • Switching basics: CAM/MAC table learning, flooding, aging
  • VLANs (802.1Q): access vs trunk ports, native VLAN concept
  • STP/RSTP: loops, root bridge, port roles/states, why STP exists
  • Link aggregation: LACP, why bundle links
  • Wi‑Fi (802.11) basics: channels, 2.4/5/6 GHz, roaming, SSID, security modes

3) IP & Subnetting (Layer 3 fundamentals)

  • IPv4 addressing: private vs public, CIDR notation
  • Subnetting (critical):
    • network ID, broadcast, usable range
    • VLSM, summarization
  • IPv6 basics:
    • address types (global unicast, link-local, multicast)
    • SLAAC vs DHCPv6 (high-level)
  • ARP / Neighbor Discovery: how IP maps to L2 (IPv4 vs IPv6)

4) Routing (Layer 3 advanced)

  • Routing concepts: routing table, longest prefix match, default route
  • Static routing: when to use it
  • Dynamic routing protocols:
    • OSPF (common in enterprises)
    • BGP (Internet / large networks; essential if you go deep)
    • (Know what RIP/EIGRP are historically/optionally)
  • Route redistribution (advanced): connecting different protocols
  • Policy-based routing (PBR): route based on rules rather than table

5) Transport Layer (TCP/UDP) + Reliability

  • TCP vs UDP: use cases, overhead, reliability
  • TCP mechanics: 3-way handshake, seq/ack, windows, retransmissions
  • Flow & congestion control: why throughput collapses sometimes
  • Ports & sockets: how services are identified

6) Application Layer Protocols (What you actually use)

  • DNS: records (A/AAAA/CNAME/MX/TXT), recursion vs authoritative, caching
  • DHCP: DORA process, scopes, options, reservations
  • HTTP/HTTPS: TLS basics, certificates, SNI, proxies
  • Email: SMTP/IMAP/POP3 basics
  • File transfer: SFTP vs FTP
  • NTP: time sync importance
  • SSH: remote management fundamentals
  • SNMP: monitoring basics (v2c vs v3 conceptually)

7) Network Services & Network Design (Real-world building blocks)

  • NAT/PAT: why it exists, port translation, typical home/enterprise patterns
  • Load balancing (intro): L4 vs L7, health checks
  • Proxy & reverse proxy: when/why
  • QoS: marking, shaping vs policing, priority queues (voice/video)
  • High availability: redundancy, failover, HSRP/VRRP concepts
  • Address planning: IP plan, VLAN plan, summarization strategy

8) Security Fundamentals (Networking-focused)

  • CIA triad & threat basics
  • Firewalls: stateless vs stateful, zones, rules, default-deny mindset
  • ACLs: L3/L4 filtering logic
  • VPNs:
    • site-to-site vs remote access
    • IPsec basics, SSL VPN concept
  • Network segmentation: VLANs, subnets, micro-segmentation concept
  • 802.1X / NAC basics: controlling access to the network
  • Wireless security: WPA2/WPA3, enterprise vs personal
  • Common attacks to recognize: spoofing, ARP poisoning, MITM, DDoS (high-level)

9) Operations: Troubleshooting & Tooling (Must-have)

  • Troubleshooting methodology: isolate layer by layer
  • CLI tools (Windows/Linux):
    • `ping`, `traceroute/tracert`, `ipconfig/ifconfig`, `netstat/ss`
    • `nslookup/dig`, `arp`, `route`, `curl`
  • Packet analysis: Wireshark basics (filters, TCP handshake, DNS flows)
  • Logs & telemetry: syslog concepts, event correlation
  • Performance testing: iPerf basics, latency checks

10) Automation & Programmability (Modern networking)

  • Scripting: Python basics for networking tasks
  • APIs & formats: REST, JSON, YAML
  • Automation tools (conceptual): Ansible-style configuration automation
  • Network data models (advanced): NETCONF/RESTCONF, YANG (optional)
  • Version control: Git basics for config/automation

11) Cloud & Virtual Networking (Very important today)

  • VPC/VNet concepts: subnets, route tables, security groups/NACLs
  • Internet gateways/NAT gateways
  • Hybrid connectivity: VPN to cloud, direct connect concepts
  • Containers & networking basics: service discovery, ingress (high-level)

12) Specialized Tracks (Pick based on goals)

  • Enterprise networking: campus LAN, wireless, NAC, SD-WAN
  • Data center networking: spine-leaf, EVPN/VXLAN (advanced)
  • Service provider/Internet: BGP deep dive, traffic engineering
  • Security engineering: IDS/IPS, SIEM, zero trust architecture
  • Network reliability/SRE: monitoring, incident response, capacity planning

Recommended learning order (practical sequence)

  1. OSI + TCP/IP + basic tools
  2. Ethernet switching + VLAN + STP
  3. IPv4 + subnetting (daily practice)
  4. Routing (static → OSPF → BGP basics)
  5. DNS/DHCP/HTTP/TLS
  6. NAT + firewall/ACL + VPN
  7. Wireshark + troubleshooting
  8. Cloud networking + automation

Quick questions (so I can tailor the roadmap)

  1. What’s your goal: IT support / network engineer / cybersecurity / cloud?
  2. Do you want a certification path (e.g., CCNA-level, Network+ level), or purely practical?
  3. Are you starting from zero, or do you already know IP/subnetting?

If you answer these, I can turn the categories above into a week-by-week study plan with labs and checkpoints.

VPS

最近我的VPS因為開了不需要開的port,就是Postgrel 5432,是claude幫我寫的docker compose,然後就吃到這招,被bot爬到,所以就刪掉重開了…
可見資安控管真的要做好QQ

這篇記一下建VPS的流程,一邊做資安的控管

在自己的電腦產生SSH Key,就不用每次登入都要密碼。

建好VPS之後,會跳出訊息詢問,打yes就好

PS C:\Users\user> ssh root@199.199.19.199
The authenticity of host '199.199.19.199 (199.199.19.199)' can't be established.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '199.199.19.199' (ED25519) to the list of known hosts.
Enter passphrase for key 'C:\Users\user/.ssh/id_ed25519':

接下來查詢我的VPS開放了哪些port
ss -tuln

下面這兩個指令也可以
netstat -tuln
nmap your.server.ip.address
可是因為要安裝套件,我懶得裝…先不用

接下來改掉SSH的預設port
nano /etc/ssh/sshd_config

改好之後增加防火牆裡要監控的port
(就是剛剛設定預設port),我發現VPS已經自動裝UFW了
ufw allow 2222/tcp

調好之後SSH要restart,指令要打 sshd_config 裡面提示的指令,GPT講的不準

接下來安裝需要的套件
sudo apt update && sudo apt upgrade
sudo apt install nginx certbot python3-certbot-nginx
sudo apt install docker.io docker-compose
systemctl enable nginx
systemctl enable docker

接著跳出這個,因為我的SSH檔有修改了,先保留

安裝完後打指令:reboot
接下來還要繼續安裝
Docker prerequisite packages:
apt install -y apt-transport-https ca-certificates curl software-properties-common

Add Docker’s GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add Docker’s repository:
echo “deb [arch=$(dpkg –print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Update apt and install Docker Engine:
apt update
apt install -y docker-ce

它提示可以移除不需要的套件,就跟著移除唄


接下來幫網站加SSL
certbot –nginx -d vividcats.org -d www.vividcats.org -d buy.vividcats.org -d meme.vividcats.org

然後因為之前domain有調好了,就不用調了

這裡有相關說明


接著安裝防駭的工具

sudo apt update
sudo apt install fail2ban

sudo systemctl enable fail2ban
sudo systemctl start fail2ban

然後雖然GPT有建議要改設定檔但我改不成功就先放著
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local

查看狀態的指令
fail2ban-client status sshd

Next.js懶人包包

  1. 一段url就是segament。 https://www.cats.com/segament/segament/segament ……
  2. 用資料夾分網址
  3. 用 ( ) 或是 _xxx 取名的資料夾不會被判斷到
  4. 資料夾裡面如果沒有 page.tsx 也不會形成網頁
  5. layout 跟 template 的差別:點這裡
  6. 有debug套件可以安裝:點這裡
  7. <Image>針對public資料夾的圖,
    如果是import圖片放進src而不是指定path (/images/xxx),就不用給寬高。
  8. slot可以應用在:header, footer… 然後 state 就類似目前點到 header 的哪個

只要有用到這些,你就是dynamic!