Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is similar to this question. However I'm looking for an answer from a perspective of worst case scenario, and risks involved. I'm not interested in LACP or cnahhel bonding.


I have a computer with two network interfaces (eth0 and eth1).

eth0 is the interface which gets it IP via DHCP. It is used for accessing the internet.

eth1 is the interface with a fixed IP that is used to connect with some arbitrary network devices. It is never physically on the same subnet as eth0.

The worst case scenario is that eth0 gets the same IP via DHCP as eth1. Example:

  • eth0: 192.168.1.5
  • eth1: 192.168.1.5

From my current perspective, this wouldn't turn to be anything different than if they were on a different sub nets. Example:

  • eth0: 192.168.1.5
  • eth1: 10.5.100.100

The reason why i believe that is because in both cases the interface has to be explicitly specified and the interface is the unique identifier separating the two addresses. The perspective being observed here is from the point of the computer with two interfaces.

  • Is this true, or would some sort conflicts occur?
  • Is there a unique fixed IP that can be set on eth1 so that a conflict never occurs?
share|improve this question
    
Are you admin on the DHCP server on eth0's subnet? –  Envite Dec 16 '13 at 9:02
    
@Envite No, that's the point. I can connect to different subnets and get different IP's on eth0 and I wouldn't want that to mess up the connection with the device on eth1. –  Alan Dec 16 '13 at 9:10
    
Can you change the subnet on which eth1 works? –  Envite Dec 16 '13 at 9:11
    
@Envite I could, but that's not the point. I'm tiring to find out if it will be a problem if the IP become the same on both interfaces, and if so, why would it be a problem. –  Alan Dec 16 '13 at 9:16
add comment

1 Answer

up vote 1 down vote accepted

It will cause problems: the kernel does not accept to have two interfaces with the same address. It will raise an error when you (or the DHCP system) tries to assign the second one.

About choosing an IP address for eth1, any possible private address may conflict, but it is rare that you get a conflict if choose a strange enough one like 172.29.0.1 or 10.199.0.1

Another option is that you go to link local addresses like 169.254.1.1 as these will never be assigned by DHCP nor live in the Internet.

share|improve this answer
    
the kernel does not accept to have two interfaces with the same address Do you have a reference on that? I ask because arp -n has an Iface field. Tnx for the link local, didn't know about that. –  Alan Dec 16 '13 at 10:07
    
superuser.com/questions/146873/… –  Envite Dec 16 '13 at 11:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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