Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an embedded Debian Linux system. It has two network interfaces, eth0 and ppp0 via a cell modem. The problem I have is that when the system boots up it gets an address via DHCP on eth0. If the modem connects that then also gets it's own IP address and clobbers the contents of /etc/resolv.conf. In my application I need eth0 to be the default route if eth0 is alive. If I make eth0 the default route, DNS no longer works as the nameservers from the modem DHCP request are not reachable.

Curiously if I then run "dhclient eth0" after all this is running, it does the right thing and adds it's nameservers to the existing file, rather than clobbering it.

Is there any good and standard way of handling this dual DHCP network situation?

share|improve this question

1 Answer 1

man interface-order first.

There is a way as well to ignore some settings that DHCP provides. Check for prepend and request options at man dhclient.conf

share|improve this answer

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.