The 11th Chapter Network programming
11.1 Client-Server programming model
1. One server process, managing a resource, operates this resource to provide a service to its clients.
2. One or more client processes.
3. Basic operations: Transactions
- When a client needs a service, it sends a request to the server to initiate a transaction. -
- After the server receives the request, it interprets it and operates its resources in the appropriate manner.
- The server sends a corresponding message to the client and waits for the next request.
- The client receives a response and processes it.
Note: Both the client and the server are processes.
11.2 Network
(1) for the host: The network is an I/O device
Data received from the network is copied from the adapter through the I/O and memory bus to the memory, typically via DMA (direct memory access).
(2) Physically: The network is a hierarchical system based on geographical distance
The bottom: LAN (LAN), the most popular is the Ethernet,
Ethernet Segment
- Includes some cables and hubs. Each cable has the same maximum bit bandwidth, and the hub replicates every bit that is received on one port to all other ports, so each host can see each bit.
- Each Ethernet adapter has a globally unique 48-bit address stored on the adapter's non-volatile memory.
- A host can send one segment: frame, to any other host in this network. Each frame consists of a fixed number of head bits (identifying the source and destination address and frame length of this frame) and data bits (payloads). Each host can see this frame, but only the destination host can read it.
- With cables and bridges, multiple Ethernet segments can be connected to a larger LAN, known as bridged Ethernet. The bandwidth of these cables can be different.
- Multiple incompatible LANs can be connected by a special computer called a router to form an Internet internetwork.
(3) Agreement
Important features of the Internet: the use of different technologies, non-compatible LAN and WAN composition, and can make it communicate with each other. The solution to communication between different networks is a layer of protocol software running on each host and router, eliminating the differences between different networks.
Two basic capabilities provided by the Protocol
- Naming mechanism: Uniquely identifies a single host
- Transfer mechanism: Defines the same way that data bits are bundled into discontinuous slices
(4) Global IP Internet
Information Security system Design Fundamentals 12th Week Study summary-Lu Songhon