From d511d7f1685b29914f4e6c6ed3ff4c03454b4d20 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Sun, 28 Feb 2016 22:03:27 +0000 Subject: [PATCH] Zebra: Move VRF keyword in show ip route commands To make the syntax of the "show ip route" vrf commands more closely align with the bgp variety, moved the vrf forward in the command. In other words, show ip route 10.1.1.1/32 vrf green became show ip route vrf green 10.0.0.1/32. Also added a couple of missing show vrf commands (ipv4 and ipv6 tags). Ticket: CM-9114 Signed-off-by: Don Slice Reviewed-by: Donald Sharp --- zebra/zebra_vty.c | 749 +++++++++++++++++++++++++++++++--------------- 1 file changed, 515 insertions(+), 234 deletions(-) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index a08424aca7..db6516ee2e 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1749,6 +1749,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn) struct nexthop *nexthop, *tnexthop; int recursing; char buf[BUFSIZ]; + struct zebra_vrf *zvrf; RNODE_FOREACH_RIB (rn, rib) { @@ -1762,7 +1763,11 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn) 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 (rib->vrf_id != VRF_DEFAULT) + { + zvrf = vrf_info_lookup(rib->vrf_id); + vty_out (vty, ", vrf %s", zvrf->name); + } if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED)) vty_out (vty, ", best"); if (rib->refcnt) @@ -1820,7 +1825,6 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn) vty_out (vty, ", via %s", ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id)); break; -#ifdef HAVE_IPV6 case NEXTHOP_TYPE_IPV6: case NEXTHOP_TYPE_IPV6_IFINDEX: vty_out (vty, " %s", @@ -1829,7 +1833,6 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn) vty_out (vty, ", via %s", ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id)); break; -#endif /* HAVE_IPV6 */ case NEXTHOP_TYPE_IFINDEX: vty_out (vty, " directly connected, %s", ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id)); @@ -1885,7 +1888,6 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib) int recursing; int len = 0; char buf[BUFSIZ]; - struct zebra_vrf *zvrf; /* Nexthop information. */ for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing)) @@ -1909,12 +1911,6 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib) && rib->type != ZEBRA_ROUTE_KERNEL) len += vty_out (vty, " [%d/%d]", rib->distance, rib->metric); - - if (rib->vrf_id != VRF_DEFAULT) - { - zvrf = vrf_info_lookup(rib->vrf_id); - len += vty_out (vty, " [vrf %s/table %u]", zvrf->name, zvrf->table_id); - } } else vty_out (vty, " %c%*c", @@ -2055,6 +2051,14 @@ DEFUN (show_ip_route, 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_nht, show_ip_nht_cmd, "show ip nht", @@ -2079,6 +2083,27 @@ ALIAS (show_ip_nht, "IP nexthop tracking table\n" VRF_CMD_HELP_STR) +DEFUN (show_ip_nht_vrf_all, + show_ip_nht_vrf_all_cmd, + "show ip nht " VRF_ALL_CMD_STR, + SHOW_STR + IP_STR + "IP nexthop tracking table\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_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + zebra_print_rnh_table(zvrf->vrf_id, AF_INET, vty, RNH_NEXTHOP_TYPE); + } + + return CMD_SUCCESS; +} + DEFUN (show_ipv6_nht, show_ipv6_nht_cmd, "show ipv6 nht", @@ -2103,6 +2128,27 @@ ALIAS (show_ipv6_nht, "IPv6 nexthop tracking table\n" VRF_CMD_HELP_STR) +DEFUN (show_ipv6_nht_vrf_all, + show_ipv6_nht_vrf_all_cmd, + "show ipv6 nht " VRF_ALL_CMD_STR, + SHOW_STR + IP_STR + "IPv6 nexthop tracking table\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_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + zebra_print_rnh_table(zvrf->vrf_id, AF_INET6, vty, RNH_NEXTHOP_TYPE); + } + + return CMD_SUCCESS; +} + DEFUN (ip_nht_default_route, ip_nht_default_route_cmd, "ip nht resolve-via-default", @@ -2165,7 +2211,6 @@ DEFUN (no_ipv6_nht_default_route, return CMD_SUCCESS; } - DEFUN (show_ip_route_tag, show_ip_route_tag_cmd, "show ip route tag <1-65535>", @@ -2180,11 +2225,17 @@ DEFUN (show_ip_route_tag, struct rib *rib; int first = 1; u_short tag = 0; + vrf_id_t vrf_id = VRF_DEFAULT; - if (argv[0]) - tag = atoi(argv[0]); + if (argc > 1) + { + tag = atoi(argv[1]); + VRF_GET_ID (vrf_id, argv[0]); + } + else + tag = atoi(argv[0]); - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); + table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -2205,13 +2256,15 @@ DEFUN (show_ip_route_tag, return CMD_SUCCESS; } -ALIAS (show_ip_route, - show_ip_route_vrf_cmd, - "show ip route " VRF_CMD_STR, +ALIAS (show_ip_route_tag, + show_ip_route_vrf_tag_cmd, + "show ip route " VRF_CMD_STR " tag <1-65535>", SHOW_STR IP_STR "IP routing table\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "Show only routes with tag\n" + "Tag value\n") DEFUN (show_ip_route_prefix_longer, show_ip_route_prefix_longer_cmd, @@ -2230,16 +2283,20 @@ DEFUN (show_ip_route_prefix_longer, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - ret = str2prefix (argv[0], &p); + if (argc > 1) + { + ret = str2prefix (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]); + } + else + ret = str2prefix (argv[0], &p); + if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -2260,14 +2317,14 @@ DEFUN (show_ip_route_prefix_longer, } 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_ip_route_vrf_prefix_longer_cmd, + "show ip route " VRF_CMD_STR " A.B.C.D/M longer-prefixes", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "IP prefix /, e.g., 35.0.0.0/8\n" - "Show route matching the specified Network/Mask pair only\n" - VRF_CMD_HELP_STR) + "Show route matching the specified Network/Mask pair only\n") DEFUN (show_ip_route_supernets, show_ip_route_supernets_cmd, @@ -2313,13 +2370,13 @@ DEFUN (show_ip_route_supernets, } ALIAS (show_ip_route_supernets, - show_ip_route_supernets_vrf_cmd, - "show ip route supernets-only " VRF_CMD_STR, + show_ip_route_vrf_supernets_cmd, + "show ip route " VRF_CMD_STR " supernets-only", SHOW_STR IP_STR "IP routing table\n" - "Show supernet entries only\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "Show supernet entries only\n") DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, @@ -2336,16 +2393,20 @@ DEFUN (show_ip_route_protocol, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - type = proto_redistnum (AFI_IP, argv[0]); + if (argc > 1) + { + type = proto_redistnum (AFI_IP, argv[1]); + VRF_GET_ID (vrf_id, argv[0]); + } + else + type = proto_redistnum (AFI_IP, argv[0]); + if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -2366,13 +2427,13 @@ DEFUN (show_ip_route_protocol, } ALIAS (show_ip_route_protocol, - show_ip_route_protocol_vrf_cmd, - "show ip route " QUAGGA_IP_REDIST_STR_ZEBRA " " VRF_CMD_STR, + show_ip_route_vrf_protocol_cmd, + "show ip route " VRF_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" - QUAGGA_IP_REDIST_HELP_STR_ZEBRA - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + QUAGGA_IP_REDIST_HELP_STR_ZEBRA) DEFUN (show_ip_route_ospf_instance, show_ip_route_ospf_instance_cmd, @@ -2424,16 +2485,20 @@ DEFUN (show_ip_route_addr, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - ret = str2prefix_ipv4 (argv[0], &p); + if (argc > 1) + { + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv4 (argv[1], &p); + } + else + ret = str2prefix_ipv4 (argv[0], &p); + if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -2453,13 +2518,13 @@ DEFUN (show_ip_route_addr, } ALIAS (show_ip_route_addr, - show_ip_route_addr_vrf_cmd, - "show ip route A.B.C.D " VRF_CMD_STR, + show_ip_route_vrf_addr_cmd, + "show ip route " VRF_CMD_STR " A.B.C.D", SHOW_STR IP_STR "IP routing table\n" - "Network in the IP routing table to display\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "Network in the IP routing table to display\n") DEFUN (show_ip_route_prefix, show_ip_route_prefix_cmd, @@ -2475,16 +2540,20 @@ DEFUN (show_ip_route_prefix, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - ret = str2prefix_ipv4 (argv[0], &p); + if (argc > 1) + { + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv4 (argv[1], &p); + } + else + ret = str2prefix_ipv4 (argv[0], &p); + if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -2504,13 +2573,13 @@ DEFUN (show_ip_route_prefix, } ALIAS (show_ip_route_prefix, - show_ip_route_prefix_vrf_cmd, - "show ip route A.B.C.D/M " VRF_CMD_STR, + show_ip_route_vrf_prefix_cmd, + "show ip route " VRF_CMD_STR " A.B.C.D/M", SHOW_STR IP_STR "IP routing table\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "IP prefix /, e.g., 35.0.0.0/8\n") static void vty_show_ip_route_summary (struct vty *vty, struct route_table *table) @@ -2629,9 +2698,9 @@ vty_show_ip_route_summary_prefix (struct vty *vty, struct route_table *table) } } - vty_out (vty, "%-20s %-20s %s (vrf %u)%s", + vty_out (vty, "%-20s %-20s %s (vrf %s)%s", "Route Source", "Prefix Routes", "FIB", - ((rib_table_info_t *)table->info)->zvrf->vrf_id, + ((rib_table_info_t *)table->info)->zvrf->name, VTY_NEWLINE); for (i = 0; i < ZEBRA_ROUTE_MAX; i++) @@ -2685,13 +2754,13 @@ DEFUN (show_ip_route_summary, } ALIAS (show_ip_route_summary, - show_ip_route_summary_vrf_cmd, - "show ip route summary " VRF_CMD_STR, + show_ip_route_vrf_summary_cmd, + "show ip route " VRF_CMD_STR " summary", SHOW_STR IP_STR "IP routing table\n" - "Summary of all routes\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "Summary of all routes\n") /* Show route summary prefix. */ DEFUN (show_ip_route_summary_prefix, @@ -2719,14 +2788,14 @@ DEFUN (show_ip_route_summary_prefix, } ALIAS (show_ip_route_summary_prefix, - show_ip_route_summary_prefix_vrf_cmd, - "show ip route summary prefix " VRF_CMD_STR, + show_ip_route_vrf_summary_prefix_cmd, + "show ip route " VRF_CMD_STR " summary prefix", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "Summary of all routes\n" - "Prefix routes\n" - VRF_CMD_HELP_STR) + "Prefix routes\n") DEFUN (show_ip_route_vrf_all, show_ip_route_vrf_all_cmd, @@ -2742,6 +2811,7 @@ DEFUN (show_ip_route_vrf_all, struct zebra_vrf *zvrf; vrf_iter_t iter; int first = 1; + int vrf_header = 1; for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -2758,22 +2828,82 @@ DEFUN (show_ip_route_vrf_all, vty_out (vty, SHOW_ROUTE_V4_HEADER); first = 0; } + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } vty_show_ip_route (vty, rn, rib); } + vrf_header = 1; } 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, +DEFUN (show_ip_route_vrf_all_tag, + show_ip_route_vrf_all_tag_cmd, + "show ip route " VRF_ALL_CMD_STR " tag <1-65535>", SHOW_STR IP_STR "IP routing table\n" + VRF_ALL_CMD_HELP_STR + "Show only routes with tag\n" + "Tag value\n") +{ + struct route_table *table; + struct route_node *rn; + struct rib *rib; + struct zebra_vrf *zvrf; + vrf_iter_t iter; + int first = 1; + int vrf_header = 1; + u_short tag = 0; + + if (argv[0]) + tag = atoi(argv[0]); + + 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 with matching tag value. */ + for (rn = route_top (table); rn; rn = route_next (rn)) + RNODE_FOREACH_RIB (rn, rib) + { + if (rib->tag != tag) + continue; + + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER); + first = 0; + } + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } + vty_show_ip_route (vty, rn, rib); + } + vrf_header = 1; + } + return CMD_SUCCESS; +} + +DEFUN (show_ip_route_vrf_all_prefix_longer, + show_ip_route_vrf_all_prefix_longer_cmd, + "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M longer-prefixes", + SHOW_STR + IP_STR + "IP routing table\n" + VRF_ALL_CMD_HELP_STR "IP prefix /, e.g., 35.0.0.0/8\n" - "Show route matching the specified Network/Mask pair only\n" - VRF_ALL_CMD_HELP_STR) + "Show route matching the specified Network/Mask pair only\n") { struct route_table *table; struct route_node *rn; @@ -2783,6 +2913,7 @@ DEFUN (show_ip_route_prefix_longer_vrf_all, vrf_iter_t iter; int ret; int first = 1; + int vrf_header = 1; ret = str2prefix (argv[0], &p); if (! ret) @@ -2807,21 +2938,28 @@ DEFUN (show_ip_route_prefix_longer_vrf_all, vty_out (vty, SHOW_ROUTE_V4_HEADER); first = 0; } + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } vty_show_ip_route (vty, rn, rib); } + vrf_header = 1; } 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, +DEFUN (show_ip_route_vrf_all_supernets, + show_ip_route_vrf_all_supernets_cmd, + "show ip route " VRF_ALL_CMD_STR " supernets-only", SHOW_STR IP_STR "IP routing table\n" - "Show supernet entries only\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "Show supernet entries only\n") { struct route_table *table; struct route_node *rn; @@ -2830,6 +2968,7 @@ DEFUN (show_ip_route_supernets_vrf_all, vrf_iter_t iter; u_int32_t addr; int first = 1; + int vrf_header = 1; for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -2852,22 +2991,29 @@ DEFUN (show_ip_route_supernets_vrf_all, vty_out (vty, SHOW_ROUTE_V4_HEADER); first = 0; } + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } vty_show_ip_route (vty, rn, rib); } } + vrf_header = 1; } 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, +DEFUN (show_ip_route_vrf_all_protocol, + show_ip_route_vrf_all_protocol_cmd, + "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" - QUAGGA_IP_REDIST_HELP_STR_ZEBRA - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + QUAGGA_IP_REDIST_HELP_STR_ZEBRA"\n") { int type; struct route_table *table; @@ -2876,6 +3022,7 @@ DEFUN (show_ip_route_protocol_vrf_all, struct zebra_vrf *zvrf; vrf_iter_t iter; int first = 1; + int vrf_header = 1; type = proto_redistnum (AFI_IP, argv[0]); if (type < 0) @@ -2900,21 +3047,28 @@ DEFUN (show_ip_route_protocol_vrf_all, vty_out (vty, SHOW_ROUTE_V4_HEADER); first = 0; } + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } vty_show_ip_route (vty, rn, rib); } + vrf_header = 1; } 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, +DEFUN (show_ip_route_vrf_all_addr, + show_ip_route_vrf_all_addr_cmd, + "show ip route " VRF_ALL_CMD_STR " A.B.C.D", SHOW_STR IP_STR "IP routing table\n" - "Network in the IP routing table to display\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "Network in the IP routing table to display\n") { int ret; struct prefix_ipv4 p; @@ -2948,14 +3102,14 @@ DEFUN (show_ip_route_addr_vrf_all, 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, +DEFUN (show_ip_route_vrf_all_prefix, + show_ip_route_vrf_all_prefix_cmd, + "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M", SHOW_STR IP_STR "IP routing table\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "IP prefix /, e.g., 35.0.0.0/8\n") { int ret; struct prefix_ipv4 p; @@ -2994,14 +3148,14 @@ DEFUN (show_ip_route_prefix_vrf_all, 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, +DEFUN (show_ip_route_vrf_all_summary, + show_ip_route_vrf_all_summary_cmd, + "show ip route " VRF_ALL_CMD_STR " summary ", SHOW_STR IP_STR "IP routing table\n" - "Summary of all routes\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "Summary of all routes\n") { struct zebra_vrf *zvrf; vrf_iter_t iter; @@ -3013,15 +3167,15 @@ DEFUN (show_ip_route_summary_vrf_all, 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, +DEFUN (show_ip_route_vrf_all_summary_prefix, + show_ip_route_vrf_all_summary_prefix_cmd, + "show ip route " VRF_ALL_CMD_STR " summary prefix", SHOW_STR IP_STR "IP routing table\n" + VRF_ALL_CMD_HELP_STR "Summary of all routes\n" - "Prefix routes\n" - VRF_ALL_CMD_HELP_STR) + "Prefix routes\n") { struct zebra_vrf *zvrf; vrf_iter_t iter; @@ -4300,6 +4454,7 @@ vty_show_ipv6_route_detail (struct vty *vty, struct route_node *rn) struct nexthop *nexthop, *tnexthop; int recursing; char buf[BUFSIZ]; + struct zebra_vrf *zvrf; RNODE_FOREACH_RIB (rn, rib) { @@ -4311,6 +4466,11 @@ vty_show_ipv6_route_detail (struct vty *vty, struct route_node *rn) vty_out (vty, ", distance %u, metric %u", rib->distance, rib->metric); if (rib->tag) vty_out (vty, ", tag %d", rib->tag); + if (rib->vrf_id != VRF_DEFAULT) + { + zvrf = vrf_info_lookup(rib->vrf_id); + vty_out (vty, ", vrf %s", zvrf->name); + } if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED)) vty_out (vty, ", best"); if (rib->refcnt) @@ -4514,6 +4674,14 @@ DEFUN (show_ipv6_route, 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_tag, show_ipv6_route_tag_cmd, "show ipv6 route tag <1-65535>", @@ -4528,11 +4696,17 @@ DEFUN (show_ipv6_route_tag, struct rib *rib; int first = 1; u_short tag = 0; + vrf_id_t vrf_id = VRF_DEFAULT; - if (argv[0]) + if (argc > 1) + { + VRF_GET_ID (vrf_id, argv[0]); + tag = atoi(argv[1]); + } + else tag = atoi(argv[0]); - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, VRF_DEFAULT); + table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -4553,13 +4727,15 @@ DEFUN (show_ipv6_route_tag, return CMD_SUCCESS; } -ALIAS (show_ipv6_route, - show_ipv6_route_vrf_cmd, - "show ipv6 route " VRF_CMD_STR, +ALIAS (show_ipv6_route_tag, + show_ipv6_route_vrf_tag_cmd, + "show ipv6 route " VRF_CMD_STR " tag <1-65535>", SHOW_STR IP_STR "IPv6 routing table\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "Show only routes with tag\n" + "Tag value\n") DEFUN (show_ipv6_route_prefix_longer, show_ipv6_route_prefix_longer_cmd, @@ -4578,16 +4754,20 @@ DEFUN (show_ipv6_route_prefix_longer, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - ret = str2prefix (argv[0], &p); + if (argc > 1) + { + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix (argv[1], &p); + } + else + ret = str2prefix (argv[0], &p); + if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -4608,14 +4788,14 @@ DEFUN (show_ipv6_route_prefix_longer, } 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_ipv6_route_vrf_prefix_longer_cmd, + "show ipv6 route " VRF_CMD_STR " X:X::X:X/M longer-prefixes", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "IPv6 prefix\n" - "Show route matching the specified Network/Mask pair only\n" - VRF_CMD_HELP_STR) + "Show route matching the specified Network/Mask pair only\n") DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, @@ -4632,16 +4812,20 @@ DEFUN (show_ipv6_route_protocol, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - type = proto_redistnum (AFI_IP6, argv[0]); + if ( argc >1 ) + { + VRF_GET_ID (vrf_id, argv[0]); + type = proto_redistnum (AFI_IP6, argv[1]); + } + else + type = proto_redistnum (AFI_IP6, argv[0]); + if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -4662,13 +4846,13 @@ DEFUN (show_ipv6_route_protocol, } ALIAS (show_ipv6_route_protocol, - show_ipv6_route_protocol_vrf_cmd, - "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA " " VRF_CMD_STR, + show_ipv6_route_vrf_protocol_cmd, + "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" - QUAGGA_IP6_REDIST_HELP_STR_ZEBRA - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) DEFUN (show_ipv6_route_addr, show_ipv6_route_addr_cmd, @@ -4684,16 +4868,20 @@ DEFUN (show_ipv6_route_addr, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - ret = str2prefix_ipv6 (argv[0], &p); + if (argc > 1 ) + { + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv6 (argv[1], &p); + } + else + ret = str2prefix_ipv6 (argv[0], &p); + if (ret <= 0) { vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -4713,13 +4901,13 @@ DEFUN (show_ipv6_route_addr, } ALIAS (show_ipv6_route_addr, - show_ipv6_route_addr_vrf_cmd, - "show ipv6 route X:X::X:X " VRF_CMD_STR, + show_ipv6_route_vrf_addr_cmd, + "show ipv6 route " VRF_CMD_STR " X:X::X:X", SHOW_STR IP_STR "IPv6 routing table\n" - "IPv6 Address\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "IPv6 Address\n") DEFUN (show_ipv6_route_prefix, show_ipv6_route_prefix_cmd, @@ -4735,16 +4923,20 @@ DEFUN (show_ipv6_route_prefix, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - ret = str2prefix_ipv6 (argv[0], &p); + if (argc > 1) + { + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv6 (argv[1], &p); + } + else + ret = str2prefix_ipv6 (argv[0], &p); + if (ret <= 0) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); return CMD_WARNING; } - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) return CMD_SUCCESS; @@ -4764,13 +4956,13 @@ DEFUN (show_ipv6_route_prefix, } ALIAS (show_ipv6_route_prefix, - show_ipv6_route_prefix_vrf_cmd, - "show ipv6 route X:X::X:X/M " VRF_CMD_STR, + show_ipv6_route_vrf_prefix_cmd, + "show ipv6 route " VRF_CMD_STR " X:X::X:X/M ", SHOW_STR IP_STR "IPv6 routing table\n" - "IPv6 prefix\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "IPv6 prefix\n") /* Show route summary. */ DEFUN (show_ipv6_route_summary, @@ -4797,13 +4989,13 @@ DEFUN (show_ipv6_route_summary, } ALIAS (show_ipv6_route_summary, - show_ipv6_route_summary_vrf_cmd, - "show ipv6 route summary " VRF_CMD_STR, + show_ipv6_route_vrf_summary_cmd, + "show ipv6 route " VRF_CMD_STR " summary", SHOW_STR IP_STR "IPv6 routing table\n" - "Summary of all IPv6 routes\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "Summary of all IPv6 routes\n") /* Show ipv6 route summary prefix. */ DEFUN (show_ipv6_route_summary_prefix, @@ -4831,14 +5023,14 @@ DEFUN (show_ipv6_route_summary_prefix, } ALIAS (show_ipv6_route_summary_prefix, - show_ipv6_route_summary_prefix_vrf_cmd, - "show ipv6 route summary prefix " VRF_CMD_STR, + show_ipv6_route_vrf_summary_prefix_cmd, + "show ipv6 route " VRF_CMD_STR " summary prefix", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "Summary of all IPv6 routes\n" - "Prefix routes\n" - VRF_CMD_HELP_STR) + "Prefix routes\n") /* * Show IPv6 mroute command.Used to dump @@ -4901,6 +5093,7 @@ DEFUN (show_ipv6_route_vrf_all, struct zebra_vrf *zvrf; vrf_iter_t iter; int first = 1; + int vrf_header = 1; for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -4917,22 +5110,83 @@ DEFUN (show_ipv6_route_vrf_all, vty_out (vty, SHOW_ROUTE_V6_HEADER); first = 0; } - vty_show_ip_route (vty, rn, rib); + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } + vty_show_ipv6_route (vty, rn, rib); } + vrf_header = 1; } 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, +DEFUN (show_ipv6_route_vrf_all_tag, + show_ipv6_route_vrf_all_tag_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " tag <1-65535>", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_ALL_CMD_HELP_STR + "Show only routes with tag\n" + "Tag value\n") +{ + struct route_table *table; + struct route_node *rn; + struct rib *rib; + struct zebra_vrf *zvrf; + vrf_iter_t iter; + int first = 1; + int vrf_header = 1; + u_short tag = 0; + + if (argv[0]) + tag = atoi(argv[0]); + + 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 IPv6 routes with matching tag value. */ + for (rn = route_top (table); rn; rn = route_next (rn)) + RNODE_FOREACH_RIB (rn, rib) + { + if (rib->tag != tag) + continue; + + if (first) + { + vty_out (vty, SHOW_ROUTE_V6_HEADER); + first = 0; + } + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } + vty_show_ipv6_route (vty, rn, rib); + } + vrf_header = 1; + } + + return CMD_SUCCESS; +} + +DEFUN (show_ipv6_route_vrf_all_prefix_longer, + show_ipv6_route_vrf_all_prefix_longer_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M longer-prefixes", + SHOW_STR + IP_STR + "IPv6 routing table\n" + VRF_ALL_CMD_HELP_STR "IPv6 prefix\n" - "Show route matching the specified Network/Mask pair only\n" - VRF_ALL_CMD_HELP_STR) + "Show route matching the specified Network/Mask pair only\n") { struct route_table *table; struct route_node *rn; @@ -4942,6 +5196,7 @@ DEFUN (show_ipv6_route_prefix_longer_vrf_all, vrf_iter_t iter; int ret; int first = 1; + int vrf_header = 1; ret = str2prefix (argv[0], &p); if (! ret) @@ -4966,21 +5221,28 @@ DEFUN (show_ipv6_route_prefix_longer_vrf_all, vty_out (vty, SHOW_ROUTE_V6_HEADER); first = 0; } - vty_show_ip_route (vty, rn, rib); + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } + vty_show_ipv6_route (vty, rn, rib); } + vrf_header = 1; } 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, +DEFUN (show_ipv6_route_vrf_all_protocol, + show_ipv6_route_vrf_all_protocol_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" - QUAGGA_IP6_REDIST_HELP_STR_ZEBRA - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { int type; struct route_table *table; @@ -4989,6 +5251,7 @@ DEFUN (show_ipv6_route_protocol_vrf_all, struct zebra_vrf *zvrf; vrf_iter_t iter; int first = 1; + int vrf_header = 1; type = proto_redistnum (AFI_IP6, argv[0]); if (type < 0) @@ -5013,21 +5276,28 @@ DEFUN (show_ipv6_route_protocol_vrf_all, vty_out (vty, SHOW_ROUTE_V6_HEADER); first = 0; } - vty_show_ip_route (vty, rn, rib); + + if (vrf_header) + { + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf->name, VTY_NEWLINE); + vrf_header = 0; + } + vty_show_ipv6_route (vty, rn, rib); } + vrf_header = 1; } 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, +DEFUN (show_ipv6_route_vrf_all_addr, + show_ipv6_route_vrf_all_addr_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X", SHOW_STR IP_STR "IPv6 routing table\n" - "IPv6 Address\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "IPv6 Address\n") { int ret; struct prefix_ipv6 p; @@ -5053,7 +5323,7 @@ DEFUN (show_ipv6_route_addr_vrf_all, if (! rn) continue; - vty_show_ip_route_detail (vty, rn); + vty_show_ipv6_route_detail (vty, rn); route_unlock_node (rn); } @@ -5061,14 +5331,14 @@ DEFUN (show_ipv6_route_addr_vrf_all, 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, +DEFUN (show_ipv6_route_vrf_all_prefix, + show_ipv6_route_vrf_all_prefix_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M", SHOW_STR IP_STR "IPv6 routing table\n" - "IPv6 prefix\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "IPv6 prefix\n") { int ret; struct prefix_ipv6 p; @@ -5099,7 +5369,7 @@ DEFUN (show_ipv6_route_prefix_vrf_all, continue; } - vty_show_ip_route_detail (vty, rn); + vty_show_ipv6_route_detail (vty, rn); route_unlock_node (rn); } @@ -5107,15 +5377,14 @@ DEFUN (show_ipv6_route_prefix_vrf_all, 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, +DEFUN (show_ipv6_route_vrf_all_summary, + show_ipv6_route_vrf_all_summary_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " summary", SHOW_STR IP_STR "IPv6 routing table\n" - "Summary of all IPv6 routes\n" - VRF_ALL_CMD_HELP_STR) + VRF_ALL_CMD_HELP_STR + "Summary of all IPv6 routes\n") { struct zebra_vrf *zvrf; vrf_iter_t iter; @@ -5157,21 +5426,21 @@ DEFUN (show_ipv6_mroute_vrf_all, vty_out (vty, SHOW_ROUTE_V6_HEADER); first = 0; } - vty_show_ip_route (vty, rn, rib); + vty_show_ipv6_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, +DEFUN (show_ipv6_route_vrf_all_summary_prefix, + show_ipv6_route_vrf_all_summary_prefix_cmd, + "show ipv6 route " VRF_ALL_CMD_STR " summary prefix", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_ALL_CMD_HELP_STR "Summary of all IPv6 routes\n" - "Prefix routes\n" - VRF_ALL_CMD_HELP_STR) + "Prefix routes\n") { struct zebra_vrf *zvrf; vrf_iter_t iter; @@ -5485,8 +5754,10 @@ zebra_vty_init (void) install_element (VIEW_NODE, &show_ip_route_tag_cmd); install_element (VIEW_NODE, &show_ip_nht_cmd); install_element (VIEW_NODE, &show_ip_nht_vrf_cmd); + install_element (VIEW_NODE, &show_ip_nht_vrf_all_cmd); install_element (VIEW_NODE, &show_ipv6_nht_cmd); install_element (VIEW_NODE, &show_ipv6_nht_vrf_cmd); + install_element (VIEW_NODE, &show_ipv6_nht_vrf_all_cmd); install_element (VIEW_NODE, &show_ip_route_addr_cmd); install_element (VIEW_NODE, &show_ip_route_prefix_cmd); install_element (VIEW_NODE, &show_ip_route_prefix_longer_cmd); @@ -5500,8 +5771,10 @@ zebra_vty_init (void) install_element (ENABLE_NODE, &show_ip_route_tag_cmd); install_element (ENABLE_NODE, &show_ip_nht_cmd); install_element (ENABLE_NODE, &show_ip_nht_vrf_cmd); + install_element (ENABLE_NODE, &show_ip_nht_vrf_all_cmd); install_element (ENABLE_NODE, &show_ipv6_nht_cmd); install_element (ENABLE_NODE, &show_ipv6_nht_vrf_cmd); + install_element (ENABLE_NODE, &show_ipv6_nht_vrf_all_cmd); install_element (ENABLE_NODE, &show_ip_route_addr_cmd); install_element (ENABLE_NODE, &show_ip_route_prefix_cmd); install_element (ENABLE_NODE, &show_ip_route_prefix_longer_cmd); @@ -5566,38 +5839,42 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_vrf_cmd); 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 (VIEW_NODE, &show_ip_route_vrf_addr_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_tag_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_prefix_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_prefix_longer_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_protocol_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_supernets_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_summary_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_summary_prefix_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 (ENABLE_NODE, &show_ip_route_vrf_addr_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_tag_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_prefix_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_prefix_longer_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_protocol_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_supernets_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_summary_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_summary_prefix_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 (VIEW_NODE, &show_ip_route_vrf_all_tag_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_addr_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_prefix_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_prefix_longer_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_protocol_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_supernets_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_summary_cmd); + install_element (VIEW_NODE, &show_ip_route_vrf_all_summary_prefix_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 (ENABLE_NODE, &show_ip_route_vrf_all_tag_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_addr_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_prefix_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_prefix_longer_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_protocol_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_supernets_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_summary_cmd); + install_element (ENABLE_NODE, &show_ip_route_vrf_all_summary_prefix_cmd); install_element (VIEW_NODE, &show_ip_mroute_vrf_cmd); install_element (ENABLE_NODE, &show_ip_mroute_vrf_cmd); @@ -5699,34 +5976,38 @@ zebra_vty_init (void) 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 (VIEW_NODE, &show_ipv6_route_vrf_tag_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_summary_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_summary_prefix_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_protocol_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_addr_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_prefix_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_prefix_longer_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 (ENABLE_NODE, &show_ipv6_route_vrf_tag_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_protocol_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_addr_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_prefix_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_prefix_longer_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_summary_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_summary_prefix_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 (VIEW_NODE, &show_ipv6_route_vrf_all_tag_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_all_summary_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_all_summary_prefix_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_all_protocol_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_all_addr_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_all_prefix_cmd); + install_element (VIEW_NODE, &show_ipv6_route_vrf_all_prefix_longer_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 (ENABLE_NODE, &show_ipv6_route_vrf_all_tag_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_protocol_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_addr_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_prefix_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_prefix_longer_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_summary_cmd); + install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_summary_prefix_cmd); install_element (VIEW_NODE, &show_ipv6_mroute_vrf_cmd); install_element (ENABLE_NODE, &show_ipv6_mroute_vrf_cmd); -- 2.39.5