mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
IPv6 networking improvements by Bergware
This commit is contained in:
+54
-24
@@ -68,7 +68,7 @@ Array.prototype.same = function(){return this.sort().filter(function(v,i,o){retu
|
||||
function prepareSettings(form) {
|
||||
var dns = form.DHCP_KEEPRESOLV !== undefined;
|
||||
var metrics = [];
|
||||
$(form).find('input[name^="METRIC"]').each(function(){metrics.push($(this).val());});
|
||||
$(form).find('input[name^="METRIC:"]').each(function(){metrics.push($(this).val());});
|
||||
if (metrics.same()) {
|
||||
swal('Duplicate metrics','List of default gateways contains duplicate metric values','error');
|
||||
return false;
|
||||
@@ -86,6 +86,7 @@ function prepareSettings(form) {
|
||||
$(form).find('input[name^="GATEWAY6:"]').not('input[name$=":0"]').prop('disabled',true);
|
||||
$(form).find('input[name^="METRIC:"]').not('input[name$=":0"]').prop('disabled',true);
|
||||
$(form).find('input[name^="METRIC6:"]').not('input[name$=":0"]').prop('disabled',true);
|
||||
$(form).find('select[name^="PRIVACY6:"]').not('select[name$=":0"]').prop('disabled',true);
|
||||
} else {
|
||||
var vlans = [];
|
||||
$(form).find('input[name^="VLANID:"]').each(function(){vlans.push($(this).val());});
|
||||
@@ -136,6 +137,7 @@ function prepareSettings(form) {
|
||||
$(form).find('input[name="NETMASK6:'+i+'"]').prop('disabled',true);
|
||||
$(form).find('input[name="GATEWAY6:'+i+'"]').prop('disabled',true);
|
||||
$(form).find('input[name="METRIC6:'+i+'"]').prop('disabled',true);
|
||||
$(form).find('select[name="PRIVACY6:'+i+'"]').prop('disabled',true);
|
||||
if (i==0) $(form).find('input[name^="DNS6_SERVER"]').prop('disabled',true);
|
||||
}
|
||||
if (protocol != 'ipv6') {
|
||||
@@ -150,8 +152,8 @@ function prepareSettings(form) {
|
||||
}
|
||||
});
|
||||
$(form).find('select[name^="USE_DHCP:"]').each(function() {
|
||||
var i = $(this).attr('name').substr(9);
|
||||
if ($(this).prop('disabled')==false && $(this).val()=='yes') {
|
||||
var i = $(this).attr('name').substr(9);
|
||||
var protocol = $(form).find('select[name="PROTOCOL:'+i+'"]').val() || 'ipv4';
|
||||
if (protocol != 'ipv6') {
|
||||
$(form).find('input[name="IPADDR:'+i+'"]').val('Obtaining IPv4 address...');
|
||||
@@ -162,6 +164,7 @@ function prepareSettings(form) {
|
||||
$(form).find('input[name="GATEWAY6:'+i+'"]').val('Obtaining IPv6 gateway...');
|
||||
}
|
||||
}
|
||||
if ($(this).val()!='yes') $(form).find('input[name="PRIVACY6:'+i+'"]').prop('disabled',true);
|
||||
});
|
||||
if (dns && form.DHCP_KEEPRESOLV.value=='no') {
|
||||
form.DHCP_KEEPRESOLV.disabled = false;
|
||||
@@ -218,8 +221,11 @@ function checkNetworkSettings(form,index,open) {
|
||||
$(form).find('input[name="IPADDR6:'+index+'"]').prop('disabled',disabled).prop('required',!disabled);
|
||||
var netmask6 = $(form).find('input[name="NETMASK6:'+index+'"]');
|
||||
var gateway6 = $(form).find('input[name="GATEWAY6:'+index+'"]');
|
||||
var privacy6 = $(form).find('select[name="PRIVACY6:'+index+'"]');
|
||||
netmask6.prop('disabled',disabled).prop('required',!disabled);
|
||||
gateway6.prop('disabled',disabled);
|
||||
privacy6.prop('disabled',!disabled);
|
||||
if (!open) privacy6.val(disabled ? 0 : 2);
|
||||
}
|
||||
if (dns && index==0) {
|
||||
if (!open) form.DHCP_KEEPRESOLV.value = disabled ? 'no' : 'yes';
|
||||
@@ -451,7 +457,7 @@ IP address assignment:
|
||||
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server<br>
|
||||
> *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 (only available for VLANs)
|
||||
|
||||
@@ -459,7 +465,7 @@ IP address assignment:
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$eth0["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of the system.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of the system.
|
||||
|
||||
IPv4 network mask:
|
||||
: <select name="NETMASK:<?=$i?>" size="1">
|
||||
@@ -475,31 +481,39 @@ IPv4 network mask:
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.252", "255.255.255.252");?>
|
||||
</select>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
||||
> 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="<?=$eth0["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC:$i"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of your router.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
|
||||
</div>
|
||||
<div class="eth0-ipv6-<?=$i?>" style="display:none" markdown="1">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$eth0["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of the system.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the system.
|
||||
|
||||
IPv6 prefix:
|
||||
: <input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$eth0["NETMASK6:$i"]?>" class="trim">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the associated prefix value of 1 to 128.
|
||||
> 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="<?=$eth0["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC6:$i"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of your router.
|
||||
> 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($eth0["PRIVACY6:$i"], "0", "Disabled");?>
|
||||
<?=mk_option($eth0["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>
|
||||
DNS server assignment:
|
||||
@@ -508,7 +522,7 @@ DNS server assignment:
|
||||
<?=mk_option($eth0['DHCP_KEEPRESOLV'], "yes", "Static");?>
|
||||
</select>
|
||||
|
||||
> If set to *Automatic* the server will use DNS server IP address returned by the local DHCP server.<br>
|
||||
> If set to *Automatic* the server will use DNS server IP address returned by the local automatic assignment.<br>
|
||||
> If set to *Static* you may enter your own list.
|
||||
>
|
||||
> This is useful in Active Directory configurations where you need to set the first DNS Server entry to the IP address of your AD Domain server.
|
||||
@@ -600,7 +614,7 @@ IP address assignment:
|
||||
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server<br>
|
||||
> *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 (only available for VLANs)
|
||||
|
||||
@@ -608,7 +622,7 @@ IP address assignment:
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$eth0["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of the system.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of the system.
|
||||
|
||||
IPv4 network mask:
|
||||
: <select name="NETMASK:<?=$i?>" size="1">
|
||||
@@ -624,31 +638,39 @@ IPv4 network mask:
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.252", "255.255.255.252");?>
|
||||
</select>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
||||
> 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="<?=$eth0["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC:$i"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of your router.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
|
||||
</div>
|
||||
<div class="eth0-ipv6-<?=$i?>" style="display:none" markdown="1">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$eth0["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of the system.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the system.
|
||||
|
||||
IPv6 prefix:
|
||||
: <input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$eth0["NETMASK6:$i"]?>" class="trim">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the associated prefix value of 1 to 128.
|
||||
> 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="<?=$eth0["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC6:$i"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of your router.
|
||||
> 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($eth0["PRIVACY6:$i"], "0", "Disabled");?>
|
||||
<?=mk_option($eth0["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>
|
||||
@@ -685,7 +707,7 @@ IP address assignment:
|
||||
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server<br>
|
||||
> *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 (only available for VLANs)
|
||||
|
||||
@@ -693,7 +715,7 @@ IP address assignment:
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:INDEX" maxlength="15" value="<?=$eth0["IPADDR:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
|
||||
> Greyed out when using DHCP server or NONE assignment. Otherwise specify here the IPv4 address of the system.
|
||||
> Greyed out when using automatic IP assignment or NONE assignment. Otherwise specify here the IPv4 address of the system.
|
||||
|
||||
IPv4 network mask:
|
||||
: <select name="NETMASK:INDEX" size="1">
|
||||
@@ -709,31 +731,39 @@ IPv4 network mask:
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.252", "255.255.255.252");?>
|
||||
</select>
|
||||
|
||||
> Greyed out when using DHCP server or NONE assignment. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
||||
> 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="<?=$eth0["GATEWAY:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:INDEX" min="1" max="9999" value="<?=$eth0["METRIC:INDEX"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of your router.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
|
||||
</div>
|
||||
<div class="eth0-ipv6-INDEX" style="display:none" markdown="1">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:INDEX" maxlength="39" value="<?=$eth0["IPADDR6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of the system.
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the system.
|
||||
|
||||
IPv6 prefix:
|
||||
: <input type="number" name="NETMASK6:INDEX" min="1" max="128" value="<?=$eth0["NETMASK6:INDEX"]?>" class="trim">
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the associated prefix value of 1 to 128.
|
||||
> 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="<?=$eth0["GATEWAY6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:INDEX" min="1" max="9999" value="<?=$eth0["METRIC6:INDEX"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of your router.
|
||||
> 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($eth0['PRIVACY6:INDEX'], "0", "Disabled");?>
|
||||
<?=mk_option($eth0['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>
|
||||
|
||||
+54
-30
@@ -116,9 +116,9 @@ Interface description:
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
<?=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:
|
||||
@@ -130,7 +130,7 @@ IP address assignment:
|
||||
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server<br>
|
||||
> *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
|
||||
|
||||
@@ -138,7 +138,7 @@ IP address assignment:
|
||||
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 DHCP server. Otherwise specify here the IPv4 address of the interface.
|
||||
> 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">
|
||||
@@ -154,31 +154,39 @@ IPv4 network mask:
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.252", "255.255.255.252");?>
|
||||
</select>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
||||
> 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"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of your router.
|
||||
> 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 DHCP server. Otherwise specify here the IPv6 address of the interface.
|
||||
> 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 DHCP server. Otherwise specify here the associated prefix value of 1 to 128.
|
||||
> 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">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC6:$i"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of your router.
|
||||
> 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:
|
||||
@@ -208,9 +216,9 @@ Interface description:
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
<?=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:
|
||||
@@ -222,7 +230,7 @@ IP address assignment:
|
||||
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server<br>
|
||||
> *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
|
||||
|
||||
@@ -230,7 +238,7 @@ IP address assignment:
|
||||
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 DHCP server or NONE assignment. Otherwise specify here the IPv4 address of the interface.
|
||||
> 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">
|
||||
@@ -246,31 +254,39 @@ IPv4 network mask:
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.252", "255.255.255.252");?>
|
||||
</select>
|
||||
|
||||
> Greyed out when using DHCP server or NONE assignment. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
||||
> 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"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of your router.
|
||||
> 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 DHCP server. Otherwise specify here the IPv6 address of the interface.
|
||||
> 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 DHCP server. Otherwise specify here the associated prefix value of 1 to 128.
|
||||
> 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">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC6:$i"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of your router.
|
||||
> 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>
|
||||
@@ -293,9 +309,9 @@ Interface description:
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:INDEX" size="1" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
<?=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:
|
||||
@@ -307,7 +323,7 @@ IP address assignment:
|
||||
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain its IP address from the local DHCP server<br>
|
||||
> *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
|
||||
|
||||
@@ -315,7 +331,7 @@ IP address assignment:
|
||||
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 DHCP server or NONE assignment. Otherwise specify here the IPv4 address of the interface.
|
||||
> 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">
|
||||
@@ -331,31 +347,39 @@ IPv4 network mask:
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.252", "255.255.255.252");?>
|
||||
</select>
|
||||
|
||||
> Greyed out when using DHCP server or NONE assignment. Otherwise specify here the associated network mask, by default 255.255.255.0 is selected.
|
||||
> 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"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv4 address of your router.
|
||||
> 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 DHCP server. Otherwise specify here the IPv6 address of the interface.
|
||||
> 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 DHCP server. Otherwise specify here the associated prefix value of 1 to 128.
|
||||
> 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">
|
||||
<input type="text" name="METRIC6:INDEX" min="1" max="9999" value="<?=$ethX["METRIC6:INDEX"]?>" class="trim"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
|
||||
> Greyed out when using DHCP server. Otherwise specify here the IPv6 address of your router.
|
||||
> 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>
|
||||
|
||||
@@ -2,8 +2,8 @@ Menu="NetworkSettings"
|
||||
Title="Routing Table"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2017, Lime Technology
|
||||
* Copyright 2017, Bergware International.
|
||||
/* 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,
|
||||
@@ -48,7 +48,7 @@ $(routeTable);
|
||||
<tbody id="route_list"></tbody>
|
||||
</table>
|
||||
|
||||
<div style="margin-top:24px;padding:0 4px;">
|
||||
<div class="shade-<?=$display['theme']?>" style="margin-top:12px;padding:12px 4px;">
|
||||
<form markdown="1" name="add_routes" method="POST" action="/webGui/include/RoutingTable.php" target="progressFrame" onsubmit="setTimeout(resetTable,500)">
|
||||
Enter route + gateway + metric:
|
||||
: <input type="text" name="route" maxlength="39" value="" class="fixed" placeholder="IPv4/nn or IPv6/nn route" required>
|
||||
|
||||
@@ -78,7 +78,7 @@ foreach ($ini as $name => $port) {
|
||||
if (!$bonding && preg_match('/^(BONDING_MODE|BONDING_MIIMON|BONDNICS|BONDNAME)/',$key)) continue;
|
||||
if (!$bridge && preg_match('/^(BRSTP|BRFD|BRNICS|BRNAME)/',$key)) continue;
|
||||
list($item,$x) = explode(':',$key,2);
|
||||
if ($trunk && $x>0 && preg_match('/^(VLANID|USE_DHCP|IPADDR6?|NETMASK6?|GATEWAY6?|METRIC6?|DESCRIPTION|PROTOCOL)/',$key)) {
|
||||
if ($trunk && $x>0 && preg_match('/^(VLANID|USE_DHCP|IPADDR6?|NETMASK6?|GATEWAY6?|METRIC6?|PRIVACY6|DESCRIPTION|PROTOCOL)/',$key)) {
|
||||
if ($x0 != $x) {$x0 = $x; $j++;}
|
||||
$vlan = ",$j]";
|
||||
} else $vlan = '';
|
||||
|
||||
Reference in New Issue
Block a user