Networking Glossary

網路相關術語與概念的主題式整理。

網路設備 (Network Devices)

Hub

Hubs are simply multi-port Repeaters. Facilitates scaling communication between additional hosts. Everyone receives everyone else’s data.

Hub

Bridge

Bridges sit between Hub-connected hosts. Only have two ports and learn which hosts are on each side.

Bridge

Switch

Switches are combination of Hubs and Bridges. Facilitate communication within a network. Switching is the process of moving data within networks.

  • L2 Devices: Only use L2 header to make decision
  • Use and Maintain MAC Address Table
  • Multiple Ports
  • Learn which hosts are on each port
Switch

Switch Steps

  1. Learn: Update MAC address Table with mapping of Switch Port to Source MAC
  2. Flood: Duplicate and send frame out all switch ports (except receiving port)
  3. Forward: Use MAC address Table to deliver Frame to appropriate switch port

Router

Facilitate communication between networks. Routing is the process of moving data between networks.

  • Known as Routes: Stored in Routing Table
  • Router has an IP address and a MAC address on each Interface
  • Router forwards packets not destined to themselves
Router Summary

Routing Table

When Router receives packets with an unknown Destination IP, packet is dropped.

Populated Methods:

  • Directly Connected: Routes for the Networks which are attached
  • Static Routes: Routes manually provided by an Administrator
  • Dynamic Routes: Routes learned automatically from other Routers

ARP Table

Router also has ARP Tables - Mapping of L3 to L2 address.

Router ARP Table

Subnetting

Router Subnetting

Repeater

中繼器 - Regenerate Signals, allows communications across greater distances.

一個將輸入訊號增強放大的裝置。中繼器是用來加強纜線上的訊號,把訊號送得更遠,以延展網路長度。

Gateway

Each host’s way out of their local Network.

Gateway

Other Devices

All networking devices perform Routing and/or Switching:

  • Access Points
  • Firewalls
  • Load Balancers
  • Virtual Switches
  • Layer 3 Switches
  • IDS / IPS
  • Proxies
  • Virtual Router

網路基礎 (Network Fundamentals)

Networks

A network is what transports traffic between Hosts.

Host Hierarchy

Host Hierarchy

IP Address

IP address = 32 bits (IPv4)

  • Octet: 一個八位元組 (bit)
  • Represented as Four Octets
  • Each Octet can be 0-255
IP Address

IP 位址轉換 (Decimal to Binary Conversion)

這是進行 IP 位址(IPv4)轉換時的基礎知識。每個 IP 位址由 4 組數字組成(例如 192.168.1.1),每一組數字都是一個 8位元 (8-bit) 的區塊(稱為 Octet)。

8-bit 轉換表

Position12345678
位值1286432168421

十進制轉二進制

口訣:比大小,減法,填 1 或 0。

  1. 比較 (Compare): 將十進制數字與當前位置的「位值」進行比較
  2. 判斷 (Decision):
    • 若數字 < 位值: 填寫 0,移動到下一個位置
    • 若數字 ≥ 位值: 減去該位值,填寫 1,帶餘數移動到下一個位置
  3. 重複 (Loop): 直到第 8 個位置結束

範例:133 → 10000101

步驟位值比較動作二進制餘數
1128133 ≥ 128減去 (133-128=5)15
2645 < 64跳過05
3325 < 32跳過05
4165 < 16跳過05
585 < 8跳過05
645 ≥ 4減去 (5-4=1)11
721 < 2跳過01
811 ≥ 1減去 (1-1=0)10

結果: 10000101

二進制轉十進制

方法:加總所有為 1 的位值

範例:00100001 → 33

位值1286432168421
二進制00100001

計算:32 + 1 = 33

VLANs (Virtual Local Area Networks)

  • Divides Switch Ports into isolated groups
  • Divides Switches into multiple “mini-switches”
  • Switches do all three actions within each VLAN

VLANs
VLANs Multiple Switches

進位制與單位 (Number Systems & Units)

Carry (進位)

不同進位制的轉換:

進位制英文說明
Binary二進位0, 1
Octal八進位0-7
Decimal十進位0-9
Hexadecimal十六進位0-9, A-F

Decimal to Binary

將十進位數除以二,取餘數
152 / 2 = 76 ...0
76 / 2 = 38 ...0
38 / 2 = 19 ...0
19 / 2 = 9 ...1
9 / 2 = 4 ...1
4 / 2 = 2 ...0
2 / 2 = 1 ...0

結果:1001 1000

Computer Memory Units

單位BitByte
基本b = bitB = Byte, 1 Byte = 8 bits
Kb/KB1 Kb = 1024 bit1 KB = 1024 Byte
Mb/MB1 Mb = 1024 Kb1 MB = 1024 KB
Gb/GB1 Gb = 1024 Mb1 GB = 1024 MB
Tb/TB1 Tb = 1024 Gb1 TB = 1024 GB
Pb/PB1 Pb = 1024 Tb1 PB = 1024 TB

協定與 API (Protocols & APIs)

REST

REST is not a framework or a library but an architectural style describing an interface based on the URL structure and the HTTP protocol. It describes a stateless, cacheable, convention-based architecture for client-server interaction.

gRPC

The gRPC framework is based on a client-server model of remote procedure calls. A client application can directly call methods on a server application as if it was a local object.

GraphQL

Provides a query language for developing APIs with a framework for fulfilling those queries.

CORS (Cross-Origin Resource Sharing)

跨來源資源共用 - 一種使用額外 HTTP 標頭,令目前瀏覽網站的使用者代理取得存取其他來源(網域)伺服器特定資源權限的機制。

HATEOAS

Hypermedia as the Engine of Application State - RESTful API 設計原則之一。

網路術語 (Networking Terms)

ABS (Adaptive Bitrate Streaming)

自適性串流 - 一種在電腦網路使用的串流技術。過去的串流媒體技術多使用 RTP/RTSP,但現在的技術則大多基於 HTTP,並為更高效在大型分散式 HTTP 網路(例如網際網路)分發而設計。

Buffer

簡單的說,buffer 是一塊暫時儲存著資料的內存(記憶體)。

Simply put, a buffer is a chunk of memory that stores packets temporarily when there is too much data sent to a network interface than what can be transmitted on the physical medium.

CDN (Content Delivery Network)

內容傳遞網路 - 分散式伺服器網路,用於更快速地傳遞內容給使用者。

CIDR (Classless Inter-Domain Routing)

無類別域間路由 - 一種 IP 地址分配方法,可提高網際網路上的資料路由效率。連線至網際網路的每台機器、伺服器和最終使用者裝置都有一個與之關聯的不重複編號,稱為 IP 地址。

Echo Cancellation

回音消除 - 用於通訊中消除回音的技術。

Encoder / Encoding

  • Encoder:編碼器 - 將資料轉換為特定格式的裝置或程式
  • Encoding:編碼法 - ASCII, Big5, Unicode 等

Head-of-line Blocking

隊頭阻塞 - 當封包必須按順序處理時,前面的封包延遲會影響後面所有封包。

Jitter

在 IP 網路中,封包到達目的地的時間長短不一,稱為 jitter(抖動)。

Narrowband / Wideband

  • Narrowband:窄頻 - 相對於寬頻,頻寬較小的通訊方式
  • Wideband:寬頻 - 相對於窄頻,頻寬較大的通訊方式

Network Partition

網路分區 - CAP 理論中的 Partition Tolerance。

Opcode

運算程式碼 (Operation Code) - 指令中指定要執行操作的部分。

PLC (Packet Loss Concealment)

封包遺失掩飾 - 用於隱藏封包丟失對音訊/視訊品質影響的技術。

Same Origin Policy

同源政策 - 瀏覽器安全機制,限制不同來源之間的資源存取。

Session & Cookie

Session & Cookie Auth

URI/URL/URN

URI

URI (Uniform Resource Identifier) - 統一資源標誌符

  • URI is an identifier that might not provide enough information to access the resource it identifies
  • Generic Form (absolute path): scheme:[//[user[:password]@]host[:port][/path][?query][#fragment]
Fragment 不會被傳送至伺服器,它完全提供瀏覽器來使用。

URL (Uniform Resource Locator) - 統一資源定位符

  • URL is an identifier that includes information about how to access the resource it identifies
  • Relative path

Common Schemes

SchemeDescription
http://Hypertext Transfer Protocol
https://HTTP with SSL/TLS encryption
ftp://File Transfer Protocol
mailto:Email address
tel:Telephone number
file://Local file system
ssh://Secure Shell
git://Git repositories