← Kỹ sư mạng← Network Engineer
Kỹ sư mạngNetwork Engineer19 Th7, 2026Jul 19, 202621 phút đọc18 min read

Thiết bị mạngNetwork Devices

Thuộc bộ kiến thức Network Engineer Roadmap.

Tổng quan

Một hệ thống mạng chỉ tốt bằng những chiếc “hộp” chuyển packet giữa các host. Mỗi device trên mạng tồn tại để giải quyết một vấn đề cụ thể: kéo dài tín hiệu, cô lập traffic, forward frame, route giữa các mạng, chuyển đổi tín hiệu, bảo vệ vành đai (perimeter), hay phân phối tải. Hiểu được mỗi thiết bị giải quyết vấn đề gì — và nó hoạt động ở tầng (layer) nào của mô hình OSI — là mental model hữu ích nhất mà một network engineer có thể mang theo, vì nó cho phép bạn suy luận về hành vi (collision domain, broadcast domain, độ trễ, kiểu lỗi) mà không cần thuộc lòng datasheet của từng sản phẩm.

Ghi chú này đi qua phân loại thiết bị từ tầng physical đi lên. Bắt đầu với các thiết bị “ngốc” chỉ lặp lại tín hiệu (repeater, hub), chuyển sang các thiết bị chuyển frame ở Layer 2 (bridge, switch), rồi tới các thiết bị routing ở Layer 3 (router, multilayer switch), và cuối cùng là các “appliance” thông minh nằm ở rìa mạng trở lên (modem, gateway, access point, firewall, load balancer, proxy, IDS/IPS, storage). Chúng ta kết thúc bằng xu hướng hiện đại chuyển sang virtual/cloud appliance (NFV) và một mô hình ra quyết định thực tế để chọn đúng thiết bị.

Các chủ đề chuyên sâu được trình bày trong các file cùng cấp, có liên kết chéo xuyên suốt:

Kiến thức nền tảng

Hai khái niệm cần nắm trước: collision domain và broadcast domain

Gần như mọi đặc tính của một thiết bị Layer 1/Layer 2 đều quy về việc nó tác động thế nào tới hai “domain” sau:

Quy tắc nhanh cho các thiết bị kinh điển:

Hãy nhớ kỹ: switch chia nhỏ collision domain; router chia nhỏ broadcast domain.

Thiết bị “hoạt động ở tầng” nào

Ta nói một thiết bị “hoạt động ở tầng” cao nhất mà nó đưa ra quyết định forwarding:

Tầng càng cao, thiết bị càng có nhiều ngữ cảnh, quyết định càng “thông minh” và (theo lịch sử) chi phí trên mỗi đơn vị throughput càng cao.

Duplex, và vì sao hub “chết”

Vì switch mang lại cho mỗi host một collision domain riêng, full-duplex — với chi phí ngang hoặc rẻ hơn hub xưa — nên hub đã lỗi thời. Ngày nay bạn sẽ không triển khai hub; chúng chỉ còn sống như công cụ dạy học và, đôi khi, như cách thô sơ để “tap” traffic phục vụ monitoring (hub thật copy mọi frame ra mọi port).

Khái niệm chính

Bảng so sánh tổng hợp: thiết bị → tầng OSI → chức năng

Thiết bịTầng OSIKhóa forwardingCollision domainBroadcast domainChức năng chính
RepeaterL1 (Physical)không (tín hiệu)1 (kéo dài)1 (kéo dài)Tái tạo/khuếch đại tín hiệu để kéo dài khoảng cách
HubL1 (Physical)không (flood mọi port)1 (mọi port)1 (mọi port)Repeater đa port; kết nối môi trường dùng chung (lỗi thời)
BridgeL2 (Data Link)MAC address1 mỗi port/segment1Nối hai segment, học MAC, lọc traffic cục bộ
SwitchL2 (Data Link)MAC address1 mỗi port1 (hoặc 1 mỗi VLAN)Forward frame đúng port; microsegmentation
Multilayer / L3 switchL2 + L3MAC + IP1 mỗi port1 mỗi VLAN, route giữa chúngSwitching tốc độ dây inter-VLAN routing
RouterL3 (Network)IP / longest-prefix match1 mỗi port1 mỗi interface (kết thúc chúng)Route packet giữa các mạng IP khác nhau
ModemChủ yếu L1không (modulation)n/an/aModulate/demodulate giữa tín hiệu digital và tín hiệu đường truyền
Wireless Access Point (AP)L2 (bridge sang wired)MACRF dùng chung (mỗi radio)1 (bridge vào VLAN wired)Bridge client Wi-Fi (802.11) vào LAN có dây
WLAN Controller (WLC)L2–L7 (quản trị)n/a (control plane)n/an/aQuản lý/cấu hình tập trung nhiều AP
FirewallL3–L7IP/port/app/staten/aphân tách zoneThực thi security policy giữa các zone/mạng
Load balancerL4 hoặc L7IP+port (L4) / nội dung HTTP (L7)n/an/aPhân phối connection/request qua một pool server
Reverse proxyL7host/path/header HTTPn/an/aĐứng trước server: terminate TLS, cache, định tuyến
Forward proxyL7request của clientn/an/aĐứng trước client khi ra internet
IDS/IPS sensorL3–L7signature packet/flown/an/aPhát hiện (IDS) hoặc chặn (IPS) traffic độc hại
NASL7 (file: NFS/SMB)request filen/an/aStorage chia sẻ mức file qua LAN
SANL2/L3 (block: FC/iSCSI)request blockn/an/aFabric storage mức block cho server

Phần còn lại của mục này giải thích từng nhóm thiết bị.

Layer 1 — Repeater và hub

Repeater nhận tín hiệu đã suy yếu, nhiễu và tái tạo lại một bản sạch, cho phép vượt qua độ dài cáp tối đa của môi trường (ví dụ 100 m cho copper Ethernet, hay các đoạn fiber dài). Nó không hiểu gì về dữ liệu — chỉ làm sạch và chuyển tiếp tín hiệu.

Hub là một repeater đa port. Frame đến ở một port sẽ được copy một cách “mù quáng” ra mọi port khác. Hệ quả:

Đó là lý do hub bị switch thay thế hoàn toàn. Xem ./08-switching.md để hiểu switch đã cải tiến ra sao.

Layer 2 — Bridge và switch

Bridge nối hai (hoặc vài) segment mạng và ra quyết định forwarding dựa trên MAC address. Nó học MAC nào nằm ở segment nào bằng cách quan sát source address, rồi chỉ forward frame qua bridge nếu đích nằm ở segment bên kia (lọc traffic cục bộ). Bridge kinh điển thường có hai port, chạy bằng phần mềm và chậm.

Switch về cơ bản là một bridge đa port mật độ cao, được tăng tốc bằng phần cứng — con ngựa thồ của LAN hiện đại. Các hành vi cốt lõi:

Các chế độ forwarding của switch: store-and-forward (nhận trọn frame, kiểm FCS rồi forward — an toàn nhất) và cut-through (bắt đầu forward ngay sau khi đọc destination MAC — độ trễ thấp nhất).

Chuyên sâu: VLAN, trunking (802.1Q), STP, EtherChannel, và MAC table trong ./08-switching.md.

Layer 3 — Router và multilayer switch

Router nối các mạng IP khác nhau và forward packet dựa trên destination IP, dùng routing tablelongest-prefix match. Các tính chất chính:

Multilayer switch (Layer 3 switch) kết hợp phần cứng forwarding tốc độ dây của switch với khả năng Layer 3 của router. Nó switch frame trong một VLAN và route packet giữa các VLAN (inter-VLAN routing) ở tốc độ phần cứng. Trong thiết kế campus/data-center hiện đại, L3 switch thường xử lý routing east-west nội bộ, còn một router hoặc firewall chuyên dụng lo phần edge/WAN. Phân biệt đại khái: router mạnh về đa dạng interface WAN, tính năng routing phong phú và NAT; L3 switch mạnh về routing LAN mật độ cao, throughput lớn giữa các VLAN.

Chuyên sâu về routing table, static vs dynamic routing, và các protocol: ./07-routing.md.

Default gateway

Default gateway là địa chỉ IP mà một host gửi packet tới khi đích không nằm trong subnet của chính nó. Host so sánh destination IP với subnet mask của mình; nếu đích là local, nó ARP và gửi trực tiếp; nếu đích ở xa, nó forward packet tới MAC của default gateway và để thiết bị đó route tiếp.

Modem và CPE / home gateway

Modem (modulator–demodulator) chuyển đổi giữa tín hiệu digital của thiết bị bạn và tín hiệu analog/line-coded mà môi trường truy nhập của nhà mạng dùng — coax (DOCSIS cable), copper điện thoại (DSL), hay fiber (ONT cho GPON, về kỹ thuật là optical network terminal nhưng cùng vai trò). Modulation mã hóa bit lên sóng mang để truyền; demodulation khôi phục bit khi nhận. Một modem thuần túy hoạt động chủ yếu ở Layer 1 (kèm chút L2 để framing) và không tự route hay cấp IP.

CPE (Customer Premises Equipment) là thuật ngữ chung cho thiết bị tại phía khách hàng do ISP cung cấp hoặc chấp thuận: modem/ONT, và thường là một home gateway hợp nhất (còn gọi residential gateway hay “wireless router”). Một home gateway điển hình là thiết bị converged gộp nhiều chức năng trong một hộp:

Hiểu nó là năm thiết bị trong một vỏ sẽ giải thích được hành vi của nó và cách troubleshoot. Trong môi trường doanh nghiệp, các chức năng này thường là các thiết bị riêng, chuyên dụng để đạt hiệu năng, khả năng mở rộng và quản trị tốt hơn.

Wireless access point (AP) và WLAN controller

Wireless access point bridge client 802.11 (Wi-Fi) vào LAN có dây. Nó hoạt động ở Layer 2 — một frame từ client Wi-Fi được bridge vào một VLAN wired. Mọi client trên một radio dùng chung môi trường RF (một dạng môi trường dùng chung/half-duplex với cơ chế tranh chấp riêng, CSMA/CA), đó là lý do mật độ AP và quy hoạch kênh (channel planning) rất quan trọng. AP không phải router; trong triển khai enterprise, AP chỉ làm radio + bridging, còn routing, DHCP và policy nằm ở nơi khác.

WLAN controller (WLC) quản lý tập trung nhiều AP — cấu hình, tối ưu RF (channel/power), roaming, security policy và firmware — biến hàng chục hay hàng nghìn AP “thin/lightweight” thành một hệ thống phối hợp thống nhất. Triển khai nhỏ có thể dùng AP “autonomous” hoặc AP quản lý qua cloud (controller đặt trên cloud).

Cố ý trình bày ngắn ở đây — nội dung đầy đủ (chuẩn, kênh, bảo mật, roaming) trong ./10-wireless-networking.md.

Firewall (như một thiết bị)

Firewall thực thi security policy giữa các network zone (ví dụ internet ↔ DMZ ↔ nội bộ). Các loại, theo mức độ tinh vi tăng dần:

Firewall có thể là appliance phần cứng chuyên dụng, một tính năng trên router, hoặc một instance virtual/cloud. Nó thường nằm ở ranh giới zone và nhiều khi chính là default gateway cho các segment được bảo vệ. Nội dung đầy đủ — zone, thiết kế rule, NAT, NGFW, deep packet inspection — trong ./11-network-security.md.

Load balancer (L4 vs L7)

Load balancer phân phối traffic đến qua một pool server backend để tăng công suất, tính sẵn sàng và khả năng mở rộng. Hai tầng hoạt động:

Load balancer còn làm health check (đưa server chết ra khỏi vòng quay) và là nền tảng của tính sẵn sàng cao. Chuyên sâu — các thuật toán (round-robin, least-connections), session persistence, HA pair và DSR — trong ./09-redundancy-and-high-availability.md.

Reverse proxy và forward proxy

Cả hai đều là trung gian kết thúc một connection và mở connection mới ở phía bên kia, nhưng hướng đối diện nhau:

Mẹo nhớ: forward proxy phục vụ/bảo vệ client; reverse proxy phục vụ/bảo vệ server.

Các appliance khác

Virtual, cloud và software appliance (NFV)

Trước đây mỗi chức năng ở trên là một hộp phần cứng chuyên dụng. Network Functions Virtualization (NFV) tách các network function khỏi phần cứng độc quyền và chạy chúng dưới dạng phần mềm (virtual machine hoặc container) trên server x86 tiêu chuẩn. Vì vậy ngày nay một “device” thường là một virtual appliance:

Liên quan: SDN tách control plane và data plane; VNF/CNF là network function được ảo hóa/container hóa; service chaining ghép nhiều VNF vào một đường đi của traffic. Mental model — device = tầng OSI + chức năng — vẫn đúng; chỉ là chức năng nay là phần mềm.

Best Practices

Mô hình chọn thiết bị (device-selection mental model)

Khớp vấn đề với tầng, rồi khớp tầng với thiết bị:

Vấn đề bạn gặpThiết bị giải quyết
Tín hiệu không tới đủ xaRepeater / fiber, hoặc cáp tốt hơn
Nối nhiều host trên một LAN, cô lập collision domainSwitch (không bao giờ dùng hub)
Chia một switch vật lý thành nhiều mạng logicVLAN trên switch
Chuyển traffic giữa các subnet / ra internetRouter (hoặc L3 switch cho inter-VLAN)
Routing throughput cao giữa nhiều VLANMultilayer (L3) switch
Kết nối tới môi trường truy nhập của ISPModem / ONT
Thêm Wi-Fi vào LAN có dâyAccess point (+ WLC nếu nhiều AP)
Thực thi security policy giữa các zoneFirewall (NGFW để nhận diện app/user)
Trải tải qua nhiều server giống hệt nhauLoad balancer (L4 cho tốc độ thô, L7 cho định tuyến theo nội dung)
Đứng trước web server: TLS, cache, định tuyếnReverse proxy
Kiểm soát/lọc truy cập internet của clientForward proxy
Phát hiện hoặc chặn tấn công trong trafficIDS (phát hiện) / IPS (chặn)
Chia sẻ file qua LANNAS
Cấp block storage nhanh cho serverSAN
Bất kỳ điều nào ở trên nhưng đàn hồi, tự độngVirtual / cloud appliance (NFV)

Hướng dẫn thiết kế và vận hành

Tài liệu tham khảo

Part of the Network Engineer Roadmap knowledge base.

Overview

A network is only as good as the boxes that move packets between hosts. Every device on a network exists to solve a specific problem: extend a signal, isolate traffic, forward frames, route between networks, translate signaling, secure a perimeter, or distribute load. Understanding what problem each device solves — and at which layer of the OSI model it operates — is the single most useful mental model a network engineer can carry, because it lets you reason about behavior (collision domains, broadcast domains, latency, failure modes) without memorizing product datasheets.

This note walks the device taxonomy from the physical layer upward. We start with the “dumb” signal-repeating devices (repeater, hub), move to Layer 2 frame-switching devices (bridge, switch), then to Layer 3 routing devices (router, multilayer switch), and finally to the “smart” appliances that live at the edge of the network and above (modem, gateway, access point, firewall, load balancer, proxy, IDS/IPS, storage). We close with the modern shift toward virtual and cloud appliances (NFV) and a practical decision model for choosing the right device.

Deeper treatments of individual subjects live in sibling files, cross-linked throughout:

Fundamentals

Two ideas you need first: collision domains and broadcast domains

Almost every property of a Layer 1/Layer 2 device comes down to how it affects two “domains”:

A quick rule of thumb for the classic devices:

Hold onto that: switches break up collision domains; routers break up broadcast domains.

The OSI layer a device “operates at”

We say a device “operates at” the highest layer at which it makes forwarding decisions:

The higher the layer, the more context the device has, the smarter its decisions can be, and (historically) the more it costs per unit of throughput.

Duplex, and why hubs died

Because switches give every host a private, full-duplex collision domain — and cost the same or less than hubs did — hubs are obsolete. You will not deploy a hub today; they survive only as a teaching tool and, occasionally, as a crude way to tap traffic for monitoring (a real hub copies every frame to every port).

Key Concepts

Master comparison table: device → OSI layer → function

DeviceOSI layerForwarding keyCollision domainsBroadcast domainsPrimary function
RepeaterL1 (Physical)none (signal)1 (extends it)1 (extends it)Regenerate/amplify a signal to extend distance
HubL1 (Physical)none (floods all ports)1 (all ports)1 (all ports)Multiport repeater; shared-media connectivity (obsolete)
BridgeL2 (Data Link)MAC address1 per port/segment1Connect two segments, learn MACs, filter locally
SwitchL2 (Data Link)MAC address1 per port1 (or 1 per VLAN)Forward frames only to the correct port; microsegmentation
Multilayer / L3 switchL2 + L3MAC + IP1 per port1 per VLAN, routes between themWire-speed switching and inter-VLAN routing
RouterL3 (Network)IP address / longest-prefix match1 per port1 per interface (terminates them)Route packets between different IP networks
ModemL1 (mostly)none (modulation)n/an/aModulate/demodulate between digital and carrier signal
Wireless Access Point (AP)L2 (bridges to wired)MACshared RF (per radio)1 (bridges into wired VLAN)Bridge Wi-Fi (802.11) clients onto the wired LAN
WLAN Controller (WLC)L2–L7 (mgmt)n/a (control plane)n/an/aCentrally manage/configure many APs
FirewallL3–L7IP/port/app/staten/asegments zonesEnforce security policy between zones/networks
Load balancerL4 or L7IP+port (L4) / HTTP content (L7)n/an/aDistribute connections/requests across a server pool
Reverse proxyL7HTTP host/path/headersn/an/aFront-end servers, terminate TLS, cache, route
Forward proxyL7client requestsn/an/aFront-end clients going out to the internet
IDS/IPS sensorL3–L7packet/flow signaturesn/an/aDetect (IDS) or block (IPS) malicious traffic
NASL7 (file: NFS/SMB)file requestsn/an/aFile-level shared storage over the LAN
SANL2/L3 (block: FC/iSCSI)block requestsn/an/aBlock-level storage fabric for servers

The rest of this section explains each family.

Layer 1 — Repeater and hub

A repeater takes a weakened, noisy signal and regenerates a clean copy, letting you exceed the maximum cable length of a medium (e.g., 100 m for copper Ethernet, or long fiber runs). It understands nothing about the data — it just cleans and forwards the signal.

A hub is a multiport repeater. A frame arriving on one port is blindly copied out of every other port. Consequences:

This is why hubs were entirely replaced by switches. See ./08-switching.md for how switches improved on this.

Layer 2 — Bridge and switch

A bridge connects two (or a few) network segments and makes forwarding decisions using MAC addresses. It learns which MACs live on which segment by observing source addresses, then forwards a frame across the bridge only if the destination is on the other segment (filtering local traffic). Classic bridges were often two-port, software-based, and slow.

A switch is essentially a high-density, hardware-accelerated multiport bridge — the workhorse of the modern LAN. Core behaviors:

Switch forwarding modes: store-and-forward (receive whole frame, check FCS, then forward — safest) vs cut-through (start forwarding after reading the destination MAC — lowest latency).

Deep dive: VLANs, trunking (802.1Q), STP, EtherChannel, and MAC tables in ./08-switching.md.

Layer 3 — Router and multilayer switch

A router connects different IP networks and forwards packets based on the destination IP address using a routing table and longest-prefix match. Key properties:

A multilayer switch (Layer 3 switch) combines a switch’s wire-speed hardware forwarding with a router’s Layer 3 capability. It switches frames within a VLAN and routes packets between VLANs (inter-VLAN routing) at hardware speed. In a modern campus/data-center design, L3 switches usually handle east-west routing internally, while a dedicated router or firewall handles the edge/WAN. Rough distinction: a router shines with WAN interface diversity, rich routing features, and NAT; an L3 switch shines with dense high-throughput LAN routing between VLANs.

Deep dive on routing tables, static vs dynamic routing, and protocols: ./07-routing.md.

Default gateway

The default gateway is the IP address a host sends packets to when the destination is not on its own subnet. The host compares the destination IP against its own subnet mask; if the destination is local, it ARPs and sends directly; if it’s remote, it forwards the packet to the default gateway’s MAC and lets that device route onward.

Modem and CPE / home gateway

A modem (modulator–demodulator) translates between the digital signals of your equipment and the analog/line-coded signal used by the carrier’s access medium — coax (DOCSIS cable), telephone copper (DSL), or fiber (an ONT for GPON, technically an optical network terminal but the same role). Modulation encodes bits onto the carrier for transmission; demodulation recovers bits on receipt. A pure modem operates mostly at Layer 1 (with some L2 for framing) and does not route or assign IPs by itself.

CPE (Customer Premises Equipment) is the umbrella term for the gear at the customer site provided or approved by the ISP: the modem/ONT, and often a combined home gateway (a.k.a. residential gateway or “wireless router”). A typical home gateway is a converged device that bundles several functions into one box:

Understanding it as five devices in one enclosure explains its behavior and how to troubleshoot it. In business settings these functions are usually separate, purpose-built devices for performance, scale, and manageability.

Wireless access point (AP) and WLAN controller

A wireless access point bridges 802.11 (Wi-Fi) clients onto the wired LAN. It operates at Layer 2 — a frame from a Wi-Fi client is bridged into a wired VLAN. All clients on one radio share the RF medium (a form of shared/half-duplex medium with its own contention, CSMA/CA), which is why AP density and channel planning matter. An AP is not a router; in enterprise deployments the AP does only radio + bridging, while routing, DHCP, and policy live elsewhere.

A WLAN controller (WLC) centrally manages many APs — configuration, RF optimization (channel/power), roaming, security policy, and firmware — turning dozens or thousands of “thin/lightweight” APs into one coordinated system. Small deployments may instead use “autonomous” APs or cloud-managed APs (controller in the cloud).

Brief here by design — full treatment (standards, channels, security, roaming) in ./10-wireless-networking.md.

Firewall (as a device)

A firewall enforces a security policy between network zones (e.g., internet ↔ DMZ ↔ internal). Types, in increasing sophistication:

A firewall can be a dedicated hardware appliance, a feature on a router, or a virtual/cloud instance. It typically sits at zone boundaries and often is the default gateway for protected segments. Full treatment — zones, rule design, NAT, NGFW, deep packet inspection — in ./11-network-security.md.

Load balancer (L4 vs L7)

A load balancer distributes incoming traffic across a pool of backend servers to improve capacity, availability, and scalability. Two operating layers:

Load balancers also do health checking (pull dead servers out of rotation) and are a cornerstone of high availability. Deep dive — algorithms (round-robin, least-connections), session persistence, HA pairing, and DSR — in ./09-redundancy-and-high-availability.md.

Reverse proxy and forward proxy

Both are intermediaries that terminate a connection and open a new one on the other side, but they face opposite directions:

Mnemonic: a forward proxy protects/serves the clients; a reverse proxy protects/serves the servers.

Other appliances

Virtual, cloud, and software appliances (NFV)

Historically each function above was a dedicated hardware box. Network Functions Virtualization (NFV) decouples network functions from proprietary hardware and runs them as software (virtual machines or containers) on standard x86 servers. So a “device” today is often a virtual appliance:

Related: SDN separates control and data planes; VNF/CNF are the virtualized/containerized network functions; service chaining stitches several VNFs into a traffic path. The mental model — device = OSI layer + function — still holds; the function is just software now.

Best Practices

A device-selection mental model

Match the problem to the layer, then to the device:

The problem you haveThe device that solves it
Signal won’t reach far enoughRepeater / fiber, or better cabling
Connect many hosts on one LAN, isolate collision domainsSwitch (never a hub)
Segment one physical switch into logical networksVLANs on a switch
Move traffic between subnets / to the internetRouter (or L3 switch for inter-VLAN)
High-throughput routing between many VLANsMultilayer (L3) switch
Connect to the ISP’s access mediumModem / ONT
Add Wi-Fi to a wired LANAccess point (+ WLC if many APs)
Enforce security policy between zonesFirewall (NGFW for app/user awareness)
Spread load across many identical serversLoad balancer (L4 for raw speed, L7 for content routing)
Front-end web servers: TLS, cache, routingReverse proxy
Control/filter outbound client internet accessForward proxy
Detect or block attacks in trafficIDS (detect) / IPS (block)
Share files across the LANNAS
Present fast block storage to serversSAN
Any of the above, but elastic and automatedVirtual / cloud appliance (NFV)

Design and operational guidance

References