hi again,
my configuration like below
wangw pppoe
dhcprelay host 10.1.1.1
dhcprelay host 10.1.1.2
but these ipadress behind ipsec network then when i save button click dhcprelay command output like
/usr/local/sbin/dhcrelay -i igb2.64 -i pppoe0 -a -m replace 10.1.1.1 10.1.1.2
and then relay doesn't work
system logs
----------------------------------------------------------------------------------------------
Mar 12 12:38:43 dhcrelay Unsupported device type 53 for "pppoe0"
Mar 12 12:38:43 dhcrelay For info, please visit https://www.isc.org/software/dhcp/
Mar 12 12:38:43 dhcrelay All rights reserved.
Mar 12 12:38:43 dhcrelay Copyright 2004-2018 Internet Systems Consortium.
Mar 12 12:38:43 dhcrelay Internet Systems Consortium DHCP Relay Agent 4.4.1
Mar 12 12:34:24 dhcrelay exiting.
after that i default code is as below
foreach ($srvips as $srcidx => $srvip) {
$destif = guess_interface_from_ip($srvip);
if (!empty($destif)) {
$dhcrelayifs[] = $destif;
}
}
$dhcrelayifs = array_unique($dhcrelayifs);
/* fire up dhcrelay */
if (empty($dhcrelayifs)) {
log_error(gettext("No suitable interface found for running dhcrelay!"));
return; /* XXX */
}
$cmd = "/usr/local/sbin/dhcrelay -i " . implode(" -i ", $dhcrelayifs);
if (isset($dhcrelaycfg['agentoption'])) {
$cmd .= " -a -m replace";
}
$cmd .= " " . implode(" ", $srvips);
echo $cmd;
die();
mwexec($cmd);
unset($cmd);
and then i just added unset for pppoe
foreach ($srvips as $srcidx => $srvip) {
$destif = guess_interface_from_ip($srvip);
if (!empty($destif)) {
$dhcrelayifs[] = $destif;
}
}
$dhcrelayifs = array_unique($dhcrelayifs);
/* fire up dhcrelay */
if (empty($dhcrelayifs)) {
log_error(gettext("No suitable interface found for running dhcrelay!"));
return; /* XXX */
}
unset($dhcrelayifs[1]); //<-------------
$cmd = "/usr/local/sbin/dhcrelay -i " . implode(" -i ", $dhcrelayifs);
if (isset($dhcrelaycfg['agentoption'])) {
$cmd .= " -a -m replace";
}
$cmd .= " " . implode(" ", $srvips);
echo $cmd;
die();
mwexec($cmd);
unset($cmd);
the command out put like below after that dhcprelay does work
/usr/local/sbin/dhcrelay -i igb2.64 -a -m replace 10.16.16.30 10.16.16.29