diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 1ba0100..6d0c157 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -32,6 +32,7 @@
 #include "zclient.h"
 #include "stream.h"
 #include "linklist.h"
+#include "vrf.h"
 
 #include "isisd/dict.h"
 #include "isisd/isis_constants.h"
@@ -52,7 +53,7 @@
 /* Router-id update message from zebra. */
 static int
 isis_router_id_update_zebra (int command, struct zclient *zclient,
-			     zebra_size_t length)
+			     zebra_size_t length, vrf_id_t vrf_id)
 {
   struct isis_area *area;
   struct listnode *node;
@@ -71,11 +72,12 @@
 }
 
 static int
-isis_zebra_if_add (int command, struct zclient *zclient, zebra_size_t length)
+isis_zebra_if_add (int command, struct zclient *zclient, zebra_size_t length,
+    vrf_id_t vrf_id)
 {
   struct interface *ifp;
 
-  ifp = zebra_interface_add_read (zclient->ibuf);
+  ifp = zebra_interface_add_read (zclient->ibuf, vrf_id);
 
   if (isis->debugs & DEBUG_ZEBRA)
     zlog_debug ("Zebra I/F add: %s index %d flags %ld metric %d mtu %d",
@@ -88,13 +90,14 @@
 }
 
 static int
-isis_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length)
+isis_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length,
+    vrf_id_t vrf_id)
 {
   struct interface *ifp;
   struct stream *s;
 
   s = zclient->ibuf;
-  ifp = zebra_interface_state_read (s);
+  ifp = zebra_interface_state_read (s, vrf_id);
 
   if (!ifp)
     return 0;
@@ -120,11 +123,11 @@
 
 static int
 isis_zebra_if_state_up (int command, struct zclient *zclient,
-			zebra_size_t length)
+			zebra_size_t length, vrf_id_t vrf_id)
 {
   struct interface *ifp;
 
-  ifp = zebra_interface_state_read (zclient->ibuf);
+  ifp = zebra_interface_state_read (zclient->ibuf, vrf_id);
 
   if (ifp == NULL)
     return 0;
@@ -136,12 +139,12 @@
 
 static int
 isis_zebra_if_state_down (int command, struct zclient *zclient,
-			  zebra_size_t length)
+			  zebra_size_t length, vrf_id_t vrf_id)
 {
   struct interface *ifp;
   struct isis_circuit *circuit;
 
-  ifp = zebra_interface_state_read (zclient->ibuf);
+  ifp = zebra_interface_state_read (zclient->ibuf, vrf_id);
 
   if (ifp == NULL)
     return 0;
@@ -156,14 +159,14 @@
 
 static int
 isis_zebra_if_address_add (int command, struct zclient *zclient,
-			   zebra_size_t length)
+			   zebra_size_t length, vrf_id_t vrf_id)
 {
   struct connected *c;
   struct prefix *p;
   char buf[BUFSIZ];
 
   c = zebra_interface_address_read (ZEBRA_INTERFACE_ADDRESS_ADD,
-				    zclient->ibuf);
+				    zclient->ibuf, vrf_id);
 
   if (c == NULL)
     return 0;
@@ -187,7 +190,7 @@
 
 static int
 isis_zebra_if_address_del (int command, struct zclient *client,
-			   zebra_size_t length)
+			   zebra_size_t length, vrf_id_t vrf_id)
 {
   struct connected *c;
   struct interface *ifp;
@@ -197,7 +200,7 @@
 #endif /* EXTREME_DEBUG */
 
   c = zebra_interface_address_read (ZEBRA_INTERFACE_ADDRESS_DELETE,
-				    zclient->ibuf);
+				    zclient->ibuf, vrf_id);
 
   if (c == NULL)
     return 0;
@@ -236,7 +239,7 @@
   if (CHECK_FLAG (route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
     return;
 
-  if (zclient->redist[ZEBRA_ROUTE_ISIS])
+  if (vrf_bitmap_check (zclient->redist[ZEBRA_ROUTE_ISIS], VRF_DEFAULT))
     {
       message = 0;
       flags = 0;
@@ -249,7 +252,7 @@
 
       stream = zclient->obuf;
       stream_reset (stream);
-      zclient_create_header (stream, ZEBRA_IPV4_ROUTE_ADD);
+      zclient_create_header (stream, ZEBRA_IPV4_ROUTE_ADD, VRF_DEFAULT);
       /* type */
       stream_putc (stream, ZEBRA_ROUTE_ISIS);
       /* flags */
@@ -301,8 +304,9 @@
   struct zapi_ipv4 api;
   struct prefix_ipv4 prefix4;
 
-  if (zclient->redist[ZEBRA_ROUTE_ISIS])
+  if (vrf_bitmap_check (zclient->redist[ZEBRA_ROUTE_ISIS], VRF_DEFAULT))
     {
+      api.vrf_id = VRF_DEFAULT;
       api.type = ZEBRA_ROUTE_ISIS;
       api.flags = 0;
       api.message = 0;
@@ -333,6 +337,7 @@
   if (CHECK_FLAG (route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
     return;
 
+  api.vrf_id = VRF_DEFAULT;
   api.type = ZEBRA_ROUTE_ISIS;
   api.flags = 0;
   api.message = 0;
@@ -418,6 +423,7 @@
   if (CHECK_FLAG (route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
     return;
 
+  api.vrf_id = VRF_DEFAULT;
   api.type = ZEBRA_ROUTE_ISIS;
   api.flags = 0;
   api.message = 0;
@@ -488,7 +494,7 @@
   if (zclient->sock < 0)
     return;
 
-  if (!zclient->redist[ZEBRA_ROUTE_ISIS])
+  if (!vrf_bitmap_check (zclient->redist[ZEBRA_ROUTE_ISIS], VRF_DEFAULT))
     return;
 
   if (CHECK_FLAG (route_info->flag, ISIS_ROUTE_FLAG_ACTIVE))
@@ -514,7 +520,7 @@
 
 static int
 isis_zebra_read_ipv4 (int command, struct zclient *zclient,
-		      zebra_size_t length)
+		      zebra_size_t length, vrf_id_t vrf_id)
 {
   struct stream *stream;
   struct zapi_ipv4 api;
@@ -563,14 +569,16 @@
 #ifdef HAVE_IPV6
 static int
 isis_zebra_read_ipv6 (int command, struct zclient *zclient,
-		      zebra_size_t length)
+		      zebra_size_t length, vrf_id_t vrf_id)
 {
   return 0;
 }
 #endif
 
 #define ISIS_TYPE_IS_REDISTRIBUTED(T) \
-T == ZEBRA_ROUTE_MAX ? zclient->default_information : zclient->redist[type]
+T == ZEBRA_ROUTE_MAX ? \
+  vrf_bitmap_check (zclient->default_information, VRF_DEFAULT) : \
+  vrf_bitmap_check (zclient->redist[type], VRF_DEFAULT)
 
 int
 isis_distribute_list_update (int routetype)
@@ -587,11 +595,18 @@
 }
 #endif /* 0 */
 
+static void
+isis_zebra_connected (struct zclient *zclient)
+{
+  zclient_send_requests (zclient, VRF_DEFAULT);
+}
+
 void
 isis_zebra_init ()
 {
   zclient = zclient_new ();
   zclient_init (zclient, ZEBRA_ROUTE_ISIS);
+  zclient->zebra_connected = isis_zebra_connected;
   zclient->router_id_update = isis_router_id_update_zebra;
   zclient->interface_add = isis_zebra_if_add;
   zclient->interface_delete = isis_zebra_if_del;
