#!/bin/sh export DATE="12.2.2006";SCRIPT=${0#/rom} export TITLE="Administración: LAN" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Administración: LAN EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then #Speedups lan_proto="$(nvram get lan_proto)" lan_ipaddr=$(nvram get lan_ipaddr) lan_netmask=$(nvram get lan_netmask) dhcp_start=$(nvram get dhcp_start) dhcp_num=$(nvram get dhcp_num) test -z "$dhcp_num" && dhcp_num=4 wifi_ipaddr=$(nvram get wifi_ipaddr) wifi_netmask=$(nvram get wifi_netmask) ff_lan_proto=$(nvram get ff_lan_proto) test -z "$ff_lan_proto" && lan_proto=static case $lan_proto in dhcp|disabled) ;; *)lan_proto=static ;; esac cat<
Protocolo LAN:
Dirección IP LAN:
Mascara de red LAN:
Ruta por defecto LAN:
Rutas Estáticas:
Deshabilitar NAT:
Deshabilitar Firewall:
EOF if [ "$(test -n "$lan_ipaddr" && ipcalc -n $lan_ipaddr $wifi_netmask|cut -d'=' -f2)" = "$(test -n "$wifi_ipaddr" && ipcalc -n $wifi_ipaddr $wifi_netmask|cut -d'=' -f2)" ]; then cat<Nota: La función firewall entre WLAN y LAN no está activa, porque la dirección IP LAN ($lan_ipaddr) hace parte de la red WLAN ($wifi_ipaddr/$wifi_netmask). EOF fi cat<
IP inicial DHCP:$(test -n "$lan_ipaddr" && ipcalc -n $lan_ipaddr $lan_netmask|cut -d'=' -f2|cut -d'.' -f1-3).
Número de Usuarios DHCP:(DHCP off with "0")
Periodo de alocación DHCP:segundos
 
   

===Tip: These settings influence the configuration, which is sent to wired clients via DHCP. To ensure a convenient network access, you should enter the Host Name and the internal Domain (-> WAN). Consejo: Estos parámetros influencian la configuración que será enviada a los clientes por cable a través de DHCP. Para asegurar un acceso conveniente a la red, tendrías que insertar el Nombre del Host y el Dominio (-> WAN).===

EOF else eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}') DIRTY= if [ -n "$post_lan" ]; then test -n "$lan_proto" && ff_lan_proto=1 for V in ff_lan_proto lan_proto lan_ipaddr lan_netmask lan_gateway static_route ff_nonat fw_disable dhcp_start dhcp_num dhcp_lease; do eval "C=\$$V" C=$(unescape $C) if [ "$C" != "$(nvram get $V)" ]; then DIRTY=1 nvram set $V="$C" fi done if checkbridge; then DIRTY=1 fi fi if [ -n "$DIRTY" ]; then nvram commit>/dev/null 2>&1 cat<Los parámetros han sido actualizados. Los cambios serán activos al próximo Reinicio. EOF else cat<No se ha cambiado ningún parámetro. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh