How is it that you really have access to the network?
This question may seem trivial, but no response usually takes a very long time. Whenever we ask what a computer must have to use the network, we mean any adapters or cables. Sometimes we say that we also need a router. Of course, all these things are usually very important in the use of computer networks, but in themselves they do not really give us access as users. In order to efficiently use computer networks, we must necessarily have the service installed on any computer network protocols.
Of course, with different networks are a number of different solutions. The simplest of these is that our dear computer has installed support for all of the family of TCP / IP protocols and has a permanently assigned IP address, which is always printed in the local configuration settings. It is one of the simplest solutions with which we come into contact, but really it is not very secure, so we have always assumed that the administrator has decided to to something else.
Most likely, the situation is that the administrator has started on one of your DHCP servers. This service allows the dynamic assignment of IP addresses at the request of any workstation on the network. It is also usually very possible that in our local network there is a functioning set of private addresses, which we do not see on the outside, and the IP address that we see on the outside is the address of our router network. The task of translation is really the appropriate response to incoming private addresses and to get content on the screen, which is really needed. Sometimes, its administrator has some very compelling reasons to install support for one of the oldest Internet protocols. Then usually on the road package is the gateway, which is really responsible for the translation of data between relevant network protocols.
If we find solutions that are based on the internal network using a set of private addresses that are not and will never be seen on the outside, it is called Network Address Translation, NAT for short. Some NAT-based networks are also different types. I distinguish NAT static, dynamic, active, passive, positive and negative. NAT itself is beautiful. It works so that an incoming packet to the internal network interface, always containing the address of our workstation, which is taken from the pool of our private addresses, is routed to one of the router’s external interface, where it goes on, along with the address of the network interface. The answer that comes is really always redirecting and then is passed on to whom you need.
Sometimes it so happens that the private addresses are much more prevalent than the available public addresses. Then we are dealing with a situation that one public address is associated with a number of private addresses. In addition, to make it clear to whom the response from the server is addressed, we need to assign each address to an appropriate set of internal ports to the external address. We take it from the pool of dynamic ports that are available to us. This to change the data port is called PAT.
As you probably noticed, all the addresses from the internal network can not really be anything, but a good practice is to use addresses from the reserved pool of private addresses. Gee, how fortunate we are; everywhere there is a good practice, whether it is a network address assignment, or for testing or software development. Sometimes it also happens that the whole operation takes place outside of the third and fourth layer ISO / OSI model. Then the packets are not shifted between the IP addresses, but between the fourth layer protocols. This solution is called Circuit-Level Proxy.
If you look at most networks, you will find some similarities in all that are visible to the naked eye. In most of them, the administrator uses the same private IP network that, in order to resolve any conflicts, all computers are dynamically allocated. This dynamic address assignment can be carried out by several protocols, but most of it is carried out by the DHCP server that has all of them. This is really the greatest potential for the transmission of all information to specific workstations. The DHCP can provide not only information about the data of IP addresses that receive data workstations, and what is really the gateway address, but also a huge range of information, such as information about services in data networks and servers.
Whoa, we finally reached the end of our quick theory on the principles of computer networks. We already know about something about layers and how to communicate. We also know what services must be provided with our computer in order to effectively communicate over a computer network. Now we can move on. To really determine how the network configuration looks in our case, we can use graphics programs, but we have the ifconfig system installed. This program allows you to set or display all information about our network. Below is a sample output from the ifconfig command from my workstation which is not currently connected to the network:
root [~] # ifconfig
eth0 Link encap: Ethernet HWaddr dc: 0e: a1: 4b: 5d: 94
inet addr: 169.254.186.86 bcast: 169.254.255.255 Mask: 255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 0 errors: 0 dropped: 2775300121 overruns: 0 frame: 0
TX packets: 2790 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 1000
RX bytes: 0 (0.0 B) TX bytes: 625441 (610.7 KB)
Interrupt: 122 Base address: 0x6000
lo Link encap: Local Loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
UP LOOPBACK RUNNING MTU: 16436 Metric: 1
RX packets: 1003 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 1003 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 0
RX bytes: 379547 (370.6 KiB) TX bytes: 379547 (370.6 KB)
root [~] #
All program options in ifoconfig. I wrote the following:
ifconfig [-a] [-v] [-s]