Why dhclient doesn't send discovery signal ?
-
Let say you have the following network :
pfsense (Type DHCP On WAN) –> ADSL Modem --> ISP Provider (DHCP Server)
Now, when you bootup pfsense, it request a IP number from ISP Provider and configure gateway/DNS,etc..
my ISP provider tell pfsense that DHCP lease should expire after 1800 secondLet say, ten minutes later, my ISP Provider go down and stay down for 5 hour, then goes up again.
During those 5 hour, Why dhcpclient inside pfsense doesn't send a discovery signal for getting new information from ISP provider ?In DD-WRT, it begin sending discovery signal after 1800 second and continue to do it until it get response from DHCP
server. -
I end up writing my first script for pfsense, it's a watchdog script that monitor diffrent IP number and restart WAN interface if it dosn't detect any connection,
I have copy this to /usr/local/etc/rc.d#!/bin/sh . /etc/rc.subr # ftp.sunet.se www.bredband.net host="194.71.11.70 195.54.106.226" case "$1" in start) logger "Starting Watchdog Services." while sleep 600 do #--- First Ping success="no" for ip in $host do if ping -c 1 -t 2 $ip >/dev/null then success="yes" logger "Watchdog Services: HeartBeat Signal From $ip Has Been Detected." break fi done #--- Second Ping if [ "$success" = "no" ] then logger "Watchdog Services: No HeartBeat Signal From $host Has Been Detected, Trying Again In 60 Second." sleep 60 success="no" for ip in $host do if ping -c 1 -t 2 $ip >/dev/null then success="yes" logger "Watchdog Services: HeartBeat Signal From $ip Has Been Detected." break fi done if [ "$success" = "no" ] then logger "Watchdog Services: No HeartBeat Signal From $host Has Been Detected, Reseting WAN Interface." sleep 2 /etc/rc.interfaces_wan_configure fi fi done exit 0 ;; stop) logger "Stopping Watchdog Services" kill `ps ax | grep watchdog | grep -v grep | awk '{ print $1 }'` ;; *) echo "Watchdog Services" echo "Created By Nima Mortazavi" echo echo "Monitoring IP Address $host every 10 Minutes And Reset WAN Interface If No Signal Is Detected." echo "Usage: `basename $0` {start|stop}" >&2 exit 64 ;; esac
-
i keep getting diconnected so i tried that script of yours and it works like a charm,
still irritating to getting diconnected from irc,ssh sessions on so forth every once in a while..hope there will be some proper fix out soon
/F
-
still irritating to getting diconnected from irc,ssh sessions on so forth every once in a while..hope there will be some proper fix out soon
use keepalive in your SSH client. every stateful firewall should disconnect unused SSH sessions after their state table timeout period. Keepalives keeps the connection up. as for IRC, I don't know.