Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running RHEL5.5 and have several network interfaces (eth0, eth1, eth2) on the machine. I wish to make /sbin/dhclient bind its UDP port 68 on specific interfaces (eth0 and eth2) but when I do 'netstat -anp | grep 68' I see:

udp        0      0 0.0.0.0:68       0.0.0.0:*                 6109/dhclient

which interferes with another software daemon running its own DHCP client that wishes to run on a specific interface (eth1) not serviced by /sbin/dhclient

Can I get /sbin/dhclient to not bind to UDP port 0.0.0.0:68?

I have configured /etc/dhclient.conf to only service the interfaces I want (eth0 and eth2 in this case) but it still binds to 0.0.0.0:68 which prevents the custom DHCP client from running on eth1.

Any help appreciated, thanks.

share|improve this question

2 Answers 2

DHCP by definition works by the client using the broadcast address to find all responding DHCP servers. It then chooses one of them (based on an algorithm, and AFAIK this is mostly to do with response times) and asks for an address. This address is then bound to the interface that is being configured.

Again, by definition, broadcasts are sent on all network interfaces. So, unless you are willing to write your own DHCP client (the sources are freely available), there is not much you can do about that.

However, you could use a different port. Read the man page for dhclient for details. This would then also require a DHCP server that listens on that port. The standard ISC DHCP server supports this with the -p option. Again, read the man page for dhcpd.

share|improve this answer

do you have access to switches ? you can easily do it by using VLANs

also you may could do it by using marking from iptables.

share|improve this answer
1  
Why the negative ? –  Nikolaidis Fotis Oct 1 '10 at 13:14

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.