I heard MAC address is assigned to a network interface. A computer or router can have multiple network interfaces, so can have multiple MAC addresses.

Is IP address assigned to a network interface too?

When a computer or router has multiple network interfaces, will it have multiple IP addresses?



Short answer: Yes

IP can either be set manually (also known as Static IP), or dynamically (commonly referred to as DHCP). A device with multiple interfaces in use normally has multiple IPs assigned to it, often with a varying mix between static or dynamic configuration.

It should be noted that the same interface can also have multiple IPs, but that's beyond the scope of this answer.

MAC address (also known as the hardware address) is not set by the user or system administrator, but is set by the manufacturer. MAC addresses are supposed to be unique, so the first half defines the manufacturer, and the second half in set according to the manufacturers system (some devices use this portion as the serial number). While it is possible to change ones MAC address, this is normally something one would not need to do.

A device with multiple interfaces has multiple MAC address as well, but for some devices these normally follow a pattern. In addition, wireless access points normally have the first 5 octets of the MAC address set at the factory, and the last octet is set on-the-fly for each wireless network it hosts (for example, the HP MSM310 and MSM320 access points does this).

To sum it up: One address per interface. IP set by the user or the sysadmin, while MAC is set by the manufacturer.

  • One network interface can have one MAC Address.
  • One network interface can have multiple IP Addresses.
  • The system may have multiple network interfaces.

Poor implementation of the device can have multiple network interfaces and one MAC address. In fact, this failure. But I know of cases older four port network card with one MAC Address.


Short answer: depends on the operating system.

Linux tends to treat the IP address as belonging to the host, not the interface.
This can cause a problem known as ARP flux.
E.g. see Linux considers an ip address as belonging to a host rather than an interface?
The Linux kernel may be patched or built to prevent this issue, and treat the IP addresses as if they were assigned to each interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.