mirror of
https://github.com/unraid/webgui.git
synced 2026-01-31 05:59:25 -06:00
437 lines
21 KiB
Plaintext
437 lines
21 KiB
Plaintext
Menu="parentname:nnn"
|
|
Title="Interface ethX"
|
|
Tag="tag"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2005-2017, Lime Technology
|
|
* Copyright 2012-2017, 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 = [0];
|
|
if (!$locked && isset($ethX)) foreach ($ethX as $key => $val) if (strpos($key,$vlan_id)===0) $vlan_ethX[] = substr($key,strlen($vlan_id));
|
|
|
|
$cmd = 'Down';
|
|
$more = true;
|
|
if (!exec("ip link show ethX|grep -om1 'UP>'")) {
|
|
$reason = "Interface is shutdown (inactive)";
|
|
$class = 'big blue';
|
|
$cmd = 'Up';
|
|
} elseif (strpos($locked,'bond')===0 || strpos($locked,'br')===0) {
|
|
$root = explode(' ',$locked);
|
|
$reason = "Interface is member of ".$root[0]." (see interface ".$root[1].")";
|
|
$class = 'big green';
|
|
} elseif (empty($ethX)) {
|
|
$reason = "Interface is not configured";
|
|
$class = 'big red';
|
|
} else {
|
|
$more = false;
|
|
$class = 'big';
|
|
}
|
|
?>
|
|
<script>
|
|
<?if ($tabbed):?>
|
|
var waitid = '#wait_eth0';
|
|
<?else:?>
|
|
var waitid = '#wait_ethX';
|
|
<?endif;?>
|
|
function portcheck_ethX() {
|
|
$.post('/webGui/include/CheckPort.php',{port:'ethX'},function(text) {
|
|
var html = $('#user-notice').html();
|
|
if (!html || html.indexOf('ethX')>0) showNotice(text);
|
|
setTimeout(portcheck_ethX,10000);
|
|
});
|
|
}
|
|
$(function() {
|
|
var form = document.ethX_settings;
|
|
<?if ($tabbed && !$service):?>
|
|
$('#tabX').bind({click:function(){
|
|
$('#bond-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
|
$('#bridge-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
|
}});
|
|
<?endif;?>
|
|
$('#bond-ethX').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
|
$('#bridge-ethX').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
|
checkBondingSettings(form,0,'ethX');
|
|
checkBridgingSettings(form,0,'ethX');
|
|
checkNetworkAccess(form,'ethX');
|
|
selectProtocol(form,'ethX');
|
|
<?if (!$tabbed):?>
|
|
$('div[id=title]').each(function(){
|
|
if ($(this).text().indexOf('Interface ethX')==0) $(this).append("<span id='wait_ethX' class='status red' style='display:none;font-size:small;font-style:italic'>Please wait... configuring interfaces</span>");
|
|
});
|
|
<?endif;?>
|
|
<?if ($locked || $service):?>
|
|
disableForm(form,true);
|
|
<?endif;?>
|
|
<?if ($no_eth0):?>
|
|
$('input[name="#shut_ethX"]').prop('disabled',true);
|
|
<?endif;?>
|
|
setTimeout(portcheck_ethX,Number('ethX'.substr(3))*1000);
|
|
});
|
|
</script>
|
|
<form markdown="1" name="ethX_settings" method="POST" action="/update.php" target="progressFrame" onchange="exitCode(this,false)" 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">
|
|
<?foreach ($vlan_ethX as $i):?>
|
|
<div id="index-ethX-<?=$i?>" markdown="1">
|
|
<?if ($i==0):?>
|
|
MAC address:
|
|
: <span class="<?=$class?>"><?=strtoupper(exec("ip link show ethX|grep -Pom1 'ether \K\S+'"))?><?if ($more):?> - <?=$reason?><?endif;?></span>
|
|
|
|
> This is the hardware address of the interface.
|
|
> When tagging is enabled all VLANs on this interface will share the same hardware address.
|
|
|
|
Enable bonding:
|
|
: <select name="BONDING" size="1" onchange="checkBondingSettings(this.form,1,'ethX')">
|
|
<?=mk_option($ethX['BONDING'], "no", "No");?>
|
|
<?=mk_option($ethX['BONDING'], "yes", "Yes");?>
|
|
</select>
|
|
|
|
> Bonding is a feature that combines multiple physical Ethernet interfaces into a single *bonded* interface named **bond0**.
|
|
> This can be used to improve the connection redundancy and/or throughput of the system.
|
|
> Different bonding modes are supported (see below), but some modes require proper switch support.
|
|
|
|
<div id="bond-members-ethX" style="display:none" markdown="1">
|
|
Bonding mode:
|
|
: <select name="BONDING_MODE" size="1" onchange="checkBondingSettings(this.form,-1,'ethX')">
|
|
<?=mk_option($ethX['BONDING_MODE'], "0", "balance-rr (0)");?>
|
|
<?=mk_option($ethX['BONDING_MODE'], "1", "active-backup (1)",isset($ethX['BONDING_MODE'])?'':'selected');?>
|
|
<?=mk_option($ethX['BONDING_MODE'], "2", "balance-xor (2)");?>
|
|
<?=mk_option($ethX['BONDING_MODE'], "3", "broadcast (3)");?>
|
|
<?=mk_option($ethX['BONDING_MODE'], "4", "802.3ad (4)");?>
|
|
<?=mk_option($ethX['BONDING_MODE'], "5", "balance-tlb (5)");?>
|
|
<?=mk_option($ethX['BONDING_MODE'], "6", "balance-alb (6)");?>
|
|
</select>
|
|
<span id="attention0" style="display:none"><b>Attention:</b> this mode requires a network switch with proper setup and support...</span>
|
|
|
|
> Mode 1 (active-backup) is the recommended default. Other modes allow you to set up a specific environment, but may require proper switch support.
|
|
> Choosing a unsupported mode can result in a disrupted communication. Use with caution.
|
|
|
|
Bonding members of bondX:
|
|
: <select id="bond-ethX" name="BONDNICS" size="1" multiple="multiple" style="display:none">
|
|
<?=mk_option($ethX['BONDNICS'],'ethX','ethX','selected disabled')?>
|
|
<?foreach ($ports as $port):?>
|
|
<?if ($port!='ethX' && !locked('ethX',$port)) echo mk_option_check($ethX['BONDNICS'],$port,$port)?>
|
|
<?endforeach;?>
|
|
</select>
|
|
|
|
> Select which interfaces are member of the *bonded* interface. By default ethX is a member, while other interfaces are optional.
|
|
|
|
</div>
|
|
|
|
Enable bridging:
|
|
: <select name="BRIDGING" size="1" onchange="checkBridgingSettings(this.form,1,'ethX')">
|
|
<?=mk_option($ethX['BRIDGING'], "no", "No");?>
|
|
<?=mk_option($ethX['BRIDGING'], "yes", "Yes");?>
|
|
</select>
|
|
|
|
> Bridging is a feature which creates a virtual bridge and allows VMs to communicate directly with the physical Ethernet port.
|
|
|
|
<div id="bridge-members-ethX" style="display:none" markdown="1">
|
|
Bridging members of brX:
|
|
: <select id="bridge-ethX" name="BRNICS" size="1" multiple="multiple" style="display:none">
|
|
<?=mk_option($ethX['BRNICS'],'ethX','ethX','selected disabled')?>
|
|
<?foreach ($ports as $port):?>
|
|
<?if ($port!='ethX' && !locked('ethX',$port)) echo mk_option_check($ethX['BRNICS'],$port,$port)?>
|
|
<?endforeach;?>
|
|
</select>
|
|
|
|
> Select which interfaces are member of the *bridged* interface. By default ethX is a member, while other interfaces are optional.
|
|
|
|
</div>
|
|
Interface description:
|
|
: <input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" value="<?=htmlspecialchars($ethX["DESCRIPTION:$i"])?>" onchange="exitCode(this.form,true)">
|
|
|
|
> Use this field to give addditional information about the purpose of the connection.
|
|
|
|
Network protocol:
|
|
: <select name="PROTOCOL:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
|
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4', 'IPv4 only');?>
|
|
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv6', 'IPv6 only');?>
|
|
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
|
</select>
|
|
|
|
IP address assignment:
|
|
: <select name="USE_DHCP:<?=$i?>" size="1" onchange="checkNetworkSettings(this.form,<?=$i?>)">
|
|
<?=mk_option($ethX["USE_DHCP:$i"], 'yes', 'Automatic');?>
|
|
<?=mk_option($ethX["USE_DHCP:$i"], 'no', 'Static');?>
|
|
<?=mk_option($ethX["USE_DHCP:$i"], '', 'None');?>
|
|
</select>
|
|
|
|
> The following settings are possible:
|
|
>
|
|
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server (IPv4) or SLAAC (IPv6)<br>
|
|
> *Static* - the IP address is manually set for this interface<br>
|
|
> *None* - no IP address is assigned to the interface
|
|
|
|
<div class="ethX-ipv4-<?=$i?>" style="display:none" markdown="1">
|
|
IPv4 address:
|
|
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$ethX["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of the interface.
|
|
|
|
IPv4 network mask:
|
|
: <select name="NETMASK:<?=$i?>" size="1">
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.0.0", "255.255.0.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.252.0", "255.255.252.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.254.0", "255.255.254.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.0", "255.255.255.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.128", "255.255.255.128");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.192", "255.255.255.192");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.224", "255.255.255.224");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.240", "255.255.255.240");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.248", "255.255.255.248");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.252", "255.255.255.252");?>
|
|
</select>
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
|
|
|
IPv4 default gateway:
|
|
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" value="<?=$ethX["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
|
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC:$i"]?>" class="trim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
|
|
|
</div>
|
|
<div class="ethX-ipv6-<?=$i?>" style="display:none" markdown="1">
|
|
IPv6 address:
|
|
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$ethX["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the interface.
|
|
|
|
IPv6 prefix:
|
|
: <input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$ethX["NETMASK6:$i"]?>" class="trim">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the associated prefix value of 1 to 128.
|
|
|
|
IPv6 default gateway:
|
|
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" value="<?=$ethX["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
|
|
|
IPv6 privacy extensions:
|
|
: <select name="PRIVACY6:<?=$i?>" size="1">
|
|
<?=mk_option($ethX["PRIVACY6:$i"], "0", "Disabled");?>
|
|
<?=mk_option($ethX["PRIVACY6:$i"], "2", "Enabled");?>
|
|
</select>
|
|
|
|
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
|
|
|
</div>
|
|
Desired MTU:
|
|
: <input type="number" name="MTU" min="68" max="9198" value="<?=$locked?$ethX['MTU']:$ethX['MTU']?>" class="narrow">
|
|
|
|
> This is the MTU size to use on the physical Ethernet interface.
|
|
> If left blank, the MTU will automatically be determined (by default 1500 bytes).
|
|
|
|
Enable VLANs:
|
|
: <select name="TYPE" size="1" onchange="checkNetworkAccess(this.form,'ethX')">
|
|
<?=mk_option($ethX['TYPE'], 'access', 'No');?>
|
|
<?=mk_option($ethX['TYPE'], 'trunk', 'Yes');?>
|
|
</select>
|
|
<span class="pin access-ethX" style="display:none" onclick="addVLAN('ethX',<?=$service?'true':'false'?>)"><i class="fa fa-plus-circle green"></i><em>add VLAN</em></span>
|
|
<?else:?>
|
|
<div class="access-ethX shade-<?=$display['theme']?>" style="display:none" markdown="1">
|
|
VLAN number:
|
|
: <input type="number" name="VLANID:<?=$i?>" min="1" max="4095" value="<?=$ethX["VLANID:$i"]?>" class="narrow" required>
|
|
<span class="pin" onclick="removeVLAN($('#index-ethX-<?=$i?>'),<?=$service?'true':'false'?>)"><i class="fa fa-minus-circle red"></i><em>remove VLAN</em></span>
|
|
|
|
> Give each VLAN a unique identifier. Numbers range from 1 to 4095.
|
|
|
|
Interface description:
|
|
: <input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" value="<?=htmlspecialchars($ethX["DESCRIPTION:$i"])?>" onchange="exitCode(this.form,true)">
|
|
|
|
> Use this field to give addditional information about the purpose of the connection.
|
|
|
|
Network protocol:
|
|
: <select name="PROTOCOL:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
|
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4', 'IPv4 only');?>
|
|
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv6', 'IPv6 only');?>
|
|
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
|
</select>
|
|
|
|
IP address assignment:
|
|
: <select name="USE_DHCP:<?=$i?>" size="1" onchange="checkNetworkSettings(this.form,<?=$i?>)">
|
|
<?=mk_option($ethX["USE_DHCP:$i"], 'yes', 'Automatic');?>
|
|
<?=mk_option($ethX["USE_DHCP:$i"], 'no', 'Static');?>
|
|
<?=mk_option($ethX["USE_DHCP:$i"], '', 'None');?>
|
|
</select>
|
|
|
|
> The following settings are possible:
|
|
>
|
|
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server (IPv4) or SLAAC (IPv6)<br>
|
|
> *Static* - the IP address is manually set for this interface<br>
|
|
> *None* - no IP address is assigned to the interface
|
|
|
|
<div class="ethX-ipv4-<?=$i?>" style="display:none" markdown="1">
|
|
IPv4 address:
|
|
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$ethX["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
|
|
|
> Greyed out when using automatic IP assignment or NONE assignment. Otherwise specify here the IPv4 address of the interface.
|
|
|
|
IPv4 network mask:
|
|
: <select name="NETMASK:<?=$i?>" size="1">
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.0.0", "255.255.0.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.252.0", "255.255.252.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.254.0", "255.255.254.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.0", "255.255.255.0");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.128", "255.255.255.128");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.192", "255.255.255.192");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.224", "255.255.255.224");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.240", "255.255.255.240");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.248", "255.255.255.248");?>
|
|
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.252", "255.255.255.252");?>
|
|
</select>
|
|
|
|
> Greyed out when using automatic IP assignment or NONE assignment. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
|
|
|
IPv4 default gateway:
|
|
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" value="<?=$ethX["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
|
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC:$i"]?>" class="trim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
|
|
|
</div>
|
|
<div class="ethX-ipv6-<?=$i?>" style="display:none" markdown="1">
|
|
IPv6 address:
|
|
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$ethX["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the interface.
|
|
|
|
IPv6 prefix:
|
|
: <input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$ethX["NETMASK6:$i"]?>" class="trim">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the associated prefix value of 1 to 128.
|
|
|
|
IPv6 default gateway:
|
|
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" value="<?=$ethX["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
|
|
|
IPv6 privacy extensions:
|
|
: <select name="PRIVACY6:<?=$i?>" size="1">
|
|
<?=mk_option($ethX["PRIVACY6:$i"], "0", "Disabled");?>
|
|
<?=mk_option($ethX["PRIVACY6:$i"], "2", "Enabled");?>
|
|
</select>
|
|
|
|
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
|
|
|
</div>
|
|
</div>
|
|
<?endif;?>
|
|
</div>
|
|
<?endforeach;?>
|
|
|
|
<script type="text/html" id="network-template-ethX" markdown="1">
|
|
<div id="index-ethX-INDEX" class="access-ethX shade-<?=$display['theme']?>" markdown="1">
|
|
VLAN number:
|
|
: <input type="number" name="VLANID:INDEX" min="1" max="4095" value="<?=$ethX["VLANID:INDEX"]?>" class="narrow" required>
|
|
<span class="pin" onclick="removeVLAN($('#index-ethX-INDEX'),false)"><i class="fa fa-minus-circle red"></i><em>remove VLAN</em></span>
|
|
|
|
> Give each VLAN a unique identifier. Numbers range from 1 to 4095.
|
|
|
|
Interface description:
|
|
: <input type="text" name="DESCRIPTION:INDEX" maxlength="80" value="<?=htmlspecialchars($ethX["DESCRIPTION:INDEX"])?>" onchange="exitCode(this.form,true)">
|
|
|
|
> Use this field to give addditional information about the purpose of the connection.
|
|
|
|
Network protocol:
|
|
: <select name="PROTOCOL:INDEX" size="1" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
|
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv4', 'IPv4 only');?>
|
|
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv6', 'IPv6 only');?>
|
|
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
|
</select>
|
|
|
|
IP address assignment:
|
|
: <select name="USE_DHCP:INDEX" size="1" onchange="checkNetworkSettings(this.form,INDEX)">
|
|
<?=mk_option($ethX["USE_DHCP:INDEX"], 'yes', 'Automatic');?>
|
|
<?=mk_option($ethX["USE_DHCP:INDEX"], 'no', 'Static');?>
|
|
<?=mk_option($ethX["USE_DHCP:INDEX"], '', 'None');?>
|
|
</select>
|
|
|
|
> The following settings are possible:
|
|
>
|
|
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server (IPv4) or SLAAC (IPv6)<br>
|
|
> *Static* - the IP address is manually set for this interface<br>
|
|
> *None* - no IP address is assigned to the interface
|
|
|
|
<div class="ethX-ipv4-INDEX" style="display:none" markdown="1">
|
|
IPv4 address:
|
|
: <input type="text" name="IPADDR:INDEX" maxlength="15" value="<?=$ethX["IPADDR:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
|
|
|
> Greyed out when using automatic IP assignment or NONE assignment. Otherwise specify here the IPv4 address of the interface.
|
|
|
|
IPv4 network mask:
|
|
: <select name="NETMASK:INDEX" size="1">
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.0.0", "255.255.0.0");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.252.0", "255.255.252.0");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.254.0", "255.255.254.0");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.0", "255.255.255.0");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.128", "255.255.255.128");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.192", "255.255.255.192");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.224", "255.255.255.224");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.240", "255.255.255.240");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.248", "255.255.255.248");?>
|
|
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.252", "255.255.255.252");?>
|
|
</select>
|
|
|
|
> Greyed out when using automatic IP assignment or NONE assignment. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
|
|
|
IPv4 default gateway:
|
|
: <input type="text" name="GATEWAY:INDEX" maxlength="15" value="<?=$ethX["GATEWAY:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
|
<input type="text" name="METRIC:INDEX" min="1" max="9999" value="<?=$ethX["METRIC:INDEX"]?>" class="trim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
|
|
|
</div>
|
|
<div class="ethX-ipv6-INDEX" style="display:none" markdown="1">
|
|
IPv6 address:
|
|
: <input type="text" name="IPADDR6:INDEX" maxlength="39" value="<?=$ethX["IPADDR6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the interface.
|
|
|
|
IPv6 prefix:
|
|
: <input type="number" name="NETMASK6:INDEX" min="1" max="128" value="<?=$ethX["NETMASK6:INDEX"]?>" class="trim">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the associated prefix value of 1 to 128.
|
|
|
|
IPv6 default gateway:
|
|
: <input type="text" name="GATEWAY6:INDEX" maxlength="39" value="<?=$ethX["GATEWAY6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
|
|
|
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
|
|
|
IPv6 privacy extensions:
|
|
: <select name="PRIVACY6:INDEX" size="1">
|
|
<?=mk_option($ethX['PRIVACY6:INDEX'], "0", "Disabled");?>
|
|
<?=mk_option($ethX['PRIVACY6:INDEX'], "2", "Enabled");?>
|
|
</select>
|
|
|
|
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
|
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
|
|
: <input type="submit" value="Apply" onclick="$(waitid).show()"><input type="button" value="Done" onclick="done()"><input type="button" name="#shut_ethX" value="Port <?=$cmd?>" onclick="portToggle('ethX','<?=$cmd?>')"><?=$service ? "$service must be <span class='strong big'>Stopped</span> to change (see Settings)" : ""?>
|
|
</form>
|