Menu="parentname:nnn"
Title="_(Interface)_ ethX"
Tag="icon-ethernet"
---
<?PHP
/* Copyright 2005-2025, Lime Technology
 * Copyright 2012-2025, Bergware International.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2,
 * as published by the Free Software Foundation.
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 */
?>
<?
$locked = locked('ethX','ethX');

// get VLAN interfaces
$vlan_ethX = $sort_ethX = [];
if (!$locked && isset($ethX)) foreach (vlanID($ethX) as $key => $val) {$vlan_ethX[] = index($key); $sort_ethX[] = (int)$val;}
array_multisort($sort_ethX,$vlan_ethX);

$cmd = 'Down';
$more = true;
if (strpos($locked,'bond')===0 || strpos($locked,'br')===0) {
  [$master_ethX,$root] = my_explode(' ',$locked);
  $reason = _('member of')." $master_ethX ("._('see interface')." $root)";
  $class = 'green-text';
} elseif (exec("ip -br link show ethX | awk '{print \$2;exit}'")=='DOWN') {
  $reason = _("shutdown")." ("._("inactive").")";
  $class = 'blue-text';
  $cmd = 'Up';
} elseif (empty($ethX)) {
  $reason = _("not configured");
  $class = 'red-text';
} else {
  $more = false;
  $class = '';
}
?>
<script>
arg1.ethX = 'none';

$(function() {
  var form = document.ethX_settings;
<?if (!$service):?>
  $('#tabX').bind({click:function(){
    $('#bond-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:"_(None)_", width:166});
    $('#bridge-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:"_(None)_", width:166});
  }});
<?endif;?>
  $('#bond-ethX').dropdownchecklist({emptyText:"_(None)_", width:166});
  $('#bridge-ethX').dropdownchecklist({emptyText:"_(None)_", width:166});
  checkBondingSettings(form,0);
  checkBridgingSettings(form,0);
  checkNetworkAccess(form);
  selectProtocol(form);
  selectGW(form);
  selectMTU(form);
<?if (isset($master_ethX)):?>
  $('div.slave-ethX').hide();
  disableForm(form);
<?elseif ($service):?>
  disableForm(form);
<?endif;?>
<?if ($no_eth0):?>
  $('input[name="#shut_ethX"]').prop('disabled',true);
<?endif;?>
  portcheck('ethX');
  presetRun(form);
});
</script>

<form markdown="1" name="ethX_settings" method="POST" action="/update.php" target="progressFrame" onchange="signalRun(this,2)" onsubmit="return prepareSettings(this)">
<input type="hidden" name="#file" value="<?=$ini?>">
<input type="hidden" name="#include" value="/webGui/include/update.ethernet.php">
<input type="hidden" name="#section" value="ethX">
<input type="hidden" name="#command" value="/webGui/scripts/netconfig">
<input type="hidden" name="#arg[1]" value="">
<input type="hidden" name="BONDNAME" value="bondX">
<input type="hidden" name="BONDING_MIIMON" value="100">
<input type="hidden" name="BRNAME" value="brX">
<input type="hidden" name="BRSTP" value="no">
<input type="hidden" name="BRFD" value="0">

_(Interface description)_:
: <?if (!$more):?>
  <input type="text" name="DESCRIPTION:0" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($ethX,"DESCRIPTION:0"))?>">
  <span class="inline-block">
    <input type="button" class="form" value="_(Info)_" onclick="networkInfo('ethX')">
    </span>
  <?else:?>
    <span class="<?=$class?>"><?=$reason?></span>
  <?endif;?>

:eth_interface_description_help:

_(MAC address)_:
: <?=strtoupper(exec("ip link show ethX|grep -Pom1 'ether \K\S+'"))?>

:eth_mac_address_help:

<div markdown="1" class="slave-ethX">
_(Enable bonding)_:
: <select name="BONDING" onchange="checkBondingSettings(this.form,1)">
  <?=mk_option(_var($ethX,'BONDING'), "no", _("No"))?>
  <?=mk_option(_var($ethX,'BONDING'), "yes", _("Yes"))?>
  </select>

:eth_enable_bonding_help:

<div markdown="1" id="bond-members-ethX" class="'hide">
_(Bonding mode)_:
: <select name="BONDING_MODE" onchange="checkBondingSettings(this.form,-1)">
  <?=mk_option(_var($ethX,'BONDING_MODE'), "0", _("balance-rr")." (0)")?>
  <?=mk_option(_var($ethX,'BONDING_MODE'), "1", _("active-backup")." (1)",isset($ethX['BONDING_MODE'])?'':'selected')?>
  <?=mk_option(_var($ethX,'BONDING_MODE'), "2", _("balance-xor")." (2)")?>
  <?=mk_option(_var($ethX,'BONDING_MODE'), "3", _("broadcast")." (3)")?>
  <?=mk_option(_var($ethX,'BONDING_MODE'), "4", _("802.3ad")." (4)")?>
  <?=mk_option(_var($ethX,'BONDING_MODE'), "5", _("balance-tlb")." (5)")?>
  <?=mk_option(_var($ethX,'BONDING_MODE'), "6", _("balance-alb")." (6)")?>
  </select>
  <span id="attention0" class="hide">**_(Attention)_:** _(this mode requires a network switch with proper setup and support)_...</span>

:eth_bonding_mode_help:

_(Bonding members of)_ bondX:
: <select id="bond-ethX" name="BONDNICS" multiple="multiple" class="'hide">
  <?=mk_option(_var($ethX,'BONDNICS'),'ethX','ethX','selected disabled')?>
  <?foreach ($ports as $port):?>
  <?if ($port!='ethX' && !locked('ethX',$port)) echo mk_option_check(_var($ethX,'BONDNICS'),$port,$port)?>
  <?endforeach;?>
  </select>

:eth_bonding_members_help:

</div>
_(Enable bridging)_:
: <select name="BRIDGING" onchange="checkBridgingSettings(this.form,1)">
  <?=mk_option(_var($ethX,'BRIDGING'), "no", _("No"))?>
  <?=mk_option(_var($ethX,'BRIDGING'), "yes", _("Yes"))?>
  </select>

:eth_enable_bridging_help:

<div markdown="1" id="bridge-members-ethX" class="'hide">
_(Bridging members of)_ brX:
: <select id="bridge-ethX" name="BRNICS" multiple="multiple" class="'hide">
  <?=mk_option(_var($ethX,'BRNICS'),'ethX','ethX','selected disabled')?>
  <?foreach ($ports as $port):?>
  <?if ($port!='ethX' && !locked('ethX',$port)) echo mk_option_check(_var($ethX,'BRNICS'),$port,$port)?>
  <?endforeach;?>
  </select>

:eth_bridging_members_help:

</div>
_(Network protocol)_:
: <select name="PROTOCOL:0" onchange="selectProtocol(this.form,0,'slow')">
  <?=mk_option(_var($ethX,"PROTOCOL:0"), 'ipv4', _('IPv4 only'))?>
  <?=mk_option(_var($ethX,"PROTOCOL:0"), 'ipv6', _('IPv6 only'))?>
  <?=mk_option(_var($ethX,"PROTOCOL:0"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
  </select>

:eth_network_protocol_help:

<div markdown="1" class="ipv4-ethX-0 hide">
_(IPv4 address assignment)_:
: <select name="USE_DHCP:0" class="ctrl" onchange="selectProtocol(this.form,0,'slow')">
  <?=mk_option(_var($ethX,"USE_DHCP:0"), 'yes', _('Automatic'))?>
  <?=mk_option(_var($ethX,"USE_DHCP:0"), 'no', _('Static'))?>
  <?=mk_option(_var($ethX,"USE_DHCP:0"), '', _('None'))?>
  </select>
  <span class="gw4-ethX-0 hide"><input type="checkbox" name="USE_GW4:0" onchange="selectGW(this.form,4,0,'slow')" <?=(_var($ethX,"METRIC:0") == 0 || _var($ethX,"GATEWAY:0") == '') ? '' : 'checked'?>><?=$enable?></span>

:eth_ipv4_address_assignment_help:

<div markdown="1" class="more-ipv4-ethX-0 hide">
_(IPv4 address)_:
: <input type="text" name="IPADDR:0" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"IPADDR:0")?>" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:0" class="slim">
  <?foreach ($masks as $mask => $prefix) echo mk_option(_var($ethX,"NETMASK:0"), $mask, $prefix, _var($ethX,"NETMASK:0")=='' && $prefix=='24'?'selected':'');?>
  </select>

:eth_ipv4_address_help:

<div markdown="1" class="more-gw4-ethX-0 hide">
_(IPv4 default gateway)_:
: <input type="text" name="GATEWAY:0" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"GATEWAY:0")?>" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
  <input type="text" name="METRIC:0" min="0" max="9999" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"METRIC:0")?:metric('ethX')?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *<?=$metric?>*

:eth_ipv4_default_gateway_help:

</div>
</div>
</div>
<div markdown="1" class="ipv6-ethX-0 hide">
_(IPv6 address assignment)_:
: <select name="USE_DHCP6:0" class="ctrl" onchange="selectProtocol(this.form,0,'slow')">
  <?=mk_option(_var($ethX,"USE_DHCP6:0"), 'yes', _('Automatic'))?>
  <?=mk_option(_var($ethX,"USE_DHCP6:0"), 'no', _('Static'))?>
  <?=mk_option(_var($ethX,"USE_DHCP6:0"), '', _('None'))?>
  </select>
  <span class="gw6-ethX-0 hide"><input type="checkbox" name="USE_GW6:0" onchange="selectGW(this.form,6,0,'slow')" <?=(_var($ethX,"METRIC6:0") == 0 || _var($ethX,"GATEWAY6:0") == '') ? '' : 'checked'?>><?=$enable?></span>

:eth_ipv6_address_assignment_help:

<div markdown="1" class="more-ipv6-ethX-0 hide">
_(IPv6 address)_:
: <input type="text" name="IPADDR6:0" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"IPADDR6:0")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:0" min="7" max="128" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"NETMASK6:0","64")?>" class="slim">

:eth_ipv6_address_help:

<div markdown="1" class="more-gw6-ethX-0 hide">
_(IPv6 default gateway)_:
: <input type="text" name="GATEWAY6:0" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"GATEWAY6:0")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
  <input type="text" name="METRIC6:0" min="0" max="9999" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"METRIC6:0")?:metric('ethX')?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *<?=$metric?>*

:eth_ipv6_default_gateway_help:

</div>
</div>
<div markdown="1" class="priv-ipv6-ethX-0 hide">
_(IPv6 privacy extensions)_:
: <select name="PRIVACY6:0">
  <?=mk_option(_var($ethX,"PRIVACY6:0"), "0", _("Disabled"))?>
  <?=mk_option(_var($ethX,"PRIVACY6:0"), "2", _("Enabled"))?>
  </select>

:eth_ipv6_privacy_extensions_help:

</div>
</div>
_(Desired MTU)_:
: <input type="number" name="MTU" min="68" max="9198" autocomplete="off" spellcheck="false" value="<?=_var($ethX,'MTU')?>" placeholder="1500" <?=(_var($ethX,'MTU')!='' || _var($ethX,'USE_MTU'))?'':'disabled'?>>
  <input type="checkbox" name="USE_MTU" onchange="selectMTU(this.form)" <?=_var($ethX,'USE_MTU')?'checked':''?>><?=$jumbo?>&nbsp;<i class="fa fa-info-circle blue-text hand" title="<?=$jumbo_1?>.&#10;<?=$jumbo_2?>.&#10;<?=$jumbo_3?>!"></i>

:eth_desired_mtu_help:

_(Enable VLANs)_:
: <select name="TYPE" onchange="checkNetworkAccess(this.form)">
  <?=mk_option(_var($ethX,'TYPE'), 'access', _('No'))?>
  <?=mk_option(_var($ethX,'TYPE'), 'trunk', _('Yes'))?>
  </select>
  <span><input type="button" id="button-vlan-ethX" class="form hide" value="_(Show)_" onclick="showVLAN('ethX')"></span>

:eth_enable_vlans_help:

</div>
<div id='index-ethX-0'></div>
<div id="vlan-list-ethX" class="hide">
<?foreach ($vlan_ethX as $i):?>
<div markdown="1" id="index-ethX-<?=$i?>" class="access-ethX shade hide">
_(Interface description)_:
: <input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($ethX,"DESCRIPTION:$i"))?>">
  <span class="inline-block">
    <input type="button" class="form" value="_(Info)_" onclick="networkInfo('eth0',<?=_var($ethX,"VLANID:$i")?>)">
  </span>

:eth_interface_description_help:

_(VLAN number)_:
: <input type="number" name="VLANID:<?=$i?>" min="1" max="4095" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"VLANID:$i")?>" class="narrow gap" required>
  <?if (!$service):?><input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-ethX-<?=$i?>'))"><?endif;?>

:eth_vlan_number_help:

_(Network protocol)_:
: <select name="PROTOCOL:<?=$i?>" onchange="selectProtocol(this.form,<?=$i?>,'slow')">
  <?=mk_option(_var($ethX,"PROTOCOL:$i"), 'ipv4', _('IPv4 only'))?>
  <?=mk_option(_var($ethX,"PROTOCOL:$i"), 'ipv6', _('IPv6 only'))?>
  <?=mk_option(_var($ethX,"PROTOCOL:$i"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
  </select>

:eth_network_protocol_help:

<div markdown="1" class="ipv4-ethX-<?=$i?> hide">
_(IPv4 address assignment)_:
: <select name="USE_DHCP:<?=$i?>" class="ctrl" onchange="selectProtocol(this.form,<?=$i?>,'slow')">
  <?=mk_option(_var($ethX,"USE_DHCP:$i"), 'yes', _('Automatic'))?>
  <?=mk_option(_var($ethX,"USE_DHCP:$i"), 'no', _('Static'))?>
  <?=mk_option(_var($ethX,"USE_DHCP:$i"), '', _('None'))?>
  </select>
  <span class="gw4-ethX-<?=$i?> hide"><input type="checkbox" name="USE_GW4:<?=$i?>" onchange="selectGW(this.form,4,<?=$i?>,'slow')" <?=(_var($ethX,"METRIC:$i") == 0 || _var($ethX,"GATEWAY:$i") == '') ? '' : 'checked'?>><?=$enable?></span>

:eth_ipv4_address_assignment_help:

<div markdown="1" class="more-ipv4-ethX-<?=$i?> hide">
_(IPv4 address)_:
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"IPADDR:$i")?>" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:<?=$i?>" class="slim">
  <?foreach ($masks as $mask => $prefix) echo mk_option(_var($ethX,"NETMASK:$i"), $mask, $prefix, _var($ethX,"NETMASK:$i")=='' && $prefix=='24'?'selected':'');?>
  </select>

:eth_ipv4_address_help:

<div markdown="1" class="more-gw4-ethX-<?=$i?> hide">
_(IPv4 default gateway)_:
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"GATEWAY:$i")?>" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
  <input type="text" name="METRIC:<?=$i?>" min="0" max="9999" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"METRIC:$i")?:metric('ethX.'._var($ethX,"VLANID:$i"))?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *<?=$metric?>*

:eth_ipv4_default_gateway_help:

</div>
</div>
</div>
<div markdown="1" class="ipv6-ethX-<?=$i?> hide">
_(IPv6 address assignment)_:
: <select name="USE_DHCP6:<?=$i?>" class="ctrl" onchange="selectProtocol(this.form,<?=$i?>,'slow')">
  <?=mk_option(_var($ethX,"USE_DHCP6:$i"), 'yes', _('Automatic'))?>
  <?=mk_option(_var($ethX,"USE_DHCP6:$i"), 'no', _('Static'))?>
  <?=mk_option(_var($ethX,"USE_DHCP6:$i"), '', _('None'))?>
  </select>
  <span class="gw6-ethX-<?=$i?> hide"><input type="checkbox" name="USE_GW6:<?=$i?>" onchange="selectGW(this.form,6,<?=$i?>,'slow')" <?=(_var($ethX,"METRIC6:$i") == 0 || _var($ethX,"GATEWAY6:$i") == '') ? '' : 'checked'?>><?=$enable?></span>

:eth_ipv6_address_assignment_help:

<div markdown="1" class="more-ipv6-ethX-<?=$i?> hide">
_(IPv6 address)_:
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"IPADDR6:$i")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:<?=$i?>" min="7" max="128" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"NETMASK6:$i","64")?>" class="slim">

:eth_ipv6_address_help:

<div markdown="1" class="more-gw6-ethX-<?=$i?> hide">
_(IPv6 default gateway)_:
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"GATEWAY6:$i")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
  <input type="text" name="METRIC6:<?=$i?>" min="0" max="9999" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"METRIC6:$i")?:metric('ethX.'._var($ethX,"VLANID:$i"))?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *<?=$metric?>*

:eth_ipv6_default_gateway_help:

</div>
</div>
<div markdown="1" class="priv-ipv6-ethX-<?=$i?> hide">
_(IPv6 privacy extensions)_:
: <select name="PRIVACY6:<?=$i?>">
  <?=mk_option(_var($ethX,"PRIVACY6:$i"), "0", _("Disabled"))?>
  <?=mk_option(_var($ethX,"PRIVACY6:$i"), "2", _("Enabled"))?>
  </select>

:eth_ipv6_privacy_extensions_help:

</div>
</div>
</div>
<?endforeach;?>
</div>

&nbsp;
: <span class="inline-block">
    <input type="submit" value="_(Apply)_" onclick="$('#wait_<?=$tabbed?'eth0':'ethX'?>').show()" disabled>
    <input type="button" value="_(Done)_" onclick="done()">
  </span>
  <span class="flex flex-row flex-wrap items-center gap-4">
    <input type="button" name="#shut_ethX" value="<?=_('Port '.$cmd)?>" onclick="portToggle('ethX','<?=$cmd?>')">
    <?if (!$service):?>
      <input type="button" id="button-add-ethX" class="hide" value="_(Add VLAN)_" onclick="addVLAN('ethX')">
    <?endif;?>
  </span>
  <?if ($service):?>
    <span><?=sprintf(_('Stop **%s** to make changes, see'),$service).' (<a href="/Settings">'._('Settings').'</a>)'?></span>
  <?endif;?>
</form>

<script markdown="1" type="text/html" id="network-template-ethX">
<div markdown="1" id="index-ethX-INDEX" class="access-ethX shade">
_(Interface description)_:
: <input type="text" name="DESCRIPTION:INDEX" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($ethX,"DESCRIPTION:INDEX"))?>">

_(VLAN number)_:
: <input type="number" name="VLANID:INDEX" min="1" max="4095" autocomplete="off" spellcheck="false" value="<?=_var($ethX,"VLANID:INDEX")?>" class="narrow gap" required>
  <input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-ethX-INDEX'))">

_(Network protocol)_:
: <select name="PROTOCOL:INDEX" onchange="selectProtocol(this.form,INDEX,'slow')">
  <?=mk_option(_var($ethX,"PROTOCOL:INDEX"), 'ipv4', _('IPv4 only'))?>
  <?=mk_option(_var($ethX,"PROTOCOL:INDEX"), 'ipv6', _('IPv6 only'))?>
  <?=mk_option(_var($ethX,"PROTOCOL:INDEX"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
  </select>

<div markdown="1" class="ipv4-ethX-INDEX">
_(IPv4 address assignment)_:
: <select name="USE_DHCP:INDEX" class="ctrl" onchange="selectProtocol(this.form,INDEX,'slow')">
  <?=mk_option(_var($ethX,"USE_DHCP:INDEX"), 'yes', _('Automatic'))?>
  <?=mk_option(_var($ethX,"USE_DHCP:INDEX"), 'no', _('Static'))?>
  <?=mk_option(_var($ethX,"USE_DHCP:INDEX"), '', _('None'))?>
  </select>
  <span class="gw4-ethX-INDEX hide"><input type="checkbox" name="USE_GW4:INDEX" onchange="selectGW(this.form,4,INDEX,'slow')"><?=$enable?></span>

<div markdown="1" class="more-ipv4-ethX-INDEX hide">
_(IPv4 address)_:
: <input type="text" name="IPADDR:INDEX" maxlength="15" autocomplete="off" spellcheck="false" value="" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:INDEX" class="slim">
  <?foreach ($masks as $mask => $prefix) echo mk_option(0, $mask, $prefix, $prefix=='24'?'selected':'');?>
  </select>

<div markdown="1" class="more-gw4-ethX-INDEX hide">
_(IPv4 default gateway)_:
: <input type="text" name="GATEWAY:INDEX" maxlength="15" autocomplete="off" spellcheck="false" value="" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
  <input type="text" name="METRIC:INDEX" min="1" max="9999" autocomplete="off" spellcheck="false" value="<?=metric('ethX.INDEX')?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *<?=$metric?>*

</div>
</div>
</div>
<div markdown="1" class="ipv6-ethX-INDEX hide">
_(IPv6 address assignment)_:
: <select name="USE_DHCP6:INDEX" class="ctrl" onchange="selectProtocol(this.form,INDEX,'slow')">
  <?=mk_option(_var($ethX,"USE_DHCP6:INDEX"), 'yes', _('Automatic'))?>
  <?=mk_option(_var($ethX,"USE_DHCP6:INDEX"), 'no', _('Static'))?>
  <?=mk_option(_var($ethX,"USE_DHCP6:INDEX"), '', _('None'))?>
  </select>
  <span class="gw6-ethX-INDEX hide"><input type="checkbox" name="USE_GW6:INDEX" onchange="selectGW(this.form,6,INDEX,'slow')"><?=$enable?></span>

<div markdown="1" class="more-ipv6-ethX-INDEX hide">
_(IPv6 address)_:
: <input type="text" name="IPADDR6:INDEX" maxlength="39" autocomplete="off" spellcheck="false" value="" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:INDEX" min="7" max="128" autocomplete="off" spellcheck="false" value="64" class="slim">

<div markdown="1" class="more-gw6-ethX-INDEX hide">
_(IPv6 default gateway)_:
: <input type="text" name="GATEWAY6:INDEX" maxlength="39" autocomplete="off" spellcheck="false" value="" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
  <input type="text" name="METRIC6:INDEX" min="1" max="9999" autocomplete="off" spellcheck="false" value="<?=metric('ethX.INDEX')?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *<?=$metric?>*

</div>
</div>
<div markdown="1" class="priv-ipv6-ethX-INDEX hide">
_(IPv6 privacy extensions)_:
: <select name="PRIVACY6:INDEX">
  <?=mk_option(_var($ethX,'PRIVACY6:INDEX'), "0", _("Disabled"))?>
  <?=mk_option(_var($ethX,'PRIVACY6:INDEX'), "2", _("Enabled"))?>
  </select>

</div>
</div>
</div>
</script>
