Stop and start WAN or LAN interfaces on DD-WRT without a reboot.
First, let’s get some given’s, like the WAN interface:
# echo $(get_wanface)
vlan2
Or this way:
# nvram show 2>&1|grep -Ei wan_ifname=
wan_ifname=vlan2
Stop WAN or LAN
ip link set $(get_wanface) down
To bring things back up:
ip link set $(get_wanface) up
Command for WAN in this case:
udhcpc -i vlan2 -p /var/run/udhcpc.pid -s /tmp/udhcpc -O routes -O msstaticroutes -O staticroutes -x hostname:DD-WRT-HEIMDALL
NOTE: Change the ‘hostname’ to the hostname that’s set in the UI.
Enjoy!

