diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 299de23..13faf90 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,63 @@
+2005-10-21 Paul Jakma <paul.jakma@sun.com>
+
+	* (general) OSPF fast, sub-second hello and 1s dead-interval
+	  support.
+	* ospf_dump.c: (ospf_timer_dump) Print out milliseconds too.
+	  Callers typically specify a length of 9, so most see
+	  millisecs unless they specify the additional length.
+	* ospf_interface.h: (struct ospf_interface) new interface param, 
+	  fast_hello.
+	* ospf_interface.c: (ospf_if_table_lookup) add brackets,
+	  gcc warning fix.
+	  (ospf_new_if_params) Initialise fast_hello param.
+	  (ospf_free_if_params) Check whether fast_hello is configured.
+	  (ospf_if_new_hook) set fast_hello to default.
+	* ospf_ism.h: Wrap OSPF_ISM_TIMER_ON inside do {} while (0) to
+	  prevent funny side-effects from its if statement when this
+	  macro is used conditionally by other macros.
+	  (OSPF_ISM_TIMER_MSEC_ON) new macro, set in milliseconds.
+	  (OSPF_HELLO_TIMER_ON) new macro to set hello timer according
+	  to whether fast_hello is set.
+	* ospf_ism.c: Update all setting of the hello timer to use
+	  either OSPF_ISM_TIMER_MSEC_ON or OSPF_HELLO_TIMER_ON. The
+	  former is used when hello is to be sent immediately.
+	* ospf_nsm.c: ditto
+	* ospf_packet.c: (ospf_hello) hello-interval is not checked
+	  for mismatch if fast_hello is set.
+	  (ospf_read) Annoying nit, fix "no ospf_interface" to be debug
+	  rather than a warning, as it can be perfectly normal to
+	  receive packets when logical subnets are used.
+	  (ospf_make_hello) Set hello-interval to 0 if fast-hellos are
+	  configured.
+	* ospf_vty.c: (ospf_auto_cost_reference_bandwidth) annoying
+	  nit, don't vty_out if this command is given, it gets tired
+	  quick.
+	  (show_ip_ospf_interface_sub) Print the hello-interval 
+	  according to whether fast-hello is set or not.
+	  Print the extra 5 millisec characters from (ospf_timer_dump)
+	  if fast-hello is configured.
+	  (ospf_vty_dead_interval_set) new function, common to all
+	  forms of dead-interval command, to set dead-interval and
+	  fast-hello correctly. If a dead-interval is given, unset
+	  fast-hello, else if a hello-multiplier is set, set
+          dead-interval to 1 and fast-hello to given multiplier.
+	  (ip_ospf_dead_interval_addr_cmd) use
+	  ospf_vty_dead_interval_set().
+	  (ip_ospf_dead_interval_minimal_addr_cmd) ditto.
+	  (no_ip_ospf_dead_interval) Unset fast-hello.
+	  (no_ip_ospf_hello_interval) Bug-fix, unset of hello-interval
+	  should set it to OSPF_HELLO_INTERVAL_DEFAULT, not
+	  OSPF_ROUTER_DEAD_INTERVAL_DEFAULT.
+	  (config_write_interface) Write out fast-hello.
+	  (ospf_config_write) Write a comment about 
+	  "auto-cost reference-bandwidth" having to be equal on all
+	  routers. Hopefully just as noticeable as old practice of
+	  writing to vty, but less annoying.
+	  (ospf_vty_if_init) install the two new dead-interval
+	  commands.
+	* ospfd.h: Add defines for OSPF_ROUTER_DEAD_INTERVAL_MINIMAL
+	  and OSPF_FAST_HELLO_DEFAULT.
+
 2005-10-18 Paul Jakma <paul.jakma@sun.com>
 
 	* (general) SPF memory management cleanup and fix for rare
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index ac74269..829c00f 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -232,31 +232,39 @@
 const char *
 ospf_timer_dump (struct thread *t, char *buf, size_t size)
 {
-  struct timeval now;
-  unsigned long h, m, s;
+  struct timeval now, result;
+  unsigned long h, m, s, ms;
 
   if (!t)
     return "inactive";
 
-  h = m = s = 0;
+  h = m = s = ms = 0;
   memset (buf, 0, size);
 
   gettimeofday (&now, NULL);
-
-  s = t->u.sands.tv_sec - now.tv_sec;
-  if (s >= 3600)
+  
+  timersub (&t->u.sands, &now, &result);
+  
+  ms = result.tv_usec / 1000;
+  
+  if (ms >= 1000)
     {
-      h = s / 3600;
-      s -= h * 3600;
+      result.tv_sec = ms / 1000;
+      ms =- result.tv_sec * 1000;
+    }
+  if (result.tv_sec >= 3600)
+    {
+      h = result.tv_sec / 3600;
+      result.tv_sec -= h * 3600;
     }
 
-  if (s >= 60)
+  if (result.tv_sec >= 60)
     {
-      m = s / 60;
-      s -= m * 60;
+      m = result.tv_sec / 60;
+      result.tv_sec -= m * 60;
     }
 
-  snprintf (buf, size, "%02ld:%02ld:%02ld", h, m, s);
+  snprintf (buf, size, "%02ld:%02ld:%02ld.%03ld", h, m, result.tv_sec, ms);
 
   return buf;
 }
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index fe32268..d21dea3 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -156,7 +156,7 @@
   p.prefixlen = IPV4_MAX_PREFIXLEN;
   
   /* route_node_get implicitely locks */
-  if (rn = route_node_lookup (IF_OIFS (ifp), &p))
+  if ((rn = route_node_lookup (IF_OIFS (ifp), &p)))
     {
       rninfo = (struct ospf_interface *) rn->info;
       route_unlock_node (rn);
@@ -559,6 +559,7 @@
   UNSET_IF_PARAM (oip, retransmit_interval);
   UNSET_IF_PARAM (oip, passive_interface);
   UNSET_IF_PARAM (oip, v_hello);
+  UNSET_IF_PARAM (oip, fast_hello);
   UNSET_IF_PARAM (oip, v_wait);
   UNSET_IF_PARAM (oip, priority);
   UNSET_IF_PARAM (oip, type);
@@ -600,6 +601,7 @@
       !OSPF_IF_PARAM_CONFIGURED (oip, retransmit_interval) &&
       !OSPF_IF_PARAM_CONFIGURED (oip, passive_interface) &&
       !OSPF_IF_PARAM_CONFIGURED (oip, v_hello) &&
+      !OSPF_IF_PARAM_CONFIGURED (oip, fast_hello) &&
       !OSPF_IF_PARAM_CONFIGURED (oip, v_wait) &&
       !OSPF_IF_PARAM_CONFIGURED (oip, priority) &&
       !OSPF_IF_PARAM_CONFIGURED (oip, type) &&
@@ -700,6 +702,9 @@
   SET_IF_PARAM (IF_DEF_PARAMS (ifp), v_hello);
   IF_DEF_PARAMS (ifp)->v_hello = OSPF_HELLO_INTERVAL_DEFAULT;
 
+  SET_IF_PARAM (IF_DEF_PARAMS (ifp), fast_hello);
+  IF_DEF_PARAMS (ifp)->fast_hello = OSPF_FAST_HELLO_DEFAULT;
+
   SET_IF_PARAM (IF_DEF_PARAMS (ifp), v_wait);
   IF_DEF_PARAMS (ifp)->v_wait = OSPF_ROUTER_DEAD_INTERVAL_DEFAULT;
 
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h
index 2b12985..28d95d7 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -55,7 +55,10 @@
 
   /* MTU mismatch check (see RFC2328, chap 10.6) */ 
   DECLARE_IF_PARAM (u_char, mtu_ignore);
-
+  
+  /* Fast-Hellos */
+  DECLARE_IF_PARAM (u_char, fast_hello);
+  
   /* Authentication data. */
   u_char auth_simple[OSPF_AUTH_SIMPLE_SIZE + 1];       /* Simple password. */
   u_char auth_simple__config:1;
diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c
index ab91e8d..f65c68c 100644
--- a/ospfd/ospf_ism.c
+++ b/ospfd/ospf_ism.c
@@ -263,9 +263,8 @@
   ospf_hello_send (oi);
 
   /* Hello timer set. */
-  OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer,
-		     OSPF_IF_PARAM (oi, v_hello));
-
+  OSPF_HELLO_TIMER_ON (oi);
+  
   return 0;
 }
 
@@ -313,7 +312,7 @@
       /* The router is trying to determine the identity of DRouter and
 	 BDRouter. The router begin to receive and send Hello Packets. */
       /* send first hello immediately */
-      OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer, 1);
+      OSPF_ISM_TIMER_MSEC_ON (oi->t_hello, ospf_hello_timer, 1);
       OSPF_ISM_TIMER_ON (oi->t_wait, ospf_wait_timer,
 			 OSPF_IF_PARAM (oi, v_wait));
       OSPF_ISM_TIMER_OFF (oi->t_ls_ack);
@@ -323,8 +322,7 @@
 	 virtual link. The router attempts to form an adjacency with
 	 neighboring router. Hello packets are also sent. */
       /* send first hello immediately */
-      OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer, 1);
-      
+      OSPF_ISM_TIMER_MSEC_ON (oi->t_hello, ospf_hello_timer, 1);      
       OSPF_ISM_TIMER_OFF (oi->t_wait);
       OSPF_ISM_TIMER_ON (oi->t_ls_ack, ospf_ls_ack_timer, oi->v_ls_ack);
       break;
@@ -332,24 +330,21 @@
       /* The network type of the interface is broadcast or NBMA network,
 	 and the router itself is neither Designated Router nor
 	 Backup Designated Router. */
-      OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer,
-			 OSPF_IF_PARAM (oi, v_hello));
+      OSPF_HELLO_TIMER_ON (oi);
       OSPF_ISM_TIMER_OFF (oi->t_wait);
       OSPF_ISM_TIMER_ON (oi->t_ls_ack, ospf_ls_ack_timer, oi->v_ls_ack);
       break;
     case ISM_Backup:
       /* The network type of the interface is broadcast os NBMA network,
 	 and the router is Backup Designated Router. */
-      OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer,
-			 OSPF_IF_PARAM (oi, v_hello));
+      OSPF_HELLO_TIMER_ON (oi);
       OSPF_ISM_TIMER_OFF (oi->t_wait);
       OSPF_ISM_TIMER_ON (oi->t_ls_ack, ospf_ls_ack_timer, oi->v_ls_ack);
       break;
     case ISM_DR:
       /* The network type of the interface is broadcast or NBMA network,
 	 and the router is Designated Router. */
-      OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer,
-			 OSPF_IF_PARAM (oi, v_hello));
+      OSPF_HELLO_TIMER_ON (oi);
       OSPF_ISM_TIMER_OFF (oi->t_wait);
       OSPF_ISM_TIMER_ON (oi->t_ls_ack, ospf_ls_ack_timer, oi->v_ls_ack);
       break;
diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h
index 94d75b4..c714a15 100644
--- a/ospfd/ospf_ism.h
+++ b/ospfd/ospf_ism.h
@@ -65,8 +65,28 @@
      
 /* Macro for OSPF ISM timer turn on. */
 #define OSPF_ISM_TIMER_ON(T,F,V) \
-      if (!(T)) \
-        (T) = thread_add_timer (master, (F), oi, (V))
+  do { \
+    if (!(T)) \
+      (T) = thread_add_timer (master, (F), oi, (V)); \
+  } while (0)
+#define OSPF_ISM_TIMER_MSEC_ON(T,F,V) \
+  do { \
+    if (!(T)) \
+      (T) = thread_add_timer_msec (master, (F), oi, (V)); \
+  } while (0)
+
+/* convenience macro to set hello timer correctly, according to
+ * whether fast-hello is set or not
+ */
+#define OSPF_HELLO_TIMER_ON(O) \
+  do { \
+    if (OSPF_IF_PARAM ((O), fast_hello)) \
+        OSPF_ISM_TIMER_MSEC_ON ((O)->t_hello, ospf_hello_timer, \
+                                1000 / OSPF_IF_PARAM ((O), fast_hello)); \
+    else \
+        OSPF_ISM_TIMER_ON ((O)->t_hello, ospf_hello_timer, \
+                                OSPF_IF_PARAM ((O), v_hello)); \
+  } while (0)
 
 /* Macro for OSPF ISM timer turn off. */
 #define OSPF_ISM_TIMER_OFF(X) \
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index 1d10084..bfd565e 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -826,7 +826,7 @@
   if (state == NSM_Init)
     {
       OSPF_ISM_TIMER_OFF (oi->t_hello);
-      OSPF_ISM_TIMER_ON (oi->t_hello, ospf_hello_timer, 1);
+      OSPF_ISM_TIMER_MSEC_ON (oi->t_hello, ospf_hello_timer, 1);
     }
 
   /* Preserve old status? */
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index e50b743..7c29a04 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -789,14 +789,6 @@
 	return;
       }
 
-  /* Compare Hello Interval. */
-  if (OSPF_IF_PARAM (oi, v_hello) != ntohs (hello->hello_interval))
-    {
-      zlog_warn ("Packet %s [Hello:RECV]: HelloInterval mismatch.",
-		 inet_ntoa (ospfh->router_id));
-      return;
-    }
-
   /* Compare Router Dead Interval. */
   if (OSPF_IF_PARAM (oi, v_wait) != ntohl (hello->dead_interval))
     {
@@ -805,6 +797,17 @@
       return;
     }
 
+  /* Compare Hello Interval - ignored if fast-hellos are set. */
+  if (OSPF_IF_PARAM (oi, fast_hello) == 0)
+    {
+      if (OSPF_IF_PARAM (oi, v_hello) != ntohs (hello->hello_interval))
+        {
+          zlog_warn ("Packet %s [Hello:RECV]: HelloInterval mismatch.",
+                     inet_ntoa (ospfh->router_id));
+          return;
+        }
+    }
+  
   if (IS_DEBUG_OSPF_EVENT)
     zlog_debug ("Packet %s [Hello:RECV]: Options %s",
 	       inet_ntoa (ospfh->router_id),
@@ -2356,7 +2359,7 @@
     {
       if ((oi = ospf_associate_packet_vl (ospf, ifp, iph, ospfh)) == NULL)
         {
-          zlog_warn ("Packet from [%s] received on link %s"
+          zlog_debug ("Packet from [%s] received on link %s"
                      " but no ospf_interface",
                      inet_ntoa (iph->ip_src), ifp->name);
           return 0;
@@ -2576,7 +2579,10 @@
   stream_put_ipv4 (s, mask.s_addr);
 
   /* Set Hello Interval. */
-  stream_putw (s, OSPF_IF_PARAM (oi, v_hello));
+  if (OSPF_IF_PARAM (oi, fast_hello) == 0)
+    stream_putw (s, OSPF_IF_PARAM (oi, v_hello));
+  else
+    stream_putw (s, 0); /* hello-interval of 0 for fast-hellos */
 
   if (IS_DEBUG_OSPF_EVENT)
     zlog_debug ("make_hello: options: %x, int: %s",
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index a47eca1..0d0befa 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2353,9 +2353,6 @@
     return CMD_SUCCESS;
   
   ospf->ref_bandwidth = refbw * 1000;
-  vty_out (vty, "%% OSPF: Reference bandwidth is changed.%s", VTY_NEWLINE);
-  vty_out (vty, "        Please ensure reference bandwidth is consistent across all routers%s", VTY_NEWLINE);
-      
   for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
     ospf_if_recalculate_output_cost (ifp);
   
@@ -2697,15 +2694,29 @@
       vty_out (vty, "%s", VTY_NEWLINE);
 
       vty_out (vty, "  Timer intervals configured,");
-      vty_out (vty, " Hello %d, Dead %d, Wait %d, Retransmit %d%s",
-	       OSPF_IF_PARAM (oi, v_hello), OSPF_IF_PARAM (oi, v_wait),
+      vty_out (vty, " Hello ");
+      if (OSPF_IF_PARAM (oi, fast_hello) == 0)
+        vty_out (vty, "%ds,", OSPF_IF_PARAM (oi, v_hello));
+      else
+        vty_out (vty, "%dms,", 1000 / OSPF_IF_PARAM (oi, fast_hello));
+      vty_out (vty, " Dead %ds, Wait %ds, Retransmit %d%s",
+	       OSPF_IF_PARAM (oi, v_wait),
 	       OSPF_IF_PARAM (oi, v_wait),
 	       OSPF_IF_PARAM (oi, retransmit_interval),
 	       VTY_NEWLINE);
       
       if (OSPF_IF_PARAM (oi, passive_interface) == OSPF_IF_ACTIVE)
-	vty_out (vty, "    Hello due in %s%s",
-		 ospf_timer_dump (oi->t_hello, buf, 9), VTY_NEWLINE);
+        {
+          int timer_slen = 9; /* length of "hh:mm:ss(nul)" */
+          
+          /* for fast hello we also want to see the .XXXX ms part */
+          if (OSPF_IF_PARAM (oi, fast_hello))
+            timer_slen += 5;
+          
+	  vty_out (vty, "    Hello due in %s%s",
+		   ospf_timer_dump (oi->t_hello, buf, timer_slen), 
+		   VTY_NEWLINE);
+        }
       else /* OSPF_IF_PASSIVE is set */
 	vty_out (vty, "    No Hellos (Passive interface)%s", VTY_NEWLINE);
       
@@ -4583,17 +4594,14 @@
       }
 }
 
-DEFUN (ip_ospf_dead_interval,
-       ip_ospf_dead_interval_addr_cmd,
-       "ip ospf dead-interval <1-65535> A.B.C.D",
-       "IP Information\n"
-       "OSPF interface commands\n"
-       "Interval after which a neighbor is declared dead\n"
-       "Seconds\n"
-       "Address of interface")
+static int
+ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str,
+                            const char *nbr_str,
+                            const char *fast_hello_str)
 {
   struct interface *ifp = vty->index;
   u_int32_t seconds;
+  u_char hellomult;
   struct in_addr addr;
   int ret;
   struct ospf_if_params *params;
@@ -4604,19 +4612,10 @@
   ospf = ospf_lookup ();
 
   params = IF_DEF_PARAMS (ifp);
-
-  seconds = strtol (argv[0], NULL, 10);
-
-  /* dead_interval range is <1-65535>. */
-  if (seconds < 1 || seconds > 65535)
+  
+  if (nbr_str)
     {
-      vty_out (vty, "Router Dead Interval is invalid%s", VTY_NEWLINE);
-      return CMD_WARNING;
-    }
-
-  if (argc == 2)
-    {
-      ret = inet_aton(argv[1], &addr);
+      ret = inet_aton(nbr_str, &addr);
       if (!ret)
 	{
 	  vty_out (vty, "Please specify interface address by A.B.C.D%s",
@@ -4628,11 +4627,36 @@
       ospf_if_update_params (ifp, addr);
     }
 
+  if (interval_str)
+    {
+      VTY_GET_INTEGER_RANGE ("Router Dead Interval", seconds, interval_str,
+                             1, 65535);
+                             
+      /* reset fast_hello too, just to be sure */
+      UNSET_IF_PARAM (params, fast_hello);
+      params->fast_hello = OSPF_FAST_HELLO_DEFAULT;
+    }
+  else if (fast_hello_str)
+    {
+      VTY_GET_INTEGER_RANGE ("Hello Multiplier", hellomult, fast_hello_str,
+                             1, 10);
+      /* 1s dead-interval with sub-second hellos desired */
+      seconds = OSPF_ROUTER_DEAD_INTERVAL_MINIMAL;
+      SET_IF_PARAM (params, fast_hello);
+      params->fast_hello = hellomult;
+    }
+  else
+    {
+      vty_out (vty, "Please specify dead-interval or hello-multiplier%s",
+              VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+    
   SET_IF_PARAM (params, v_wait);
   params->v_wait = seconds;
   
   /* Update timer values in neighbor structure. */
-  if (argc == 2)
+  if (nbr_str)
     {
       if (ospf)
 	{
@@ -4651,6 +4675,22 @@
   return CMD_SUCCESS;
 }
 
+
+DEFUN (ip_ospf_dead_interval,
+       ip_ospf_dead_interval_addr_cmd,
+       "ip ospf dead-interval <1-65535> A.B.C.D",
+       "IP Information\n"
+       "OSPF interface commands\n"
+       "Interval after which a neighbor is declared dead\n"
+       "Seconds\n"
+       "Address of interface\n")
+{
+  if (argc == 2)
+    return ospf_vty_dead_interval_set (vty, argv[0], argv[1], NULL);
+  else
+    return ospf_vty_dead_interval_set (vty, argv[0], NULL, NULL);
+}
+
 ALIAS (ip_ospf_dead_interval,
        ip_ospf_dead_interval_cmd,
        "ip ospf dead-interval <1-65535>",
@@ -4666,6 +4706,33 @@
        "Interval after which a neighbor is declared dead\n"
        "Seconds\n")
 
+DEFUN (ip_ospf_dead_interval_minimal,
+       ip_ospf_dead_interval_minimal_addr_cmd,
+       "ip ospf dead-interval minimal hello-multiplier <1-10> A.B.C.D",
+       "IP Information\n"
+       "OSPF interface commands\n"
+       "Interval after which a neighbor is declared dead\n"
+       "Minimal 1s dead-interval with fast sub-second hellos\n"
+       "Hello multiplier factor\n"
+       "Number of Hellos to send each second\n"
+       "Address of interface\n")
+{
+  if (argc == 2)
+    return ospf_vty_dead_interval_set (vty, NULL, argv[1], argv[0]);
+  else
+    return ospf_vty_dead_interval_set (vty, NULL, NULL, argv[0]);
+}
+
+ALIAS (ip_ospf_dead_interval_minimal,
+       ip_ospf_dead_interval_minimal_cmd,
+       "ip ospf dead-interval minimal hello-multiplier <1-10>",
+       "IP Information\n"
+       "OSPF interface commands\n"
+       "Interval after which a neighbor is declared dead\n"
+       "Minimal 1s dead-interval with fast sub-second hellos\n"
+       "Hello multiplier factor\n"
+       "Number of Hellos to send each second\n")
+
 DEFUN (no_ip_ospf_dead_interval,
        no_ip_ospf_dead_interval_addr_cmd,
        "no ip ospf dead-interval A.B.C.D",
@@ -4705,7 +4772,10 @@
 
   UNSET_IF_PARAM (params, v_wait);
   params->v_wait = OSPF_ROUTER_DEAD_INTERVAL_DEFAULT;
-
+  
+  UNSET_IF_PARAM (params, fast_hello);
+  params->fast_hello = OSPF_FAST_HELLO_DEFAULT;
+  
   if (params != IF_DEF_PARAMS (ifp))
     {
       ospf_free_if_params (ifp, addr);
@@ -4787,7 +4857,7 @@
       ospf_if_update_params (ifp, addr);
     }
 
-  SET_IF_PARAM (params, v_hello); 
+  SET_IF_PARAM (params, v_hello);
   params->v_hello = seconds;
 
   return CMD_SUCCESS;
@@ -4841,7 +4911,7 @@
     }
 
   UNSET_IF_PARAM (params, v_hello);
-  params->v_hello = OSPF_ROUTER_DEAD_INTERVAL_DEFAULT;
+  params->v_hello = OSPF_HELLO_INTERVAL_DEFAULT;
 
   if (params != IF_DEF_PARAMS (ifp))
     {
@@ -6994,7 +7064,15 @@
 	if (OSPF_IF_PARAM_CONFIGURED (params, v_wait) &&
 	    params->v_wait != OSPF_ROUTER_DEAD_INTERVAL_DEFAULT)
 	  {
-	    vty_out (vty, " ip ospf dead-interval %u", params->v_wait);
+	    vty_out (vty, " ip ospf dead-interval ");
+	    
+	    /* fast hello ? */
+	    if (OSPF_IF_PARAM_CONFIGURED (params, fast_hello))
+	      vty_out (vty, "minimal hello-multiplier %d",
+	               params->fast_hello);
+            else
+              vty_out (vty, "%u", params->v_wait);
+            
 	    if (params != IF_DEF_PARAMS (ifp))
 	      vty_out (vty, " %s", inet_ntoa (rn->p.u.prefix4));
 	    vty_out (vty, "%s", VTY_NEWLINE);
@@ -7435,8 +7513,12 @@
 
       /* auto-cost reference-bandwidth configuration.  */
       if (ospf->ref_bandwidth != OSPF_DEFAULT_REF_BANDWIDTH)
-	vty_out (vty, " auto-cost reference-bandwidth %d%s",
-		 ospf->ref_bandwidth / 1000, VTY_NEWLINE);
+        {
+          vty_out (vty, "! Important: ensure reference bandwidth "
+                        "is consistent across all routers%s", VTY_NEWLINE);
+          vty_out (vty, " auto-cost reference-bandwidth %d%s",
+		   ospf->ref_bandwidth / 1000, VTY_NEWLINE);
+        }
 
       /* SPF timers print. */
       if (ospf->spf_delay != OSPF_SPF_DELAY_DEFAULT ||
@@ -7601,9 +7683,11 @@
   /* "ip ospf dead-interval" commands. */
   install_element (INTERFACE_NODE, &ip_ospf_dead_interval_addr_cmd);
   install_element (INTERFACE_NODE, &ip_ospf_dead_interval_cmd);
+  install_element (INTERFACE_NODE, &ip_ospf_dead_interval_minimal_addr_cmd);
+  install_element (INTERFACE_NODE, &ip_ospf_dead_interval_minimal_cmd);
   install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_addr_cmd);
   install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_cmd);
-
+  
   /* "ip ospf hello-interval" commands. */
   install_element (INTERFACE_NODE, &ip_ospf_hello_interval_addr_cmd);
   install_element (INTERFACE_NODE, &ip_ospf_hello_interval_cmd);
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index 7a2649f..b24a1cf 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -94,6 +94,7 @@
 /* OSPF interface default values. */
 #define OSPF_OUTPUT_COST_DEFAULT           10
 #define OSPF_ROUTER_DEAD_INTERVAL_DEFAULT  40
+#define OSPF_ROUTER_DEAD_INTERVAL_MINIMAL   1
 #define OSPF_HELLO_INTERVAL_DEFAULT        10
 #define OSPF_ROUTER_PRIORITY_DEFAULT        1
 #define OSPF_RETRANSMIT_INTERVAL_DEFAULT    5
@@ -106,6 +107,7 @@
 #define OSPF_NEIGHBOR_PRIORITY_DEFAULT      0
 
 #define OSPF_MTU_IGNORE_DEFAULT             0
+#define OSPF_FAST_HELLO_DEFAULT             0
 
 /* OSPF options. */
 #define OSPF_OPTION_T                    0x01  /* TOS. */
