Linux Command

dhcrelay

Relaying DHCP and BOOTP requests can be provided using the dhcrelay command

Supplementary instructions

dhcrelay Command Use the dhcrelay command to provide relay DHCP and BOOTP requests from a subnet without a DHCP server to a direct connection to one or more DHCP servers in other subnets. This command is used on the DHCP relay server and supports both DHCPv4/BOOTP and DHCPv6 protocols.

grammar

dhcrelay [options] [DHCP server]

Options

-c <hop count> When forwarding packets, dhcrelay discards packets that have reached a maximum hop count. The default value is 10, the maximum value is 255
-4 Run the dhcrelay command as a DHCPv4/BOOTP relay agent. This is the default operating mode
-6 Run the dhcrelay command as a DHCPv6 relay agent
-q quiet mode
-p <port> Listen and send port. The default port of DHCPv4/BOOTP is 67, and the default port of DHCPv6 is 547
-A <length> specifies the maximum packet size sent to the DHCP server
-d forces the dhcrelay command to run as a foreground process

example

Specify the location of the DHCP server.

[root@localhost ~]# dhcrelay 192.168.0.2
Internet Systems Consortium DHCP Relay Agent4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/00:0c:29:fc:2f:ef
Sending on LPF/eth1/00:0c:29:fc:2f:ef
Listening on LPF/eth0/00:0c:27:fc:25:ec
Sending on LPF/eth0/00:0c:27:fc:25:ec
Sending on Socket/fallback
Keep reading

You may need these next

Related picks, plus your reading history and saved articles.