Chapter 1: Introduction to Computer Networks

莊博丞 Eddie avatar
  • 莊博丞 Eddie
  • 4 min read

1. Internet

  • “Nuts and Bolts” view:
    • Millions of connected devices (hosts = end systems)
    • Using network applications
    • Connected via communication links (fiber, copper, radio, satellite).
    • Routers forward data packets.
  • Service View:
    • Internet provides services to applications like the web, VoIP, email, e-commerce.
    • Applications use Internet protocols (TCP, IP, HTTP, etc.).

2. Protocol (通訊協定)

  • A set of rules for sending/receiving messages (e.g., TCP, IP).
  • Human protocols:include phrases like “What’s the time?” or “I have a question.”
  • Network protocols:govern communication between machines.
  • Protocols define format(Syntax and Semantics). order of msgs sent and received, and action taken on msg transmission.
  • Internet Standards:IETF (Internet Engineering Task Force)

3. Network Edge

  • End Systems (Hosts): Clients and servers running applications (e.g., web, email).
  • Client-Server Model: Clients request services from always-on servers.
  • Peer-to-Peer Model (P2P): Minimal (or no) use of dedicated servers (e.g., Skype, BitTorrent).

3.1 Network Edge Data Transfer

  • TCP (Transmission Control Protocol): Provides reliable, in-order data transfer, flow control, and congestion control.
    • Flow control: Sender won’t overwhelm receiver
    • Congestion control: Sender will slow down the sending rate when network congested
    • Examples: HTTP, FTP, SMTP(Email), Telnet(Remote Login)
  • UDP (User Datagram Protocol):
    • Disadvantage but also an advantage
      • connectionless
      • unreliable
      • no flow control
      • no congestion control
    • Examples: Streaming media, DNS, Internet telephony, teleconferencing.

3.2 Access Network

DSL(Digital Subscriber Line)

  • Single user single line

Cable Network

  • Different channels transmitted in different frequency bands
  • Unlike DSL, which has dedicated access to central office

Wireless

  • Wireless LANs (WIFI)
  • Cellular

3.3 Sending Packets

  • Breaks into smaller chunks, known as packets, of length L bits
  • Transmission Rate (R)(bits/sec): transmits packet into access network.
  • Transmission Delay(sec): L(bits) / R(bits/sec)

4. Network Core

4.1 Packet Switching (封包交換)

  • Small Packets: Breaks messages into smaller packets and forwards them through routers.
  • Store and Forward: entire packet must arrive at router before it can be transmitted on next link
  • Queueing delay, loss:
    • packets will queue, waited to be transmitted on link
    • packets can be dropped(lost) if memory fills up

4.2 Circuit Switching (電路交換)

  • Reserves end-to-end resources for a connection (e.g., in traditional telephone networks).
  • 為每個user保留傳輸線路
  • FDM(分頻多工) vs TDM(分時多工)

4.3 Packet Switching V.S. Circuit Switching

  • 網際網路目前主要採用「Packet Switching」作為主要的傳輸方式。
  • 情境:
    • 總頻寬1Mb/s,每個User會使用100kb/s(active 10% of time)
    • Circuit Switching: 10 users
    • Packet Switching: with 35 users (probability > 10 active at same time is less than .0004)
    • Conclusion: Packet Switching allows more users to use network
  • Excessive congestion possible: packet delay and loss

4.4 Internet Structure

A network of networks, with ISPs(Internet service provider) connected at various levels.


5. Delay, Loss, and Throughput

5.1 Four sources of packet delay

  1. Nodal Processing(節點處理)
  2. Queuing
  3. Transmission
  4. Propagation

5.2 Trace route program

Provides delay measurement from source to router along end-end Internet path towards destination. For all i:

  • sends three packets(預防封包遺失) that will reach router i on path towards destination
  • router i will return packets to sender
  • sender times interval between transmission and reply.
  • 白話:我傳給你,你回傳給我,計算時間差
  • 可以用 tracert <IP>(Windows)、traceroute <IP>(Mac)來完成trace route

5.3 Packet Loss

  • Occurs when the buffer fills up, leading to dropped packets.

5.4 Throughput(流量)

  • The rate of data transfer between sender and receiver. The bottleneck link limits throughput.
  • 白話:資訊在網路流動的速度
  • Different type of measuring throughput.
    • instantaneous: rate at given point in time(極短的時間,但不是瞬時)
    • average: rate over long(er) period of time(一段時間)
  • Bottleneck: a section of network transmission the determine the average throughput, usually the smallest one.
    • EX. Server → $R_s$ → $R_c$ → Client
    • If $R_s$ > $R_c$, then $R_c$ is the bottleneck.

6. Protocol Layers and Service Models:

  • Internet Protocol Stack(實務):
    1. Application: Supports network applications (e.g., FTP, HTTP).
    2. Transport: Process-to-process data transfer (e.g., TCP, UDP).
    3. Network: Routing of data from source to destination (e.g., IP).
    4. Link: Data transfer between neighboring network elements (e.g., Ethernet, Wi-Fi).
    5. Physical: Transmission of raw bits across the physical medium.

筆記整理

  • 可以發現越上面的階層越接近我們日常可能會看到的領域
  • 從軟體層面→硬體層面
  • EX. FTP→TCP→IP→Ethernet→Fiber Optic Cable
  • ISO/OSI Reference Model(理論)
    • presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions
    • session: synchronization, checkpointing, recovery of data exchange

7. Security:

  • Malware: Viruses, worms, spyware can infect hosts via the Internet.
  • Denial of Service (DoS) Attacks: Overwhelm servers or networks with traffic.
  • Packet Sniffing & IP Spoofing: Methods for attackers to intercept or disguise data.

8. History:

  • 1960s: Early packet-switching principles developed.
  • 1970s: ARPAnet created and expanded, introduction of protocols like NCP and early email.
  • 1980s: Deployment of TCP/IP, creation of DNS, and proliferation of networks (CSnet, BITnet).
  • 1990s: Commercialization of the Internet and the rise of the World Wide Web.
  • 2000s: The emergence of online social networks, cloud services, and mobile devices.
  • Present: Billions of devices connected to the Internet, with increasing wireless broadband access and extensive cloud computing.
莊博丞 Eddie

莊博丞 Eddie

交大百川 資工核心、SenioRS站長、Project EDU創辦人兼任負責人。

Recommended for You