Data exchange over local network. Practical work in computer science "Transfer of information between computers

You probably have a wide variety of devices on your home network, be it Windows or Linux computers, Macbooks, or Android phones. And you'll most likely want to transfer files between them. Instead of copying files onto flash drives and running from room to room, it is much more convenient to simply set up shared folders on the local network. This is not difficult to do.

Windows

First of all, let's enable the ability to share files over the local network in the settings. Open Control Panel and go to Network and Internet → Sharing Options. Select the network you are connected to and enable the “Turn on network discovery” and “Turn on file and printer sharing” options.

Now right-click on the folder you want to share and select Options. In the folder options, on the “Sharing” tab, set access settings, allowing all users on your local network the ability to write and read files in the shared folder.

To view folders open on your local network, in Explorer, select Network in the sidebar.

macOS

Go to System Preferences on your Mac and select Sharing. Turn on File and Folder Sharing. Go to “Options...” and check “File and folder sharing via SMB.”

Below, in the “Shared Folders” section, you can choose which folders to share. If you want local network users to be able to upload files to these folders, in the Users section, grant read-write access to all users.

To access local network files, select Go from the menu bar in your Finder and click Network.

Linux

Sharing folders in Linux is very easy. Let's take Ubuntu as an example.

Sharing Linux folders on the local network is provided by Samba. You can install it using the following command:

sudo apt-get install samba samba-common system-config-samba

In the file manager, right-click on the folder you want to provide access to from the local network. Open the folder's properties, go to the "Local Network Public Folder" tab and select "Publish this folder."

To be able to copy files to this folder from another computer, select Allow other users to change the contents of this folder.

If you do not want to enter your username and password again, check the “Guest access” checkbox.

You can access folders on your local network in Ubuntu by selecting Network in the sidebar of the Nautilus file manager.

iOS

You can connect to shared folders on your local network in iOS using FileExporer Free. Click the "+" button and choose which device you want to connect to: Windows, macOS or Linux. After searching for devices on your local network, FileExporer Free will provide you with a list of shared folders.

Methods of data exchange in local networks

To control the exchange (network access control, network arbitration), various methods are used, the features of which largely depend on the network topology.

There are several groups of access methods based on time division of the channel:

 centralized and decentralized

 deterministic and random

Centralized access is controlled from a network control center, such as a server. The decentralized access method operates on the basis of protocols without control actions from the center.

Deterministic access provides each workstation with a guaranteed access time (for example, scheduled access time) to the data transmission medium. Random access is based on the equality of all stations in the network and their ability to access the medium at any time to transmit data.

Centralized access to mono channel

In networks with centralized access, two access methods are used: the polling method and the delegation method. These methods are used in networks with an explicit control center.

Survey method.
Data exchange on a LAN with a star topology with an active center (central server). With a given topology, all stations can decide to transmit information to the server at the same time. The central server can communicate with only one workstation. Therefore, at any time it is necessary to select only one station broadcasting.

The central server sends requests to all stations in turn. Each workstation that wants to transmit data (the first one polled) sends a response or immediately begins transmission. After the end of the transmission session, the central server continues polling in a circle. Stations, in this case, have the following priorities: the maximum priority is for the one that is closest to the last station that completed the exchange.

Data exchange in a network with a bus topology. This topology may have the same centralized control as a star. One of the nodes (the central one) sends requests to all the others, finding out who wants to transmit, and then allows the transmission to whichever one of them, after the end of the transmission, reports it.
Transfer of authority method (passing token)
A token is a service package of a certain format into which clients can place their information packages. The sequence of transmitting a token over the network from one workstation to another is set by the server. The workstation receives permission to access the data transmission medium upon receipt of a special token packet. This access method for networks with bus and star topologies is provided by the ArcNet protocol.

Decentralized access to mono channel

Let's consider decentralized deterministic and random methods of access to the data transmission medium.
The decentralized deterministic method includes the token passing method. The token passing method uses a packet called a token. A token is a packet that does not have an address and circulates freely over the network; it can be free or busy.

Data exchange in a network with a ring topology

1. This network uses the “token passing” access method. The transfer algorithm is as follows:
a) a node wishing to transmit waits for a free token, upon receiving which it marks it as busy (changes the corresponding bits), adds its own packet to it and sends the result further into the ring;
b) each node that receives such a token accepts it and checks whether the packet is addressed to it;
c) if the packet is addressed to this node, then the node sets a specially allocated acknowledgment bit in the token and sends the modified token with the packet further;
d) the transmitting node receives back its message, which has passed through the entire ring, releases the token (marks it as free) and again sends the token to the network. In this case, the sending node knows whether its package was received or not.

For the normal functioning of this network, it is necessary that one of the computers or a special device ensure that the token is not lost, and if the token is lost, this computer must create it and launch it into the network.

Data exchange in a network with bus topology

In this case, all nodes have equal access to the network and the decision when to transmit is made by each node locally, based on an analysis of the network state. Competition arises between nodes for network capture, and, therefore, conflicts between them are possible, as well as distortion of transmitted data due to packet overlap.

Let's look at the most commonly used carrier sense multiple access with collision detection (CSMA/CD). The essence of the algorithm is as follows:
1) a node that wants to transmit information monitors the state of the network, and as soon as it is free, it begins transmission;
2) the node transmits data and simultaneously monitors the state of the network (carrier sensing and collision detection). If no collisions are detected, the transfer is completed;
3) if a collision is detected, the node amplifies it (transmits for some more time) to ensure detection by all transmitting nodes, and then stops transmitting. Other transmitting nodes do the same;
4) after the unsuccessful attempt is terminated, the node waits for a randomly selected period of time tback, and then repeats its attempt to transmit, while monitoring collisions.

In case of a second collision, trear increases. Eventually, one of the nodes gets ahead of the other nodes and successfully transmits the data. The CSMA/CD method is often called the race method. This method for networks with a bus topology is implemented by the Ethernet protocol.


General concepts. Protocol. Protocol stack

The main goal that is pursued when connecting computers into a network is the ability to use the resources of each computer by all network users. In order to realize this feature, computers connected to the network must have the necessary means of interaction with other computers on the network.
The task of sharing network resources includes solving many problems - choosing a method for addressing computers and coordinating electrical signals when establishing electrical communication, ensuring reliable data transmission and processing error messages, generating sent and interpreting received messages, as well as many other equally important tasks.
The usual approach to solving a complex problem is to break it down into several subproblems. A certain module is assigned to solve each subtask. At the same time, the functions of each module and the rules for their interaction are clearly defined.
A special case of task decomposition is a multi-level representation, in which the entire set of modules that solve subtasks is divided into hierarchically ordered groups - levels. For each level, a set of query functions is defined, with which modules at a given level can be accessed by modules at a higher level to solve their problems.
This set of functions performed by a given layer for a higher layer, as well as the message formats exchanged between two neighboring layers during their interaction, is called an interface.
The rules for interaction between two machines can be described as a set of procedures for each level. Such formalized rules that determine the sequence and format of messages exchanged between network components located at the same level, but in different nodes, are called protocols.
A consistent set of protocols at different levels, sufficient to organize internetworking, is called a protocol stack.
When organizing interaction, two main types of protocols can be used. In connection-oriented network service (CONS) protocols, before exchanging data, the sender and recipient must first establish a logical connection, that is, agree on the parameters of the exchange procedure that will be valid only within the framework of this connection. After completing the dialogue, they must terminate this connection. When a new connection is established, the negotiation procedure is carried out again.
The second group of protocols are protocols without prior connection establishment (connectionless network service, CLNS). Such protocols are also called datagram protocols. The sender simply transmits the message when it is ready.

ISO/OSI model

Just because a protocol is an agreement between two interacting entities, in this case two computers working on a network, does not mean that it is necessarily a standard. But in practice, when implementing networks, they tend to use standard protocols. These may be proprietary, national or international standards.
The International Standards Organization (ISO) has developed a model that clearly defines the different levels of interaction between systems, gives them standard names, and specifies what work each level should do. This model is called the Open System Interconnection (OSI) model or ISO/OSI model.
In the OSI model, communication is divided into seven layers or layers (Fig. 1). Each level deals with one specific aspect of interaction. Thus, the interaction problem is decomposed into 7 particular problems, each of which can be solved independently of the others. Each layer maintains interfaces with the layers above and below.
The OSI model describes only system communications, not end-user applications. Applications implement their own communication protocols by accessing system facilities. It should be borne in mind that the application can take on the functions of some of the upper layers of the OSI model, in which case, if necessary, internetworking, it accesses directly the system tools that perform the functions of the remaining lower layers of the OSI model.

An end-user application can use system interaction tools not only to organize a dialogue with another application running on another machine, but also simply to receive the services of a particular network service.

So, let's say an application makes a request to an application layer, such as a file service. Based on this request, the application level software generates a standard format message, which contains service information (header) and, possibly, transmitted data. This message is then forwarded to the representative level.
The presentation layer adds its header to the message and passes the result down to the session layer, which in turn adds its header, and so on.
Finally, the message reaches the lowest, physical layer, which actually transmits it along the communication lines.
When a message arrives on another machine over the network, it moves up sequentially from level to level. Each level analyzes, processes and deletes the header of its level, performs functions corresponding to this level and passes the message to the higher level.
In addition to the term "message", there are other names used by network specialists to designate a unit of data exchange. The ISO standards for protocols of any level use the term “protocol data unit” - Protocol Data Unit (PDU). In addition, the names frame, packet, and datagram are often used.

ISO/OSI Model Layer Functions

Physical level. This layer deals with the transmission of bits over physical channels, such as coaxial cable, twisted pair cable, or fiber optic cable. This level is related to the characteristics of physical data transmission media, such as bandwidth, noise immunity, characteristic impedance and others. At the same level, the characteristics of electrical signals are determined, such as requirements for pulse edges, voltage or current levels of the transmitted signal, type of encoding, and signal transmission speed. In addition, the types of connectors and the purpose of each contact are standardized here.
Physical layer functions are implemented in all devices connected to the network. On the computer side, the physical layer functions are performed by the network adapter or serial port.
Data link level. One of the tasks of the link layer is to check the availability of the transmission medium. Another task of the link layer is to implement error detection and correction mechanisms. To do this, at the data link layer, bits are grouped into sets called frames. The link layer ensures that each frame is transmitted correctly by placing a special sequence of bits at the beginning and end of each frame to mark it, and also calculates a checksum by summing all the bytes of the frame in a certain way and adding the checksum to the frame. When the frame arrives, the receiver again calculates the checksum of the received data and compares the result with the checksum from the frame. If they match, the frame is considered correct and accepted. If the checksums do not match, an error is recorded.
The link layer protocols used in local networks contain a certain structure of connections between computers and methods for addressing them. Although the data link layer provides frame delivery between any two nodes on a local network, it does this only in a network with a very specific connection topology, precisely the topology for which it was designed. Typical topologies supported by LAN link layer protocols include shared bus, ring, and star. Examples of link layer protocols are Ethernet, Token Ring, FDDI, 100VG-AnyLAN.
Network layer. This level serves to form a unified transport system that unites several networks with different principles for transmitting information between end nodes.
Network layer messages are usually called packets. When organizing packet delivery at the network level, the concept of “network number” is used. In this case, the recipient's address consists of the network number and the computer number on this network.
In order to transmit a message from a sender located on one network to a recipient located on another network, you need to make a number of transit transfers (hops) between networks, each time choosing the appropriate route. Thus, a route is a sequence of routers through which a packet passes.
The problem of choosing the best path is called routing and its solution is the main task of the network layer. This problem is complicated by the fact that the shortest path is not always the best. Often the criterion for choosing a route is the time of data transmission along this route; it depends on the capacity of communication channels and traffic intensity, which can change over time.
At the network level, two types of protocols are defined. The first type refers to the definition of rules for transmitting end node data packets from the node to the router and between routers. These are the protocols that are usually meant when people talk about network layer protocols. The network layer also includes another type of protocol, called routing information exchange protocols. Using these protocols, routers collect information about the topology of internetwork connections. Network layer protocols are implemented by operating system software modules, as well as router software and hardware.
Examples of network layer protocols are the TCP/IP stack IP Internetwork Protocol and the Novell IPX stack Internetwork Protocol.
Transport layer. On the way from the sender to the recipient, packets may be corrupted or lost. While some applications have their own error handling, there are others that prefer to deal with a reliable connection right away. The job of the transport layer is to ensure that applications or the upper layers of the stack - application and session - transfer data with the degree of reliability that they require. The OSI model defines five classes of service provided by the transport layer.
As a rule, all protocols, starting from the transport layer and above, are implemented by software of the end nodes of the network - components of their network operating systems. Examples of transport protocols include the TCP and UDP protocols of the TCP/IP stack and the SPX protocol of the Novell stack.
Session level. The session layer provides conversation management to record which party is currently active and also provides synchronization facilities. The latter allow you to insert checkpoints into long transfers, so that in case of failure you can go back to the last checkpoint, instead of starting all over again. In practice, few applications use the session layer, and it is rarely implemented.
Presentation level. This layer provides assurance that information conveyed by the application layer will be understood by the application layer in another system. If necessary, the presentation layer converts data formats into some common presentation format, and at the reception, accordingly, performs the reverse conversion. In this way, application layers can overcome, for example, syntactic differences in data representation. At this level, encryption and decryption of data can be performed, thanks to which the secrecy of data exchange is ensured for all application services at once. An example of a protocol that operates at the presentation layer is the Secure Socket Layer (SSL) protocol, which provides secure messaging for the application layer protocols of the TCP/IP stack.
Application layer. The application layer is really just a set of various protocols through which network users access shared resources such as files, printers, or hypertext Web pages, and also organize their collaboration, for example, using the electronic mail protocol. The unit of data that the application layer operates on is usually called a message.
There is a very wide variety of application layer protocols. Let us give as examples at least a few of the most common implementations of file services: NCP in the Novell NetWare operating system, SMB in Microsoft Windows NT, NFS, FTP and TFTP, which are part of the TCP/IP stack.

Application interaction protocols and transport subsystem protocols

Functions at all layers of the OSI model can be classified into one of two groups: either functions that depend on a specific technical implementation of the network, or functions that are oriented to work with applications.
The three lower levels - physical, channel and network - are network-dependent, that is, the protocols of these levels are closely related to the technical implementation of the network and the communication equipment used.
The three upper levels - session, presentation and application - are application-oriented and depend little on the technical features of network construction. The protocols at these layers are not affected by any changes in network topology, hardware replacement, or migration to another network technology.
The transport layer is the intermediate layer, it hides all the details of the functioning of the lower layers from the upper layers. This allows you to develop applications that are independent of the technical means directly involved in transporting messages.

Figure 2 shows the layers of the OSI model at which the various network elements operate.
A computer with a network OS installed on it interacts with another computer using protocols of all seven levels. Computers carry out this interaction through various communication devices: hubs, modems, bridges, switches, routers, multiplexers. Depending on the type, a communication device can operate either only at the physical layer (repeater), or at the physical and link level (bridge and switch), or at the physical, link and network layer, sometimes including the transport layer (router).

Functional correspondence of types of communication equipment to the levels of the OSI model

The best way to understand the differences between network adapters, repeaters, bridges/switches, and routers is to think of them in terms of the OSI model. The relationship between the functions of these devices and the layers of the OSI model is shown in Figure 3.

A repeater, which regenerates signals, thereby allowing you to increase the length of the network, operates at the physical level.
The network adapter operates at the physical and data link layers. The physical layer includes that part of the functions of the network adapter that is associated with the reception and transmission of signals over the communication line, and gaining access to the shared transmission medium and recognizing the MAC address of the computer is already a function of the link layer.
Bridges do most of their work at the data link layer. For them, the network is represented by a set of MAC addresses of devices. They extract these addresses from headers added to packets at the data link layer and use them during packet processing to decide which port to send a particular packet to. Bridges do not have access to higher-level network address information. Therefore, they are limited in making decisions about possible paths or routes for packets to travel through the network.
Routers operate at the network layer of the OSI model. For routers, a network is a set of device network addresses and a set of network paths. Routers analyze all possible paths between any two network nodes and choose the shortest one. When choosing, other factors may be taken into account, for example, the state of intermediate nodes and communication lines, line capacity or the cost of data transmission.
In order for a router to perform the functions assigned to it, it must have access to more detailed information about the network than that available to the bridge. In addition to the network address, the network layer packet header contains data, for example, about the criteria that should be used when choosing a route, about the lifetime of the packet in the network, and about which upper-level protocol the packet belongs to.
By using additional information, a router can perform more packet operations than a bridge/switch. Therefore, the software required to operate the router is more complex.
Figure 3 shows another type of communication device - a gateway, which can operate at any level of the OSI model. A gateway is a device that performs protocol translation. A gateway is placed between communicating networks and serves as an intermediary, translating messages coming from one network into the format of another network. The gateway can be implemented either purely by software installed on a regular computer, or on the basis of a specialized computer. Translating one protocol stack into another is a complex intellectual task that requires the most complete information about the network, so the gateway uses the headers of all translated protocols.

IEEE 802 Specification

Around the same time that the OSI model was introduced, the IEEE 802 specification was published, which effectively extends the OSI networking model. This expansion occurs at the data link and physical layers, which determine how more than one computer can access a network without conflicting with other computers on the network.
This standard details these layers by breaking the data link layer into 2 sublayers:
– Logical Link Control (LLC) – logical link control sublevel. Manages connections between data channels and defines the use of logical interface points, called Services Access Points, which other computers can use to pass information to higher layers of the OSI model;
– Media Access Control (MAC) – device access control sublayer. Provides parallel access for several network adapters at the physical level, has direct interaction with the computer's network card and is responsible for ensuring error-free data transfer between computers on the network.

By protocol stack

A protocol suite (or protocol stack) is a combination of protocols that work together to provide network communication. These protocol suites are usually divided into three groups, corresponding to the OSI network model:
– network;
– transport;
– applied.
Network protocols provide the following services:
– addressing and routing of information;
– checking for errors;
– retransmission request;
– establishing rules of interaction in a specific network environment.
Popular network protocols:
– DDP (Delivery Datagram Protocol). The Apple data transfer protocol used in AppleTalk.
– IP (Internet Protocol). Part of the TCP/IP protocol suite that provides addressing and routing information.
– IPX (Internetwork Packet eXchange) and NWLink. A Novell NetWare networking protocol (and Microsoft's implementation of this protocol) used for routing and forwarding packets.
– NetBEUI. Developed jointly by IBM and Microsoft, this protocol provides transport services for NetBIOS.
Transport protocols are responsible for ensuring reliable transport of data between computers.
Popular transport protocols:
– ATP (AppleTalk Transaction Protocol) and NBP (Name Binding Protocol). AppleTalk session and transport protocols.
– NetBIOS/NetBEUI. The first one establishes a connection between computers, and the second one provides data transfer services for this connection.
– SPX (Sequenced Packet exchange) and NWLink. Novell's connection-oriented protocol used to provide data delivery (and Microsoft's implementation of this protocol).
– TCP (Transmission Control Protocol). Part of the TCP/IP protocol suite responsible for reliable data delivery.
Application protocols responsible for the interaction of applications.
Popular application protocols:
– AFP (AppleTalk File Protocol). Macintosh Remote File Management Protocol.
– FTP (File Transfer Protocol). Another member of the TCP/IP protocol suite, used to provide file transfer services.
– NCP (NetWare Core Protocol – NetWare Basic Protocol). Novell client shell and redirectors.
– SMTP (Simple Mail Transport Protocol). A member of the TCP/IP protocol suite responsible for transmitting electronic mail.
– SNMP (Simple Network Management Protocol). TCP/IP protocol used to manage and monitor network devices.

Topic 1.3: Open systems and the OSI model

Topic 1.4: Basics of local networks

Topic 1.5: Basic technologies of local networks

Topic 1.6: Basic software and hardware components of a LAN

Local networks

1.5. Basic technologies of local networks

1.5.2. Methods of data exchange in local networks

To control the exchange (network access control, network arbitration), various methods are used, the features of which largely depend on the network topology.

There are several groups of access methods based on time division of the channel:

  • centralized and decentralized;
  • deterministic and random.

Centralized access is controlled from a network control center, such as a server. The decentralized access method operates on the basis of protocols without control actions from the center.

Deterministic access provides each workstation with a guaranteed access time (for example, scheduled access time) to the data transmission medium. Random access is based on the equality of all stations in the network and their ability to access the medium at any time to transmit data.

Centralized access to mono channel

In networks with centralized access, two access methods are used: the polling method and the delegation method. These methods are used in networks with an explicit control center.

Survey method

Data exchange on a LAN with a star topology with an active center (central server). With a given topology, all stations can decide to transmit information to the server at the same time. The central server can communicate with only one workstation. Therefore, at any time it is necessary to select only one station broadcasting.

The central server sends requests to all stations in turn. Each workstation that wants to transmit data (the first one polled) sends a response or immediately begins transmission. After the end of the transmission session, the central server continues polling in a circle. Stations, in this case, have the following priorities: the maximum priority is for the one that is closest to the last station that completed the exchange.

Data exchange in a network with a bus topology. This topology may have the same centralized control as a star. One of the nodes (the central one) sends requests to all the others, finding out who wants to transmit, and then allows the transmission to whichever one of them, after the end of the transmission, reports it.

Transfer of authority method (passing token)

A token is a service package of a certain format into which clients can place their information packages. The sequence of transmitting a token over the network from one workstation to another is set by the server. The workstation receives permission to access the data transmission medium upon receipt of a special token packet. This access method for networks with bus and star topologies is provided by the ArcNet protocol.

Decentralized access to mono channel

Let's consider decentralized deterministic and random methods of access to the data transmission medium.

Decentralized deterministic access method

The decentralized deterministic method includes the token passing method. The token passing method uses a packet called a token. A token is a packet that does not have an address and circulates freely over the network; it can be free or busy.

Data exchange in a network with a ring topology (decentralized deterministic access method). This network uses the “token passing” access method.

The transfer algorithm is as follows:

  1. A node that wants to transmit waits for a free token, upon receiving which it marks it as busy (changes the corresponding bits), adds its own packet to it and sends the result further into the ring.
  2. Each node that receives such a token accepts it and checks whether the packet is addressed to it.
  3. If the packet is addressed to this node, then the node sets a specially allocated acknowledgment bit in the token and sends the modified token with the packet further.
  4. The transmitting node receives back its message that has passed through the entire ring, releases the token (marks it as free) and sends the token back to the network. In this case, the sending node knows whether its package was received or not.

For the normal functioning of this network, it is necessary that one of the computers or a special device ensure that the token is not lost, and if the token is lost, this computer must create it and launch it into the network.

Data exchange in a network with bus topology (decentralized random access method)

In this case, all nodes have equal access to the network and the decision when to transmit is made by each node locally, based on an analysis of the network state. Competition arises between nodes for network capture, and, therefore, conflicts between them are possible, as well as distortion of transmitted data due to packet overlap.

Let's look at the most commonly used carrier sense multiple access with collision detection (CSMA/CD).

The essence of the algorithm is as follows:

  1. A node that wants to transmit information monitors the state of the network, and as soon as it is free, it begins transmission.
  2. The node transmits data and simultaneously monitors the state of the network (carrier sensing and collision detection). If no collisions are detected, the transfer is completed.
  3. If a collision is detected, the node amplifies it (transmits some more time) to ensure detection by all transmitting nodes, and then stops transmitting. Other transmitting nodes do the same.
  4. After the failed attempt is terminated, the node waits for a randomly selected period of time tback and then repeats its attempt to transmit, while monitoring for collisions. In case of a second collision, trear increases. Eventually, one of the nodes gets ahead of the other nodes and successfully transmits the data. The CSMA/CD method is often called the race method. This method for networks with a bus topology is implemented by the Ethernet protocol.

Any network interaction on a LAN is based on connecting computers using a cable system (CS). CS implementation options can be different even with the same network operating technology. Ethernet LANs of 10 Base standards operate on bus technology using the CSMA/CD random access method to the common transmission medium. This operating principle can be implemented using various topologies (Fig. 1, 2). In Fig. Figure 1 shows a traditional bus topology in which the network cards (network adapters) of all nodes using transceivers (transceivers) are connected to a cable system common to all nodes. Thus, the network is configured on two types of coaxial cable: “thick” and “thin” Ethernet

(10Base-5 and 10Base-2 standards).

In the 10Base-T and 10Base-F standards, each of the nodes (Fig. 2) is connected to one of the ports of the multiport repeater - hub Hub (hub), the operation of which is based on the principle: the hub transmits a signal received on one of the ports to the outputs of all ports of the hub, with the exception of the port on which this signal was received. The connection is made using twisted pairs (10Base-T) or fiber optic cable (10Base-F). By the nature of the connection, this type of LAN is physically implemented as a “star”, and according to the hub operation algorithm, it retains all the features of the bus topology.



Similarly, the Token Ring network, which uses token ring technology, is physically configured as a star. The principle of concentrating some of the inter-node connections in the internal structure of the hub can be developed in order to achieve higher performance through parallel processing of intra-network traffic by connecting node segments to ports switch Switch (switch), but for now this is used in the logical structuring of the network.

Data exchange over the Ethernet network occurs in compliance with the following frame format:

Preamble

Address

recipient

Address

sender

Field length

data

Data field

46-1800 bytes

The preamble is a kind of synchronization signal, during 7 bytes of which a sequence of alternating 1s and 0s is transmitted, which ends (in the eighth byte) with the initial frame delimiter 1010101 1 . After the preamble, the receiver is ready to analyze the message recipient address.

The recipient and sender addresses are unique addresses for each of the network cards, specified by the manufacturer. These are the so-called physical addresses. The location of these addresses at the beginning of the frame convinces us that it is simply necessary to know them, regardless of the location of the recipient and sender in the overall distributed internetwork structure.

CRC – field for protecting information with a cyclic code.

Generally speaking, physical addresses might be enough for exchange within a small isolated network, but they are completely insufficient for organizing a session between nodes located on different subnets. This happens for the simple reason that it is impossible to track billions of adapter addresses, the composition of which changes dynamically due to the addition of new nodes to the network or the exclusion of any part of them, replacement of network equipment, etc.



Therefore, addressing nodes, regardless of their location, is performed according to a standard procedure, when each node, in addition to a physical address, is assigned another network an address that uniquely identifies both the network in which each node is located and the address of the node itself in this network. Since the IP network layer protocol determines the delivery route for a message in the TCP/IP protocol stack, this address is often called the IP address and is placed in the header of this protocol (Fig. 3).

Thus, in accordance with the physical address, each of the adapters decides whether or not to accept the signal acting at its input, and the IP address simply determines the location of the required network node.

Since the IP address of the message recipient is initially known (or can be determined through the domain name service DNS), and the physical address must be determined, the network software provides a standard procedure for broadcasting an ARP request, the meaning of which means: “The host with such and such an IP address! Please provide your physical address." Although there are other means, such as storing some collections of addresses in a cache and then retrieving them when needed, determining a physical address (called hardware address resolution) via a broadcast request is universal.

Structure and classesIP addresses

First of all, an IP address is not the address of a computer, but its network card. Therefore, if a computer has several network cards, then it has the same number of IP addresses (Fig. 4).

Rice. 4

The IP address currently consists of 4 bytes, and this 32-bit binary combination can be written in different ways, for example:

In binary: 10000110 00011000 00001000 01000010;

In decimal: 2249721922;

In hexadecimal: Ох86180842;

In dotted decimal: 134.24.8.66.

Due to greater ease of perception, it is customary to write the IP address in the form: decimal with a dot.

In its structure, it consists of two parts: the network identifier (number) and the node identifier occupying the right (lower) part of the address. To be able to rationally distribute address space among existing networks of various sizes, an address classification system is used. As can be seen from the table, class A is provided for numbering a relatively small number of very large networks (N max = 127), each of which contains up to M max = 16,777,216 nodes. The zero value of the most significant bit of the network identifier determines membership in class A.

Class

Elder

bits

IP- address

Identifier

networks

Identifier

node

For broadcasting

Similarly, class B contains up to N max = 16,384 networks with the number of nodes in each up to M max = 65,536, and class C includes N max = 2,097,152 networks with M max< 256 узлов.

By determining the decimal value of the high byte of the network identifier, you can determine membership in a specific class by IP address.

Network class

Range of high byte values

From 128 to 191

From 192 to 224

From 225 to 240

Additional conventions regarding the use of IP addresses are taken into account here:

If the network ID consists of all zeros, this means that the destination and origin nodes are on the same network;