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.

At present, I have:

  • a Netgear router with DHCP off at 192.168.0.1
  • my computer
    • eth0 at 192.168.0.2
    • wlan0 at 192.168.0.2

The wlan0 interface always connects to the router, while the eth0 interface connects to other computers with crossover and acts as a dnsmasq DHCP server for network boot and installation.

If I use the Gnome NetworkManager to enable both connections, that is, with wlan0 connected to the router/internet and eth0 to another computer, both as 192.168.0.2, I cannot access the internet while eth0 is connected.

Why is this? How can I configure my computer to follow wlan0 for Internet usage, but use eth0 for itself (the latter is working but blocking wlan0).

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You can't assign multiple interfaces to one IP address (that's not how ARP works). You can use multiple interfaces in a bridge and then assign an IP address to the bridge*. Note that this will give you one virtual interface, and all network devices will be on the same subnet (although they are already on the same subnet, DHCP requests aren't relayed from eth0 to wlan0) so you will either get DHCP from the Netgear or from your dnsmasq server depending on which packet gets there first.

*Bridge eth0 and wlan0 and then assign 192.168.0.2 to br0.

You can try configuring the interface metrics so that wlan0 is preferred over eth0, but this will result in any traffic being sent from your computer to go to the Netgear.

To be honest, you should look at different subnets.

share|improve this answer
1  
Thank you very much. –  Delan Azabani May 30 '10 at 9:20
3  
ARP has no problems with multiple IP addresses for the same device. In fact I use multiple IP addresses every day (try it using # ip a a). It's more likely the problems arise from improper routing configuration. –  artistoex Jan 18 '12 at 11:19
1  
@artistoex Great that your network's working for you! Don't know how that helps us. This is about two devices with the same address, not one device with two addresses. –  ta.speot.is Jan 18 '12 at 12:33
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.