Mac and Windows share data via "direct connection" via network cable

1. Question raising

MacThe convenient "airdrop" in the ecosystem must have impressed many people. However, due to the special requirements of various purposes and usage scenarios, it is difficult for us to complete the task completely only in a Macsingle Windowsscenario. In this way, Macthe Windowsshared data will be in a certain situation. A degree of rigid need.

Of course, some people will say that there are many software for transferring files between LANs, such as LANDropetc., which greatly improves the efficiency of transferring files between two systems. However, in this scenario, on the one hand, there is uncertainty in the transmission speed and stability; on the other hand, such a LAN environment may not exist or may not be safe.

There are several problems after searching the relevant information on the Internet. First, the relevant articles introducing direct network connection are mainly focused on the Windowsenvironment. Second, some articles only focus on the purpose and the configuration is too simple and crude, which may lead to security risks during use. Third, some articles focus too much on network security, making the configuration too cumbersome.

Therefore, this article is based on the existing problems, focuses on data sharing Macbetween Windowsusers, clarifies some issues that have not been discussed in the past, and provides a configuration solution suitable for actual environments that takes into account security and convenience.

2. Necessary conditions

  • Hardware requirements:
    First of all, two physical network cards are required. WindowsEquipment generally has two network cards, one wireless network card and one wired network card. MacGenerally, USB Huba considerable number of devices need USB Hubto have their own network cards.
  • Parameter requirements:
    Network cards currently on the market are generally Gigabit network cards. Considering USBthe complexity of the interface standards of the equipment, Gigabit network cards can actually cope with most application scenarios. If you consider that some users may transfer video material or want a more extreme user experience, you may consider using 2.5Ga network card.
  • MacNetwork card parameters
    Insert image description here
  • WindowsNetwork card parameters
    Insert image description here

3. Parameter setting

3.1 Network card parameter setting

Connecting two computers through a network cable is the most primitive way of LAN networking. However, the two computers cannot communicate directly at this time. To be able to communicate between two computers, two conditions need to be met. First, the two computers need to establish an Physical connection, secondly, a logical connection needs to be established between the two computers. Because a direct connection has been established between the two computers through a network cable, the two computers communicate directly. At this time, you only need to configure the logical connection, that is, the IPaddress and subnet mask, and there is no need to configure a gateway DNS.

Because some network documents share data through routing or within an established LAN, the computer Adoes not need to configure the gateway DNS. The computer Bneeds to set the gateway to the computer A's IPaddress, and DNSdoes not need to be configured.

To establish a logical connection between two computers, you only need to set the two computers on the same network segment, that is, the IPfirst three digits of the address are the same and the last digit is different. In addition, it should be noted that the focus of this tutorial is that the sharing of data Macbetween Windowscomputers does not involve the sharing of the network. The connection between the two computers and the Internet is handled by separate network cards, so there is no need to modify the routing table. . Some network literature here will emphasize the configuration of the gateway, which is actually not accurate because Windwostwo gateways are not allowed to exist at the same time. If you must share the network or use it in a LAN environment, please consider using routethe command to modify the routing table information to configure dual network cards.

  • WindowsNetwork card configuration
    Insert image description here
    Insert image description here
    Insert image description here
    Insert image description here
  • MacNetwork card configuration
    Insert image description here
  • Network connectivity test.
    If the two computers can pingcommunicate, it means that the logical connection is successfully established. If they cannot, it pingmeans that the logical connection is not established. At this time, you need to check whether the network card configuration is correct or modify the firewall configuration.
ping 192.168.1.2

Insert image description here

3.2 Create dedicated shared users

This part of the configuration has two main purposes. One is to deal with the situation where some Windwosusers Administratorfail to share after opening the user. The other is for network security purposes. Of course, this tutorial only considers basic security configuration. WindowsAfter the user turns on Administratorthe user, the user will be asked to enter a password during the process of sharing data. In fact, the account may not have a password, causing the data sharing to fail. In addition, when the sharing fails, some online tutorials give The solution is to enable SMB V1.0or enable Guestthe user or Everyoneadd the user to the security group. Doing so has very large potential security risks.

Based on security considerations, this tutorial creates a new user specifically for data and performs basic configuration of user permissions.

  • Create dedicated user
    Insert image description here
    Insert image description here
    Insert image description here

3.3 Configure user permissions

WindowsUse in to win + rcall "Run" and secpol.mscopen the "Local Security Policy" settings window via
Insert image description here

  • Grant the user "Access this computer from the network" permission
    Insert image description here
    Insert image description here
  • Restrict this user from logging into the system
    Insert image description here

3.4 Shared parameter configuration

Insert image description here
Insert image description here

  • Network discovery does not need to be turned on
  • File and printer sharing must be turned on
    Insert image description here
    Insert image description here
  • It is recommended to enable password-protected sharing to prevent unexpected situations.

Insert image description here

4. SMB share configuration

What this tutorial shares is composed of two small-capacity solid-state drives Raid, Windowswhich is equivalent to a disk in . If you turn on "Sharing without password protection" and add it Everyoneto the security policy group according to the relevant literature in the network, there will be quite serious security risks. This tutorial adopts "Sharing with password protection" while taking into account security and convenience. ”, so you only need to consider the shared permission configuration without having to modify the security policy.
Insert image description here

5. Effect test

  • MacConnect Windowsshared disk
    • Shortcut key command + kto open the connection server interface and enter the address WindowsofIP
192.168.1.1

Insert image description here
Insert image description here
Insert image description here
Insert image description here

  • speed test
    • 6.09GBThe file transfer takes less than 1 minute, and the speed easily exceeds 100Mb/s
      Insert image description here

Insert image description here

references

  1. Two computers are connected with a network cable (can the two computers communicate with each other if they are directly connected to the network cable?)
  2. Share files between two computers directly connected via network cable
  3. Mac OS X access Windows shared folders
  4. MAC computer connected to windows desktop
  5. mac configuration dual network card mac uses the internal network and external network at the same time
  6. The easiest way to connect two computers: direct connection
  7. Use SMB sharing safely and correctly under Windows 10/11
  8. Windows network shared files
  9. win10 "You cannot access this shared folder because your organization's security policy blocks unauthenticated guest access."
  10. Folder settings sharing, add Everyone
  11. Windows shared folder, set up passwordless access

Guess you like

Origin blog.csdn.net/Y1575071736/article/details/130869548