Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:protocol.dhcp [2023/10/03 23:31] – update vgaetera | docs:guide-user:network:protocol.dhcp [2023/10/04 01:41] – [Providing ISP DNS with DHCP] update vgaetera | ||
|---|---|---|---|
| Line 125: | Line 125: | ||
| do DHCP_OPT=" | do DHCP_OPT=" | ||
| for DHCP_OPT in ${DHCP_OPT} | for DHCP_OPT in ${DHCP_OPT} | ||
| - | do if [ "${DHCP_OPT%%, | + | do case ${DHCP_OPT%%, |
| - | then uci del_list dhcp.${DHCP_POOL}.dhcp_option=" | + | (6|option: |
| - | fi | + | uci del_list dhcp.${DHCP_POOL}.dhcp_option=" |
| + | esac | ||
| done | done | ||
| uci add_list dhcp.${DHCP_POOL}.dhcp_option=" | uci add_list dhcp.${DHCP_POOL}.dhcp_option=" | ||
| Line 164: | Line 165: | ||
| ==== Getting specific WAN IP address ==== | ==== Getting specific WAN IP address ==== | ||
| - | Get a specific WAN IP address. | + | Assuming your ISP provides |
| + | Reconnect until you get the one matching a specific regexp. | ||
| + | Delay for 10 seconds between reconnects. | ||
| <code bash> | <code bash> | ||
| Line 170: | Line 173: | ||
| WAN_ADDR=" | WAN_ADDR=" | ||
| case ${WAN_ADDR} in | case ${WAN_ADDR} in | ||
| - | (192.168.*.*) exit 0 ;; | + | (192.168.*) exit 0 ;; |
| esac | esac | ||
| sleep 10 | sleep 10 | ||
| Line 179: | 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 << " | + | cat << " |
| WAN_ADDR=" | WAN_ADDR=" | ||
| LAN_IF=" | LAN_IF=" | ||
| LAN_ADDR=" | LAN_ADDR=" | ||
| case ${WAN_ADDR} in | case ${WAN_ADDR} in | ||
| - | (192.168.*.*) NEW_ADDR=" | + | (192.168.*) NEW_ADDR=" |
| (*) NEW_ADDR=" | (*) NEW_ADDR=" | ||
| esac | esac | ||