当前位置:网站首页>What is the difference between IP address and physical address
What is the difference between IP address and physical address
2022-07-07 16:20:00 【Full stack programmer webmaster】
So-called IP The address is given to each connection at Internet One assigned by the host on 32bit Address . Simply put, it's what you're doing on the Internet ID. MAC(Media Access Control, Media access control ) Address ( Physical address ) It's identification LAN( LAN ) Identification of nodes . The physical address of the network card is usually burned into the network card by the network card manufacturer EPROM( A kind of Flash memory chips , It is usually possible to write by program ), It stores the address of the computer that sends data and the host that receives data when transmitting data . It's your computer ID card ~ This address is determined by the network card , But you can change the physical address of the network card read by the system in the registry .
Mac The address is the address used on the media access layer , Generally speaking, it is the physical address of the network card , current Mac The address is generally 6 byte 48bit( In the early days, there were 2 byte 16bit Of Mac Address ).
about MAC Address , Because we don't contact it directly , So you may not be very familiar . stay OSI(Open System Interconnection, Open Systems Interconnection )7 Layer network protocol ( The physical layer , Data link layer , The network layer , Transport layer , The session layer , The presentation layer , application layer ) In the reference model , The second layer is the data link layer (Data Link). It contains two sub layers , The upper layer is logical link control (LLC:Logical Link Control), The next level is what we mentioned earlier MAC(Media Access Control) layer , Media access control layer . The so-called medium (Media),
It refers to the various physical environments through which signals are transmitted . Common network media include cables ( Such as : Twisted pair , Coaxial cable , Optical fiber ),
And microwaves 、 laser 、 Infrared, etc , Sometimes called physical media .MAC Address is also called physical address 、 Hardware address or link address , Written inside the hardware when produced by a network device manufacturer . This address has nothing to do with the network ,
That is, regardless of the hardware that will have this address ( Such as network card 、 A hub 、 Router, etc ) Where to access the network , It all has the same MAC Address ,MAC The address is generally unalterable , It cannot be set by the user .
MAC Before the address 24 It is from the manufacturer to IEEE The address of the manufacturer applying . after 24 The position is decided by the manufacturer .( In the early 2 Bytes without application )
One :IP Address and Mac What are the connections and differences between addresses
about IP Address , I believe everyone is familiar with , It means to use TCP/IP Protocol assigned to the host 32 Bit address .IP The addresses are separated by dots 4 individual 8 It's made up of octets , Such as 192.168.0.1 It's just one. IP Address , This is called dotted decimal format .IP The address consists of network address and host address , The number of bits allocated to these two parts varies with the address class (A class 、B class 、C Class etc. ) Different but different . Network address is used for routing , The host address is used to find a separate host within the network or subnet . One IP The address makes it possible to route data from the source address to the destination address .
Nowadays, many computers are built through local area networks , Then through the switch and Internet Connected . Then assign each user a fixed IP Address , Managed by the management center , In order to facilitate management, you need to use Mac Address to mark the user , Prevent confusion , Clear responsibility ( For example, cyber crime ). in addition IP Address and Mac The address is different , Although they are one-to-one correspondence in the LAN .IP The address is based on the current IPv4 Specified standards , Addresses that are easy to remember without hardware restrictions , and Mac The address is the physical address of the network card , It has something to do with hardware , It's hard to remember .
MAC The length of the address is 48 position (6 Bytes ), Usually expressed as 12 individual 16 Hexadecimal number , Every time 2 individual 16 The base numbers are separated by colons , Such as :08:00:20:0A:8C:6D It's just one. MAC Address , The top 6 position 16 Hexadecimal number 08:00:20 The number representing the network hardware manufacturer , It consists of IEEE(Istitute of Electrical and Electronics Engineers, Institute of electrical and Electronics Engineers ) Distribute , Then 3 position 16 Hexadecimal number 0A:8C:6D Represents a network product manufactured by the manufacturer ( Such as network card ) My serial number .
Every network manufacturer must ensure that every Ethernet device it manufactures 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 comes out of the factory with a unique MAC Address , Then why do you need to allocate another for each host IP The address? ? Or why each host is assigned a unique IP Address , Why in the network device ( Such as network card , A hub , Router, etc ) A unique... Is embedded in production MAC The address? ? The main reasons are as follows :(1)IP The allocation of addresses is based on the topology of the network , Not according to who made the network settings . If the efficient routing scheme is based on the equipment manufacturer rather than the topology of the network , This scheme is not feasible .
(2) When there is an additional layer of address addressing , Equipment is easier to move and maintain .
for example , If an Ethernet card breaks , Can be replaced , Without having to get a new IP Address . If one IP The host moves from one network to another , You can give it a new IP Address , Without a new network card .
(3) Whether it's a LAN , Or the communication between computers in the WAN , In the end, it is shown that the data packet starts from the initial node on some form of link , Passing from one node to another , Finally, it is transmitted to the destination node .
The movement of packets between these nodes is caused by ARP(Address Resolution Protocol: Address resolution protocol ) Responsible for IP Address mapping to MAC Address to complete .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113209.html Link to the original text :https://javaforall.cn
边栏推荐
- Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()
- Numpy -- data cleaning
- 121. The best time to buy and sell stocks
- 招标公告:盘锦市人民医院盘锦医院数据库维保项目
- 【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
- Continuous creation depends on it!
- Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
- There are many ways to realize the pause function in JS
- Numpy -- epidemic data analysis case
- Leetcode-136-只出现一次的数(用异或来解答)
猜你喜欢
Three. JS introductory learning notes 08:orbitcontrols JS plug-in - mouse control model rotation, zoom in, zoom out, translation, etc
Odoo integrated plausible embedded code monitoring platform
C4D learning notes 3- animation - animation rendering process case
2022第四届中国(济南)国际智慧养老产业展览会,山东老博会
The unity vector rotates at a point
喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
10 schemes to ensure interface data security
持续创作,还得靠它!
MySQL数据库基本操作-DQL-基本查询
Xcode Revoke certificate
随机推荐
Unity3D_ Class fishing project, bullet rebound effect is achieved
修改配置文件后tidb无法启动
Three. JS introductory learning notes 15: threejs frame animation module
Asyncio concept and usage
Rongyun won the 2022 China Xinchuang digital office portal excellence product award!
Power of leetcode-231-2
神经网络c语言中的指针是怎么回事
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
Wireless sensor networks -- ZigBee and 6LoWPAN
How to query the data of a certain day, a certain month, and a certain year in MySQL
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
平衡二叉树(AVL)
【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()
Notification uses full resolution
Three. JS introductory learning notes 05: external model import -c4d into JSON file for web pages
Mysql database backup script
通知Notification使用全解析
Odoo集成Plausible埋码监控平台