return CMD_WARNING;
}
if (add_cmd)
- static_add_ipv4 (&p, NULL, NULL, ZEBRA_FLAG_BLACKHOLE, tag, distance, 0);
+ static_add_ipv4 (&p, NULL, NULL, ZEBRA_FLAG_BLACKHOLE, tag, distance, VRF_DEFAULT);
else
- static_delete_ipv4 (&p, NULL, NULL, tag, distance, 0);
+ static_delete_ipv4 (&p, NULL, NULL, tag, distance, VRF_DEFAULT);
return CMD_SUCCESS;
}
if (gate_str == NULL)
{
if (add_cmd)
- static_add_ipv4 (&p, NULL, NULL, flag, tag, distance, 0);
+ static_add_ipv4 (&p, NULL, NULL, flag, tag, distance, VRF_DEFAULT);
else
- static_delete_ipv4 (&p, NULL, NULL, tag, distance, 0);
+ static_delete_ipv4 (&p, NULL, NULL, tag, distance, VRF_DEFAULT);
return CMD_SUCCESS;
}
ifname = gate_str;
if (add_cmd)
- static_add_ipv4 (&p, ifname ? NULL : &gate, ifname, flag, tag, distance, 0);
+ static_add_ipv4 (&p, ifname ? NULL : &gate, ifname, flag, tag, distance, VRF_DEFAULT);
else
- static_delete_ipv4 (&p, ifname ? NULL : &gate, ifname, tag, distance, 0);
+ static_delete_ipv4 (&p, ifname ? NULL : &gate, ifname, tag, distance, VRF_DEFAULT);
return CMD_SUCCESS;
}
vty_out (vty, ", distance %u, metric %u", rib->distance, rib->metric);
if (rib->tag)
vty_out (vty, ", tag %d", rib->tag);
+ vty_out (vty, ", vrf %u", rib->vrf_id);
if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED))
vty_out (vty, ", best");
if (rib->refcnt)
&& 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",
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",
struct prefix p;
int ret;
int first = 1;
+ vrf_id_t vrf_id = VRF_DEFAULT;
ret = str2prefix (argv[0], &p);
if (! ret)
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;
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",
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;
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)
{
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,
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)
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;
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_ospf_instance,
show_ip_route_ospf_instance_cmd,
"show ip route ospf <1-65535>",
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)
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;
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",
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)
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;
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)
{
}
}
- 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++)
{
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);
}
/*
}
}
- 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++)
{
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. */
"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;
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,
"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;
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);
+
+ 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);
+
+ 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)
+static_config_ipv4 (struct vty *vty, safi_t safi, const char *cmd)
{
struct route_node *rn;
struct static_ipv4 *si;
struct route_table *stable;
+ struct zebra_vrf *zvrf;
+ vrf_iter_t iter;
int write;
write = 0;
- /* Lookup table. */
- stable = zebra_vrf_static_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
- if (! stable)
- return -1;
-
- for (rn = route_top (stable); rn; rn = route_next (rn))
- for (si = rn->info; si; si = si->next)
- {
- vty_out (vty, "ip route %s/%d", inet_ntoa (rn->p.u.prefix4),
- rn->p.prefixlen);
+ for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+ {
+ if ((zvrf = vrf_iter2info (iter)) == NULL ||
+ (stable = zvrf->stable[AFI_IP][safi]) == NULL)
+ continue;
- switch (si->type)
+ for (rn = route_top (stable); rn; rn = route_next (rn))
+ for (si = rn->info; si; si = si->next)
{
- case STATIC_IPV4_GATEWAY:
- vty_out (vty, " %s", inet_ntoa (si->gate.ipv4));
- break;
- case STATIC_IPV4_IFNAME:
- vty_out (vty, " %s", si->gate.ifname);
- break;
- case STATIC_IPV4_BLACKHOLE:
- vty_out (vty, " Null0");
- break;
- }
-
- /* flags are incompatible with STATIC_IPV4_BLACKHOLE */
- if (si->type != STATIC_IPV4_BLACKHOLE)
- {
- if (CHECK_FLAG(si->flags, ZEBRA_FLAG_REJECT))
- vty_out (vty, " %s", "reject");
+ vty_out (vty, "%s %s/%d", cmd, inet_ntoa (rn->p.u.prefix4),
+ rn->p.prefixlen);
- if (CHECK_FLAG(si->flags, ZEBRA_FLAG_BLACKHOLE))
- vty_out (vty, " %s", "blackhole");
- }
+ switch (si->type)
+ {
+ case STATIC_IPV4_GATEWAY:
+ vty_out (vty, " %s", inet_ntoa (si->gate.ipv4));
+ break;
+ case STATIC_IPV4_IFNAME:
+ vty_out (vty, " %s", si->gate.ifname);
+ break;
+ case STATIC_IPV4_BLACKHOLE:
+ vty_out (vty, " Null0");
+ break;
+ }
- if (si->tag)
- vty_out (vty, " tag %d", si->tag);
+ /* flags are incompatible with STATIC_IPV4_BLACKHOLE */
+ if (si->type != STATIC_IPV4_BLACKHOLE)
+ {
+ if (CHECK_FLAG(si->flags, ZEBRA_FLAG_REJECT))
+ vty_out (vty, " %s", "reject");
- if (si->distance != ZEBRA_STATIC_DISTANCE_DEFAULT)
- vty_out (vty, " %d", si->distance);
+ if (CHECK_FLAG(si->flags, ZEBRA_FLAG_BLACKHOLE))
+ vty_out (vty, " %s", "blackhole");
+ }
- vty_out (vty, "%s", VTY_NEWLINE);
+ if (si->tag)
+ vty_out (vty, " tag %d", si->tag);
- write = 1;
- }
+ if (si->distance != ZEBRA_STATIC_DISTANCE_DEFAULT)
+ vty_out (vty, " %d", si->distance);
+
+ vty_out (vty, "%s", VTY_NEWLINE);
+
+ write = 1;
+ }
+ }
return write;
}
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;
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. */
struct in6_addr *gate = NULL;
struct in6_addr gate_addr;
u_char type = 0;
- int table = 0;
u_char flag = 0;
u_short tag = 0;
}
if (add_cmd)
- static_add_ipv6 (&p, type, gate, ifname, flag, tag, distance, table);
+ static_add_ipv6 (&p, type, gate, ifname, flag, tag, distance, VRF_DEFAULT);
else
- static_delete_ipv6 (&p, type, gate, ifname, tag, distance, table);
+ static_delete_ipv6 (&p, type, gate, ifname, tag, distance, VRF_DEFAULT);
return CMD_SUCCESS;
}
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;
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",
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)
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)
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,
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)
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;
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",
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)
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;
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",
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)
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;
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,
"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;
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,
"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;
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.
struct route_node *rn;
struct rib *rib;
int first = 1;
+ vrf_id_t vrf_id = VRF_DEFAULT;
+
+ if (argc > 0)
+ VTY_GET_INTEGER ("VRF ID", vrf_id, argv[0]);
- table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, VRF_DEFAULT);
+ table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id);
if (! table)
return CMD_SUCCESS;
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);
+
+ 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);
+
+ 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)
{
int write = 0;
- write += static_config_ipv4 (vty);
+ write += static_config_ipv4 (vty, SAFI_UNICAST, "ip route");
#ifdef HAVE_IPV6
write += static_config_ipv6 (vty);
#endif /* HAVE_IPV6 */
install_element (ENABLE_NODE, &show_ip_mroute_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);
+
#ifdef HAVE_IPV6
install_element (CONFIG_NODE, &ipv6_route_cmd);
install_element (CONFIG_NODE, &ipv6_route_flags_cmd);
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 */
}