Networking – Can a Computer with 2 Network Cards Have the Same IP Address for Both?

iplannetworking

While answering this question I found something I didn't know and couldn't find an answer for.

In the context of the above question if a computer / server has 2 LAN ports built in on the motherboard (Or 2 seperate Network Cards) should these 2 cards have the same IP address e.g 10.0.0.1 or should they both have different addresses e.g
Port 1 10.0.0.1
Port 2 10.0.0.2
Hypothesising that the user wants just to connect 2 other computers to the servers 2 LAN ports using crossover cable.

I would think they had to have different 2 seperate IP addresses but was wondering what that would mean if using DNS. Would the server have 2 seperate records in DNS. Could it be contacted by either? Which would take precedence?

Any answers on this topic or further information would be greatly appreciated.

Best Answer

Yes and no.

While e40 is correct in thinking that IP addresses should be unique within a routing domain (i.e. there should ever only be one 10.0.0.1 present on your network - see RFC 5889) you can have multiple hardware devices underlying that single IP address. This is generally done with Link Aggregation Control Protocol (LACP). LACP can function at any of the three lowest OSI layers which of course includes IP. The method in which the IP address is "resolved" (at Layer-3) to which specific MAC address (at Layer-2) for frame delivery is largely implementation dependent (although generally it's round robin).

You could configure IP address aliases on each device so that each NIC could be reachable individually or through the "virtual" IP address that represents the bonded NIC (both devices).

Related Question