ZJU Computer Networks Course Documentation (2025-2026)

website·Indexed 31 days ago

https://zjucomp.net

Course documentation for the 2025-2026 academic year Computer Networks course at Zhejiang University, taught by Lu Xiqun. It includes detailed guides and resources for Labs 1-8, covering Wireshark packet analysis, GNS3 network simulation, VLAN configuration, RIP, OSPF, BGP, and Socket programming. The site also provides lecture notes on the Physical, Data Link, Network, Transport, and Application layers, along with a technical terminology glossary and toolchain configuration for Windows and WSL.

Tokens
48.4K
Snippets
165
Records
349
Agent score
56%

What's inside ZJU Computer Networks Course Docs

  1. Overview of Computer Networks Course Labs (2025-2026)

    The course provides a series of labs covering network protocol analysis, switching, routing, and socket programming. For Labs 1-6, students can choose between a standard guide and a 'detailed guided version' (详解引导版) which introduces knowledge points incrementally.
  2. Understand HTTP Caching, Replication, and CDN

    Key concepts for optimizing web content delivery:

    • Caching: Reduces the need to reload data by storing copies of resources locally or at intermediaries.
    • Server Replication: Distributes load across multiple servers to prevent a single server from being overwhelmed (load balancing).
    • CDN (Content Delivery Network): Caches popular content on geographically distributed servers to reduce latency and save origin server resources.
  3. Reference general network architecture terminology

    General terms used to describe the structure and tools of network systems.

    Terms include:

    • OSI Model (OSI 模型)
    • Physical/Data Link/Network/Transport/Application Layer (物理层/数据链路层/网络层/传输层/应用层)
    • Protocol Stack (协议栈)
    • Wireshark (抓包工具)
    • Capture Filter (捕获过滤器)
  4. Common network protocols overview

    The following protocols are commonly analyzed during network capture experiments:

    • HTTP (HyperText Transfer Protocol): Transmits web content between browsers and servers.
    • DNS (Domain Name System): Translates domain names into IP addresses.
    • TCP (Transmission Control Protocol): Ensures stable and reliable data transmission.
    • ICMP (Internet Control Message Protocol): Used for network diagnostics and reporting status.
    • ARP (Address Resolution Protocol): Resolves IP addresses to physical (MAC) addresses within a local area network (LAN).
  5. Network Architecture and OSI Model Terminology

    General terminology related to network architecture and the OSI model, including the primary layers and fundamental concepts.
  6. BGP Routing Concepts and Path Selection

    Key BGP concepts for developers and network engineers:

    • AS Numbers: Private AS numbers range from 64512 to 65534.
    • Neighbor Types: iBGP (Internal) neighbors are in the same AS; eBGP (External) neighbors are in different ASes.
    • Route Status: * indicates a valid route, > indicates the best route, i indicates an internal route, and r indicates a route rejected during routing table write (often due to a higher priority internal route like OSPF).
    • Best Path Selection: By default, BGP selects the path that traverses the fewest number of ASes, regardless of interface bandwidth.
  7. Key topics for Computer Architecture

    Ensure thorough mastery of the detailed steps and concepts for the following high-probability exam topics:

    • Cache Coherency Protocols (at least one will be tested).
    • Execution Algorithms: Scoreboard algorithm, Tomasulo algorithm, or Superscalar variants (at least one will be tested).
    • Recommended Materials: Use PPTs from Professor JXH's class for concise content.
  8. Calculate system performance using Little's Result and Queueing formulas

    Use these fundamental equations to analyze system delays and queue lengths:

    • Average Time in System (T): T = x̃ + W (where x̃ is average service time and W is average waiting time).
    • Little's Result: N̄ = λT (Average number of customers in system = arrival rate × average time in system).
    • Average Queue Size (N̄_q): N̄_q = λW.
    • Multi-server Relation: N̄_q = N̄ - mρ (Average queue size = total customers in system minus those currently being served by m servers).
  9. Understand HTTP and TCP layering in network captures

    In network analysis, HTTP is observed as being 'wrapped' inside TCP. This is because HTTP is an application-layer protocol that relies on TCP (transport layer) to ensure reliable delivery of the request-response model between a browser and a server. Addressing is handled by a combination of the IP address (host-to-host) and the Port number (process-to-process).
  10. Reference networking terminology for the Physical Layer

    Key terms and concepts associated with the Physical Layer of the network architecture, covering transmission media, signaling, and hardware.

    Terms include:

    • Twisted Pair Cable (双绞线)
    • Fiber Optics (光纤)
    • Coaxial Cable (同轴电缆)
    • Circuit Switching (电路交换)
    • Baud Rate (波特率)
    • Baseband Transmission (基带传输)
    • 4B/5B scheme (4B/5B编码)
    • Bandwidth (带宽)
    • Codec (编解码器)
    • Modem (调制解调器)
    • Modulation and Demodulation (调制与解调)
    • Propagation Time (传播时间)
  11. Design a request-response dispatch system for Socket communication

    To maintain high cohesion and low coupling, separate the request dispatching logic from the actual business logic. Use a handler-based architecture where a central loop receives data, parses the request type, and delegates the task to a specific function.

    Server-side Responsibilities:

    • Disconnect Request: Remove client records and terminate the associated handler thread.
    • Info Requests (Time/Name/List): Assemble and send response packets based on the protocol.
    • Message Requests: Forward messages to the target client and return a success/failure response to the sender.

    Client-side Responsibilities:

    • Function Calls: Assemble request packets for the server based on user input.
    • Message Presentation: Because user input is blocking, use a dedicated thread to monitor the Socket for incoming messages/responses and display them to the user in real-time.
    // Conceptual framework for request dispatching
    pkt func1Handler(params) { /* business logic */ return response; }
    pkt func2Handler(params) { /* business logic */ return response; }
    
    void connectionHandler(int socket) {
        while (!shouldExit) {
            // 1. recv() request from client
            // 2. Parse request type
            if (type == FUNC1) {
                pkt res = func1Handler(params);
                send(socket, res);
            }
            else if (type == FUNC2) {
                pkt res = func2Handler(params);
                send(socket, res);
            }
        }
    }
  12. Understand the Web browser request lifecycle

    The general process for a browser to load a webpage involves:

    1. DNS Resolution: Resolving the URL to a server IP address.
    2. Connection Establishment: Establishing a TCP/IP connection (typically port 80 for HTTP, 443 for HTTPS).
    3. Sending Request: The browser sends an HTTP request message.
    4. Server Processing: The server processes the request and returns an HTTP response message.
    5. Closing Connection: In HTTP/1.0, the connection is closed immediately after the response. In HTTP/1.1+, connections may be kept alive (persistent connections) to reuse for subsequent resource requests (CSS, JS, images).