Ip – Why can a host with a single NIC and on two networks have 2 IP adresses

ipip addressNetworkprotocol-theory

I understand that an IP adress refers to a NIC and not to a host, therefore a single host can have as many IP adresses as NICs.

But Tannenbaum says:

It really refers to a network interface, so if a host is on two networks, it must have two IP addresses.

Can someone clarify this?

Best Answer

IP addresses are assigned to layer-3 interfaces (IP is a layer-3 protocol), either physical or virtual, and each interface can have multiple IP addresses. Multiple IP addresses are even required for IPv6, where you will have a Link-Local address and one or more Global and/or ULA addresses per interface.


I will give you an IPv4 example that happens. DHCP is normally confined to a single LAN because it uses broadcast (forget for a minute about DHCP relay because not every router supports that). That means that you would need a DHCP server on every network you have, but there are reasons you do not want to do that. One way around this is to connect the DHCP server via a trunk link. The DHCP server would have a single NIC, but it would have an address for every network that comes in through the trunk. It could have many addresses for networks served by that one NIC.

Related Topic