Computer Network
lastmod 2026-09-15created 2014-01-1166 edits
| (covered on a separate page)
|
A computer network is a set of distributed computers connected by a communication network.
Commands between calculating machines and early computers were mostly relayed directly by humans. In September 1940, George Stibitz used a teletype machine to send commands to the Complex Number Calculator in New York and receive the results. Connecting output systems such as teletypes to computers was a matter of great interest to J.C.R. Licklider in 1962, when he developed a working group called the so-called 'interplanetary network'. This 'interplanetary network' later became the predecessor of ARPANET.
Categories
- ComputerNetwork:Basic - Computer network basics
- Container network (Docker:Network)
- L4 Switch#Network engineer Hwanyeong's tech blog : Understanding L4 switches easily - Recommended tutorial
- Air-Gap - A physically isolated network environment
- Network segment
- Rate limiting
- Debian:NetworkConfiguration - Debian network configuration
- Ubuntu:NetworkConfiguration - Ubuntu network configuration
- ArchLinux:Network
- netplan - To set a static IP on Ubuntu, see Netplan#How to set a static IP.
- Linux:Network
Detecting IP conflicts
See arp-scan#Detecting IP conflicts.
Communicating between two or more PCs over a direct connection
- Wangjaengi's Computer Journey : Naver Blog - Connecting two PCs directly - wired/wireless LAN card setup 1
How to connect a network or the Internet between PCs without a router:
Check the name of each network interface (Ethernet port) connected to the server. Ethernet interfaces are usually shown as "eth0," "eth1," "eth2," "eth3," and so on. You can check with the following command.
Configure a different subnet for each Ethernet port. For example, you can set eth0 to 192.168.1.1/24, eth1 to 192.168.2.1/24, eth2 to 192.168.3.1/24, and eth3 to 192.168.4.1/24.
sudo ifconfig eth0 192.168.1.1/24 up
sudo ifconfig eth1 192.168.2.1/24 up
sudo ifconfig eth2 192.168.3.1/24 up
sudo ifconfig eth3 192.168.4.1/24 up
You need to set up routing for direct communication through each Ethernet port. Add routing rules so that traffic is sent to the correct Ethernet port. The subnets must be different from each other
sudo ip route add 192.168.2.0/24 dev eth1
sudo ip route add 192.168.3.0/24 dev eth2
sudo ip route add 192.168.4.0/24 dev eth3
(Optional) If needed, you can set firewall rules to allow or block specific ports or services. For example, you can set firewall rules with iptables.
sudo iptables -A INPUT -i eth1 -j ACCEPT
sudo iptables -A INPUT -i eth2 -j ACCEPT
sudo iptables -A INPUT -i eth3 -j ACCEPT
Using a Linux server as a router
See net.ipv4.ip_forward for details.
Promiscuous mode
When the TCP/IP protocol was designed, datagrams were meant to be sent without any encryption at all. So if you collect the packets moving across the network and reassemble them in the right order, you can get the original data.. This method is called sniffing. It means to sniff around..
That means someone could intercept your ID and password when you connect from a remote host, right? On Ethernet, the source host scatters data to multiple hosts. Then.. each host just lets the data pass if it isn't its own, and if it is its own, it receives it and does something with it.
By default, a system is set to receive only its own data. But when you run a sniffer, your system's interface opens up and accepts anything.. This mode is called promiscuous mode. If your system is running in promiscuous mode, you might suspect that a sniffer is running....
When problems occur because two interfaces have the same subnet
Root cause:
- When there are two interfaces on the same subnet, there is no guarantee which interface will be used to send traffic, and the system accepts traffic for both IPs on both interfaces.
- This is because on Linux, IP addresses belong to the host and are not tied to interfaces.
- If you ping with
-I DEVto use a given interface, there is no guarantee that the reply packets (if any) will come back on the same interface, so-I DEVmay not work.
Network layer models
The Internet is based on the TCP/IP model, which first developed among private operators and became the backbone of the major Internet networks. This model can be compared, as shown below, with the OSI 7-layer model established earlier by an international standards organization.
| Internet model | |
| Application layer | Application layer |
| Presentation layer | |
| Session layer | |
| Transport layer | Transport layer |
| Network layer | Internet Layer |
| Data link layer | Network Access Layer |
| Physical layer |
Computer network types by geographical scope
| Near field (NFC), Body (BAN), Personal (PAN), Near-me (NAN), Local (LAN), Home (HAN), Storage (SAN), Campus (CAN), Backbone, Metropolitan (MAN), Wide (WAN), Internet, Interplanetary Internet |
Network Utilities
Utilities related to network testing.
- NS-3 - http://www.nsnam.org/ - A network simulator for network-related testing such as load testing (runs on the Linux kernel).
- tcping - A utility for finding the TCP and PORT status of a given IP (open source, runs on Win32).
- nmap
- arp
- arping
- cacti - http://www.cacti.net/ - Network monitoring software using PING and SNMP.
- fiddler - Web debugging proxy.
- HTTPScoop - A simple HTTP tracer.
- Wireshark - Open-source packet analyzer
- Berkeley Packet Filter (BPF) - Used for packet analysis.
- OPNSense - Open-source network security platform
- ping - Check an IP
- traceroute - Traces the packet path from the server to the target host
- dns lookup - Look up DNS
- whois - Check information about a domain
- port check - Check IP and PORT together
- reverse lookup - Check host name and IP information
- proxy checker - Check whether it is a proxy server and related information
- bandwidth meter - Check download and upload speed measurements for the current connection
- network calculator - Full information about the currently connected network
- network mask calculator - Network information per subnet
- country by ip - Check the location of your own IP
- unit converter - Why is there a unit converter here, out of nowhere?
- [Recommended] iperf - Network TCP traffic speed test
Network Traffic Generators
- WAN/LAN Network Traffic Generators for Bandwidth & Stress Testing
- WAN Killer - Commercial
- Ostinato Packet Generator - GUI interface, GNU GPL v3, so free to use.
- Packet Sender
- Nping - Nping is another open-source tool for response analysis, response time management, and network packet generation. It can also be used as a simple ping utility to identify active hosts.
- TRex - Trex is a traffic generator tool powered by DPDK. It is open-source software that works well in both stateful and stateless modes.
- NetScanTools Packet Generator - Commercial
- PB Software - Commercial
- mirrord - Open source that mirrors production traffic into the development environment
Performance measurement metrics
Let's grade the results of tests with ping, iperf, mtr (My TraceRoute), and so on.
By bandwidth
- Local network (LAN/inside a data center)
- Excellent: 900+ Mbps (on a 1Gbps network)
- Good: 700-900 Mbps
- Fair: 500-700 Mbps
- Degraded: under 500 Mbps
- Excellent: 80+ Mbps (on a 100Mbps line)
- Good: 60-80 Mbps
- Fair: 40-60 Mbps
- Degraded: under 40 Mbps
- Excellent: 500+ Mbps
- Good: 300-500 Mbps
- Fair: 100-300 Mbps
- Degraded: under 100 Mbps
- Very good: 0-5ms (real-time communication possible)
- Good: 5-20ms (smooth for regular work)
- Fair: 20-50ms (slightly unstable)
- Poor: 50ms or more (noticeable quality loss)
- No issues: 0-0.1%
- Good: 0.1-0.5%
- Caution: 0.5-2%
- Problem: 2% or more
In practice, you should adjust the thresholds according to the line type (1Gbps, 10Gbps, etc.) and the use case (regular work, real-time streaming, data transfer, etc.).
Checking how smooth ssh communication is
For SSH terminal communication, latency matters much more than bandwidth.
- Bandwidth
- Minimum: 0.1 Mbps (100 Kbps)
- Recommended: 1 Mbps or more
- Very comfortable: 0-50ms
- Comfortable: 50-100ms
- Usable: 100-200ms
- Frustrating: 200-300ms
- Nearly unusable: 300ms or more
- Ideal: 0%
- Acceptable: 0-1%
- Inconvenient: 1-3%
- Problem: 3% or more
Since it is text-based, it actually works even at 56K modem (0.056 Mbps) speeds, but for stability about 1 Mbps is enough.
See also
Favorite site
- Wikipedia (en) description of computer networks
- Zetawiki: Network bridge
- Zetawiki: Network switch
- Zetawiki: Gateway
- List of posts in the 'Understanding Network Infra Easily' category
Use Linux
References
-
PC_to_PC_-_network_connect.pdf ↩
- Air gap
- ArchLinux:Network
- Berkeley Packet Filter
- Cacti
- Computer Sciences
- ComputerNetwork:Basic
- Debian:NetworkConfiguration
- Fiddler
- Ganglia
- GNU
- Icinga
- IPerf
- Iperf
- Iptables
- Kubernetes:Basic
- Link aggregation
- Linux
- Linux:Network
- Mesh networking
- Mirrord
- Modular connector
- MTR
- Nagios
- Net.bridge.bridge-nf-call-ip6tables
- Net.bridge.bridge-nf-call-iptables
- Net.ipv4.ip forward
- Netplan
- Network Administrator
- Network interface controller
- Network monitoring
- Network Programming
- Network Security
- Network segment
- Network switch
- Network topology
- Nping
- OpenStack:RDO
- OPNSense
- Overlay network
- PartyKit
- Rate limiting
- Registered jack
- Simple Network Management Protocol
- Small Form-factor Pluggable
- Software
- Speedtest
- Tcping
- Tunneling protocol
- Twisted pair
- Ubuntu:NetworkConfiguration
- Underlay network
- Zabbix