Data exchange over the network. Methods of data exchange in local networks

In your home network Surely there are a wide variety of devices, 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 to flash drives and running from room to room, it is much more convenient to simply set up shared folders in 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 → Settings public access" Select the network you are connected to and enable the “Turn on network discovery” and “Turn on file and printer sharing” options.

Now click right click mouse over 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 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 file manager Nautilus.

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.


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 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 a certain part of 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 dynamically changes 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 is responsible for determining the message delivery route 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 cache memory and then retrieving them when necessary, defining 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 the membership of 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;

Sooner or later, when working with a local network, users need to transfer files from computer to computer. As a rule, there are no special problems with sending files over a local network: you can use standard tools in the Windows/Linux operating system or use additional software.

How to transfer files over a local network between 2 computers?

To send files over a local network using operating system the so-called . To do this, you need to open the folder properties (where the required file) and in the “Access” section allow you to use the computer on the network, view the folder and/or change and copy files.

This is not exactly transferring files from computer to computer, but the principle is similar: you will give the user access to the necessary files, and he will be able to open or copy the document he needs.

In addition, to share files over a local network, you can create one or all network computers“shared folder” into which the user will upload files through the “ network"/"Network", etc. (depending on the operating system used).

And anyone using a computer on the local network, if necessary, will be able to copy the necessary files to/from this folder.

A program for sharing files over a local network

For more advanced “users” (who do not want to use standard means OS or wants to receive additional features when transferring files over a local network) third-party software has been developed.

For example, the wonderful HTTP File Server program, which does not require installation, is suitable for exchanging files on a local network.

The main task of this program is the creation (or better said, imitation), which acts as a file hosting service.

After launching the program (it will be minimized to tray) the following will be presented:

Information about the “local IP address” - it will be indicated in address bar and it is also the server address;

  • - menu with available functionality;
  • - number of the listening port.

The program is only available on English language, but the interface is quite simple and understanding it will not be difficult.

So, to transfer a file from computer to computer via a local network, you need to:

In the "Virtual" window File System» right-click and select “Add File” or “Add folder from disk” (to select one file or a folder as a whole);

  • - by these actions you placed files on the server and opened them for downloading to other users;
  • - now to download this file from another computer you need to go to the address indicated at the top of the address bar (in the example it is “192.168.1.3”), select the desired file and download it.

The file hosting service is ready: local network users can add their files and folders through the program menu.

In addition, you can add accounts to restrict access to the file hosting service for third-party users (in this case, you will need to specify a login and password to download a file) or create local groups (so as not to “mix” all the files in one heap, but to structure them as needed).

Each network node, as a rule, works independently and can access the network at any time. Therefore, exchange control is required in order to streamline the use of the network by various nodes and prevent or resolve conflicts between them. Otherwise, the transmitted information may be distorted. To control the exchange (network access control, network arbitration), various methods are used,the features of which largely depend on the network topology .

DATA EXCHANGE IN THE NETWORK (TYPE - STAR) - With this topology, all nodes can decide to transmit information simultaneously. Most often, the central component can communicate with only one node. Therefore, at any time it is necessary to select only one peripheral node conducting the transmission.

There are two solutions to this problem.

1. "Active center". The central component sends requests to all computers in turn. Each computer that “wants” to transmit information (the first of those surveyed) sends a response or immediately begins transmission. After the end of the transmission session, the central component continues polling in a circle. Peripheral nodes, in in this case, have the following priorities: the maximum priority is for the one who is closest to the last subscriber who completed the exchange. The central component transmits without any queue.

2. "Passive center". In this case, the central component does not poll, but listens to all peripheral nodes. Those nodes that want to transmit periodically send requests and wait for a response. When the center receives a request, it responds to the requesting node (allows it to transmit), after which it begins transmission. The priorities here are the same as in case 1.

DATA EXCHANGE IN THE NETWORK (TYPE - BUS). In this topology, the same centralized control as in the "star" is possible. 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 reports it after the end of the transmission. The only difference is that it does not pump information from one node to another, but only controls access.

However, much more often decentralized control is implemented in the bus topology. In this case, all nodes have equal access to the network and the decision when to transmit is made by each node on the spot, 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.

There are many access algorithms, often very complex. We will look at the most commonly used carrier sense multiple access with collision detection (CSMA/CD). The essence of the algorithm is as follows:



a) a node that wants to transmit information monitors the state of the network, and as soon as it is free, it begins transmission;

b) 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;

c) 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;

d) after the unsuccessful attempt is terminated, the node waits for a randomly selected period of time t, and then repeats its attempt to transmit, while monitoring collisions.

In the event of a second collision, the rear increases.

The advantages of the method include the fact that even after the network is freed, all nodes remain equal and none of them can take over the network for a long time, although conflicts are inevitable.

DATA EXCHANGE IN THE NETWORK (TYPE - RING).

1. One of the principles of data transmission in a ring network is called “token passing”. A marker is a special type of message,

transmitted over a network from one node to another; the node that accepts the token gains the right to use the network channel. 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.

Although there is no explicitly designated center, it is necessary for one of the computers or a special device to ensure that the token is not lost (for example, if some node fails). It should be noted that in such a network there is a system of priority in data transmission: the right to transmit passes to the next node in the direction of the ring from the last transmitting node. But this is only relevant when the intensity of exchange is high; when it is low, all subscribers have equal rights.

At first glance, it seems that the transfer of the marker takes too long, but in fact, in a ring with a diameter of 200 m, the marker can circulate at a frequency of 10,000 revolutions per second.

2. Method of ring segments (slots). The main difference between this method and the token passing method is that multiple nodes are allowed to transmit at any time, whereas in the token method only one party always transmits. Instead of a token, the network uses several so-called slots (usually from 2 to 8), which essentially perform the same function as the token -. timestamp function. These slots go around the ring quite often, the time interval between them is small, and therefore little information can fit between them (usually from 8 to 32 bytes). In this case, the state of the slot can be free or occupied.

The algorithm for working with this method is as follows:

a) a node that wants to transmit parses its information into slots (small packets) established size;

b) then he waits for the arrival of a free slot and loads it with the first part of his information, then waits for the next free slot and places the second part in it, and so on until the entire amount of information is completely transferred. In each slot there is a bit that determines whether the slot is free or occupied, a field for the network address of the receiver and transmitter, and an end-of-transmission bit. Time

at this method transmissions are sampled and therefore no collisions occur.

c) the node to which the transmission is addressed selects slots containing information addressed specifically to it, and sets an acknowledgment bit in the received slot (another slot field), and continues this way until the last slot addressed to it;

d) the sending node receives its slots back through the “ring” and marks them as free. At the same time, it has an acknowledgment of reception (from the analysis of the acknowledgment bit).

Obviously, with this method, several nodes can transmit at once. Moreover, it is not at all necessary that each transmitting node occupies neighboring slots with its information: slots located nearby can contain information related to different nodes.

As in the marker method, here it is necessary to monitor the passage of slots and restore them if they disappear. The advantage is that the network simultaneously handles transmissions from several nodes.

Introduction

Let me assume that many of you have encountered the need to copy files from one PC or laptop to another. For these purposes, you can use various flash drives, disks, etc., but the most convenient and fastest way is to create a network. How to quickly create and configure such a network will be described in this material.

This material is intended primarily for those who do not have the time or desire to understand more deeply computer networks, studying the site materials, but you need to transfer files from one device to another.

The description will be made using the example of Windows XP and Windows Vista. There is no difference in setup between a PC and a laptop.

To organize file sharing, you must first create a network between devices, and then set up sharing. Let's get started.

Network creation

To transfer files, the most convenient and fastest way is to connect using a network cable. Network cables To create a network, there are direct and crossovers (crossovers). We need a crossover cable. You can buy it in a store or make it yourself. More details about how to make such a cable are described in this material:. It is worth noting that modern network cards are able to automatically detect the type of cable and adapt to it. In other words, if you don't have a crossover cable, you can use a straight cable. With a high degree of probability the network will work.

If for some reason using a wired network is not possible, then you can create a wireless one. The setup procedure is similar. More details about wireless networks described in this material:

Now let's start setting up the network.

Setting up a network in Windows XP

Let's go to Control Panel -> Network connections

Click on Connect to local network. Please note that the connection indicates Connected. Right-click and click on Properties

Choose Internet Protocol (TCP/IP) and click on Properties

Click OK. Network setup on one device (PC or laptop) is complete. Let's look at how the network will be configured in Windows Vista.

Setting up a network in Windows Vista

Let's go to Control Panel -> -> Managing network connections

Right-click on the local network connection and go to Properties:

Choose Internet Protocol Version 4 (TCP/IP) and click on Properties:

It should look something like this:

Now let's go to Network and Sharing Center and look at our network. It should be private. If it is not one, then click on Settings

Click Close:

That's all. We're done setting up the network on Vista. Now let's move on to the setup Public access

Setting up sharing in Windows XP

First we go to Service -> Folder properties:

On the tab View enable simple file sharing:

Press the button Change on the tab Computer name and enter the name working group. Two computers on the network must have the same workgroup name. On the same tab you can specify the name of the computer on the network.

Now let's go to My computer Sharing and security...

Click on the warning:

We indicate the name of the shared resource and allow (or not allow) modification of files over the network:

That's all

Setting up sharing in Windows Vista

First of all, we go to Control Panel -> Folder properties and check the box:

Click on Change:

Enter the name of the computer and workgroup. The workgroup name must be the same on all computers on the network:

Now let's go to Computer and click on the folder that needs to be accessed from the network, and select from the menu General access.... In my example, I open general access to the entire D: partition, that is, on another computer the entire D: partition of the first one (on which access was opened) will be displayed.

Click on Additional access:

Specify the name of the shared resource and click on Permissions

On this tab we can specify which users will be able to open and change files on this computer from the network:

This is what it should look like:

We are done with sharing on Windows Vista.

How to access shared resources on another computer

Once you have set up the network and file sharing, you can already transfer files from one computer to another.

To do this you need to open Computer and enter in the address bar \computer name. For example: \ASPIRE or \Athlon. It is also possible through network or Net. If this does not work, then you can enter the IP address of another computer on the network:

If you need to constantly work with shared files, which are located on another computer, then right-click on the shared folder and select To plug network drive . In this case, the folder with files on another computer will be displayed as a partition (disk)

Solving possible problems

If you are unable to access files on another computer, then you need to do the following:

1) see if it works network connection Are the lights on?
2) run Command line and enter the command ping the IP address of another computer on the network. For example, ping 192.168.1.1:

If you have pings (0% loss), then you need to check the sharing settings, otherwise check the network connection and firewall (firewall) settings

We ask all questions in this forum topic: