In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how the Linux system modifies the mac address. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
MAC (Media Access Control, Media access Control), or MAC address, hardware address, is used to define the location of network devices. In the OSI model, the layer 3 network layer is responsible for the IP address, and the layer 2 data link layer is responsible for the MAC address.
MAC address introduction: MAC (Media Access Control, Media access Control), or MAC address, hardware address, is used to define the location of network devices.
In the OSI model, the layer 3 network layer is responsible for the IP address, and the layer 2 data link layer is responsible for the MAC address.
So a host will have an IP address, and each network location will have a MAC address dedicated to it.
MAC address, used to represent the identifier of each site on the Internet, expressed in hexadecimal numbers, a total of six bytes (48 bits).
Among them, the first three bytes are the codes assigned by IEEE's registration authority RA to different manufacturers (high 24 bits), also known as "compiling unique identifiers" (Organizationally Unique Identifier), and the last three bytes (low 24 bits) are assigned to the production adapter interface by each manufacturer, called extended identifiers (uniqueness).
An address block can generate 2 ^ 24 different addresses. The MAC address is actually the adapter address or adapter identifier EUI-48.
Detailed method for Linux system to modify MAC address: method 1:
Ifconfig eth0 downifconfig eth0 hw ether MAC address ifconfig eth0 up
Method 2: the MAC is restored to the original after the modified linux is restarted. In order to keep the modified MAC valid for the next startup, we can modify the contents of the file file: / etc/rc.d/rc.sysinit (RedFlag Linux is this file, other versions of linux should be different), and add the following at the end of the file:
Ifconfig eth0 downifconfig eth0 hw ether MAC address ifconfig eth0 up
Method 3: it's simple, just add the following sentence to. / etc/sysconfig/network-scripts/ifcfg-eth0:
MACADDR=00:AA:BB:CC:DD:EE
Method 4:
How to change the MAC address of network card under Linux
Vi / etc/network/interfaces adds the following hwaddress ether AA:BB:CC:DD:EE:FF to the configuration of eth0
After reading the above, do you have any further understanding of how the Linux system modifies the mac address? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.