Ubuntu – DHCP Relay setup in ubuntu server

dhcpnetworkingUbuntu

I have a network appliance (QNO) that works as traffic load balancer and dhcp server. I would like to add a linux server in between the network appliance and the client computers. The linux server will be used to monitor bandwidth usage.

My problem is I still want DHCP to be served by the network appliance so that load balancing will still work efficiently. We are afraid that if we setup the linux server as the DHCP server the network appliance will not be able to load balance the traffic if it only sees the linux server as a single client connecting to it.

I've been searching all over for a tutorial on how to setup DHCP relay but have not found any. How do I setup DHCP relay on my linux server given there are two NICs attached to it, one connects the linux server to the network appliance and the other connects the linux server to the client computers.

EDIT

Router (DHCP) —-> [eth0] Linux Server (Relay agent) [eth1] —–> PC (network)

Router IP is 192.168.0.100
eth0 is on DHCP
eth1 is static 192.168.2.11 (if I need to change this I can)

Tried to do dhcrelay -i eth1 192.168.0.100, but the PC was not getting any DHCP lease from the DHCP router.

I might be missing something here.

Best Answer

In the simplest case it is

dhcrelay -i <interface_towards_clients> <ipaddress_of_DHCP_server>

See the man page to dhcrelay for details.

Related Topic