Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:network:protocol.dhcp [2023/10/04 01:02] – [Getting specific WAN IP address] update vgaeteradocs:guide-user:network:protocol.dhcp [2023/10/04 01:41] – [Providing ISP DNS with DHCP] update vgaetera
Line 125: Line 125:
 do DHCP_OPT="$(uci -q get dhcp.${DHCP_POOL}.dhcp_option)" do DHCP_OPT="$(uci -q get dhcp.${DHCP_POOL}.dhcp_option)"
 for DHCP_OPT in ${DHCP_OPT} for DHCP_OPT in ${DHCP_OPT}
-do if [ "${DHCP_OPT%%,*}" = "6" ] +do case ${DHCP_OPT%%,*} in 
-then uci del_list dhcp.${DHCP_POOL}.dhcp_option="${DHCP_OPT}" +(6|option:dns-server) 
-fi+uci del_list dhcp.${DHCP_POOL}.dhcp_option="${DHCP_OPT}" ;; 
 +esac
 done done
 uci add_list dhcp.${DHCP_POOL}.dhcp_option="6,${DNS_SERV// /,}" uci add_list dhcp.${DHCP_POOL}.dhcp_option="6,${DNS_SERV// /,}"
Line 181: Line 182:
 ==== Resolving WAN/LAN subnet conflicts ==== ==== Resolving WAN/LAN subnet conflicts ====
 Automatically resolve WAN/LAN subnet conflicts. Automatically resolve WAN/LAN subnet conflicts.
 +Change LAN subnet if it overlaps with WAN.
  
 <code bash> <code bash>
-cat << "EOF" > /etc/udhcpc.user.d/20-lan-ipaddr+cat << "EOF" > /etc/udhcpc.user.d/10-lan-ipaddr
 WAN_ADDR="${ip}" WAN_ADDR="${ip}"
 LAN_IF="lan" LAN_IF="lan"
  • Last modified: 2023/10/06 03:39
  • by vgaetera