Fundamentals
Computer Networking's main purpose is to enable several devices to communicate with each other to share and exchange resources.
Network computer devices that send, route, or receive data within a network are called network nodes.
Usually, nodes include hosts such as PCs, servers, phones, but also network hardware. Two such devices are said to be networked when one of them can exchange information with the other.
Network hardware
These are physical devices that are required for communication and interaction between devices on a computer network. Specifically, they mediate data in a computer network.
Such examples are:
- routers
- modems
- switches
nodes can be linked with the help of:
- cables, most commonly the Ethernet cable.
- telephone lines
- radio waves, enabling a wireless connection
- satellites
- infrared light beams.
Even though nowadays we take for granted that all devices can connect to a network, this was not always this case.
While modern devices have network devices integrated into their circuit boards, older ones such as PCs or game consoles, needed a peripheral network device, such as USB adapters or Network Interface Cards(NIC).
At the same time, some devices can't connect to a network at all.
The largest and most known computer network is the internet. This worldwide system of interconnected smaller networks enables millions of devices to communicate with each other.
What is a packet?
Think of packets as the simplest unit of communication in computer networks.
packets
Other terms equivalent to packets are datagrams, segments, blocks, cells, and even frames, depending on the protocol used for data transmission.
Whatever the nature of the communication over a computer network might be, data must be sent and received.
Data transmission: the action of sending data over a network works in the following way:
- original data is broken down into smaller structures of data-packets.
- packets are transmitted following the rules of the protocol used.
- when packets reach their destination, they are reassembled into the original data.
A packet is composed of a header and a payload (the actual data sent). The content of the header depends on the protocol used for transmission.
Over the internet, where IP(Internet Protocol) is the standard, packets 'header' needs to have:
- source IP address
- destination IP address
- type of service(used for optimizations)
- flags
- other technical data
Packets are sent over the internet through nodes. (devices and routers) positioned between the source and destination.
How do nodes work?
Contrary to traditional lines of communication, such as telephone lines, where there must be a continuous physical link between the source and destination, modern networks work on a different concept.
Packets are routed from source to destination, going through nodes. At each node, calculations are made deciding the most efficient route of reaching the destination.
What is the protocol?
Networks enable two or more devices to communicate.
As in real life, for two parties to communicate efficiently, they need to follow some rules. About computer networks, these sets of rules are called protocols.
Some of the following protocols:
IP-used to uniquely identify computers(host)
FTP-standard protocol for file transfer between two hosts
HTTP-key protocol for data transfer across the World Wide Web.
SMTP-used for mail transfer.
Network Layers
According to the OSI model (used for computer systems communication standardization), there are 7 layers of networking protocols.
These layers range from a low-level Physical Layer to a high-level Application layer.
Any protocol can be pinpointed to a specific layer,
For example, the HTTP protocol is situated on the session layer that manages the continuous exchange of information.
Types of networks
There are several types of computer networks currently in use, characterized by their purpose as well as their size.
The size of a network is inferred from the geographic area they occupy and the number of devices that are connected to it.
computer networks have been classified as:
- PAN: personal area network
- LAN: local area network
- WLAN: wireless local area network
- MAN: metropolitan area network
- WAN: wide area network
LAN
LAN network connects a small number of devices, is typically used in networked office buildings, schools, or homes.
Due to operating in a limited space LANs are usually owned, controlled, and managed by a single person or organization. They also tend to use certain connectivity technologies, primarily Ethernet and Token Ring.
Ethernet
Ethernet is a family of computer networking technologies commonly used in LANs, MANs, and WANs.
It defines wiring and signaling standards for the physical layer of other TCP/IP stack.
Token Ring
Token Ring is a communications protocol for LANs.
It uses a special 3-byte frame called a token that travels around a logical "ring" of workstations or servers.
This token passing is a channel access method providing fair access for all stations, and eliminating the collisions present in other access methods.
This type of network is usually characterized by high-speed communication and low implementation costs.
WAN
It is capable of spanning a large physical distance such as a town, a region, a country, or the entire world. The internet is the vast WAN, spanning the Earth.
A network device called a router connects more LANs to WAN, resulting in a high-speed connection as well, but higher costs.
WLAN
The term WAN is usually confused with WLAN.
A WLAN is a type of LAN that uses wireless technology (nearly aways WI-FI) to connect some or all computers and devices to the router and in turn a network(e.g. Internet).
Network models
The networking communication concept was divided into multiple layers.
OSI (Open System Interconnect) Model
OSI is an open standard for all network communications. This model defines a paradigm to implement protocols in seven layers.
- Application Layer: provides an interface needed by applications to communicate within a network.
- Presentation Layer: checks the data to ensure that it's compatible with the communication resources
- Session Layer handles authentication and authorization functions.
- Transport Layer: promise the complete delivery of the data.
- Network Layer: It handles packet routing through logical addressing and switching functions.
- DataLink Layer: transfers data between adjacent network nodes.
- Physical Layer: It supports the electrical or mechanical interface to the physical medium.
during data transmission, each layer adds a header to the data that directs and identifies the packet (a process call encapsulation). The encapsulated packet is sent to the next layer that in turn adds its header and so on.
The combined encapsulated packet is transmitted and received.
The receiving computer reverses the process, extracting the data at each layer with the header information directing what needs to be done. Before passing the data up to the OSI stack each layer respectively strips off its header. finally, when the process is finished, the data can be used bt application.
Network Models(TCP/IP)
TCP/IP Internet Model
The TCP/IP stack, pre-dating the model is a layered protocol and is based on standard protocols around which the internet has developed.
The four layers taking part in the Internet model architecture are:
- Application Layer: defines the protocol which enables applications to interact with lower layers
- Transport Layer: ensures that the delivered data is in-order.
- Internet Layer: responsible for addressing, packaging, and routing functions
- Network Interface Layer: provides the means for the system to deliver data to the other devices on a directly attached network.
TCP/IP is the older of two approaches to data communications and is well established throughout the world.
The OSI model is a proven concept that is used in all other data communications protocols. It will continue to be used as a guideline for all other communications applications.