What is a MAC address - the basics
The Mac address is the address used on the media access layer. In layman's terms, it is the physical address of the network card. Today's Mac addresses generally use 6 bytes and 48 bits (in the early days, there were 2 bytes and 16 bit Mac addresses).
As for the MAC address, since we don’t have direct contact with it, everyone may not be very familiar with it. In the OSI (Open System Interconnection, Open System Interconnection) 7-layer network protocol (physical layer, data link layer, network layer, transport layer, session layer, presentation layer, application layer) reference model, the second layer is the data link Road layer (Data Link). It contains two sub-layers. The upper layer is Logical Link Control (LLC), and the lower layer is the MAC (Media Access Control) layer we mentioned earlier, which is the media access control layer. The so-called media refers to the various physical environments through which signals are transmitted. Commonly used network media include cables (such as twisted pairs, coaxial cables, optical fibers), microwaves, lasers, infrared, etc. The media are sometimes also called physical media. The MAC address is also called the physical address, hardware address or link address. It is written inside the hardware when it is produced by the network equipment manufacturer. This address has nothing to do with the network, that is, no matter where the hardware with this address (such as network card, hub, router, etc.) is connected to the network, it will have the same MAC address. The MAC address generally cannot be changed and cannot be changed by the user. Set it yourself. The first 24 digits of the MAC address are the manufacturer's address applied to IEEE by the manufacturer. The last 24 digits are determined by the manufacturer. (You don’t need to apply for the early 2-byte ones) 1: What is the connection and difference between IP address and Mac address? I believe everyone is familiar with the IP address, which refers to the 32-bit address assigned to the host using the TCP/IP protocol. An IP address consists of four 8-bit groups separated by dots. For example, 192.168.0.1 is an IP address. This writing method is called dotted decimal format. An IP address consists of two parts: a network address and a host address. The number of bits allocated to these two parts varies depending on the address class (Class A, Class B, Class C, etc.). Network addresses are used for routing, while host addresses are used to find an individual host within a network or subnet. An IP address makes it possible to route data from a source address to a destination address. Nowadays, many computers are connected to the Internet by first setting up a local area network and then through a switch. Then each user is assigned a fixed IP address, which is managed uniformly by the management center. In order to facilitate management, it is necessary to use the Mac address to identify the user, prevent confusion, and clarify responsibilities (such as cyber crimes). In addition, there is a difference between IP address and Mac address, although they have a one-to-one correspondence in the LAN. The IP address is specified according to the current IPv4 standard and is not restricted by hardware. It is an address that is easy to remember, but the Mac address is the physical address of the network card, which is somewhat related to the hardware and is more difficult to remember. The length of the MAC address is 48 bits (6 bytes), usually expressed as 12 hexadecimal numbers, and each two hexadecimal numbers are separated by colons, such as: 08:00:20:0A:8C :6D is a MAC address. The first 6 hexadecimal digits 08:00:20 represent the network hardware manufacturer's number. It is assigned by IEEE (Institute of Electrical and Electronics Engineers, Institute of Electrical and Electronics Engineers), and the last 3 digits represent the network hardware manufacturer's number. The hexadecimal number 0A:8C:6D represents the serial number of a certain network product (such as a network card) manufactured by the manufacturer. Each network manufacturer must ensure that every Ethernet device it makes has the same first three bytes and different last three bytes. This ensures that every Ethernet device in the world has a unique MAC address. Since every Ethernet device has a unique MAC address when it leaves the factory, why do we need to assign an IP address to each host? In other words, why is each host assigned a unique IP address, and why is it necessary to embed a unique MAC address in the production of network equipment (such as network cards, hubs, routers, etc.)? The main reasons are as follows: (1) IP addresses are assigned based on the topology of the network, not who created the network settings. It is not feasible to base an efficient routing solution on the basis of the equipment manufacturer rather than the topological location of the network. (2) Equipment is easier to move and repair when there is an additional layer of addressing. For example, if an Ethernet card breaks, it can be replaced without obtaining a new IP address. If an IP host moves from one network to another, it can be given a new IP address without the need for a new network card. (3) Whether it is a communication between computers in a local area network or a wide area network, the final performance is to transmit the data packet from the initial node on some form of link, from one node to another node, and finally to the destination. node. The movement of data packets between these nodes is completed by ARP (Address Resolution Protocol) which is responsible for mapping IP addresses to MAC addresses. |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
