When we learn about the network, we can see there are two address: IP address and MAC address.
So, what is difference between them? ๐ญ
- IP address:
- IP address function:
- It is used globally on the internet to transfer packets from source node to remote destination.
- Network layer(layer 3) address for node/router interfaces.
- 32 bit IPv4 address assigned by DHCP server.
- IP address function:
- MAC address (or LAN or physical or Ethernet address):
- MAC address function:
- It is used locally in the same subnet to transfer frame from one node to another physically-connected node.
- Data link layer (layer 2) address for node/router interfaces.
- 48 bit MAC address burned in NIC ROM.
- e.g. IA-2F-BB-76-09-AD
- MAC address function:
IP address:
- It is like a postal address!
- A hierarchical address, so it is not portable.
- address depends on IP subnet to which node is attached.
- The location of your subnet matters
- IP address changes when you move from a subnet to another subnet (gets a new IP from the new subnet)
MAC address:
- It is like a Social Security Number!
- A flat address, so it is portable.
- Remains the same while moving from a LAN to another.
- The location of your subnet does not matter.
- MAC address always remains the same even if you move from a subnet to another subnet (burnt on NIC card).
- MAC address allocation administered by IEEE.
'Computer Science ๐ > Network Programming ๐ฐ๏ธ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Ethernet (0) | 2023.04.20 |
---|---|
LAN address & APR (0) | 2023.04.20 |
NAT, Apr/14/2023 (0) | 2023.04.15 |
DNS(1), Apr/12/2023 (0) | 2023.04.13 |
HTTP(3), Apr/11/2023 (0) | 2023.04.12 |