This is a beta course, so its structure, chapters, and examples may continue to change.
Fundamental Concepts of Computer Networks
The computer network is the core infrastructure of modern information technology. This page covers its basic concepts, component structure, functional characteristics, and classification.
A computer network is a system of interconnected computers and their peripheral devices that share resources and exchange information according to network protocols.
Key Aspects of the Definition
- Interconnection: multiple computers are connected through communication links
- Protocol conformance: communication follows a unified set of network protocols
- Sharing: hardware, software, and data resources are shared
- Distribution: the computer systems are geographically dispersed
A computer network consists of the following parts:
1. Host Systems
- Function: provide computing and storage capacity
- Types: servers, workstations, personal computers
- Characteristic: have independent processing capability
2. Communication Subnet
- Transmission media: twisted pair, optical fibre, wireless, and so on
- Switching equipment: routers, switches, hubs, and so on
- Function: carry out data transfer and route selection
3. Network Protocols
- Purpose: define the rules and formats of communication
- Layers: a layered protocol hierarchy
- Standards: ensure interoperability between devices from different vendors
1. Data Communication
- File transfer: move files between different computers
- Electronic mail: provide electronic communication service
- Remote login: let users access other computers remotely
- Real-time communication: support real-time traffic such as voice and video
2. Resource Sharing
- Hardware sharing: printers, scanners, storage devices, and so on
- Software sharing: applications, databases, and so on
- Data sharing: files, database contents, and other information
- Computing resources: shared CPU time and memory
3. Distributed Processing
- Load balancing: distribute tasks across several computers
- Parallel computing: several computers work together on a complex computation
- Fault tolerance: a single point of failure does not bring down the whole system
- Scalability: the system grows in size as demand requires
4. Improved Reliability
- Redundancy: backup for critical devices and links
- Fault recovery: faults are detected and repaired automatically
- Data backup: important data is kept in multiple copies
- Service continuity: services stay available
By Geographic Range
1. Wide Area Network (WAN)
- Coverage: spans cities, countries, or the whole globe
- Transmission distance: tens to thousands of kilometres
- Transmission rate: relatively low, typically a few Mbps to a few Gbps
- Typical applications: the Internet, corporate WANs
- Technical characteristics: uses public communication facilities, so the cost is high
2. Metropolitan Area Network (MAN)
- Coverage: covers a single city or region
- Transmission distance: a few to tens of kilometres
- Transmission rate: moderate, typically tens of Mbps to a few Gbps
- Typical applications: city networks, campus networks
- Technical characteristics: sits between a LAN and a WAN
3. Local Area Network (LAN)
- Coverage: within a building or a campus
- Transmission distance: a few hundred metres to a few kilometres
- Transmission rate: high, typically 10Mbps to 10Gbps
- Typical applications: office networks, home networks
- Technical characteristics: high rate, low delay, relatively low cost
4. Personal Area Network (PAN)
- Coverage: around a single person’s devices
- Transmission distance: a few to tens of metres
- Transmission rate: low, typically a few Mbps to a few hundred Mbps
- Typical applications: Bluetooth devices, wireless earphones
- Technical characteristics: short range, low power consumption
By Topology
1. Bus Topology
- Structural characteristics: every device connects to one shared transmission line
- Advantages: simple structure, low cost, easy to extend
- Disadvantages: a failure affects a wide area, and transmission efficiency drops as devices are added
- Typical applications: early Ethernet
2. Star Topology
- Structural characteristics: every device connects to a central node
- Advantages: good fault isolation, easy management, convenient expansion
- Disadvantages: a failure of the central node affects the whole network, and the cost is high
- Typical applications: modern Ethernet, wireless networks
3. Ring Topology
- Structural characteristics: devices are linked in a closed loop
- Advantages: high transmission efficiency, easy fault localization
- Disadvantages: a single point of failure affects the whole network, and expansion is difficult
- Typical applications: token ring, FDDI
4. Mesh Topology
- Structural characteristics: devices have several connection paths between them
- Advantages: high reliability, many possible transmission paths
- Disadvantages: expensive, complex to manage
- Typical applications: Internet backbone, military networks
By Users
1. Public Network
- Characteristics: open to the general public
- Management: operated by a telecommunications carrier
- Charging: billed according to usage
- Typical applications: the Internet, the telephone network
2. Private Network
- Characteristics: serves a specific organization or group of users
- Management: run by the organization itself
- Charging: usually not charged to outsiders
- Typical applications: corporate intranets, banking networks
// Network type enumeration
typedef enum {
NETWORK_TYPE_WAN = 0,
NETWORK_TYPE_MAN = 1,
NETWORK_TYPE_LAN = 2,
NETWORK_TYPE_PAN = 3
} NetworkType;
// Topology enumeration
typedef enum {
TOPOLOGY_BUS = 0,
TOPOLOGY_STAR = 1,
TOPOLOGY_RING = 2,
TOPOLOGY_MESH = 3
} TopologyType;
// Network classification structure
typedef struct {
NetworkType type;
TopologyType topology;
char name[64];
int max_distance; // Maximum transmission distance (metres)
int max_bandwidth; // Maximum bandwidth (Mbps)
int device_count; // Number of devices
} NetworkClassification;
// Network classification function
NetworkClassification classify_network(NetworkType type, TopologyType topology) {
NetworkClassification net;
net.type = type;
net.topology = topology;
switch(type) {
case NETWORK_TYPE_WAN:
net.max_distance = 1000000; // 1000km
net.max_bandwidth = 1000; // 1Gbps
strcpy(net.name, "Wide Area Network");
break;
case NETWORK_TYPE_MAN:
net.max_distance = 50000; // 50km
net.max_bandwidth = 10000; // 10Gbps
strcpy(net.name, "Metropolitan Area Network");
break;
case NETWORK_TYPE_LAN:
net.max_distance = 5000; // 5km
net.max_bandwidth = 10000; // 10Gbps
strcpy(net.name, "Local Area Network");
break;
case NETWORK_TYPE_PAN:
net.max_distance = 100; // 100m
net.max_bandwidth = 100; // 100Mbps
strcpy(net.name, "Personal Area Network");
break;
}
return net;
}