diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 78e7366..33368b6 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -31,9 +31,11 @@
 
 #include "zebra/zserv.h"
 
-static int do_show_ip_route(struct vty *vty, safi_t safi);
+static int do_show_ip_route(struct vty *vty, safi_t safi, vrf_id_t vrf_id);
 static void vty_show_ip_route_detail (struct vty *vty, struct route_node *rn,
                                       int mcast);
+static void vty_show_ip_route (struct vty *vty, struct route_node *rn,
+                               struct rib *rib);
 
 /* General function for static route. */
 static int
@@ -259,10 +261,23 @@
        IP_STR
        "Display RPF information for multicast source\n")
 {
+  vrf_id_t vrf_id = VRF_DEFAULT;
+
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
   VTY_WARN_EXPERIMENTAL();
-  return do_show_ip_route(vty, SAFI_MULTICAST);
+  return do_show_ip_route(vty, SAFI_MULTICAST, vrf_id);
 }
 
+ALIAS (show_ip_rpf,
+       show_ip_rpf_vrf_cmd,
+       "show ip rpf " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "Display RPF information for multicast source\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ip_rpf_addr,
        show_ip_rpf_addr_cmd,
        "show ip rpf A.B.C.D",
@@ -274,6 +289,91 @@
   struct in_addr addr;
   struct route_node *rn;
   struct rib *rib;
+  vrf_id_t vrf_id = VRF_DEFAULT;
+  int ret;
+
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  VTY_WARN_EXPERIMENTAL();
+
+  ret = inet_aton (argv[0], &addr);
+  if (ret == 0)
+    {
+      vty_out (vty, "%% Malformed address%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  rib = rib_match_ipv4_multicast (addr, &rn, vrf_id);
+
+  if (rib)
+    vty_show_ip_route_detail (vty, rn, 1);
+  else
+    vty_out (vty, "%% No match for RPF lookup%s", VTY_NEWLINE);
+
+  return CMD_SUCCESS;
+}
+
+ALIAS (show_ip_rpf_addr,
+       show_ip_rpf_addr_vrf_cmd,
+       "show ip rpf A.B.C.D " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "Display RPF information for multicast source\n"
+       "IP multicast source address (e.g. 10.0.0.0)\n"
+       VRF_CMD_HELP_STR)
+
+DEFUN (show_ip_rpf_vrf_all,
+       show_ip_rpf_vrf_all_cmd,
+       "show ip rpf " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "Display RPF information for multicast source\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct zebra_vrf *zvrf;
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  vrf_iter_t iter;
+  int first = 1;
+
+  VTY_WARN_EXPERIMENTAL();
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_MULTICAST]) == NULL)
+        continue;
+
+      /* Show all IPv4 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          {
+            if (first)
+              {
+                vty_out (vty, SHOW_ROUTE_V4_HEADER);
+                first = 0;
+              }
+            vty_show_ip_route (vty, rn, rib);
+          }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_rpf_addr_vrf_all,
+       show_ip_rpf_addr_vrf_all_cmd,
+       "show ip rpf A.B.C.D " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "Display RPF information for multicast source\n"
+       "IP multicast source address (e.g. 10.0.0.0)\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct in_addr addr;
+  struct route_node *rn;
+  vrf_iter_t iter;
   int ret;
 
   VTY_WARN_EXPERIMENTAL();
@@ -285,12 +385,11 @@
       return CMD_WARNING;
     }
 
-  rib = rib_match_ipv4_multicast (addr, &rn, VRF_DEFAULT);
-
-  if (rib)
-    vty_show_ip_route_detail (vty, rn, 1);
-  else
-    vty_out (vty, "%% No match for RPF lookup%s", VTY_NEWLINE);
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if (rib_match_ipv4_multicast (addr, &rn, vrf_iter2id (iter)))
+        vty_show_ip_route_detail (vty, rn, 1);
+    }
 
   return CMD_SUCCESS;
 }
@@ -717,6 +816,7 @@
               VTY_NEWLINE);
       vty_out (vty, "  Known via \"%s\"", zebra_route_string (rib->type));
       vty_out (vty, ", distance %u, metric %u", rib->distance, rib->metric);
+      vty_out (vty, ", vrf %u", rib->vrf_id);
       if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED))
         vty_out (vty, ", best");
       if (rib->refcnt)
@@ -865,6 +965,9 @@
 	      && rib->type != ZEBRA_ROUTE_KERNEL)
 	    len += vty_out (vty, " [%d/%d]", rib->distance,
 			    rib->metric);
+
+          if (rib->vrf_id != VRF_DEFAULT)
+            len += vty_out (vty, " [vrf %u]", rib->vrf_id);
 	}
       else
 	vty_out (vty, "  %c%*c",
@@ -985,16 +1088,22 @@
        IP_STR
        "IP routing table\n")
 {
-  return do_show_ip_route(vty, SAFI_UNICAST);
+  vrf_id_t vrf_id = VRF_DEFAULT;
+
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  return do_show_ip_route(vty, SAFI_UNICAST, vrf_id);
 }
 
-static int do_show_ip_route(struct vty *vty, safi_t safi) {
+static int do_show_ip_route(struct vty *vty, safi_t safi, vrf_id_t vrf_id)
+{
   struct route_table *table;
   struct route_node *rn;
   struct rib *rib;
   int first = 1;
 
-  table = zebra_vrf_table (AFI_IP, safi, VRF_DEFAULT);
+  table = zebra_vrf_table (AFI_IP, safi, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1012,6 +1121,14 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route,
+       show_ip_route_vrf_cmd,
+       "show ip route " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ip_route_prefix_longer,
        show_ip_route_prefix_longer_cmd,
        "show ip route A.B.C.D/M longer-prefixes",
@@ -1027,6 +1144,7 @@
   struct prefix p;
   int ret;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   ret = str2prefix (argv[0], &p);
   if (! ret)
@@ -1034,8 +1152,11 @@
       vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
       return CMD_WARNING;
     }
-  
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1054,6 +1175,16 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_prefix_longer,
+       show_ip_route_prefix_longer_vrf_cmd,
+       "show ip route A.B.C.D/M longer-prefixes " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+       "Show route matching the specified Network/Mask pair only\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ip_route_supernets,
        show_ip_route_supernets_cmd,
        "show ip route supernets-only",
@@ -1065,10 +1196,14 @@
   struct route_table *table;
   struct route_node *rn;
   struct rib *rib;
-  u_int32_t addr; 
+  u_int32_t addr;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1080,7 +1215,7 @@
 
 	if ((IN_CLASSC (addr) && rn->p.prefixlen < 24)
 	   || (IN_CLASSB (addr) && rn->p.prefixlen < 16)
-	   || (IN_CLASSA (addr) && rn->p.prefixlen < 8)) 
+	   || (IN_CLASSA (addr) && rn->p.prefixlen < 8))
 	  {
 	    if (first)
 	      {
@@ -1093,6 +1228,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_supernets,
+       show_ip_route_supernets_vrf_cmd,
+       "show ip route supernets-only " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Show supernet entries only\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ip_route_protocol,
        show_ip_route_protocol_cmd,
        "show ip route " QUAGGA_IP_REDIST_STR_ZEBRA,
@@ -1106,6 +1250,7 @@
   struct route_node *rn;
   struct rib *rib;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   type = proto_redistnum (AFI_IP, argv[0]);
   if (type < 0)
@@ -1113,8 +1258,11 @@
       vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
       return CMD_WARNING;
     }
-  
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1133,6 +1281,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_protocol,
+       show_ip_route_protocol_vrf_cmd,
+       "show ip route " QUAGGA_IP_REDIST_STR_ZEBRA " " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       QUAGGA_IP_REDIST_HELP_STR_ZEBRA
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ip_route_addr,
        show_ip_route_addr_cmd,
        "show ip route A.B.C.D",
@@ -1145,6 +1302,7 @@
   struct prefix_ipv4 p;
   struct route_table *table;
   struct route_node *rn;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   ret = str2prefix_ipv4 (argv[0], &p);
   if (ret <= 0)
@@ -1153,7 +1311,10 @@
       return CMD_WARNING;
     }
 
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1171,6 +1332,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_addr,
+       show_ip_route_addr_vrf_cmd,
+       "show ip route A.B.C.D " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Network in the IP routing table to display\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ip_route_prefix,
        show_ip_route_prefix_cmd,
        "show ip route A.B.C.D/M",
@@ -1183,6 +1353,7 @@
   struct prefix_ipv4 p;
   struct route_table *table;
   struct route_node *rn;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   ret = str2prefix_ipv4 (argv[0], &p);
   if (ret <= 0)
@@ -1191,7 +1362,10 @@
       return CMD_WARNING;
     }
 
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1211,6 +1385,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_prefix,
+       show_ip_route_prefix_vrf_cmd,
+       "show ip route A.B.C.D/M " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+       VRF_CMD_HELP_STR)
+
 static void
 vty_show_ip_route_summary (struct vty *vty, struct route_table *table)
 {
@@ -1247,8 +1430,10 @@
 	    }
 	}
 
-  vty_out (vty, "%-20s %-20s %-20s %s", 
-	   "Route Source", "Routes", "FIB", VTY_NEWLINE);
+  vty_out (vty, "%-20s %-20s %s  (vrf %u)%s",
+           "Route Source", "Routes", "FIB",
+           ((rib_table_info_t *)table->info)->zvrf->vrf_id,
+           VTY_NEWLINE);
 
   for (i = 0; i < ZEBRA_ROUTE_MAX; i++) 
     {
@@ -1273,6 +1458,7 @@
   vty_out (vty, "------%s", VTY_NEWLINE);
   vty_out (vty, "%-20s %-20d %-20d %s", "Totals", rib_cnt[ZEBRA_ROUTE_TOTAL], 
 	   fib_cnt[ZEBRA_ROUTE_TOTAL], VTY_NEWLINE);  
+  vty_out (vty, "%s", VTY_NEWLINE);
 }
 
 /*
@@ -1325,8 +1511,10 @@
 	     }
       }
 
-  vty_out (vty, "%-20s %-20s %-20s %s",
-	   "Route Source", "Prefix Routes", "FIB", VTY_NEWLINE);
+  vty_out (vty, "%-20s %-20s %s  (vrf %u)%s",
+           "Route Source", "Prefix Routes", "FIB",
+           ((rib_table_info_t *)table->info)->zvrf->vrf_id,
+           VTY_NEWLINE);
 
   for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
     {
@@ -1351,6 +1539,7 @@
   vty_out (vty, "------%s", VTY_NEWLINE);
   vty_out (vty, "%-20s %-20d %-20d %s", "Totals", rib_cnt[ZEBRA_ROUTE_TOTAL],
 	   fib_cnt[ZEBRA_ROUTE_TOTAL], VTY_NEWLINE);
+  vty_out (vty, "%s", VTY_NEWLINE);
 }
 
 /* Show route summary.  */
@@ -1363,8 +1552,12 @@
        "Summary of all routes\n")
 {
   struct route_table *table;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1373,6 +1566,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_summary,
+       show_ip_route_summary_vrf_cmd,
+       "show ip route summary " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Summary of all routes\n"
+       VRF_CMD_HELP_STR)
+
 /* Show route summary prefix.  */
 DEFUN (show_ip_route_summary_prefix,
        show_ip_route_summary_prefix_cmd,
@@ -1384,8 +1586,12 @@
        "Prefix routes\n")
 {
   struct route_table *table;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1394,6 +1600,321 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_route_summary_prefix,
+       show_ip_route_summary_prefix_vrf_cmd,
+       "show ip route summary prefix " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Summary of all routes\n"
+       "Prefix routes\n"
+       VRF_CMD_HELP_STR)
+
+DEFUN (show_ip_route_vrf_all,
+       show_ip_route_vrf_all_cmd,
+       "show ip route " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int first = 1;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show all IPv4 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          {
+            if (first)
+              {
+                vty_out (vty, SHOW_ROUTE_V4_HEADER);
+                first = 0;
+              }
+            vty_show_ip_route (vty, rn, rib);
+          }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_prefix_longer_vrf_all,
+       show_ip_route_prefix_longer_vrf_all_cmd,
+       "show ip route A.B.C.D/M longer-prefixes " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+       "Show route matching the specified Network/Mask pair only\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct prefix p;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int ret;
+  int first = 1;
+
+  ret = str2prefix (argv[0], &p);
+  if (! ret)
+    {
+      vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show matched type IPv4 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          if (prefix_match (&p, &rn->p))
+            {
+              if (first)
+                {
+                  vty_out (vty, SHOW_ROUTE_V4_HEADER);
+                  first = 0;
+                }
+              vty_show_ip_route (vty, rn, rib);
+            }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_supernets_vrf_all,
+       show_ip_route_supernets_vrf_all_cmd,
+       "show ip route supernets-only " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Show supernet entries only\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  u_int32_t addr;
+  int first = 1;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show matched type IPv4 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          {
+            addr = ntohl (rn->p.u.prefix4.s_addr);
+
+            if ((IN_CLASSC (addr) && rn->p.prefixlen < 24)
+               || (IN_CLASSB (addr) && rn->p.prefixlen < 16)
+               || (IN_CLASSA (addr) && rn->p.prefixlen < 8))
+              {
+                if (first)
+                  {
+                    vty_out (vty, SHOW_ROUTE_V4_HEADER);
+                    first = 0;
+                  }
+                vty_show_ip_route (vty, rn, rib);
+              }
+          }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_protocol_vrf_all,
+       show_ip_route_protocol_vrf_all_cmd,
+       "show ip route " QUAGGA_IP_REDIST_STR_ZEBRA " " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       QUAGGA_IP_REDIST_HELP_STR_ZEBRA
+       VRF_ALL_CMD_HELP_STR)
+{
+  int type;
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int first = 1;
+
+  type = proto_redistnum (AFI_IP, argv[0]);
+  if (type < 0)
+    {
+      vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show matched type IPv4 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          if (rib->type == type)
+            {
+              if (first)
+                {
+                  vty_out (vty, SHOW_ROUTE_V4_HEADER);
+                  first = 0;
+                }
+              vty_show_ip_route (vty, rn, rib);
+            }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_addr_vrf_all,
+       show_ip_route_addr_vrf_all_cmd,
+       "show ip route A.B.C.D " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Network in the IP routing table to display\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  int ret;
+  struct prefix_ipv4 p;
+  struct route_table *table;
+  struct route_node *rn;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  ret = str2prefix_ipv4 (argv[0], &p);
+  if (ret <= 0)
+    {
+      vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      rn = route_node_match (table, (struct prefix *) &p);
+      if (! rn)
+        continue;
+
+      vty_show_ip_route_detail (vty, rn, 0);
+
+      route_unlock_node (rn);
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_prefix_vrf_all,
+       show_ip_route_prefix_vrf_all_cmd,
+       "show ip route A.B.C.D/M " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  int ret;
+  struct prefix_ipv4 p;
+  struct route_table *table;
+  struct route_node *rn;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  ret = str2prefix_ipv4 (argv[0], &p);
+  if (ret <= 0)
+    {
+      vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      rn = route_node_match (table, (struct prefix *) &p);
+      if (! rn)
+        continue;
+      if (rn->p.prefixlen != p.prefixlen)
+        {
+          route_unlock_node (rn);
+          continue;
+        }
+
+      vty_show_ip_route_detail (vty, rn, 0);
+
+      route_unlock_node (rn);
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_summary_vrf_all,
+       show_ip_route_summary_vrf_all_cmd,
+       "show ip route summary " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Summary of all routes\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    if ((zvrf = vrf_iter2info (iter)) != NULL)
+      vty_show_ip_route_summary (vty, zvrf->table[AFI_IP][SAFI_UNICAST]);
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ip_route_summary_prefix_vrf_all,
+       show_ip_route_summary_prefix_vrf_all_cmd,
+       "show ip route summary prefix " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       "Summary of all routes\n"
+       "Prefix routes\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    if ((zvrf = vrf_iter2info (iter)) != NULL)
+      vty_show_ip_route_summary_prefix (vty, zvrf->table[AFI_IP][SAFI_UNICAST]);
+
+  return CMD_SUCCESS;
+}
+
 /* Write IPv4 static route configuration. */
 static int
 static_config_ipv4 (struct vty *vty, safi_t safi, const char *cmd)
@@ -1401,7 +1922,6 @@
   struct route_node *rn;
   struct static_ipv4 *si;  
   struct route_table *stable;
-  char buf[PREFIX_STRLEN];
   int write;
 
   write = 0;
@@ -1414,7 +1934,8 @@
   for (rn = route_top (stable); rn; rn = route_next (rn))
     for (si = rn->info; si; si = si->next)
       {
-        vty_out (vty, "%s %s", cmd, prefix2str (&rn->p, buf, sizeof buf));
+        vty_out (vty, "%s %s/%d", cmd, inet_ntoa (rn->p.u.prefix4),
+                 rn->p.prefixlen);
 
         switch (si->type)
           {
@@ -1493,8 +2014,12 @@
   struct route_node *rn;
   struct rib *rib;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP, SAFI_MULTICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP, SAFI_MULTICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1512,6 +2037,50 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ip_mroute,
+       show_ip_mroute_vrf_cmd,
+       "show ip mroute " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP Multicast routing table\n"
+       VRF_CMD_HELP_STR)
+
+DEFUN (show_ip_mroute_vrf_all,
+       show_ip_mroute_vrf_all_cmd,
+       "show ip mroute " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP Multicast routing table\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int first = 1;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show all IPv4 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          {
+           if (first)
+             {
+               vty_out (vty, SHOW_ROUTE_V4_HEADER);
+               first = 0;
+             }
+           vty_show_ip_route (vty, rn, rib);
+          }
+    }
+
+  return CMD_SUCCESS;
+}
 
 #ifdef HAVE_IPV6
 /* General fucntion for IPv6 static route. */
@@ -1830,8 +2399,12 @@
   struct route_node *rn;
   struct rib *rib;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1849,6 +2422,14 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route,
+       show_ipv6_route_vrf_cmd,
+       "show ipv6 route " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ipv6_route_prefix_longer,
        show_ipv6_route_prefix_longer_cmd,
        "show ipv6 route X:X::X:X/M longer-prefixes",
@@ -1864,10 +2445,7 @@
   struct prefix p;
   int ret;
   int first = 1;
-
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
-  if (! table)
-    return CMD_SUCCESS;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   ret = str2prefix (argv[0], &p);
   if (! ret)
@@ -1876,6 +2454,13 @@
       return CMD_WARNING;
     }
 
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
+  if (! table)
+    return CMD_SUCCESS;
+
   /* Show matched type IPv6 routes. */
   for (rn = route_top (table); rn; rn = route_next (rn))
     RNODE_FOREACH_RIB (rn, rib)
@@ -1891,6 +2476,16 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route_prefix_longer,
+       show_ipv6_route_prefix_longer_vrf_cmd,
+       "show ipv6 route X:X::X:X/M longer-prefixes " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "IPv6 prefix\n"
+       "Show route matching the specified Network/Mask pair only\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ipv6_route_protocol,
        show_ipv6_route_protocol_cmd,
        "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA,
@@ -1904,6 +2499,7 @@
   struct route_node *rn;
   struct rib *rib;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   type = proto_redistnum (AFI_IP6, argv[0]);
   if (type < 0)
@@ -1911,8 +2507,11 @@
       vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
       return CMD_WARNING;
     }
-  
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1931,6 +2530,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route_protocol,
+       show_ipv6_route_protocol_vrf_cmd,
+       "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA " " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       QUAGGA_IP6_REDIST_HELP_STR_ZEBRA
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ipv6_route_addr,
        show_ipv6_route_addr_cmd,
        "show ipv6 route X:X::X:X",
@@ -1943,6 +2551,7 @@
   struct prefix_ipv6 p;
   struct route_table *table;
   struct route_node *rn;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   ret = str2prefix_ipv6 (argv[0], &p);
   if (ret <= 0)
@@ -1951,7 +2560,10 @@
       return CMD_WARNING;
     }
 
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -1969,6 +2581,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route_addr,
+       show_ipv6_route_addr_vrf_cmd,
+       "show ipv6 route X:X::X:X " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "IPv6 Address\n"
+       VRF_CMD_HELP_STR)
+
 DEFUN (show_ipv6_route_prefix,
        show_ipv6_route_prefix_cmd,
        "show ipv6 route X:X::X:X/M",
@@ -1981,6 +2602,7 @@
   struct prefix_ipv6 p;
   struct route_table *table;
   struct route_node *rn;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
   ret = str2prefix_ipv6 (argv[0], &p);
   if (ret <= 0)
@@ -1989,7 +2611,10 @@
       return CMD_WARNING;
     }
 
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 1)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -2009,6 +2634,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route_prefix,
+       show_ipv6_route_prefix_vrf_cmd,
+       "show ipv6 route X:X::X:X/M " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "IPv6 prefix\n"
+       VRF_CMD_HELP_STR)
+
 /* Show route summary.  */
 DEFUN (show_ipv6_route_summary,
        show_ipv6_route_summary_cmd,
@@ -2019,8 +2653,12 @@
        "Summary of all IPv6 routes\n")
 {
   struct route_table *table;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -2029,6 +2667,15 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route_summary,
+       show_ipv6_route_summary_vrf_cmd,
+       "show ipv6 route summary " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "Summary of all IPv6 routes\n"
+       VRF_CMD_HELP_STR)
+
 /* Show ipv6 route summary prefix.  */
 DEFUN (show_ipv6_route_summary_prefix,
        show_ipv6_route_summary_prefix_cmd,
@@ -2040,8 +2687,12 @@
        "Prefix routes\n")
 {
   struct route_table *table;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -2050,6 +2701,16 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_route_summary_prefix,
+       show_ipv6_route_summary_prefix_vrf_cmd,
+       "show ipv6 route summary prefix " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "Summary of all IPv6 routes\n"
+       "Prefix routes\n"
+       VRF_CMD_HELP_STR)
+
 /*
  * Show IPv6 mroute command.Used to dump
  * the Multicast routing table.
@@ -2066,8 +2727,12 @@
   struct route_node *rn;
   struct rib *rib;
   int first = 1;
+  vrf_id_t vrf_id = VRF_DEFAULT;
 
-  table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, VRF_DEFAULT);
+  if (argc > 0)
+    VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
+
+  table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id);
   if (! table)
     return CMD_SUCCESS;
 
@@ -2085,6 +2750,310 @@
   return CMD_SUCCESS;
 }
 
+ALIAS (show_ipv6_mroute,
+       show_ipv6_mroute_vrf_cmd,
+       "show ipv6 mroute " VRF_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 Multicast routing table\n"
+       VRF_CMD_HELP_STR)
+
+DEFUN (show_ipv6_route_vrf_all,
+       show_ipv6_route_vrf_all_cmd,
+       "show ipv6 route " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int first = 1;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show all IPv6 route. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          {
+            if (first)
+              {
+                vty_out (vty, SHOW_ROUTE_V6_HEADER);
+                first = 0;
+              }
+            vty_show_ip_route (vty, rn, rib);
+          }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_route_prefix_longer_vrf_all,
+       show_ipv6_route_prefix_longer_vrf_all_cmd,
+       "show ipv6 route X:X::X:X/M longer-prefixes " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "IPv6 prefix\n"
+       "Show route matching the specified Network/Mask pair only\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct prefix p;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int ret;
+  int first = 1;
+
+  ret = str2prefix (argv[0], &p);
+  if (! ret)
+    {
+      vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show matched type IPv6 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          if (prefix_match (&p, &rn->p))
+            {
+              if (first)
+                {
+                  vty_out (vty, SHOW_ROUTE_V6_HEADER);
+                  first = 0;
+                }
+              vty_show_ip_route (vty, rn, rib);
+            }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_route_protocol_vrf_all,
+       show_ipv6_route_protocol_vrf_all_cmd,
+       "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA " " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IP routing table\n"
+       QUAGGA_IP6_REDIST_HELP_STR_ZEBRA
+       VRF_ALL_CMD_HELP_STR)
+{
+  int type;
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int first = 1;
+
+  type = proto_redistnum (AFI_IP6, argv[0]);
+  if (type < 0)
+    {
+      vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show matched type IPv6 routes. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          if (rib->type == type)
+            {
+              if (first)
+                {
+                  vty_out (vty, SHOW_ROUTE_V6_HEADER);
+                  first = 0;
+                }
+              vty_show_ip_route (vty, rn, rib);
+            }
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_route_addr_vrf_all,
+       show_ipv6_route_addr_vrf_all_cmd,
+       "show ipv6 route X:X::X:X " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "IPv6 Address\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  int ret;
+  struct prefix_ipv6 p;
+  struct route_table *table;
+  struct route_node *rn;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  ret = str2prefix_ipv6 (argv[0], &p);
+  if (ret <= 0)
+    {
+      vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL)
+        continue;
+
+      rn = route_node_match (table, (struct prefix *) &p);
+      if (! rn)
+        continue;
+
+      vty_show_ip_route_detail (vty, rn, 0);
+
+      route_unlock_node (rn);
+    }
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_route_prefix_vrf_all,
+       show_ipv6_route_prefix_vrf_all_cmd,
+       "show ipv6 route X:X::X:X/M " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "IPv6 prefix\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  int ret;
+  struct prefix_ipv6 p;
+  struct route_table *table;
+  struct route_node *rn;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  ret = str2prefix_ipv6 (argv[0], &p);
+  if (ret <= 0)
+    {
+      vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE);
+      return CMD_WARNING;
+    }
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL)
+        continue;
+
+      rn = route_node_match (table, (struct prefix *) &p);
+      if (! rn)
+        continue;
+      if (rn->p.prefixlen != p.prefixlen)
+        {
+          route_unlock_node (rn);
+          continue;
+        }
+
+      vty_show_ip_route_detail (vty, rn, 0);
+
+      route_unlock_node (rn);
+    }
+
+  return CMD_SUCCESS;
+}
+
+/* Show route summary.  */
+DEFUN (show_ipv6_route_summary_vrf_all,
+       show_ipv6_route_summary_vrf_all_cmd,
+       "show ipv6 route summary " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "Summary of all IPv6 routes\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    if ((zvrf = vrf_iter2info (iter)) != NULL)
+      vty_show_ip_route_summary (vty, zvrf->table[AFI_IP6][SAFI_UNICAST]);
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_mroute_vrf_all,
+       show_ipv6_mroute_vrf_all_cmd,
+       "show ipv6 mroute " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 Multicast routing table\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct route_table *table;
+  struct route_node *rn;
+  struct rib *rib;
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+  int first = 1;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    {
+      if ((zvrf = vrf_iter2info (iter)) == NULL ||
+          (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL)
+        continue;
+
+      /* Show all IPv6 route. */
+      for (rn = route_top (table); rn; rn = route_next (rn))
+        RNODE_FOREACH_RIB (rn, rib)
+          {
+           if (first)
+             {
+               vty_out (vty, SHOW_ROUTE_V6_HEADER);
+               first = 0;
+             }
+           vty_show_ip_route (vty, rn, rib);
+          }
+    }
+  return CMD_SUCCESS;
+}
+
+DEFUN (show_ipv6_route_summary_prefix_vrf_all,
+       show_ipv6_route_summary_prefix_vrf_all_cmd,
+       "show ipv6 route summary prefix " VRF_ALL_CMD_STR,
+       SHOW_STR
+       IP_STR
+       "IPv6 routing table\n"
+       "Summary of all IPv6 routes\n"
+       "Prefix routes\n"
+       VRF_ALL_CMD_HELP_STR)
+{
+  struct zebra_vrf *zvrf;
+  vrf_iter_t iter;
+
+  for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+    if ((zvrf = vrf_iter2info (iter)) != NULL)
+      vty_show_ip_route_summary_prefix (vty, zvrf->table[AFI_IP6][SAFI_UNICAST]);
+
+  return CMD_SUCCESS;
+}
+
 /* Write IPv6 static route configuration. */
 static int
 static_config_ipv6 (struct vty *vty)
@@ -2252,6 +3221,57 @@
   install_element (VIEW_NODE, &show_ip_rpf_addr_cmd);
   install_element (ENABLE_NODE, &show_ip_rpf_addr_cmd);
 
+  /* Commands for VRF */
+
+  install_element (VIEW_NODE, &show_ip_route_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_addr_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_prefix_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_prefix_longer_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_protocol_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_supernets_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_summary_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_route_summary_prefix_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_addr_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_prefix_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_prefix_longer_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_protocol_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_supernets_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_summary_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_summary_prefix_vrf_cmd);
+
+  install_element (VIEW_NODE, &show_ip_route_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_addr_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_prefix_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_prefix_longer_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_protocol_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_supernets_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_summary_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_route_summary_prefix_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_addr_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_prefix_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_prefix_longer_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_protocol_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_supernets_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_summary_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_route_summary_prefix_vrf_all_cmd);
+
+  install_element (VIEW_NODE, &show_ip_mroute_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_mroute_vrf_cmd);
+
+  install_element (VIEW_NODE, &show_ip_mroute_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_mroute_vrf_all_cmd);
+
+  install_element (VIEW_NODE, &show_ip_rpf_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_rpf_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ip_rpf_addr_vrf_cmd);
+  install_element (VIEW_NODE, &show_ip_rpf_addr_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_rpf_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_rpf_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ip_rpf_addr_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ip_rpf_addr_vrf_all_cmd);
+
 #ifdef HAVE_IPV6
   install_element (CONFIG_NODE, &ipv6_route_cmd);
   install_element (CONFIG_NODE, &ipv6_route_flags_cmd);
@@ -2286,5 +3306,43 @@
 
   install_element (VIEW_NODE, &show_ipv6_mroute_cmd);
   install_element (ENABLE_NODE, &show_ipv6_mroute_cmd);
+
+  /* Commands for VRF */
+
+  install_element (VIEW_NODE, &show_ipv6_route_vrf_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_summary_vrf_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_summary_prefix_vrf_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_protocol_vrf_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_addr_vrf_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_prefix_vrf_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_prefix_longer_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_protocol_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_addr_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_prefix_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_prefix_longer_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_summary_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_summary_prefix_vrf_cmd);
+
+  install_element (VIEW_NODE, &show_ipv6_route_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_summary_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_summary_prefix_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_protocol_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_addr_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_prefix_vrf_all_cmd);
+  install_element (VIEW_NODE, &show_ipv6_route_prefix_longer_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_protocol_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_addr_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_prefix_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_prefix_longer_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_summary_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_route_summary_prefix_vrf_all_cmd);
+
+  install_element (VIEW_NODE, &show_ipv6_mroute_vrf_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_mroute_vrf_cmd);
+
+  install_element (VIEW_NODE, &show_ipv6_mroute_vrf_all_cmd);
+  install_element (ENABLE_NODE, &show_ipv6_mroute_vrf_all_cmd);
 #endif /* HAVE_IPV6 */
 }
