Why eth1 with auto dhcp disturbs pppoe over eth0?

Hi, I use ubuntu 16.04 desktop with ufw (default setup + 22, 80, 443 ports open).

I connect directly to ISP using pppoe over eth0. I also have eth1 which when disabled the websites are accessible in browser. When starting eth1 with auto dhcp the websites are no longer accessible in browser (give a timeout while trying to load). eth1 is plugged in a LAN port of a router with its WAN port unplugged (yeah, don't ask why). When setting a manual ip on eth1 while gateway and dns are left blank the websites are accessible in browser again.

Why this happens?

You have already said it: DHCP (dynamic host configuration protocol) is a method of not only setting an IP address but to configure the whole IP stack of a system: this includes (but is not limited to:

  • IP adresses
  • subnet masks
  • static routes
  • name resolution

What exactly you get from the DHCP-server is configured there, not your system and chances are the DHCP-server is just configured badly.

So, if you connect to your first DHCP-server on eth0 you get everything configured right and your browsing is working. The second DHCP-server is perhaps configured the same way but because there is no outside connection you cannot use what it configures on your system and therefore the configuration is wrong and if you use that your working config is overwritten by a not-working config. Actually, you can use the IP-address you get, but not the DNS server and/or static routes that come along with it.

Configure the DHCP for your second interface for "DHCP (addresses only)" so that it doesn't overwrite the content of your file /etc/resolv.conf when configuring an IP address. Otherwise get the DHCP-server configured correctly so that it doesn't send certain "option fields" (DHCP-terminology) or fill them with values which work.

I hope this helps.

bakunin

1 Like

Thank you and I consider this thread SOLVED.

Hi adrhc,
I'm glad that you got the help you needed.

To mark a thread solved, hit the "Edit Tags" button in the upper right corner of the Tags box at the top of every page of this thread and add the tag "solved". I have done that for you for this thread.

1 Like