CHƯƠNG 5: COMPUTER NETWORKING REVISION¤
PHẦN 1: THE INTERNET - OVERVIEW¤
1. ĐỊNH NGHĨA "NUTS AND BOLTS"¤
Các thành phần chính:
A. Hosts (End Systems): - Billions of connected computing devices - Clients and servers - Running network apps at Internet's "edge" - Servers thường ở data centers
B. Packet Switches: - Forward packets (chunks of data) - Routers, switches
C. Communication Links: - Fiber, copper, radio, satellite - Transmission rate: bandwidth
D. Networks: - Collection of devices, routers, links - Managed by an organization - Examples: home network, enterprise network, datacenter network, mobile network
E. Internet: - "Network of networks" - Interconnected ISPs (local/regional/national/global)
2. PROTOCOLS¤
Đặc điểm: - Protocols are EVERYWHERE - Control sending, receiving of messages
Ví dụ: - HTTP (Web) - Streaming video - Skype - TCP, IP - WiFi, 4G, Ethernet
Chuẩn hóa: - RFC: Request for Comments - IETF: Internet Engineering Task Force
3. INTERNET AS SERVICES¤
Infrastructure cung cấp services cho applications: - Web, streaming video, multimedia teleconferencing - Email, games, e-commerce, social media - Inter-connected appliances
Programming Interface: - "Hooks" cho sending/receiving apps - Connect to, use Internet transport service - Cung cấp service options (tương tự postal service)
PHẦN 2: INTERNET HISTORY¤
1. 1980-1990: NEW PROTOCOLS & PROLIFERATION¤
Các cột mốc quan trọng: - 1983: Deployment of TCP/IP - 1982: SMTP e-mail protocol defined - 1983: DNS defined for name-to-IP-address translation - 1985: FTP protocol defined - 1988: TCP congestion control - New networks: CSnet, BITnet, NSFnet, Minitel - 100,000 hosts connected
2. 1990, 2000s: COMMERCIALIZATION & THE WEB¤
Early 1990s: - ARPAnet decommissioned - 1991: NSF lifts restrictions on commercial use - NSFnet decommissioned 1995
The Web: - Hypertext [Bush 1945, Nelson 1960s] - HTML, HTTP: Berners-Lee - 1994: Mosaic, later Netscape - Late 1990s: Commercialization of the Web
Late 1990s - 2000s: - Killer apps: instant messaging, P2P file sharing - Network security to forefront - Est. 50 million hosts, 100 million+ users - Backbone links running at Gbps
3. 2005-PRESENT: SCALE, SDN, MOBILITY, CLOUD¤
Phát triển chính: - Aggressive deployment of broadband home access (10-100s Mbps) - 2008: Software-Defined Networking (SDN) - Ubiquity of high-speed wireless: 4G/5G, WiFi - Service providers (Google, FB, Microsoft) create own networks - Bypass commercial Internet - Connect "close" to end user - Enterprises run services in "cloud" (AWS, Azure) - 2017: Rise of smartphones > fixed devices - ~18B devices attached to Internet (2017)
PHẦN 3: INTERNET STRUCTURE¤
CÁC THÀNH PHẦN CHÍNH¤
1. Network Edge: - Hosts: clients and servers - Servers often in data centers
2. Access Networks & Physical Media: - Wired, wireless communication links
3. Network Core: - Interconnected routers - Network of networks
PHẦN 4: NETWORK-CORE FUNCTIONS¤
1. FORWARDING (SWITCHING)¤
Định nghĩa: - Local action - Move arriving packets from router's input link to appropriate router output link
Sử dụng: - Local forwarding table - Based on header value → output link
2. ROUTING¤
Định nghĩa: - Global action - Determine source-destination paths taken by packets
Sử dụng: - Routing algorithms
SO SÁNH¤
| Forwarding | Routing |
|---|---|
| Local action | Global action |
| Move packets between links | Determine paths |
| Forwarding table | Routing algorithms |
| Fast (hardware) | Slower (software) |
PHẦN 5: PACKET DELAY & LOSS¤
1. TẠI SAO CÓ DELAY VÀ LOSS?¤
Nguyên nhân: - Packets queue in router buffers - Waiting for turn for transmission - Queue length grows when arrival rate > output link capacity - Packet loss occurs when memory to hold queued packets fills up
Tình huống: - Free buffers: packets accepted - No free buffers: arriving packets dropped (loss)
2. BỐN NGUỒN GỐC PACKET DELAY¤
Công thức tổng: d_nodal = d_proc + d_queue + d_trans + d_prop
A. d_proc: NODAL PROCESSING DELAY¤
Hoạt động: - Check bit errors - Determine output link
Thời gian: - Typically < microseconds
B. d_queue: QUEUEING DELAY¤
Hoạt động: - Time waiting at output link for transmission
Phụ thuộc: - Congestion level of router
C. d_trans: TRANSMISSION DELAY¤
Công thức: - d_trans = L/R - L: packet length (bits) - R: link transmission rate (bps)
Ý nghĩa: - Time to push all packet bits onto link
D. d_prop: PROPAGATION DELAY¤
Công thức: - d_prop = d/s - d: length of physical link - s: propagation speed (~2×10^8 m/sec)
Ý nghĩa: - Time for bit to propagate through link
LƯU Ý QUAN TRỌNG: - d_trans và d_prop RẤT KHÁC NHAU! - d_trans: thời gian đẩy bits lên link - d_prop: thời gian bits di chuyển trên link
PHẦN 6: PROTOCOL STACK (LAYERING)¤
1. TẠI SAO LAYERING?¤
Lợi ích: - Explicit structure: Xác định, quan hệ giữa các pieces của hệ thống - Layered reference model: Cho discussion - Modularization: Dễ maintenance, updating - Change in layer's service: Transparent to rest of system - VD: Change in gate procedure không ảnh hưởng rest of system
2. INTERNET PROTOCOL STACK (5 LAYERS)¤
Từ trên xuống:
Layer 5: APPLICATION¤
- Chức năng: Supporting network applications
- Protocols: HTTP, IMAP, SMTP, DNS
- PDU (Protocol Data Unit): Message (M)
Layer 4: TRANSPORT¤
- Chức năng: Process-process data transfer
- Protocols: TCP, UDP
- PDU: Segment (Ht | M)
Layer 3: NETWORK¤
- Chức năng: Routing of datagrams from source to destination
- Protocols: IP, routing protocols
- PDU: Datagram (Hn | Ht | M)
Layer 2: LINK (DATA LINK)¤
- Chức năng: Data transfer between neighboring network elements
- Protocols: Ethernet, 802.11 (WiFi), PPP
- PDU: Frame (Hl | Hn | Ht | M)
Layer 1: PHYSICAL¤
- Chức năng: Bits "on the wire"
- PDU: Bits
3. ENCAPSULATION PROCESS¤
Quá trình từ Application → Physical:
- Application Layer: Tạo Message (M)
- Transport Layer:
- Thêm header Ht
- Tạo Segment (Ht | M)
- Network Layer:
- Thêm header Hn
- Tạo Datagram (Hn | Ht | M)
- Link Layer:
- Thêm header Hl
- Tạo Frame (Hl | Hn | Ht | M)
- Physical Layer: Truyền bits
Headers chứa gì: - Ht: Transport layer info (port numbers, sequence numbers...) - Hn: Network layer info (IP addresses...) - Hl: Link layer info (MAC addresses...)
4. END-TO-END VIEW¤
Source → Destination:
Source Host: Switch: Router: Destination Host:
App → M
Trans→ Ht|M
Net → Hn|Ht|M Net→ Hn|Ht|M Net → Hn|Ht|M
Link → Hl|Hn|Ht|M Link→Hl|Hn|Ht|M Link→ Hl|Hn|Ht|M Link→ Hl|Hn|Ht|M
Phy → bits Phy → bits Phy → bits Phy → bits
↓ ↓ ↓
Link Net App
Net Link Trans
Phy Net
Link
Phy
Lưu ý: - Switch: Chỉ đến Link layer - Router: Đến Network layer - Host: Full stack
5. ISO/OSI REFERENCE MODEL (7 LAYERS)¤
So với Internet Stack - thêm 2 layers:
7. Application (giống Internet) 6. Presentation: - Allow applications interpret meaning of data - Encryption, compression, machine-specific conventions
5. Session: - Synchronization, checkpointing, recovery of data exchange
4. Transport (giống Internet) 3. Network (giống Internet) 2. Link (giống Internet) 1. Physical (giống Internet)
Internet Stack "missing" Presentation & Session: - If needed, must be implemented in application - Câu hỏi: Needed?
PHẦN 7: NETWORK SECURITY¤
1. BỐI CẢNH¤
Vấn đề: - Internet NOT originally designed with (much) security in mind - Original vision: "a group of mutually trusting users attached to a transparent network" ☺ - Internet protocol designers playing "catch-up" - Security considerations in ALL layers!
2. MỤC TIÊU NETWORK SECURITY¤
4 mục tiêu chính:
A. CONFIDENTIALITY¤
- Only sender, intended receiver should "understand" message contents
- Sender encrypts message
- Receiver decrypts message
B. AUTHENTICATION¤
- Sender, receiver want to confirm identity of each other
C. MESSAGE INTEGRITY¤
- Sender, receiver want to ensure message not altered (in transit or afterwards) without detection
D. ACCESS AND AVAILABILITY¤
- Services must be accessible and available to users
3. ALICE, BOB, TRUDY¤
Nhân vật: - Alice, Bob: Lovers! Want to communicate "securely" - Trudy (intruder): May intercept, delete, add messages
Trong thực tế Alice & Bob có thể là: - Real-life people - Web browser/server for e-transactions - Online banking client/server - DNS servers - BGP routers exchanging routing table updates
4. BAD GUYS CAN DO¤
Các hành động độc hại:
A. EAVESDROP¤
- Intercept messages
B. ACTIVELY INSERT MESSAGES¤
- Insert messages into connection
C. IMPERSONATION (SPOOFING)¤
- Fake (spoof) source address in packet
- Any field in packet
D. HIJACKING¤
- "Take over" ongoing connection
- By removing sender or receiver
- Inserting himself in place
E. DENIAL OF SERVICE (DoS)¤
- Prevent service from being used by others
- By overloading resources
5. CÁC LOẠI TẤN CÔNG CỤ THỂ¤
A. PACKET SNIFFING¤
Cách hoạt động: - Broadcast media (shared Ethernet, wireless) - Promiscuous network interface reads/records ALL packets passing by - Including passwords!
Tools: - Wireshark (free packet sniffer - dùng trong labs) - Alternatives: tcpdump, scapy
B. IP SPOOFING¤
Cách hoạt động: - Injection of packet with FALSE source address - Pretend to be someone else
C. DENIAL OF SERVICE (DoS)¤
Cách hoạt động: 1. Select target 2. Break into hosts around network (see botnet) 3. Send packets to target from compromised hosts
Mục đích: - Make resources (server, bandwidth) unavailable to legitimate traffic - By overwhelming resource with bogus traffic
6. LINES OF DEFENSE¤
Các biện pháp phòng thủ:
A. AUTHENTICATION¤
- Proving you are who you say you are
- Cellular networks: hardware identity via SIM card
- Traditional Internet: no such hardware assist
B. CONFIDENTIALITY¤
- Via encryption
C. INTEGRITY CHECKS¤
- Digital signatures prevent/detect tampering
D. ACCESS RESTRICTIONS¤
- Password-protected VPNs
E. FIREWALLS¤
- Specialized "middleboxes" in access and core networks
- Off-by-default: filter incoming packets
- Restrict senders, receivers, applications
- Detecting/reacting to DoS attacks
PHẦN 8: AUTHENTICATION (CASE STUDY)¤
EVOLUTION OF AUTHENTICATION PROTOCOLS¤
Protocol ap1.0: PLAINTEXT¤
Alice → Bob: "I am Alice"
Vấn đề: - In a network, Bob cannot "see" Alice - Trudy simply declares herself to be Alice - ✗ KHÔNG AN TOÀN
Protocol ap2.0: IP ADDRESS¤
Alice → Bob: "I am Alice" + Alice's IP address
Vấn đề: - Trudy can create packet "spoofing" Alice's address - ✗ KHÔNG AN TOÀN
Protocol ap3.0: PASSWORD¤
Alice → Bob: "I am Alice" + Alice's password
Vấn đề: - Playback attack: Trudy records Alice's packet and later plays it back to Bob - ✗ KHÔNG AN TOÀN
Protocol ap3.1: ENCRYPTED PASSWORD¤
Alice → Bob: "I am Alice" + encrypted password
Vấn đề: - Playback attack STILL works - Trudy records encrypted packet and plays back - Không cần biết password! - ✗ KHÔNG AN TOÀN
Protocol ap4.0: NONCE (CHALLENGE-RESPONSE)¤
Khái niệm: - Nonce: Number used only once-in-a-lifetime
Quy trình: 1. Alice → Bob: "I am Alice" 2. Bob → Alice: R (nonce) 3. Alice → Bob: K_A-B(R) (encrypted with shared secret key)
Bảo mật: - Bob knows Alice is live - Only Alice knows key to encrypt nonce - ✓ AN TOÀN (với shared secret key)
Nhược điểm: - Requires shared symmetric key
Protocol ap5.0: PUBLIC KEY¤
Quy trình: 1. Alice → Bob: "I am Alice" 2. Bob → Alice: R (nonce) 3. Bob → Alice: "Send me your public key" 4. Alice → Bob: K_A^+ (public key) 5. Alice → Bob: K_A^-(R) (signed with private key)
Verification: - Bob computes: K_A+(K_A-(R)) = R - Knows only Alice has private key
Vấn đề: - Man-in-the-Middle (MITM) attack!
MITM ATTACK ON ap5.0¤
Scenario: - Trudy poses as Alice (to Bob) AND as Bob (to Alice)
Attack: 1. Alice → Trudy (thinks Bob): "I am Alice" 2. Trudy → Bob: "I am Alice" 3. Bob → Trudy: R 4. Trudy → Alice: R 5. Bob → Trudy: "Send public key" 6. Trudy → Alice: "Send public key" 7. Alice → Trudy: K_A^+ 8. Trudy → Bob: K_T^+ (Trudy's key, claims Alice's!) 9. Alice → Trudy: K_A^-(R) 10. Trudy decrypts, re-encrypts with her key 11. Trudy → Bob: K_T^-(R) 12. Bob verifies with K_T^+, thinks authenticating Alice!
Hậu quả: - Bob thinks talking to Alice - Alice thinks talking to Bob - Trudy intercepts ALL communication
7. GIẢI PHÁP: CERTIFICATION AUTHORITIES (CA)¤
VẤN ĐỀ: PIZZA PRANK¤
Scenario: - Trudy creates email: "Dear Pizza Store, please deliver 4 pepperoni pizzas. Thank you, Bob" - Trudy signs with her private key - Trudy sends to Pizza Store her public key, says it's Bob's public key - Pizza Store verifies signature (with Trudy's key thinking it's Bob's) - Delivers pizzas to Bob - Bob doesn't even like pepperoni!
GIẢI PHÁP: PUBLIC KEY CERTIFICATION¤
Certification Authority (CA): - Binds public key to particular entity, E
Quy trình đăng ký: 1. Entity (person, website, router) registers public key with CA 2. Entity provides "proof of identity" to CA 3. CA creates certificate binding identity E to E's public key 4. Certificate digitally signed by CA
Certificate structure:
[Bob's identifying information | Bob's public key K_B^+]
signed with CA's private key K_CA^-
CA nói: "This is E's public key"
SỬ DỤNG CERTIFICATE¤
Khi Alice muốn Bob's public key:
- Alice gets Bob's certificate (from Bob or elsewhere)
- Alice applies CA's public key to Bob's certificate
- Decrypt signature: K_CA^+(signature)
- Get Bob's public key K_B^+
Bảo mật: - CA's public key là widely known & trusted - Signature cannot be forged - ✓ ALICE CHẮC CHẮN ĐÂY LÀ BOB'S PUBLIC KEY
NGÂN HÀNG CÂU HỎI CHƯƠNG 5¤
PHẦN 1: INTERNET OVERVIEW¤
Câu 1: Hosts trong Internet còn được gọi là gì?
A. Routers
B. End systems ✓
C. Switches
D. Links
Câu 2: Packet switches bao gồm những gì?
A. Chỉ routers
B. Chỉ switches
C. Routers và switches ✓
D. Hosts và servers
Câu 3: Internet được mô tả là gì?
A. A single network
B. "Network of networks" ✓
C. A super computer
D. A protocol
Câu 4: RFC viết tắt của gì?
A. Really Fast Connection
B. Request for Comments ✓
C. Router Function Call
D. Registered File Copy
Câu 5: IETF viết tắt của gì?
A. Internet Encryption Task Force
B. Internet Engineering Task Force ✓
C. International Electronic Transfer Format
D. Internet Exploration Technology Forum
Câu 6: Protocols trong Internet làm gì?
A. Chỉ mã hóa dữ liệu
B. Control sending, receiving of messages ✓
C. Chỉ routing packets
D. Chỉ addressing
Câu 7: Ví dụ nào KHÔNG phải Internet protocol?
A. HTTP
B. TCP
C. IP
D. HTML ✓
PHẦN 2: INTERNET HISTORY¤
Câu 8: TCP/IP được deploy năm nào?
A. 1980
B. 1983 ✓
C. 1985
D. 1990
Câu 9: SMTP (email protocol) được defined năm nào?
A. 1980
B. 1982 ✓
C. 1985
D. 1988
Câu 10: DNS được defined năm nào?
A. 1980
B. 1982
C. 1983 ✓
D. 1985
Câu 11: FTP protocol được defined năm nào?
A. 1983
B. 1985 ✓
C. 1988
D. 1990
Câu 12: TCP congestion control được giới thiệu năm nào?
A. 1985
B. 1986
C. 1988 ✓
D. 1990
Câu 13: Năm 1980-1990, có bao nhiêu hosts connected?
A. 10,000
B. 50,000
C. 100,000 ✓
D. 1,000,000
Câu 14: NSF lifts restrictions on commercial use năm nào?
A. 1989
B. 1990
C. 1991 ✓
D. 1995
Câu 15: HTML, HTTP được tạo bởi ai?
A. Tim Cook
B. Berners-Lee ✓
C. Bill Gates
D. Steve Jobs
Câu 16: Mosaic browser ra đời năm nào?
A. 1990
B. 1992
C. 1994 ✓
D. 1996
Câu 17: Software-Defined Networking (SDN) xuất hiện năm nào?
A. 2005
B. 2008 ✓
C. 2010
D. 2015
Câu 18: Năm nào smartphones > fixed devices trên Internet?
A. 2015
B. 2016
C. 2017 ✓
D. 2018
Câu 19: Năm 2017 có bao nhiêu devices attached to Internet?
A. 5B
B. 10B
C. ~18B ✓
D. 25B
Câu 20: Late 1990s - 2000s, vấn đề gì to forefront?
A. Speed
B. Cost
C. Network security ✓
D. Bandwidth
PHẦN 3: INTERNET STRUCTURE¤
Câu 21: Network edge bao gồm gì?
A. Chỉ routers
B. Hosts: clients và servers ✓
C. Chỉ switches
D. Chỉ links
Câu 22: Servers thường nằm ở đâu?
A. Home networks
B. Data centers ✓
C. Mobile devices
D. Routers
Câu 23: Access networks bao gồm gì?
A. Chỉ wired links
B. Chỉ wireless links
C. Wired và wireless communication links ✓
D. Chỉ fiber optic
Câu 24: Network core bao gồm gì?
A. End systems
B. Interconnected routers ✓
C. Chỉ switches
D. Clients
PHẦN 4: FORWARDING & ROUTING¤
Câu 25: Forwarding còn được gọi là gì?
A. Routing
B. Switching ✓
C. Addressing
D. Encapsulation
Câu 26: Forwarding là loại action nào?
A. Global action
B. Local action ✓
C. Remote action
D. Distributed action
Câu 27: Forwarding làm gì?
A. Determine paths
B. Move packets from input link to output link ✓
C. Calculate routes
D. Create packets
Câu 28: Routing là loại action nào?
A. Local action
B. Global action ✓
C. Physical action
D. Link action
Câu 29: Routing làm gì?
A. Move packets between links
B. Determine source-destination paths ✓
C. Forward packets
D. Encrypt data
Câu 30: Forwarding sử dụng gì?
A. Routing algorithms
B. Forwarding table (local) ✓
C. DNS servers
D. IP addresses only
Câu 31: Routing sử dụng gì?
A. Forwarding table
B. Routing algorithms ✓
C. MAC addresses
D. Port numbers
PHẦN 5: PACKET DELAY & LOSS¤
Câu 32: Packets queue ở đâu?
A. In links
B. In router buffers ✓
C. In hosts
D. In switches
Câu 33: Packet loss xảy ra khi nào?
A. Link bị hỏng
B. Memory to hold queued packets fills up ✓
C. Router tắt
D. Cable bị đứt
Câu 34: Queue length grows khi nào?
A. Link rỗi
B. Arrival rate > output link capacity ✓
C. Router khởi động
D. Bandwidth tăng
Câu 35: Công thức tổng nodal delay?
A. d_proc + d_queue
B. d_trans + d_prop
C. d_proc + d_queue + d_trans + d_prop ✓
D. d_queue + d_trans
Câu 36: d_proc là gì?
A. Queueing delay
B. Nodal processing delay ✓
C. Transmission delay
D. Propagation delay
Câu 37: d_proc làm những gì?
A. Chỉ forward packets
B. Check bit errors, determine output link ✓
C. Chỉ queue packets
D. Chỉ transmit packets
Câu 38: d_proc thường mất bao lâu?
A. Milliseconds
B. < Microseconds ✓
C. Seconds
D. Minutes
Câu 39: d_queue phụ thuộc vào gì?
A. Link length
B. Packet size
C. Congestion level of router ✓
D. Propagation speed
Câu 40: Công thức d_trans?
A. d/s
B. L/R ✓
C. R/L
D. L×R
Câu 41: Trong d_trans = L/R, L là gì?
A. Link length
B. Packet length (bits) ✓
C. Loss rate
D. Latency
Câu 42: Trong d_trans = L/R, R là gì?
A. Router number
B. Link transmission rate (bps) ✓
C. Retry count
D. Route length
Câu 43: Công thức d_prop?
A. L/R
B. d/s ✓
C. s/d
D. d×s
Câu 44: Trong d_prop = d/s, d là gì?
A. Delay
B. Data size
C. Length of physical link ✓
D. Distance to router
Câu 45: Trong d_prop = d/s, s là gì?
A. Speed of router
B. Propagation speed (~2×10^8 m/sec) ✓
C. Size of packet
D. Number of switches
Câu 46: d_trans và d_prop có giống nhau không?
A. Giống nhau
B. RẤT KHÁC NHAU ✓
C. Gần giống nhau
D. Không liên quan
Câu 47: d_trans là thời gian gì?
A. Bits di chuyển trên link
B. Đẩy all packet bits onto link ✓
C. Packet đợi trong queue
D. Processing packet
Câu 48: d_prop là thời gian gì?
A. Đẩy bits lên link
B. Bit propagate through link ✓
C. Queue packet
D. Process packet
PHẦN 6: PROTOCOL STACK¤
Câu 49: Tại sao sử dụng layering?
A. Để phức tạp hơn
B. Modularization eases maintenance, updating ✓
C. Để chậm hơn
D. Không có lý do
Câu 50: Internet Protocol Stack có bao nhiêu layers?
A. 3
B. 4
C. 5 ✓
D. 7
Câu 51: Layer cao nhất trong Internet Stack?
A. Transport
B. Application ✓
C. Network
D. Physical
Câu 52: Application layer bao gồm protocols nào?
A. TCP, UDP
B. HTTP, IMAP, SMTP, DNS ✓
C. IP, routing protocols
D. Ethernet, WiFi
Câu 53: Transport layer bao gồm protocols nào?
A. HTTP, DNS
B. TCP, UDP ✓
C. IP, ICMP
D. Ethernet, PPP
Câu 54: Network layer chức năng chính?
A. Process-process transfer
B. Routing datagrams from source to destination ✓
C. Application support
D. Bits on wire
Câu 55: Network layer bao gồm protocols nào?
A. TCP, UDP
B. HTTP, DNS
C. IP, routing protocols ✓
D. Ethernet, WiFi
Câu 56: Link layer bao gồm protocols nào?
A. IP, ICMP
B. TCP, UDP
C. Ethernet, 802.11 (WiFi), PPP ✓
D. HTTP, FTP
Câu 57: Link layer chức năng chính?
A. Routing packets
B. Data transfer between neighboring network elements ✓
C. Process communication
D. Application support
Câu 58: Physical layer làm gì?
A. Routing
B. Addressing
C. Bits "on the wire" ✓
D. Encryption
Câu 59: PDU của Application layer là gì?
A. Segment
B. Message (M) ✓
C. Datagram
D. Frame
Câu 60: PDU của Transport layer là gì?
A. Message
B. Segment (Ht | M) ✓
C. Datagram
D. Frame
Câu 61: PDU của Network layer là gì?
A. Segment
B. Frame
C. Datagram (Hn | Ht | M) ✓
D. Message
Câu 62: PDU của Link layer là gì?
A. Segment
B. Datagram
C. Frame (Hl | Hn | Ht | M) ✓
D. Packet
Câu 63: PDU của Physical layer là gì?
A. Frames
B. Packets
C. Bits ✓
D. Bytes
Câu 64: Header Ht chứa thông tin gì?
A. IP addresses
B. Transport layer info (port numbers, sequence numbers) ✓
C. MAC addresses
D. Application data
Câu 65: Header Hn chứa thông tin gì?
A. Port numbers
B. Network layer info (IP addresses) ✓
C. MAC addresses
D. Application commands
Câu 66: Header Hl chứa thông tin gì?
A. IP addresses
B. Port numbers
C. Link layer info (MAC addresses) ✓
D. Routing info
Câu 67: Switch hoạt động đến layer nào?
A. Physical only
B. Link layer ✓
C. Network layer
D. Transport layer
Câu 68: Router hoạt động đến layer nào?
A. Physical only
B. Link layer
C. Network layer ✓
D. Application layer
Câu 69: Host có bao nhiêu layers?
A. 3 layers
B. Full stack (5 layers) ✓
C. 2 layers
D. 4 layers
Câu 70: ISO/OSI model có bao nhiêu layers?
A. 5
B. 6
C. 7 ✓
D. 8
Câu 71: Hai layers trong OSI KHÔNG có trong Internet Stack?
A. Application, Transport
B. Presentation, Session ✓
C. Network, Link
D. Physical, Application
Câu 72: Presentation layer làm gì?
A. Routing packets
B. Encryption, compression, machine-specific conventions ✓
C. Process communication
D. Bits transmission
Câu 73: Session layer làm gì?
A. Encryption
B. Synchronization, checkpointing, recovery of data exchange ✓
C. Routing
D. Addressing
Câu 74: Internet Stack "missing" Presentation & Session, phải làm gì?
A. Không thể implement
B. If needed, must be implemented in application ✓
C. Implement ở transport layer
D. Implement ở network layer
PHẦN 7: NETWORK SECURITY BASICS¤
Câu 75: Internet được thiết kế với bảo mật từ đầu không?
A. Có, rất bảo mật
B. KHÔNG, not originally designed with (much) security in mind ✓
C. Một phần
D. Chỉ cho military
Câu 76: Original vision của Internet về security?
A. Highly secure network
B. "A group of mutually trusting users attached to transparent network" ✓
C. Zero trust network
D. Military-grade security
Câu 77: Security considerations nên ở layer nào?
A. Chỉ application layer
B. Chỉ network layer
C. ALL layers! ✓
D. Chỉ physical layer
Câu 78: Bốn mục tiêu chính của network security?
A. Speed, Cost, Reliability, Scalability
B. Confidentiality, Authentication, Message Integrity, Access & Availability ✓
C. Encryption, Compression, Routing, Forwarding
D. TCP, IP, HTTP, DNS
Câu 79: Confidentiality nghĩa là gì?
A. Tất cả đều biết message
B. Only sender, intended receiver should "understand" message contents ✓
C. Message công khai
D. Không mã hóa
Câu 80: Để đạt Confidentiality, sender làm gì?
A. Gửi plaintext
B. Encrypts message ✓
C. Sign message
D. Hash message
Câu 81: Authentication nghĩa là gì?
A. Mã hóa message
B. Confirm identity of each other ✓
C. Tăng tốc độ
D. Nén dữ liệu
Câu 82: Message Integrity nghĩa là gì?
A. Message nhanh
B. Message ngắn
C. Ensure message not altered without detection ✓
D. Message được mã hóa
Câu 83: Access and Availability nghĩa là gì?
A. Chỉ admin truy cập
B. Không ai truy cập được
C. Services must be accessible and available to users ✓
D. Chỉ mở vào ban ngày
Câu 84: Trong network security, Alice và Bob là ai?
A. Real attackers
B. Lovers! Want to communicate securely ✓
C. Routers
D. Firewalls
Câu 85: Trudy trong network security là ai?
A. Helper
B. Intruder - may intercept, delete, add messages ✓
C. Certificate Authority
D. Administrator
Câu 86: Trong thực tế, Alice & Bob có thể là gì?
A. Chỉ người thật
B. Web browser/server, DNS servers, BGP routers, online banking ✓
C. Chỉ routers
D. Chỉ servers
PHẦN 8: ATTACKS¤
Câu 87: Eavesdrop attack là gì?
A. Xóa messages
B. Intercept messages ✓
C. Tạo messages giả
D. Từ chối service
Câu 88: Impersonation (Spoofing) là gì?
A. Nghe lén
B. Fake (spoof) source address in packet ✓
C. Xóa packets
D. Làm chậm network
Câu 89: Hijacking attack là gì?
A. Nghe lén connection
B. "Take over" ongoing connection by removing sender/receiver ✓
C. Tạo connection mới
D. Mã hóa connection
Câu 90: Denial of Service (DoS) làm gì?
A. Cải thiện service
B. Prevent service from being used by others (overload resources) ✓
C. Tăng tốc service
D. Backup service
Câu 91: Packet sniffing hoạt động trên media nào?
A. Chỉ wired
B. Broadcast media (shared Ethernet, wireless) ✓
C. Chỉ fiber optic
D. Chỉ satellite
Câu 92: Packet sniffing sử dụng gì?
A. Normal network interface
B. Promiscuous network interface ✓
C. Firewall
D. Router
Câu 93: Packet sniffing có thể capture được gì?
A. Chỉ headers
B. Chỉ payloads
C. ALL packets including passwords! ✓
D. Chỉ broadcast packets
Câu 94: Tool nào là packet sniffer?
A. Notepad
B. Wireshark ✓
C. Chrome
D. Excel
Câu 95: Alternatives của Wireshark?
A. Word, Excel
B. tcpdump, scapy ✓
C. Firefox, Safari
D. PowerPoint, Outlook
Câu 96: IP Spoofing là gì?
A. Mã hóa IP
B. Injection of packet with FALSE source address ✓
C. Tăng tốc IP
D. Backup IP
Câu 97: DoS attack hoạt động như thế nào?
A. Improve resources
B. Select target → break into hosts → send packets from compromised hosts ✓
C. Protect target
D. Monitor target
Câu 98: DoS attack sử dụng gì để tấn công?
A. One powerful computer
B. Botnet - compromised hosts around network ✓
C. Chỉ router
D. Chỉ switch
Câu 99: Mục đích của DoS attack?
A. Improve availability
B. Make resources unavailable by overwhelming with bogus traffic ✓
C. Increase speed
D. Backup data
PHẦN 9: DEFENSE¤
Câu 100: Authentication trong defense là gì?
A. Mã hóa data
B. Proving you are who you say you are ✓
C. Tăng tốc độ
D. Nén data
Câu 101: Cellular networks authentication dùng gì?
A. Password
B. Hardware identity via SIM card ✓
C. Fingerprint
D. Face recognition
Câu 102: Traditional Internet có hardware assist cho authentication không?
A. Có, rất nhiều
B. No such hardware assist ✓
C. Chỉ một số
D. Tất cả đều có
Câu 103: Confidentiality defense đạt được qua gì?
A. Firewall
B. Encryption ✓
C. Antivirus
D. Backup
Câu 104: Integrity checks sử dụng gì?
A. Antivirus
B. Digital signatures ✓
C. Firewall
D. VPN
Câu 105: Digital signatures làm gì?
A. Mã hóa data
B. Prevent/detect tampering ✓
C. Tăng tốc độ
D. Nén data
Câu 106: Access restrictions sử dụng gì?
A. Open network
B. Password-protected VPNs ✓
C. No password
D. Public access
Câu 107: Firewalls là gì?
A. Physical walls
B. Specialized "middleboxes" in access and core networks ✓
C. Software only
D. Hardware only
Câu 108: Firewalls hoạt động theo nguyên tắc gì?
A. Allow all
B. Off-by-default: filter incoming packets ✓
C. Block all
D. Random filtering
Câu 109: Firewalls restrict gì?
A. Chỉ senders
B. Chỉ receivers
C. Senders, receivers, applications ✓
D. Chỉ protocols
Câu 110: Firewalls có thể làm gì với DoS?
A. Không thể làm gì
B. Detecting/reacting to DoS attacks ✓
C. Chỉ detect
D. Chỉ log
PHẦN 10: AUTHENTICATION PROTOCOLS¤
Câu 111: Protocol ap1.0 - Alice says "I am Alice" - có an toàn không?
A. Rất an toàn
B. An toàn một phần
C. KHÔNG an toàn - Trudy can declare herself as Alice ✓
D. An toàn với encryption
Câu 112: Protocol ap2.0 thêm gì so với ap1.0?
A. Password
B. Alice's IP address ✓
C. Encryption
D. Digital signature
Câu 113: Vấn đề của Protocol ap2.0?
A. Quá chậm
B. Trudy can spoof Alice's IP address ✓
C. Quá phức tạp
D. Cần hardware
Câu 114: Protocol ap3.0 thêm gì so với ap2.0?
A. IP address mới
B. Alice's password ✓
C. Certificate
D. Nonce
Câu 115: Vấn đề của Protocol ap3.0?
A. Password quá ngắn
B. Playback attack - Trudy records and replays packet ✓
C. Password quá dài
D. Không có vấn đề
Câu 116: Protocol ap3.1 encrypt password có giải quyết playback attack không?
A. Có, hoàn toàn
B. KHÔNG - playback attack STILL works ✓
C. Một phần
D. Tùy thuộc encryption
Câu 117: Tại sao ap3.1 vẫn bị playback attack?
A. Encryption yếu
B. Trudy không cần biết password, chỉ cần replay encrypted packet ✓
C. Password ngắn
D. IP spoofing
Câu 118: Nonce là gì?
A. Nonsense number
B. Number used only ONCE-in-a-lifetime ✓
C. Normal number
D. Negative number
Câu 119: Protocol ap4.0 sử dụng gì?
A. Password only
B. Nonce (challenge-response) với shared secret key ✓
C. IP address
D. Certificate
Câu 120: Quy trình ap4.0?
A. Alice sends password
B. Bob sends R (nonce) → Alice returns K(R) encrypted with shared key ✓
C. Alice sends IP
D. Bob sends password
Câu 121: Tại sao ap4.0 an toàn?
A. Password mạnh
B. Bob knows Alice is LIVE, only Alice knows key to encrypt nonce ✓
C. IP không thể spoof
D. Encryption mạnh
Câu 122: Nhược điểm của ap4.0?
A. Quá chậm
B. Requires shared symmetric key ✓
C. Quá phức tạp
D. Không an toàn
Câu 123: Protocol ap5.0 sử dụng gì thay cho shared key?
A. Longer password
B. Public key cryptography ✓
C. Multiple passwords
D. Hardware token
Câu 124: Trong ap5.0, Alice gửi gì cho Bob?
A. Password
B. Public key và encrypted nonce
C. K_A^-(R) - signed with private key ✓
D. Chỉ public key
Câu 125: Bob verify ap5.0 như thế nào?
A. Decrypt với shared key
B. K_A+(K_A-(R)) = R - decrypt with Alice's public key ✓
C. Check password database
D. Ask CA
Câu 126: Vấn đề CHÍNH của ap5.0?
A. Quá chậm
B. Man-in-the-Middle (MITM) attack ✓
C. Public key quá dài
D. Không an toàn
Câu 127: Trong MITM attack, Trudy làm gì?
A. Chỉ nghe lén
B. Poses as Alice (to Bob) AND as Bob (to Alice) ✓
C. Chỉ block messages
D. Chỉ modify messages
Câu 128: Trong MITM, Trudy gửi public key nào cho Bob?
A. Alice's public key
B. Trudy's public key (claims it's Alice's!) ✓
C. Bob's public key
D. CA's public key
Câu 129: Kết quả của MITM attack?
A. Bob phát hiện Trudy
B. Alice phát hiện Trudy
C. Trudy intercepts ALL communication, Bob thinks talking to Alice ✓
D. Không có hậu quả
Câu 130: Giải pháp cho MITM attack?
A. Longer keys
B. Stronger encryption
C. Certification Authorities (CA) - certified public keys ✓
D. Faster computers
Câu 131: CA viết tắt của gì?
A. Computer Algorithm
B. Certification Authority ✓
C. Cryptographic Authentication
D. Certificate Analyzer
Câu 132: CA làm gì?
A. Mã hóa messages
B. Binds public key to particular entity E ✓
C. Tạo private keys
D. Routing packets
Câu 133: Entity phải làm gì khi register với CA?
A. Chỉ gửi public key
B. Provides "proof of identity" to CA ✓
C. Trả tiền
D. Không cần làm gì
Câu 134: CA tạo gì sau khi verify identity?
A. Private key
B. Certificate binding identity E to E's public key ✓
C. Password
D. IP address
Câu 135: Certificate được sign bằng gì?
A. Entity's private key
B. CA's private key ✓
C. Entity's public key
D. CA's public key
Câu 136: Certificate chứa gì?
A. Chỉ public key
B. Chỉ identity
C. Entity's identifying information VÀ entity's public key, signed by CA ✓
D. Chỉ signature
Câu 137: Khi Alice muốn Bob's public key, Alice làm gì?
A. Hỏi Bob trực tiếp
B. Google search
C. Gets Bob's certificate, applies CA's public key to decrypt signature ✓
D. Tạo key mới
Câu 138: Alice verify certificate bằng gì?
A. Bob's private key
B. Alice's private key
C. CA's public key (widely known & trusted) ✓
D. Bob's public key
Câu 139: Sau khi verify certificate, Alice có được gì?
A. Bob's private key
B. Bob's public key (chắc chắn đúng!) ✓
C. CA's private key
D. Shared secret key
Câu 140: Tại sao CA's signature không thể forge (giả mạo)?
A. Quá dài
B. Chỉ CA có CA's private key để sign ✓
C. Encryption mạnh
D. Hardware protection
Câu 141: Trong Pizza Prank example, Trudy làm gì?
A. Order pizza cho mình
B. Order pizza "from Bob", sends her public key claiming it's Bob's ✓
C. Hủy order của Bob
D. Đánh cắp pizza
Câu 142: Pizza Store verify như thế nào trong Pizza Prank?
A. Call Bob
B. Verifies signature with Trudy's key (thinking it's Bob's) ✓
C. Check database
D. Ask CA
Câu 143: Kết quả của Pizza Prank?
A. Trudy bị bắt
B. Bob nhận 4 pepperoni pizzas (Bob doesn't even like pepperoni!) ✓
C. Pizza Store phát hiện lừa đảo
D. Không có hậu quả
Câu 144: Certificate giải quyết Pizza Prank như thế nào?
A. Không giải quyết được
B. CA certifies Bob's real public key, Pizza Store can verify ✓
C. Chỉ làm chậm attack
D. Tăng chi phí attack
Câu 145: CA's public key phải như thế nào?
A. Bí mật
B. Widely known & trusted ✓
C. Thay đổi thường xuyên
D. Khác nhau mỗi user
ĐÁP ÁN NHANH (Câu 1-145)¤
1.B 2.C 3.B 4.B 5.B 6.B 7.D 8.B 9.B 10.C 11.B 12.C 13.C 14.C 15.B 16.C 17.B 18.C 19.C 20.C 21.B 22.B 23.C 24.B 25.B 26.B 27.B 28.B 29.B 30.B 31.B 32.B 33.B 34.B 35.C 36.B 37.B 38.B 39.C 40.B 41.B 42.B 43.B 44.C 45.B 46.B 47.B 48.B 49.B 50.C 51.B 52.B 53.B 54.B 55.C 56.C 57.B 58.C 59.B 60.B 61.C 62.C 63.C 64.B 65.B 66.C 67.B 68.C 69.B 70.C 71.B 72.B 73.B 74.B 75.B 76.B 77.C 78.B 79.B 80.B 81.B 82.C 83.C 84.B 85.B 86.B 87.B 88.B 89.B 90.B 91.B 92.B 93.C 94.B 95.B 96.B 97.B 98.B 99.B 100.B 101.B 102.B 103.B 104.B 105.B 106.B 107.B 108.B 109.C 110.B 111.C 112.B 113.B 114.B 115.B 116.B 117.B 118.B 119.B 120.B 121.B 122.B 123.B 124.C 125.B 126.B 127.B 128.B 129.C 130.C 131.B 132.B 133.B 134.B 135.B 136.C 137.C 138.C 139.B 140.B 141.B 142.B 143.B 144.B 145.B
BẢNG TÓM TẮT NHANH - CHƯƠNG 5¤
1. INTERNET BASICS¤
- Hosts = End systems billions connected
- Packet switches: Routers, Switches
- Internet = "Network of networks"
- Protocols: HTTP, TCP, IP, WiFi, Ethernet
- Standards: RFC, IETF
2. INTERNET HISTORY - KEY DATES¤
- 1983: TCP/IP, DNS
- 1982: SMTP
- 1985: FTP
- 1988: TCP congestion control
- 1991: Commercial use
- 1994: Mosaic browser
- 2008: SDN
- 2017: Smartphones > fixed, ~18B devices
3. FORWARDING VS ROUTING¤
- Forwarding: LOCAL action, move packets input→output
- Routing: GLOBAL action, determine paths, routing algorithms
4. PACKET DELAY¤
- d_nodal = d_proc + d_queue + d_trans + d_prop
- d_proc: < μs, check errors, determine output
- d_queue: depends on congestion
- d_trans = L/R: push bits onto link
- d_prop = d/s: bits propagate through link
- d_trans ≠ d_prop!
5. PROTOCOL STACK (5 LAYERS)¤
- Application: HTTP, DNS, SMTP - Message
- Transport: TCP, UDP - Segment (Ht|M)
- Network: IP, routing - Datagram (Hn|Ht|M)
- Link: Ethernet, WiFi - Frame (Hl|Hn|Ht|M)
-
Physical: Bits
-
Switch: Link layer
- Router: Network layer
- Host: Full stack
6. OSI MODEL (7 LAYERS)¤
- Internet Stack + Presentation + Session
- If needed → implement in application
7. NETWORK SECURITY GOALS¤
- Confidentiality: Encryption/Decryption
- Authentication: Confirm identity
- Message Integrity: Detect tampering
- Access & Availability: Services accessible
8. ATTACKS¤
- Eavesdrop: Intercept messages
- Spoofing: Fake source address
- Hijacking: Take over connection
- DoS: Overwhelm resources with bogus traffic
- Packet Sniffing: Promiscuous mode, capture all (Wireshark)
9. DEFENSE¤
- Authentication: Proving identity (SIM card)
- Confidentiality: Encryption
- Integrity: Digital signatures
- Access: Password-protected VPNs
- Firewalls: Off-by-default filtering
10. AUTHENTICATION EVOLUTION¤
- ap1.0: "I am Alice" → ✗ Trudy declares
- ap2.0: + IP address → ✗ IP spoofing
- ap3.0: + Password → ✗ Playback attack
- ap3.1: + Encrypted password → ✗ Still playback
- ap4.0: + Nonce (R) + shared key → ✓ OK but needs shared key
- ap5.0: + Public key → ✗ MITM attack
- Solution: CA (Certificates) → ✓ SECURE!
11. CERTIFICATES¤
- CA binds public key to entity
- Certificate = [Identity | Public Key] signed by CA's private key
- Alice gets Bob's cert → verify with CA's public key → get Bob's public key
- CA's public key: widely known & trusted
CHUẨN BỊ THI: Nhớ kỹ 4 delay types, 5 layers (chức năng + PDU), attacks vs defenses, authentication protocols evolution, và vai trò của CA!