zebra: add support for route tags
[Forward ported by Cumulus]
Documentation
-------------
All ipv4 and ipv6 static route commands now have a "tag" option
which allows the user to set a tag between 1 and 65535.
quagga(config)# ip route 1.1.1.1/32 10.1.1.1 tag ?
<1-65535> Tag value
quagga(config)# ip route 1.1.1.1/32 10.1.1.1 tag 40
quagga(config)#
quagga# show ip route 1.1.1.1/32
Routing entry for 1.1.1.1/32
Known via "static", distance 1, metric 0, tag 40, best
* 10.1.1.1, via swp1
quagga#
The route-map parser supports matching on tags and setting tags
!
route-map MATCH_TAG_18 permit 10
match tag 18
!
!
route-map SET_TAG_22 permit 10
set tag 22
!
BGP and OSPF support:
- matching on tags when redistribing routes from the RIB into BGP/OSPF.
- setting tags when redistribing routes from the RIB into BGP/OSPF.
BGP also supports setting a tag via a table-map, when installing BGP
routes into the RIB.
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Signed-off-by: Piotr Chytla <pch@packetconsulting.pl>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 08144cb..a14f68b 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -93,6 +93,10 @@
if (vrf_id_str)
VTY_GET_INTEGER ("VRF ID", vrf_id, vrf_id_str);
+ /* tag */
+ if (tag_str)
+ tag = atoi(tag_str);
+
/* Null0 static route. */
if ((gate_str != NULL) && (strncasecmp (gate_str, "Null0", strlen (gate_str)) == 0))
{
@@ -469,6 +473,39 @@
NULL, NULL, NULL, NULL);
}
+DEFUN (ip_route_tag,
+ ip_route_tag_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL,
+ argv[1], NULL, argv[2], NULL, NULL);
+}
+
+DEFUN (ip_route_tag_vrf,
+ ip_route_tag_vrf_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL,
+ argv[1], NULL, argv[2], NULL, argv[3]);
+}
+
DEFUN (ip_route_flags,
ip_route_flags_cmd,
"ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)",
@@ -484,6 +521,42 @@
argv[2], NULL, NULL, NULL);
}
+DEFUN (ip_route_flags_tag,
+ ip_route_flags_tag_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1],
+ argv[2], argv[3], NULL, NULL);
+}
+
+DEFUN (ip_route_flags_tag_vrf,
+ ip_route_flags_tag_vrf_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1],
+ argv[2], argv[3], NULL, argv[4]);
+}
+
DEFUN (ip_route_flags2,
ip_route_flags2_cmd,
"ip route A.B.C.D/M (reject|blackhole)",
@@ -497,6 +570,37 @@
NULL, argv[1], NULL, NULL, NULL);
}
+DEFUN (ip_route_flags2_tag,
+ ip_route_flags2_tag_cmd,
+ "ip route A.B.C.D/M (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL,
+ argv[1], argv[2], NULL, NULL);
+}
+
+DEFUN (ip_route_flags2_tag_vrf,
+ ip_route_flags2_tag_vrf_cmd,
+ "ip route A.B.C.D/M (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL,
+ argv[1], argv[2], NULL, argv[3]);
+}
+
/* Mask as A.B.C.D format. */
DEFUN (ip_route_mask,
ip_route_mask_cmd,
@@ -513,6 +617,42 @@
argv[2], NULL, NULL, NULL, NULL);
}
+DEFUN (ip_route_mask_tag,
+ ip_route_mask_tag_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2],
+ NULL, argv[3], NULL, NULL);
+}
+
+DEFUN (ip_route_mask_tag_vrf,
+ ip_route_mask_tag_vrf_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2],
+ NULL, argv[3], NULL, argv[4]);
+}
+
DEFUN (ip_route_mask_flags,
ip_route_mask_flags_cmd,
"ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)",
@@ -529,6 +669,43 @@
argv[2], argv[3], NULL, NULL, NULL);
}
+DEFUN (ip_route_mask_flags_tag,
+ ip_route_mask_flags_tag_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1],
+ argv[2], argv[3], argv[4], NULL, NULL);
+}
+
+DEFUN (ip_route_mask_flags_tag_vrf,
+ ip_route_mask_flags_tag_vrf_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1],
+ argv[2], argv[3], argv[4], NULL, argv[5]);
+}
+
DEFUN (ip_route_mask_flags2,
ip_route_mask_flags2_cmd,
"ip route A.B.C.D A.B.C.D (reject|blackhole)",
@@ -543,6 +720,39 @@
NULL, argv[2], NULL, NULL, NULL);
}
+DEFUN (ip_route_mask_flags2_tag,
+ ip_route_mask_flags2_tag_cmd,
+ "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL,
+ argv[2], argv[3], NULL, NULL);
+}
+
+DEFUN (ip_route_mask_flags2_tag_vrf,
+ ip_route_mask_flags2_tag_vrf_cmd,
+ "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL,
+ argv[2], argv[3], NULL, argv[4]);
+}
+
/* Distance option value. */
DEFUN (ip_route_distance,
ip_route_distance_cmd,
@@ -559,6 +769,41 @@
argv[1], NULL, NULL, argv[2], NULL);
}
+DEFUN (ip_route_tag_distance,
+ ip_route_tag_distance_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL,
+ argv[1], NULL, argv[2], argv[3], NULL);
+}
+
+DEFUN (ip_route_tag_distance_vrf,
+ ip_route_tag_distance_vrf_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL,
+ argv[1], NULL, argv[2], argv[3], argv[4]);
+}
+
DEFUN (ip_route_flags_distance,
ip_route_flags_distance_cmd,
"ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>",
@@ -575,6 +820,43 @@
argv[2], NULL, argv[3], NULL);
}
+DEFUN (ip_route_flags_tag_distance,
+ ip_route_flags_tag_distance_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1],
+ argv[2], argv[3], argv[4], NULL);
+}
+
+DEFUN (ip_route_flags_tag_distance_vrf,
+ ip_route_flags_tag_distance_vrf_cmd,
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1],
+ argv[2], argv[3], argv[4], argv[5]);
+}
+
DEFUN (ip_route_flags_distance2,
ip_route_flags_distance2_cmd,
"ip route A.B.C.D/M (reject|blackhole) <1-255>",
@@ -589,6 +871,39 @@
NULL, argv[1], NULL, argv[2], NULL);
}
+DEFUN (ip_route_flags_tag_distance2,
+ ip_route_flags_tag_distance2_cmd,
+ "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL,
+ NULL, argv[1], argv[2], argv[3], NULL);
+}
+
+DEFUN (ip_route_flags_tag_distance2_vrf,
+ ip_route_flags_tag_distance2_vrf_cmd,
+ "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], NULL,
+ NULL, argv[1], argv[2], argv[3], argv[4]);
+}
+
DEFUN (ip_route_mask_distance,
ip_route_mask_distance_cmd,
"ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>",
@@ -605,6 +920,83 @@
NULL, NULL, argv[3], NULL);
}
+DEFUN (ip_route_mask_tag_distance,
+ ip_route_mask_tag_distance_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1],
+ argv[2], NULL, argv[3], argv[4], NULL);
+}
+
+DEFUN (ip_route_mask_tag_distance_vrf,
+ ip_route_mask_tag_distance_vrf_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1],
+ argv[2], NULL, argv[3], argv[4], argv[5]);
+}
+
+
+DEFUN (ip_route_mask_flags_tag_distance,
+ ip_route_mask_flags_tag_distance_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2],
+ argv[3], argv[4], argv[5], NULL);
+}
+
+DEFUN (ip_route_mask_flags_tag_distance_vrf,
+ ip_route_mask_flags_tag_distance_vrf_cmd,
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2],
+ argv[3], argv[4], argv[5], argv[6]);
+}
+
DEFUN (ip_route_mask_flags_distance,
ip_route_mask_flags_distance_cmd,
"ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>",
@@ -637,6 +1029,41 @@
NULL, argv[2], NULL, argv[3], NULL);
}
+DEFUN (ip_route_mask_flags_tag_distance2,
+ ip_route_mask_flags_tag_distance2_cmd,
+ "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL,
+ argv[2], argv[3], argv[4], NULL);
+}
+
+DEFUN (ip_route_mask_flags_tag_distance2_vrf,
+ ip_route_mask_flags_tag_distance2_vrf_cmd,
+ "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL,
+ argv[2], argv[3], argv[4], argv[5]);
+}
+
DEFUN (no_ip_route,
no_ip_route_cmd,
"no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0)",
@@ -652,6 +1079,41 @@
argv[1], NULL, NULL, NULL, NULL);
}
+DEFUN (no_ip_route_tag,
+ no_ip_route_tag_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1],
+ NULL, argv[2], NULL, NULL);
+}
+
+DEFUN (no_ip_route_tag_vrf,
+ no_ip_route_tag_vrf_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1],
+ NULL, argv[2], NULL, argv[3]);
+}
+
ALIAS (no_ip_route,
no_ip_route_flags_cmd,
"no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)",
@@ -664,6 +1126,20 @@
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
+ALIAS (no_ip_route_tag,
+ no_ip_route_flags_tag_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n")
+
DEFUN (no_ip_route_flags2,
no_ip_route_flags2_cmd,
"no ip route A.B.C.D/M (reject|blackhole)",
@@ -678,6 +1154,39 @@
NULL, NULL, NULL, NULL, NULL);
}
+DEFUN (no_ip_route_flags2_tag,
+ no_ip_route_flags2_tag_cmd,
+ "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL,
+ NULL, argv[1], NULL, NULL);
+}
+
+DEFUN (no_ip_route_flags2_tag_vrf,
+ no_ip_route_flags2_tag_vrf_cmd,
+ "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL,
+ NULL, argv[1], NULL, argv[2]);
+}
+
DEFUN (no_ip_route_mask,
no_ip_route_mask_cmd,
"no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0)",
@@ -694,6 +1203,24 @@
argv[2], NULL, NULL, NULL, NULL);
}
+DEFUN (no_ip_route_mask_tag,
+ no_ip_route_mask_tag_cmd,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2],
+ NULL, argv[3], NULL, NULL);
+}
+
ALIAS (no_ip_route_mask,
no_ip_route_mask_flags_cmd,
"no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)",
@@ -707,6 +1234,21 @@
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
+ALIAS (no_ip_route_mask_tag,
+ no_ip_route_mask_flags_tag_cmd,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n")
+
DEFUN (no_ip_route_mask_flags2,
no_ip_route_mask_flags2_cmd,
"no ip route A.B.C.D A.B.C.D (reject|blackhole)",
@@ -722,6 +1264,41 @@
NULL, NULL, NULL, NULL, NULL);
}
+DEFUN (no_ip_route_mask_flags2_tag,
+ no_ip_route_mask_flags2_tag_cmd,
+ "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1],
+ NULL, NULL, argv[2], NULL, NULL);
+}
+
+DEFUN (no_ip_route_mask_flags2_tag_vrf,
+ no_ip_route_mask_flags2_tag_vrf_cmd,
+ "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1],
+ NULL, NULL, argv[2], NULL, argv[3]);
+}
+
DEFUN (no_ip_route_distance,
no_ip_route_distance_cmd,
"no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) <1-255>",
@@ -738,6 +1315,43 @@
argv[1], NULL, NULL, argv[2], NULL);
}
+DEFUN (no_ip_route_tag_distance,
+ no_ip_route_tag_distance_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1],
+ NULL, argv[2], argv[3], NULL);
+}
+
+DEFUN (no_ip_route_tag_distance_vrf,
+ no_ip_route_tag_distance_vrf_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1],
+ NULL, argv[2], argv[3], argv[4]);
+}
+
DEFUN (no_ip_route_flags_distance,
no_ip_route_flags_distance_cmd,
"no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>",
@@ -755,6 +1369,45 @@
argv[1], argv[2], NULL, argv[3], NULL);
}
+DEFUN (no_ip_route_flags_tag_distance,
+ no_ip_route_flags_tag_distance_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1],
+ argv[2], argv[3], argv[4], NULL);
+}
+
+DEFUN (no_ip_route_flags_tag_distance_vrf,
+ no_ip_route_flags_tag_distance_vrf_cmd,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1],
+ argv[2], argv[3], argv[4], argv[5]);
+}
+
DEFUN (no_ip_route_flags_distance2,
no_ip_route_flags_distance2_cmd,
"no ip route A.B.C.D/M (reject|blackhole) <1-255>",
@@ -770,6 +1423,41 @@
argv[1], NULL, argv[2], NULL);
}
+DEFUN (no_ip_route_flags_tag_distance2,
+ no_ip_route_flags_tag_distance2_cmd,
+ "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL,
+ argv[1], argv[2] , argv[3], NULL);
+}
+
+DEFUN (no_ip_route_flags_tag_distance2_vrf,
+ no_ip_route_flags_tag_distance2_vrf_cmd,
+ "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix (e.g. 10.0.0.0/8)\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL,
+ argv[1], argv[2] , argv[3], argv[4]);
+}
+
DEFUN (no_ip_route_mask_distance,
no_ip_route_mask_distance_cmd,
"no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>",
@@ -787,6 +1475,45 @@
argv[2], NULL, NULL, argv[3], NULL);
}
+DEFUN (no_ip_route_mask_tag_distance,
+ no_ip_route_mask_tag_distance_cmd,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1],
+ argv[2], NULL, argv[3], argv[4], NULL);
+}
+
+DEFUN (no_ip_route_mask_tag_distance_vrf,
+ no_ip_route_mask_tag_distance_vrf_cmd,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Null interface\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1],
+ argv[2], NULL, argv[3], argv[4], argv[5]);
+}
+
DEFUN (no_ip_route_mask_flags_distance,
no_ip_route_mask_flags_distance_cmd,
"no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>",
@@ -805,6 +1532,47 @@
argv[2], argv[3], NULL, argv[4], NULL);
}
+DEFUN (no_ip_route_mask_flags_tag_distance,
+ no_ip_route_mask_flags_tag_distance_cmd,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3],
+ argv[4], argv[5], NULL);
+}
+
+DEFUN (no_ip_route_mask_flags_tag_distance_vrf,
+ no_ip_route_mask_flags_tag_distance_vrf_cmd,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "IP gateway address\n"
+ "IP gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3],
+ argv[4], argv[5], argv[6]);
+}
+
DEFUN (no_ip_route_mask_flags_distance2,
no_ip_route_mask_flags_distance2_cmd,
"no ip route A.B.C.D A.B.C.D (reject|blackhole) <1-255>",
@@ -1213,6 +1981,43 @@
argv[2], NULL, argv[3], argv[4]);
}
+DEFUN (no_ip_route_mask_flags_tag_distance2,
+ no_ip_route_mask_flags_tag_distance2_cmd,
+ "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n")
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL,
+ argv[2], argv[3], argv[4], NULL);
+}
+
+DEFUN (no_ip_route_mask_flags_tag_distance2_vrf,
+ no_ip_route_mask_flags_tag_distance2_vrf_cmd,
+ "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IP destination prefix\n"
+ "IP destination prefix mask\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Tag of this route\n"
+ "Tag value\n"
+ "Distance value for this route\n"
+ VRF_CMD_HELP_STR)
+{
+ return zebra_static_ipv4_safi (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL,
+ argv[2], argv[3], argv[4], argv[5]);
+}
+
char *proto_rm[AFI_MAX][ZEBRA_ROUTE_MAX+1]; /* "any" == ZEBRA_ROUTE_MAX */
DEFUN (ip_protocol,
@@ -1633,6 +2438,59 @@
return CMD_SUCCESS;
}
+DEFUN (show_ip_route_tag,
+ show_ip_route_tag_cmd,
+ "show ip route tag <1-65535>",
+ SHOW_STR
+ IP_STR
+ "IP routing table\n"
+ "Show only routes with tag\n"
+ "Tag value\n")
+{
+ struct route_table *table;
+ struct route_node *rn;
+ 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 == 2)
+ VTY_GET_INTEGER ("VRF ID", vrf_id, argv[1]);
+
+ table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
+ if (! table)
+ return CMD_SUCCESS;
+
+ /* 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;
+ }
+ vty_show_ip_route (vty, rn, rib);
+ }
+ return CMD_SUCCESS;
+}
+
+ALIAS (show_ip_route_tag,
+ show_ip_route_tag_vrf_cmd,
+ "show ip route tag <1-65535>" VRF_CMD_STR,
+ SHOW_STR
+ IP_STR
+ "IP routing table\n"
+ "Show only routes with tag\n"
+ "Tag value\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",
@@ -2567,6 +3425,10 @@
if (tag_str)
tag = atoi (tag_str);
+ /* tag */
+ if (tag_str)
+ tag = atoi(tag_str);
+
/* When gateway is valid IPv6 addrees, then gate is treated as
nexthop address other case gate is treated as interface name. */
ret = inet_pton (AF_INET6, gate_str, &gate_addr);
@@ -2622,6 +3484,35 @@
NULL, NULL);
}
+DEFUN (ipv6_route_tag,
+ ipv6_route_tag_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL);
+}
+
+DEFUN (ipv6_route_tag_vrf,
+ ipv6_route_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]);
+}
+
DEFUN (ipv6_route_flags,
ipv6_route_flags_cmd,
"ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole)",
@@ -2637,6 +3528,39 @@
NULL, NULL);
}
+DEFUN (ipv6_route_flags_tag,
+ ipv6_route_flags_tag_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL);
+}
+
+DEFUN (ipv6_route_flags_tag_vrf,
+ ipv6_route_flags_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]);
+}
+
DEFUN (ipv6_route_ifname,
ipv6_route_ifname_cmd,
"ipv6 route X:X::X:X/M X:X::X:X INTERFACE",
@@ -2650,6 +3574,35 @@
NULL, NULL);
}
+DEFUN (ipv6_route_ifname_tag,
+ ipv6_route_ifname_tag_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL);
+}
+
+DEFUN (ipv6_route_ifname_tag_vrf,
+ ipv6_route_ifname_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]);
+}
+
DEFUN (ipv6_route_ifname_flags,
ipv6_route_ifname_flags_cmd,
"ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole)",
@@ -2665,6 +3618,39 @@
NULL, NULL);
}
+DEFUN (ipv6_route_ifname_flags_tag,
+ ipv6_route_ifname_flags_tag_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL);
+}
+
+DEFUN (ipv6_route_ifname_flags_tag_vrf,
+ ipv6_route_ifname_flags_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]);
+}
+
DEFUN (ipv6_route_pref,
ipv6_route_pref_cmd,
"ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) <1-255>",
@@ -2679,6 +3665,37 @@
NULL);
}
+DEFUN (ipv6_route_pref_tag,
+ ipv6_route_pref_tag_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL);
+}
+
+DEFUN (ipv6_route_pref_tag_vrf,
+ ipv6_route_pref_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]);
+}
+
DEFUN (ipv6_route_flags_pref,
ipv6_route_flags_pref_cmd,
"ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) <1-255>",
@@ -2695,6 +3712,41 @@
NULL);
}
+DEFUN (ipv6_route_flags_pref_tag,
+ ipv6_route_flags_pref_tag_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL);
+}
+
+DEFUN (ipv6_route_flags_pref_tag_vrf,
+ ipv6_route_flags_pref_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]);
+}
+
DEFUN (ipv6_route_ifname_pref,
ipv6_route_ifname_pref_cmd,
"ipv6 route X:X::X:X/M X:X::X:X INTERFACE <1-255>",
@@ -2709,6 +3761,37 @@
NULL);
}
+DEFUN (ipv6_route_ifname_pref_tag,
+ ipv6_route_ifname_pref_tag_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL);
+}
+
+DEFUN (ipv6_route_ifname_pref_tag_vrf,
+ ipv6_route_ifname_pref_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]);
+}
+
DEFUN (ipv6_route_ifname_flags_pref,
ipv6_route_ifname_flags_pref_cmd,
"ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) <1-255>",
@@ -2725,6 +3808,41 @@
NULL);
}
+DEFUN (ipv6_route_ifname_flags_pref_tag,
+ ipv6_route_ifname_flags_pref_tag_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>",
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL);
+}
+
+DEFUN (ipv6_route_ifname_flags_pref_tag_vrf,
+ ipv6_route_ifname_flags_pref_tag_vrf_cmd,
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
+}
+
DEFUN (no_ipv6_route,
no_ipv6_route_cmd,
"no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE)",
@@ -2739,6 +3857,37 @@
NULL);
}
+DEFUN (no_ipv6_route_tag,
+ no_ipv6_route_tag_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL);
+}
+
+DEFUN (no_ipv6_route_tag_vrf,
+ no_ipv6_route_tag_vrf_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]);
+}
+
ALIAS (no_ipv6_route,
no_ipv6_route_flags_cmd,
"no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole)",
@@ -2751,6 +3900,20 @@
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
+ALIAS (no_ipv6_route_tag,
+ no_ipv6_route_flags_tag_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+
DEFUN (no_ipv6_route_ifname,
no_ipv6_route_ifname_cmd,
"no ipv6 route X:X::X:X/M X:X::X:X INTERFACE",
@@ -2765,6 +3928,37 @@
NULL);
}
+DEFUN (no_ipv6_route_ifname_tag,
+ no_ipv6_route_ifname_tag_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL);
+}
+
+DEFUN (no_ipv6_route_ifname_tag_vrf,
+ no_ipv6_route_ifname_tag_vrf_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]);
+}
+
ALIAS (no_ipv6_route_ifname,
no_ipv6_route_ifname_flags_cmd,
"no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole)",
@@ -2777,6 +3971,20 @@
"Emit an ICMP unreachable when matched\n"
"Silently discard pkts when matched\n")
+ALIAS (no_ipv6_route_ifname_tag,
+ no_ipv6_route_ifname_flags_tag_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n")
+
DEFUN (no_ipv6_route_pref,
no_ipv6_route_pref_cmd,
"no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) <1-255>",
@@ -2792,6 +4000,39 @@
NULL);
}
+DEFUN (no_ipv6_route_pref_tag,
+ no_ipv6_route_pref_tag_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL);
+}
+
+DEFUN (no_ipv6_route_pref_tag_vrf,
+ no_ipv6_route_pref_tag_vrf_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]);
+}
+
DEFUN (no_ipv6_route_flags_pref,
no_ipv6_route_flags_pref_cmd,
"no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) <1-255>",
@@ -2810,6 +4051,45 @@
NULL);
}
+DEFUN (no_ipv6_route_flags_pref_tag,
+ no_ipv6_route_flags_pref_tag_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ /* We do not care about argv[2] */
+ return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL);
+}
+
+DEFUN (no_ipv6_route_flags_pref_tag_vrf,
+ no_ipv6_route_flags_pref_tag_vrf_cmd,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ /* We do not care about argv[2] */
+ return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]);
+}
+
DEFUN (no_ipv6_route_ifname_pref,
no_ipv6_route_ifname_pref_cmd,
"no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <1-255>",
@@ -2825,6 +4105,39 @@
NULL);
}
+DEFUN (no_ipv6_route_ifname_pref_tag,
+ no_ipv6_route_ifname_pref_tag_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL);
+}
+
+DEFUN (no_ipv6_route_ifname_pref_tag_vrf,
+ no_ipv6_route_ifname_pref_tag_vrf_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]);
+}
+
DEFUN (no_ipv6_route_ifname_flags_pref,
no_ipv6_route_ifname_flags_pref_cmd,
"no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) <1-255>",
@@ -2842,6 +4155,43 @@
NULL);
}
+DEFUN (no_ipv6_route_ifname_flags_pref_tag,
+ no_ipv6_route_ifname_flags_pref_tag_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>",
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n")
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL);
+}
+
+DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf,
+ no_ipv6_route_ifname_flags_pref_tag_vrf_cmd,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+ NO_STR
+ IP_STR
+ "Establish static routes\n"
+ "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
+ "IPv6 gateway address\n"
+ "IPv6 gateway interface name\n"
+ "Emit an ICMP unreachable when matched\n"
+ "Silently discard pkts when matched\n"
+ "Set tag for this route\n"
+ "Tag value\n"
+ "Distance value for this prefix\n"
+ VRF_CMD_HELP_STR)
+{
+ return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
+}
+
DEFUN (ipv6_route_vrf,
ipv6_route_vrf_cmd,
"ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) " VRF_CMD_STR,
@@ -3133,6 +4483,59 @@
"IPv6 routing table\n"
VRF_CMD_HELP_STR)
+DEFUN (show_ipv6_route_tag,
+ show_ipv6_route_tag_cmd,
+ "show ipv6 route tag <1-65535>",
+ SHOW_STR
+ IP_STR
+ "IPv6 routing table\n"
+ "Show only routes with tag\n"
+ "Tag value\n")
+{
+ struct route_table *table;
+ struct route_node *rn;
+ 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 == 2)
+ 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 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;
+ }
+ vty_show_ip_route (vty, rn, rib);
+ }
+ return CMD_SUCCESS;
+}
+
+ALIAS (show_ipv6_route_tag,
+ show_ipv6_route_tag_vrf_cmd,
+ "show ipv6 route tag <1-65535>" VRF_CMD_STR,
+ SHOW_STR
+ IP_STR
+ "IPv6 routing table\n"
+ "Show only routes with tag\n"
+ "Tag value\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",
@@ -3887,31 +5290,78 @@
install_element (CONFIG_NODE, &no_ip_protocol_cmd);
install_element (VIEW_NODE, &show_ip_protocol_cmd);
install_element (CONFIG_NODE, &ip_route_cmd);
+ install_element (CONFIG_NODE, &ip_route_tag_cmd);
+ install_element (CONFIG_NODE, &ip_route_tag_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_flags_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags_tag_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags_tag_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_flags2_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags2_tag_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags2_tag_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_mask_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_tag_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_tag_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_mask_flags_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags_tag_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags_tag_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_mask_flags2_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_tag_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_tag_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags_tag_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags2_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags2_tag_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags2_tag_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_tag_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags2_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_tag_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_flags_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags_tag_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_flags_distance2_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags_tag_distance2_cmd);
+ install_element (CONFIG_NODE, &ip_route_flags_tag_distance2_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_mask_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_tag_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_mask_flags_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &ip_route_mask_flags_distance2_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance2_cmd);
+ install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance2_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_tag_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_flags_distance2_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance2_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance2_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_tag_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance_vrf_cmd);
install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance2_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_cmd);
+ install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_vrf_cmd);
install_element (VIEW_NODE, &show_ip_route_cmd);
+ install_element (VIEW_NODE, &show_ip_route_tag_cmd);
+ install_element (VIEW_NODE, &show_ip_route_tag_vrf_cmd);
install_element (VIEW_NODE, &show_ip_nht_cmd);
install_element (VIEW_NODE, &show_ipv6_nht_cmd);
install_element (VIEW_NODE, &show_ip_route_addr_cmd);
@@ -3996,7 +5446,39 @@
install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_cmd);
install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_cmd);
install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_flags_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_flags_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_flags_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_flags_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_pref_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_flags_pref_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_flags_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_pref_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_flags_pref_tag_cmd);
+ install_element (CONFIG_NODE, &ipv6_route_ifname_flags_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_flags_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_pref_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_tag_vrf_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_tag_cmd);
+ install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_tag_vrf_cmd);
install_element (VIEW_NODE, &show_ipv6_route_cmd);
+ install_element (VIEW_NODE, &show_ipv6_route_tag_cmd);
+ install_element (VIEW_NODE, &show_ipv6_route_tag_vrf_cmd);
install_element (VIEW_NODE, &show_ipv6_route_summary_cmd);
install_element (VIEW_NODE, &show_ipv6_route_summary_prefix_cmd);
install_element (VIEW_NODE, &show_ipv6_route_protocol_cmd);