• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Why dhclient doesn't send discovery signal ?

Scheduled Pinned Locked Moved DHCP and DNS
4 Posts 3 Posters 3.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    nima.m
    last edited by May 13, 2006, 1:33 PM

    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 second

    Let 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.

    1 Reply Last reply Reply Quote 0
    • N
      nima.m
      last edited by May 13, 2006, 9:04 PM

      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
      
      
      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by Jul 6, 2006, 6:28 PM

        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

        1 Reply Last reply Reply Quote 0
        • C
          cmb
          last edited by Jul 16, 2006, 11:29 PM

          @fredde:

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received