IP – Is a Network Interface Card (NIC) Required for IP Addresses?

ipnic

Here is the command to assign IP address to an interface for Linux server.

ip addr add ADDRESS dev IFNAME

Where IFNAME is the interface name and ADDRESS is the IP address you want to assign to the interface.

To add address 192.168.121.45 with netmask 24 to device eth0, you would type:

sudo ip address add 192.168.121.45/24 dev eth0

NIC belongs to the physical layer, IP belongs to the IP layer, they are independent. I would like to ask further questions to figure out the relation between NIC and IP address.

  • Is the NIC prerequisite of IP address?
  • Must IP address be attached to a NIC?
  • Can ip address live alone on IP layer without NIC?

Reference

  1. Linux ip Command: Assign IP addresses to an interface
  2. serverFault: Can a single network card have 2 IP addresses?

Best Answer

You don't necessarily need a NIC (physical interface). You need an interface though, either physical, logical or virtual.

There are loopback interfaces, built into the local TCP/IP stack, virtual NICs (vNICs) for virtual machines, switch virtual interfaces (SVIs) for routing on layer-3 switches, TUN/TAP interfaces for VPN, and many other types of virtual interfaces.