Approximately 80% of us who graduate from university with any IT specialty do not end up becoming programmers. Many take jobs in technical support, as system administrators, computer equipment maintenance specialists, sales consultants for digital technology, or managers in the IT sector, and so on.
This article is just for that 80% who have recently graduated with an IT specialty and are already starting to monitor job vacancies, such as for a system administrator or assistant position, a field engineer in an outsourcing company, or in first/second-line technical support.
It is also for self-study or for training new employees.
During my time working in the IT field, I encountered the problem that universities do not provide the most basic knowledge regarding networks. I first faced this myself when, after graduating in 2016, I went to interviews and couldn't answer simple (as it seems to me now) questions. At that time, I thought I had slacked off and didn’t learn properly in university. But it turned out to be an issue with the educational program. Now, I still face this knowledge gap when I train new employees.
As a result, I had to study numerous articles on the internet before I grasped the basic concepts, and now when I assign topics for study to young specialists, they struggle to find and absorb the necessary information. This happens because there is a massive amount of articles online, and they are either disorganized by topics or written in overly complex language. Furthermore, most of the information at the beginning of these articles contains mostly just scientific definitions, followed by complex usage technologies. Ultimately, there's a lot that is completely unclear for beginners.
That's precisely why I decided to gather the main topics into one article and explain them as simply as possible 'in layman's terms'.
I warn you right away that there will be no in-depth information in this article, only the most basic and essential content.
The topics covered are:
- Global and local networks
- White and gray IP addresses
- NAT
- DHCP server and subnets
- Network routing devices (router, switch, hub)
- Basic Network Analysis Commands
- UDP and TCP Transport Protocols
1. Global and Local Networks
The entire internet is divided into global (WAN) and local (LAN).
All user devices within a single apartment, office, or even a building (computers, smartphones, printers/MFPs, televisions, etc.) connect to a router that unites them into a local network.
Participants in the same local network can exchange data between their devices without connecting to an internet provider. However, to access the network (for instance, to use the search engine Yandex or Google, visit VK, Instagram, YouTube, or AmoCRM), access to the global network.
Access to the global network is provided by the internet provider, which is why we pay them a subscription fee. The provider sets the speed level on their routers for each connection according to the chosen tariff. The provider runs twisted pair or fiber optics to our router (our local network), and after that, any device within our local network can access the global network.
For analogy, networks can be compared to roads.
For example, the roads in your city N represent the local network. These roads connect you to stores, institutions, parks, and other places in your city.
To reach another city N, you need to get onto the federal highway and travel a certain distance. In other words, exit to the global network.
For a clearer understanding of what a global and local network is, I have drawn a schematic representation.

2. White and Gray IP Addresses
Each device in the network has its own unique IP address. It is necessary for devices in the network to understand where to route requests and responses.
It is similar to how our homes and apartments have their exact address (postal code, city, street, house number, apartment number).
Within your local network (apartment, office, or building), there is a range of unique addresses. I think many have noticed that the IP address of a computer, for example, starts with the numbers 192.168.X.X.
So this is the local address of your device.
There are the allowed ranges of local networks:

I believe it is clear from the table presented why the most common range is 192.168.X.X.
To find out, for instance, the IP address of your computer (running Windows OS), type the command in the terminal ipconfig

As you can see, my computer's IP address in my home local network 192.168.88.251
To access global networks, your local IP address is replaced by the router with a global one, which your provider has assigned to you. Global IP addresses do not fall under the ranges from the table above.
evaluates the importance of each attribute in the model with two numbers: Local IP addresses are gray IP addresses, while global ones are white..
For a better understanding, consider the diagram below. I've labeled each device with its IP address.

The diagram shows that the provider allows us access to global networks (the internet) from the white IP address 91.132.25.108.
For our router, the provider assigned a gray IP address 172.17.135.11.
And in our local network, all devices also have gray IP addresses 192.168.X.X.
You can find out what IP address you are using to access the global network on the site

But from all this, it's important to remember one very important factor!
Currently, there is an acute shortage of white IP addresses, as the number of network devices has long exceeded the number of available IPs. For this reason, internet providers assign users gray IP addresses (within the local network of the provider, for example, within several apartment buildings) and give access to the global network under a single common white IP address..
To find out whether the provider assigns you a gray or white IP address, you can log into your router and check what IP address your router receives from the provider.
Or you can visit, for example, the site and at the very bottom (in the footer of the site) you will see your router's IP address.
For example, I logged in with my home internet:

As you can see, in fact, I have a gray IP address 172.17.132.2 (see the range of local addresses). To connect with a white IP address, providers usually offer an additional service for a subscription fee.
In reality, this is not critical for home internet. However, for company offices, it is recommended to purchase a white IP address from the provider,as using a gray IP address can lead to issues with VoIP operation and will also void the possibility of setting up remote access via VPN. That means a gray IP address will not allow you to host your configured server on the internet and will not enable remote access to the server from another network.
3. NAT
In the previous section, I noted that “Currently, the issue of the shortage of white IP addresses has become acute.And so, the common connection scheme among internet providers now is to connect multiple clients using gray IP addresses, while releasing them into the global internet under one common white IP.
But it hasn’t always been this way; initially, everyone was issued white IP addresses, and soon to avoid the problem of white IP address scarcity, NAT was invented. NAT (Network Address Translation) is a mechanism for translating IP addresses..
NAT It works on all routers and allows us to access the global network from the local network.
For better understanding, let's analyze two examples:
1. The first case: You have purchased the white IP address 91.105.8.10 and several devices are connected in the local network.

Each local device has its gray IP address. However, internet access is only possible with a white IP address.
Therefore, when, for example, PC1 with IP address 192.168.1.3 wants to search on Yandex, the router, while sending the request from PC1 to the global network, engages the mechanism NAT, which which converts PC1's IP address to the white global IP address 91.105.8.10.
The same goes in the opposite direction; when the router receives a response from the Yandex server, it uses the mechanism NAT to send this response to the IP address 192.168.1.3, to which PC1 is connected.
2. The second case: You also have several devices connected in the local network, but you did not purchase a white IP address from the internet provider.

In this case, the local address PC1(192.168.1.3) is first converted NATby your router and turns into the gray IP address 172.17.115.3, which was assigned to you by the internet provider, and then your gray IP address is converted NATby the provider's router into the white IP address 91.105.108.10, and only after that is internet access (global network) established.
That is, in this case, your devices are behind double NAT. NATThis scheme provides a higher degree of security for your devices, but it also comes with several significant downsides, such as unstable SIP registration for VoIP equipment or one-way audio issues during VoIP calls.
I will write a separate article with more details about how the mechanism works, its pros and cons, port allocation, sockets, and types.
4. DHCP - server and subnets. NAT4. DHCP — server and subnets NAT I'll write a separate article.
4. DHCP — server and subnets
To connect a device, such as a computer, to the internet, you typically just plug the cable (twisted pair) into the computer and then into an available port on the router, after which the computer automatically receives an IP address and gains internet access.
The same goes for Wi-Fi; for example, from a smartphone or laptop, you connect to the desired network, enter the password, the device receives an IP address, and you have internet access.
A What allows the device to automatically obtain a local IP address?
This function is performed by DHCP server.
Every router is equipped with a DHCP server. The automatically obtained IP addresses are dynamic IP addresses..
Why dynamic?
Because with each new connection or router reboot, DHCP server it also reboots and can assign different IP addresses to the devices.
That is, for example, right now your computer has the IP address 192.168.1.10, after rebooting the router, the computer's IP address may change to 192.168.1.35
To keep the IP address from changing, it can be set statically.This can be done both on the computer in the network settings and on the router itself.
Additionally, DHCP server on the router, you can disable it altogether and assign IP addresses manually.
You can set up several DHCP servers on one router. This way, the local network will be divided into subnets..
For example, we will connect computers to the zero subnet in the range 192.168.0.2-192.168.0.255, printers to the first subnet in the range 192.168.1.2-192.168.1.255, and Wi-Fi will be provided on the fifth subnet with the range 192.168.5.2-192.168.5.255 (see diagram below).

Usually, it is not necessary to divide into subnets. This is done when a company has a large number of devices connected to the network and during network security setup.
However, such a setup is quite common in companies.
Therefore, it is crucial to know one very important point.
Attention!
If you need to access the web interface from a PC, for example, of a printer or IP phone, and your PC is in another subnet, you will not be able to connect.
To understand, let’s take an example:

Suppose you are working at PC1 with the local IP address 10.10.5.2 and want to access the web interface of the IP phone with the local IP address 192.168.1.3, you will not be able to connect. Since the devices are in different subnets. The IP phone, located in subnet 192.168.1.X, can only be accessed from PC3 (192.168.1.5)..
The same goes for the multifunction printer (172.17.17.12); you will only be able to connect from PC4 (172.17.17.10)..
Therefore, when you connect remotely to a user on a PC to access the web interface of an IP phone, you must first check their local IP addresses to ensure both devices are connected to the same subnet.
5. Network routing devices (router, switch, hub)
Strangely enough, there's a fact that newcomers in IT (sometimes even active system administrators) do not know or confuse concepts such as router, switch, network gateway, and hub..
I think the reason for this confusion arose because of the abundance of synonyms and jargon in the names of networking equipment, which now misleads many novice engineers.
Let's break it down.
a) Router, routing device, and network gateway
Everyone knows what a routeris. It is the device that distributes internet access within a space, connected by the internet provider.
evaluates the importance of each attribute in the model with two numbers: the routing device and network gateway are indeed the router..
This equipment is the primary device in organizing a network. The most commonly used name in engineering circles is “a router”.
By the way, a router can be not only a set-top box but also a computer system unit if you install an additional network card in it and run RouterOS Mikrotik, for example. Then distribute the network to multiple devices using a switch.

b) What is a Switch and how does it differ from a Router and Hub?
A Switch and Router are also synonyms; however,. Here, a hub is a slightly different device. More on that in the next point (v).

A Router (switch) is used to branch out the local network. Like a three-way adapter or power strip, where we connect our devices to supply power from one outlet.

A switch cannot route the network like a router.It will not assign your device an IP address and, without the help of a router, cannot connect you to the internet.
A standard router typically has 4-5 ports for connecting devices. Accordingly, if your devices are connected with cables and outnumber the ports on the router, you will need a switch. You can connect a 24-port switch to one port of the router and easily organize a local network for 24 devices.
And if you have another router lying around, you can enable switch mode in its web interface and also use it as a switch.
v) Hub
Hub performs the same functions as a switch. However, its distribution technology is quite outdated and no longer modern.

Hub distributes incoming packets from the router to all connected devices indiscriminately, and the devices themselves must determine if it's their packet or not.
A a switch has a MAC table and therefore distributes incoming packets to one specific device that requested that packet. Consequently, data transmission with a switch is faster and more efficient..
Currently, it's rare to encounter the use of a hub, but they still appear, so you need to be prepared for this and definitely recommend users replace a hub with a switch.
6. Basic commands for network analysis
a) Ping command
To determine if an IP address or the device itself is active, you can 'ping' it.
For this, we type the command ping “ip-address”.

Here we 'pinged' Google's DNS server and, as we can see, the server is active (response to pings is received and equals 83 ms).
If the recipient is unavailable or the specified IP address does not exist, we will see the following:

That is, we do not receive responses to pings.
However, Ping it's much more useful to use with flags:
-t - 'ping' continuously (to stop, press the Ctrl+C combination)
-a - display the name of the 'pinged' node (website/device/server)

Accordingly, the flag “-a” showed us that the name of the pinged node is “dns.google”.
And thanks to the flag “-t” the ping was continuous, I stopped it by pressing Ctrl+C.
With continuous pinging, you can see how the pinged node behaves and the approximate quality of the internet connection.
As seen from the screenshot, there are periodic delays in packet reception of up to 418 ms, which is quite critical, as a jump from 83 ms to 418 ms would reflect on video calls as lagging/freezing of the image or in VoIP as degradation of voice quality.
In my case, it's likely my home Internet causing issues.
But to more accurately determine the cause, one needs to run a dump. And this is a topic for an entire article.
Attention! Sometimes routers are configured to block sending ICMP packets (some turn it off intentionally, while in others it is not enabled by default), in this case such a node will not respond to 'pings', although it will be active and functioning normally in the network.
Another possibility of 'pinging' is Find out what IP address is hidden behind a website's domain. Specifically, which server hosts the site.
To do this, simply replace the IP address with the website:

As you can see, the IP address of Habr is 178.248.237.68
b) Traceroute
Sometimes it is very important to see the path that a packet takes to reach a specific device.
There might be a gap somewhere, and the packet does not reach the intended recipient. So the traceroute utility helps determine at which stage this packet is stuck.
On Windows, this utility is called with the command "tracert" IP address or domain:

Here we can see through which nodes our request passes before reaching the server ya.ru
At Linux OS this utility is called with the command traceroute.
Some devices, routers, or VoIP gateways also have tracing utilities.
c) Whois utility
This utility allows you to find out all information about an IP address or the domain registrar.
For example, let's check the IP address 145.255.1.71. To do this, I enter the command in the terminal whois 145.255.1.71

We received information about the IP address provider, the country, city, address, range, etc.
I only use it on Linux. The utility can be easily downloaded and installed from the standard repository of the operating system.
But I've also read that there is a similar solution on Windows.
7. Transport protocols TCP and UDP
All requests and responses between devices in the network are transmitted using transport protocols TCP and UDP.
The TCP protocol guarantees the delivery of the request and the integrity of its transmission. It checks the availability of a node before sending a packet. And if the integrity of the packet is violated along the way, then TCP it will supplement the missing components.
In general, this is a protocol that will do everything to ensure that your request reaches its destination correctly.
Therefore TCP the most widely used transport protocol. It is used when users surf the internet, browse websites, services, social networks, etc.

UDP the protocol does not guarantee data transmission like TCP. It does not check the availability of the destination node before sending, nor does it replenish the packet in case of degradation. If any packet or several packets are lost along the way, the message will reach the recipient in an incomplete form.
So why is UDP needed?
The fact is that this transport protocol has a huge advantage over TCP data transfer speed. Therefore UDP is widely used for the transmission of voice and video packets in real time. Specifically, in VoIP and video calls.
For instance, any call made through WhatsApp or Viber uses the transport protocol UDP. The same applies to video calls, for example, through Skype or the same messengers WhatsApp and Viber.

This is precisely because UDP does not guarantee absolute data transmission and the integrity of the packets transmitted, which often leads to issues during internet calls.
These issues include voice interruption, delays, echo, or robotic sound.
This problem arises due to a congested internet channel, double NAT, or wireless channels.
It would certainly be good to use TCP, but unfortunately, for voice transmission, instantaneous delivery of intact packets is required, and UDP.
is ideal for this task. UDP To avoid issues with the use of UDPprotocol, it is simply necessary to organize a quality internet channel. Also, set a dedicated bandwidth on the router for TCP , so that the load from other devices that use UDP.
That's all.
does not interfere with the operation of the transport protocol.
I did not overload the article by copying scientific definitions of all the terms used here. If someone needs this, just Google it.
I tried to compile the 7 most important moments that, in my opinion, will help a young ‘IT specialist’ through the initial stages of interviews for ‘IT’ positions or at least let employers know that you obviously know more than an average user.
Source: habr.com
