1

I have some basic questions as I am trying to understand the concept of network interfaces a bit better.

  1. Is network interface same as network interface card (NIC)? If not, what's the difference.
  2. What is unique identifier for NI? (Is it IP address)
  3. What is unique identifier for NIC? (Is it MAC address)
  4. Is it a 1:1 or 1:N or M:N relation between NI and NIC?
  5. Is it a 1:1 or 1:N or M:N relation between NI and IP Address (same for MAC address)
  6. Is it a 1:1 or 1:N or M:N relation between NIC and IP Address (same for MAC address)
  7. Can 2 hosts in same network have same IP address?
2
  • Removed the off-topic host question.
    – Ron Maupin
    Feb 12, 2021 at 0:23
  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Dec 23, 2021 at 16:32

2 Answers 2

1

A network interface card can have one or multiple network interfaces.

There are no specific external unique identifiers for a network interface. If an interface uses MAC addressing, the MAC addressing must only be unique on the local broadcast network. IP addressing can be reused in some circumstances. For example, most private networks use Private IPv4 addressing, and each of those networks probably has hosts with the same addresses in multiple networks.

Each interface will have its own MAC address, assuming it is for a protocol that uses MAC addresses (not all protocols use MAC addresses). Sometimes, multiple addresses can be bundled to use a single IP address for the multiple interfaces, and some interfaces can be configured to use subinterfaces where each subinterface has its own IP address. Also, IPv6 will almost always have multiple IP addresses on a single interface or subinterface.

Two hosts in the same network can be configured with the same IP address, but that will cause real problems.

0

Today, "NIC" most often stands for network interface controller - many NICs are embedded on the motherboard and not necessarily on an expansion card. The latter is just a carrier for one or more actual interfaces; dual- and quad-port cards are quite common.

Each interface is a) a physical layer component (L1), encoding the data and interfacing the cable, and b) a data link layer component (L2), handling the framing and addressing (where required).

The unique identifier may be its (perhaps MAC) address but sometimes it's just a physical port (e.g. for a serial interface).

When MAC addressing is used, an interface has one default ("hardware") address but it may be configured to use multiple addresses. So, the interface-MAC relation is often 1:1 but may be 1:N.

IP addressing (L3) sits on top of L2 (not part of the NIC but the OS stack). Each IP address is mapped to a MAC address, but potentially multiple IP addresses can map a common MAC address (when they use the same interface). So again, the MAC-IP relation is usually 1:1 but may also be 1:N.

In summary, no two hosts may use the same IP address (within the same subnet) because that would violate the MAC-IP relation or the interface-MAC relation (with a duplicate MAC).

Duplicate IP addressing can be used in a routed network with various workarounds (esp. NAT) but, for obvious reasons, that should be avoided at almost any cost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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