build: Add QuaggaId to README.NetBSD
[jleu-quagga.git] / bgpd / bgp_mplsvpn.c
blob72ad089e42a2e814c4f4fd5a2bd4da9621b41ee8
1 /* MPLS-VPN
2 Copyright (C) 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
4 This file is part of GNU Zebra.
6 GNU Zebra is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version.
11 GNU Zebra is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Zebra; see the file COPYING. If not, write to the Free
18 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA. */
21 #include <zebra.h>
23 #include "command.h"
24 #include "prefix.h"
25 #include "log.h"
26 #include "memory.h"
27 #include "stream.h"
29 #include "bgpd/bgpd.h"
30 #include "bgpd/bgp_table.h"
31 #include "bgpd/bgp_route.h"
32 #include "bgpd/bgp_attr.h"
33 #include "bgpd/bgp_mplsvpn.h"
35 static u_int16_t
36 decode_rd_type (u_char *pnt)
38 u_int16_t v;
40 v = ((u_int16_t) *pnt++ << 8);
41 v |= (u_int16_t) *pnt;
42 return v;
45 u_int32_t
46 decode_label (u_char *pnt)
48 u_int32_t l;
50 l = ((u_int32_t) *pnt++ << 12);
51 l |= (u_int32_t) *pnt++ << 4;
52 l |= (u_int32_t) ((*pnt & 0xf0) >> 4);
53 return l;
56 static void
57 decode_rd_as (u_char *pnt, struct rd_as *rd_as)
59 rd_as->as = (u_int16_t) *pnt++ << 8;
60 rd_as->as |= (u_int16_t) *pnt++;
62 rd_as->val = ((u_int32_t) *pnt++ << 24);
63 rd_as->val |= ((u_int32_t) *pnt++ << 16);
64 rd_as->val |= ((u_int32_t) *pnt++ << 8);
65 rd_as->val |= (u_int32_t) *pnt;
68 static void
69 decode_rd_ip (u_char *pnt, struct rd_ip *rd_ip)
71 memcpy (&rd_ip->ip, pnt, 4);
72 pnt += 4;
74 rd_ip->val = ((u_int16_t) *pnt++ << 8);
75 rd_ip->val |= (u_int16_t) *pnt;
78 int
79 bgp_nlri_parse_vpnv4 (struct peer *peer, struct attr *attr,
80 struct bgp_nlri *packet)
82 u_char *pnt;
83 u_char *lim;
84 struct prefix p;
85 int psize;
86 int prefixlen;
87 u_int32_t label;
88 u_int16_t type;
89 struct rd_as rd_as;
90 struct rd_ip rd_ip;
91 struct prefix_rd prd;
92 u_char *tagpnt;
94 /* Check peer status. */
95 if (peer->status != Established)
96 return 0;
98 /* Make prefix_rd */
99 prd.family = AF_UNSPEC;
100 prd.prefixlen = 64;
102 pnt = packet->nlri;
103 lim = pnt + packet->length;
105 for (; pnt < lim; pnt += psize)
107 /* Clear prefix structure. */
108 memset (&p, 0, sizeof (struct prefix));
110 /* Fetch prefix length. */
111 prefixlen = *pnt++;
112 p.family = AF_INET;
113 psize = PSIZE (prefixlen);
115 if (prefixlen < 88)
117 zlog_err ("prefix length is less than 88: %d", prefixlen);
118 return -1;
121 label = decode_label (pnt);
123 /* Copyr label to prefix. */
124 tagpnt = pnt;;
126 /* Copy routing distinguisher to rd. */
127 memcpy (&prd.val, pnt + 3, 8);
129 /* Decode RD type. */
130 type = decode_rd_type (pnt + 3);
132 /* Decode RD value. */
133 if (type == RD_TYPE_AS)
134 decode_rd_as (pnt + 5, &rd_as);
135 else if (type == RD_TYPE_IP)
136 decode_rd_ip (pnt + 5, &rd_ip);
137 else
139 zlog_err ("Invalid RD type %d", type);
140 return -1;
143 p.prefixlen = prefixlen - 88;
144 memcpy (&p.u.prefix, pnt + 11, psize - 11);
146 #if 0
147 if (type == RD_TYPE_AS)
148 zlog_info ("prefix %ld:%ld:%ld:%s/%d", label, rd_as.as, rd_as.val,
149 inet_ntoa (p.u.prefix4), p.prefixlen);
150 else if (type == RD_TYPE_IP)
151 zlog_info ("prefix %ld:%s:%ld:%s/%d", label, inet_ntoa (rd_ip.ip),
152 rd_ip.val, inet_ntoa (p.u.prefix4), p.prefixlen);
153 #endif /* 0 */
155 if (pnt + psize > lim)
156 return -1;
158 if (attr)
159 bgp_update (peer, &p, attr, AFI_IP, SAFI_MPLS_VPN,
160 ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, tagpnt, 0);
161 else
162 bgp_withdraw (peer, &p, attr, AFI_IP, SAFI_MPLS_VPN,
163 ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, tagpnt);
166 /* Packet length consistency check. */
167 if (pnt != lim)
168 return -1;
170 return 0;
174 str2prefix_rd (const char *str, struct prefix_rd *prd)
176 int ret;
177 char *p;
178 char *p2;
179 struct stream *s;
180 char *half;
181 struct in_addr addr;
183 s = stream_new (8);
185 prd->family = AF_UNSPEC;
186 prd->prefixlen = 64;
188 p = strchr (str, ':');
189 if (! p)
190 return 0;
192 if (! all_digit (p + 1))
193 return 0;
195 half = XMALLOC (MTYPE_TMP, (p - str) + 1);
196 memcpy (half, str, (p - str));
197 half[p - str] = '\0';
199 p2 = strchr (str, '.');
201 if (! p2)
203 if (! all_digit (half))
205 XFREE (MTYPE_TMP, half);
206 return 0;
208 stream_putw (s, RD_TYPE_AS);
209 stream_putw (s, atoi (half));
210 stream_putl (s, atol (p + 1));
212 else
214 ret = inet_aton (half, &addr);
215 if (! ret)
217 XFREE (MTYPE_TMP, half);
218 return 0;
220 stream_putw (s, RD_TYPE_IP);
221 stream_put_in_addr (s, &addr);
222 stream_putw (s, atol (p + 1));
224 memcpy (prd->val, s->data, 8);
226 return 1;
230 str2tag (const char *str, u_char *tag)
232 unsigned long l;
233 char *endptr;
234 u_int32_t t;
236 l = strtoul (str, &endptr, 10);
238 if (*endptr == '\0' || l == ULONG_MAX || l > UINT32_MAX)
239 return 0;
241 t = (u_int32_t) l;
243 tag[0] = (u_char)(t >> 12);
244 tag[1] = (u_char)(t >> 4);
245 tag[2] = (u_char)(t << 4);
247 return 1;
250 char *
251 prefix_rd2str (struct prefix_rd *prd, char *buf, size_t size)
253 u_char *pnt;
254 u_int16_t type;
255 struct rd_as rd_as;
256 struct rd_ip rd_ip;
258 if (size < RD_ADDRSTRLEN)
259 return NULL;
261 pnt = prd->val;
263 type = decode_rd_type (pnt);
265 if (type == RD_TYPE_AS)
267 decode_rd_as (pnt + 2, &rd_as);
268 snprintf (buf, size, "%u:%d", rd_as.as, rd_as.val);
269 return buf;
271 else if (type == RD_TYPE_IP)
273 decode_rd_ip (pnt + 2, &rd_ip);
274 snprintf (buf, size, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val);
275 return buf;
278 return NULL;
281 /* For testing purpose, static route of MPLS-VPN. */
282 DEFUN (vpnv4_network,
283 vpnv4_network_cmd,
284 "network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD",
285 "Specify a network to announce via BGP\n"
286 "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
287 "Specify Route Distinguisher\n"
288 "VPN Route Distinguisher\n"
289 "BGP tag\n"
290 "tag value\n")
292 return bgp_static_set_vpnv4 (vty, argv[0], argv[1], argv[2]);
295 /* For testing purpose, static route of MPLS-VPN. */
296 DEFUN (no_vpnv4_network,
297 no_vpnv4_network_cmd,
298 "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD",
299 NO_STR
300 "Specify a network to announce via BGP\n"
301 "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
302 "Specify Route Distinguisher\n"
303 "VPN Route Distinguisher\n"
304 "BGP tag\n"
305 "tag value\n")
307 return bgp_static_unset_vpnv4 (vty, argv[0], argv[1], argv[2]);
310 static int
311 show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd)
313 struct bgp *bgp;
314 struct bgp_table *table;
315 struct bgp_node *rn;
316 struct bgp_node *rm;
317 struct attr *attr;
318 int rd_header;
319 int header = 1;
320 char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s";
322 bgp = bgp_get_default ();
323 if (bgp == NULL)
325 vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE);
326 return CMD_WARNING;
329 for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_MPLS_VPN]); rn;
330 rn = bgp_route_next (rn))
332 if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0)
333 continue;
335 if ((table = rn->info) != NULL)
337 rd_header = 1;
339 for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
340 if ((attr = rm->info) != NULL)
342 if (header)
344 vty_out (vty, "BGP table version is 0, local router ID is %s%s",
345 inet_ntoa (bgp->router_id), VTY_NEWLINE);
346 vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s",
347 VTY_NEWLINE);
348 vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s",
349 VTY_NEWLINE, VTY_NEWLINE);
350 vty_out (vty, v4_header, VTY_NEWLINE);
351 header = 0;
354 if (rd_header)
356 u_int16_t type;
357 struct rd_as rd_as;
358 struct rd_ip rd_ip;
359 u_char *pnt;
361 pnt = rn->p.u.val;
363 /* Decode RD type. */
364 type = decode_rd_type (pnt);
365 /* Decode RD value. */
366 if (type == RD_TYPE_AS)
367 decode_rd_as (pnt + 2, &rd_as);
368 else if (type == RD_TYPE_IP)
369 decode_rd_ip (pnt + 2, &rd_ip);
371 vty_out (vty, "Route Distinguisher: ");
373 if (type == RD_TYPE_AS)
374 vty_out (vty, "%u:%d", rd_as.as, rd_as.val);
375 else if (type == RD_TYPE_IP)
376 vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val);
378 vty_out (vty, "%s", VTY_NEWLINE);
379 rd_header = 0;
381 route_vty_out_tmp (vty, &rm->p, attr, SAFI_MPLS_VPN);
385 return CMD_SUCCESS;
388 enum bgp_show_type
390 bgp_show_type_normal,
391 bgp_show_type_regexp,
392 bgp_show_type_prefix_list,
393 bgp_show_type_filter_list,
394 bgp_show_type_neighbor,
395 bgp_show_type_cidr_only,
396 bgp_show_type_prefix_longer,
397 bgp_show_type_community_all,
398 bgp_show_type_community,
399 bgp_show_type_community_exact,
400 bgp_show_type_community_list,
401 bgp_show_type_community_list_exact
404 static int
405 bgp_show_mpls_vpn (struct vty *vty, struct prefix_rd *prd, enum bgp_show_type type,
406 void *output_arg, int tags)
408 struct bgp *bgp;
409 struct bgp_table *table;
410 struct bgp_node *rn;
411 struct bgp_node *rm;
412 struct bgp_info *ri;
413 int rd_header;
414 int header = 1;
415 char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s";
416 char v4_header_tag[] = " Network Next Hop In tag/Out tag%s";
418 bgp = bgp_get_default ();
419 if (bgp == NULL)
421 vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE);
422 return CMD_WARNING;
425 for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_MPLS_VPN]); rn; rn = bgp_route_next (rn))
427 if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0)
428 continue;
430 if ((table = rn->info) != NULL)
432 rd_header = 1;
434 for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
435 for (ri = rm->info; ri; ri = ri->next)
437 if (type == bgp_show_type_neighbor)
439 union sockunion *su = output_arg;
441 if (ri->peer->su_remote == NULL || ! sockunion_same(ri->peer->su_remote, su))
442 continue;
444 if (header)
446 if (tags)
447 vty_out (vty, v4_header_tag, VTY_NEWLINE);
448 else
450 vty_out (vty, "BGP table version is 0, local router ID is %s%s",
451 inet_ntoa (bgp->router_id), VTY_NEWLINE);
452 vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s",
453 VTY_NEWLINE);
454 vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s",
455 VTY_NEWLINE, VTY_NEWLINE);
456 vty_out (vty, v4_header, VTY_NEWLINE);
458 header = 0;
461 if (rd_header)
463 u_int16_t type;
464 struct rd_as rd_as;
465 struct rd_ip rd_ip;
466 u_char *pnt;
468 pnt = rn->p.u.val;
470 /* Decode RD type. */
471 type = decode_rd_type (pnt);
472 /* Decode RD value. */
473 if (type == RD_TYPE_AS)
474 decode_rd_as (pnt + 2, &rd_as);
475 else if (type == RD_TYPE_IP)
476 decode_rd_ip (pnt + 2, &rd_ip);
478 vty_out (vty, "Route Distinguisher: ");
480 if (type == RD_TYPE_AS)
481 vty_out (vty, "%u:%d", rd_as.as, rd_as.val);
482 else if (type == RD_TYPE_IP)
483 vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val);
485 vty_out (vty, "%s", VTY_NEWLINE);
486 rd_header = 0;
488 if (tags)
489 route_vty_out_tag (vty, &rm->p, ri, 0, SAFI_MPLS_VPN);
490 else
491 route_vty_out (vty, &rm->p, ri, 0, SAFI_MPLS_VPN);
495 return CMD_SUCCESS;
498 DEFUN (show_ip_bgp_vpnv4_all,
499 show_ip_bgp_vpnv4_all_cmd,
500 "show ip bgp vpnv4 all",
501 SHOW_STR
502 IP_STR
503 BGP_STR
504 "Display VPNv4 NLRI specific information\n"
505 "Display information about all VPNv4 NLRIs\n")
507 return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_normal, NULL, 0);
510 DEFUN (show_ip_bgp_vpnv4_rd,
511 show_ip_bgp_vpnv4_rd_cmd,
512 "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn",
513 SHOW_STR
514 IP_STR
515 BGP_STR
516 "Display VPNv4 NLRI specific information\n"
517 "Display information for a route distinguisher\n"
518 "VPN Route Distinguisher\n")
520 int ret;
521 struct prefix_rd prd;
523 ret = str2prefix_rd (argv[0], &prd);
524 if (! ret)
526 vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
527 return CMD_WARNING;
529 return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_normal, NULL, 0);
532 DEFUN (show_ip_bgp_vpnv4_all_tags,
533 show_ip_bgp_vpnv4_all_tags_cmd,
534 "show ip bgp vpnv4 all tags",
535 SHOW_STR
536 IP_STR
537 BGP_STR
538 "Display VPNv4 NLRI specific information\n"
539 "Display information about all VPNv4 NLRIs\n"
540 "Display BGP tags for prefixes\n")
542 return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_normal, NULL, 1);
545 DEFUN (show_ip_bgp_vpnv4_rd_tags,
546 show_ip_bgp_vpnv4_rd_tags_cmd,
547 "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn tags",
548 SHOW_STR
549 IP_STR
550 BGP_STR
551 "Display VPNv4 NLRI specific information\n"
552 "Display information for a route distinguisher\n"
553 "VPN Route Distinguisher\n"
554 "Display BGP tags for prefixes\n")
556 int ret;
557 struct prefix_rd prd;
559 ret = str2prefix_rd (argv[0], &prd);
560 if (! ret)
562 vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
563 return CMD_WARNING;
565 return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_normal, NULL, 1);
568 DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes,
569 show_ip_bgp_vpnv4_all_neighbor_routes_cmd,
570 "show ip bgp vpnv4 all neighbors A.B.C.D routes",
571 SHOW_STR
572 IP_STR
573 BGP_STR
574 "Display VPNv4 NLRI specific information\n"
575 "Display information about all VPNv4 NLRIs\n"
576 "Detailed information on TCP and BGP neighbor connections\n"
577 "Neighbor to display information about\n"
578 "Display routes learned from neighbor\n")
580 union sockunion *su;
581 struct peer *peer;
583 su = sockunion_str2su (argv[0]);
584 if (su == NULL)
586 vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE);
587 return CMD_WARNING;
590 peer = peer_lookup (NULL, su);
591 if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN])
593 vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
594 return CMD_WARNING;
597 return bgp_show_mpls_vpn (vty, NULL, bgp_show_type_neighbor, su, 0);
600 DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
601 show_ip_bgp_vpnv4_rd_neighbor_routes_cmd,
602 "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D routes",
603 SHOW_STR
604 IP_STR
605 BGP_STR
606 "Display VPNv4 NLRI specific information\n"
607 "Display information for a route distinguisher\n"
608 "VPN Route Distinguisher\n"
609 "Detailed information on TCP and BGP neighbor connections\n"
610 "Neighbor to display information about\n"
611 "Display routes learned from neighbor\n")
613 int ret;
614 union sockunion *su;
615 struct peer *peer;
616 struct prefix_rd prd;
618 ret = str2prefix_rd (argv[0], &prd);
619 if (! ret)
621 vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
622 return CMD_WARNING;
625 su = sockunion_str2su (argv[1]);
626 if (su == NULL)
628 vty_out (vty, "Malformed address: %s%s", argv[0], VTY_NEWLINE);
629 return CMD_WARNING;
632 peer = peer_lookup (NULL, su);
633 if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN])
635 vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
636 return CMD_WARNING;
639 return bgp_show_mpls_vpn (vty, &prd, bgp_show_type_neighbor, su, 0);
642 DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes,
643 show_ip_bgp_vpnv4_all_neighbor_advertised_routes_cmd,
644 "show ip bgp vpnv4 all neighbors A.B.C.D advertised-routes",
645 SHOW_STR
646 IP_STR
647 BGP_STR
648 "Display VPNv4 NLRI specific information\n"
649 "Display information about all VPNv4 NLRIs\n"
650 "Detailed information on TCP and BGP neighbor connections\n"
651 "Neighbor to display information about\n"
652 "Display the routes advertised to a BGP neighbor\n")
654 int ret;
655 struct peer *peer;
656 union sockunion su;
658 ret = str2sockunion (argv[0], &su);
659 if (ret < 0)
661 vty_out (vty, "%% Malformed address: %s%s", argv[0], VTY_NEWLINE);
662 return CMD_WARNING;
664 peer = peer_lookup (NULL, &su);
665 if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN])
667 vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
668 return CMD_WARNING;
671 return show_adj_route_vpn (vty, peer, NULL);
674 DEFUN (show_ip_bgp_vpnv4_rd_neighbor_advertised_routes,
675 show_ip_bgp_vpnv4_rd_neighbor_advertised_routes_cmd,
676 "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D advertised-routes",
677 SHOW_STR
678 IP_STR
679 BGP_STR
680 "Display VPNv4 NLRI specific information\n"
681 "Display information for a route distinguisher\n"
682 "VPN Route Distinguisher\n"
683 "Detailed information on TCP and BGP neighbor connections\n"
684 "Neighbor to display information about\n"
685 "Display the routes advertised to a BGP neighbor\n")
687 int ret;
688 struct peer *peer;
689 struct prefix_rd prd;
690 union sockunion su;
692 ret = str2sockunion (argv[1], &su);
693 if (ret < 0)
695 vty_out (vty, "%% Malformed address: %s%s", argv[0], VTY_NEWLINE);
696 return CMD_WARNING;
698 peer = peer_lookup (NULL, &su);
699 if (! peer || ! peer->afc[AFI_IP][SAFI_MPLS_VPN])
701 vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
702 return CMD_WARNING;
705 ret = str2prefix_rd (argv[0], &prd);
706 if (! ret)
708 vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
709 return CMD_WARNING;
712 return show_adj_route_vpn (vty, peer, &prd);
715 void
716 bgp_mplsvpn_init (void)
718 install_element (BGP_VPNV4_NODE, &vpnv4_network_cmd);
719 install_element (BGP_VPNV4_NODE, &no_vpnv4_network_cmd);
722 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_cmd);
723 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_cmd);
724 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_tags_cmd);
725 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_tags_cmd);
726 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbor_routes_cmd);
727 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbor_routes_cmd);
728 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbor_advertised_routes_cmd);
729 install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbor_advertised_routes_cmd);
731 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_cmd);
732 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_cmd);
733 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_tags_cmd);
734 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_tags_cmd);
735 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbor_routes_cmd);
736 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbor_routes_cmd);
737 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbor_advertised_routes_cmd);
738 install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbor_advertised_routes_cmd);