QnA

network-address

Q&A 정리: network-address

MAC 주소란 무엇인가?

네트워크 장비(랜카드 등)에 공장에서 새겨 넣는 고유 식별번호로, 사람으로 치면 주민등록번호와 비슷하다. 같은 네트워크 안에서 장치끼리 서로를 구별하는 데 쓰인다.

A MAC address is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment.

MAC addresses are primarily assigned by device manufacturers, and are therefore often referred to as a physical address.


IP 주소와 MAC 주소의 역할 차이는?

MAC 주소가 장치 자체의 이름표라면, IP 주소는 그 장치가 네트워크 어디에 있는지 알려주는 우편 주소다. IP 주소 덕분에 데이터가 올바른 네트워크 경로를 찾아갈 수 있다.

IP addresses serve two main functions: network interface identification, and location addressing.


논리 주소(IP)가 있는데 물리 주소(MAC)가 왜 필요한가?

IP 주소는 목적지 건물의 주소이고, MAC 주소는 그 건물 안에서 실제로 택배를 받을 사람의 이름이다. 같은 네트워크 안에서 최종 수신자를 특정하려면 MAC 주소가 필요하며, ARP라는 프로토콜이 IP 주소를 MAC 주소로 변환해 준다.

The Address Resolution Protocol (ARP) is a communication protocol for discovering the link layer address, such as a MAC address, associated with an internet layer address, typically an IPv4 address.

ARP enables a host to send, for example, an IPv4 packet to another node in the local network by providing a protocol to get the MAC address associated with an IP address.


ARP(Address Resolution Protocol)란 무엇인가?

IP 주소만 알고 MAC 주소를 모를 때, "이 IP 쓰는 사람 누구야?"라고 네트워크 전체에 방송하면 해당 장치가 자신의 MAC 주소로 응답하는 프로토콜이다. 같은 네트워크 안에서만 작동하며, IPv6에서는 NDP라는 후속 프로토콜이 이 역할을 대신한다.

The Address Resolution Protocol (ARP) is a communication protocol for discovering the link layer address, such as a MAC address, associated with an internet layer address, typically an IPv4 address.

ARP enables a host to send, for example, an IPv4 packet to another node in the local network by providing a protocol to get the MAC address associated with an IP address. The host broadcasts a request containing the target node's IP address, and the node with that IP address replies with its MAC address.

It is communicated within the boundaries of a single subnetwork and is never routed.

In Internet Protocol Version 6 (IPv6) networks, the functionality of ARP is provided by the Neighbor Discovery Protocol (NDP).


MAC 주소가 전 세계적으로 고유한데 왜 호스트를 찾으려면 IP 주소가 필요한가?

MAC 주소는 장치의 고유 이름이지만 위치 정보가 없다. 마치 주민등록번호만으로는 그 사람이 어디 사는지 알 수 없는 것과 같다. IP 주소는 네트워크상의 위치를 포함하고 있어서 데이터가 경로를 따라 목적지까지 찾아갈 수 있게 해 준다.

An IP address serves two principal functions: it identifies the host, or more specifically, its network interface, and it provides the location of the host in the network, and thus, the capability of establishing a path to that host.


네트워크 내에서 호스트를 어떻게 식별하는가?

네트워크에 연결된 각 장치(호스트)는 네트워크 주소라는 고유한 번호를 부여받아 식별된다. 네트워크 장비는 이 주소를 보고 데이터를 정확한 장치에게 전달한다.

Within a computer network, hosts are identified by network addresses, which allow networking hardware to locate and identify hosts.


호스트명이란 무엇이며 네트워크 주소로 어떻게 변환되는가?

호스트명은 숫자로 된 네트워크 주소 대신 사람이 기억하기 쉽게 붙인 이름이다. 예를 들어 "google.com" 같은 이름이 호스트명이며, DNS 같은 이름 서버가 이 이름을 실제 네트워크 주소로 변환해 준다.

Hosts may also have hostnames, memorable labels for the host nodes, which can be mapped to a network address using a hosts file or a name server such as Domain Name Service.


Static IP와 Dynamic IP의 차이는?

Static IP는 장치에 고정으로 배정된 주소로, 항상 같은 주소를 쓴다. Dynamic IP는 장치가 네트워크에 접속할 때마다 자동으로 새 주소를 받는 방식이다. 집 주소가 바뀌지 않는 자가 vs 매번 다른 방을 배정받는 호텔에 비유할 수 있다.

IP addresses are assigned to a host either dynamically as they join the network, or persistently by configuration of the host hardware or software. Persistent configuration is also known as using a static IP address. In contrast, when a computer's IP address is assigned each time it restarts, this is known as using a dynamic IP address.


Unicast의 한계와, Broadcast/Multicast/Anycast는 각각 어떻게 다른가?

Unicast는 1:1 전송이라 같은 데이터를 여러 명에게 보내려면 반복해서 보내야 한다. Broadcast는 네트워크 전체에 한 번에 뿌리는 방식이고, Multicast는 관심 있는 그룹에게만 한 번에 보내는 방식이다. Anycast는 여러 수신자 중 가장 가까운 한 명에게만 전달하며, 전 세계에 분산된 서버 중 가장 빠른 곳으로 연결하는 데 활용된다.

Sending the same data to multiple unicast addresses requires the sender to send all the data many times over, once for each recipient.

Broadcasting is an addressing technique available in IPv4 to address data to all possible destinations on a network in one transmission operation as an all-hosts broadcast. IPv6 does not implement broadcast addressing and replaces it with multicast to the specially defined all-nodes multicast address.

A multicast address is associated with a group of interested receivers. The sender sends a single datagram from its unicast address to the multicast group address, and the intermediary routers take care of making copies and sending them to all interested receivers (those that have joined the corresponding multicast group).

Like broadcast and multicast, anycast is a one-to-many routing topology. However, the data stream is not transmitted to all receivers, just the one that the router decides is closest in the network. Anycast methods are useful for global load balancing and are commonly used in distributed DNS systems.


NAT(Network Address Translation)란 무엇이며, 사설 IP를 가진 장치가 인터넷과 통신할 수 있는 원리는?

회사나 가정의 여러 장치가 하나의 공인 IP 주소를 공유해서 인터넷에 접속하게 해 주는 기술이다. 공유 오피스의 대표 전화번호처럼, 외부에서는 하나의 주소만 보이지만 내부에서는 각 장치가 서로 다른 사설 주소를 사용한다. 공유기(라우터)가 내부 주소와 외부 주소를 변환하는 역할을 한다.

A common practice is to have a NAT device mask many devices in a private network. Only the public interfaces of the NAT device need to have an Internet-routable address.

The NAT device maps different IP addresses on the private network to different TCP or UDP port numbers on the public network. In residential networks, NAT functions are usually implemented in a residential gateway. In this scenario, the computers connected to the router have private IP addresses, and the router has a public address on its external interface to communicate on the Internet. The internal computers appear to share one public IP address.