eth0| S |        +----------+
internet ======|   |        |          |------PC1
               | / |        |  switch  |------PC2
               |   |========|          |------PC3
               | R |eth1    +----------+

S/R: Server as Router

eth0: connection from the internet/other network        
eth1: internal network        
PC1,PC2,PC3: Ubuntu OS  

*addition PC4 connected to switch which is on windows OS.

I set PC1, PC2 and PC4 to auto DHCP to have an access with the network and internet but

PC3 is on static.      
PC3 has an IP address same of a router(dhcp:interface=eth1). e.g.        


Problem encounter:
The PC4 can access to the network/internet while
PC1 and PC2 cannot.

Window OS automatically can detect real gateway(router) while
Ubuntu OS cannot. :(

How can we fix this if someone configured a static ip add same with the gateway(router)?


Honestly, this sounds more like a user problem than a technological one. Just don't allow people on your home network if they cannot configure their devices correctly.

When configuring addresses manually, people tend to choose them from the low end of the address space. You could move your gateway to .254, set your DHCP pool to .100 - .199 and keep statically allocated addresses in the low end of your subnet. Remeber to document everything (a single post-it will do!) so that people don't reuse existing allocations.

You could also set the ARP tables manually on the PCs to point to the eth1 interface of S/R. On the Linux PCs, run sudo arp -i <iface> -s <macaddr> where <iface> is the Ethernet interface, likely eth0. <macaddr> is the hardware MAC address of the eth1 adapter on S/R, which you can find by running ifconfig eth1 on the server.

If you are a professional network admin, you likely already have the skills and hardware budget to keep misconfigured hosts from disrupting the network.

  • Hello Sir Andyn, is this automatically saved? – rjbarsal Jul 19 '13 at 7:29
  • The ARP cache is cleaned at least whenever the computers are rebooted. If you want to run it automatically, you could edit the /etc/network/interfaces file – andyn Jul 19 '13 at 7:58



iface eth0 inet dhcp
post-up arp -i <iface> -s <macaddr>    


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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