• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/zebra/bgpd/

Lines Matching refs:bgp

62 bgp_afi_node_get (struct bgp *bgp, afi_t afi, safi_t safi, struct prefix *p,
71 prn = bgp_node_get (bgp->rib[afi][safi], (struct prefix *) prd);
80 table = bgp->rib[afi][safi];
91 /* Allocate new bgp info structure. */
103 /* Free bgp route information. */
141 /* Get MED value. If MED value is missing and "bgp bestpath
144 bgp_med_value (struct attr *attr, struct bgp *bgp)
150 if (bgp_flag_check (bgp, BGP_FLAG_MED_MISSING_AS_WORST))
157 /* Compare two bgp route entity. br is preferable then return 1. */
159 bgp_info_cmp (struct bgp *bgp, struct bgp_info *new, struct bgp_info *exist)
189 new_pref = bgp->default_local_pref;
194 exist_pref = bgp->default_local_pref;
218 if (! bgp_flag_check (bgp, BGP_FLAG_ASPATH_IGNORE))
240 if (bgp_flag_check (bgp, BGP_FLAG_ALWAYS_COMPARE_MED)
241 || (bgp_flag_check (bgp, BGP_FLAG_MED_CONFED)
247 new_med = bgp_med_value (new->attr, bgp);
248 exist_med = bgp_med_value (exist->attr, bgp);
282 if (! bgp_flag_check (bgp, BGP_FLAG_COMPARE_ROUTER_ID)
411 if (peer->bgp->config & BGP_CONFIG_CLUSTER_ID)
412 cluster_id = peer->bgp->cluster_id;
414 cluster_id = peer->bgp->router_id;
465 struct bgp *bgp;
472 bgp = peer->bgp;
554 if (CHECK_FLAG(bgp->config, BGP_CONFIG_CONFEDERATION))
556 if (aspath_loop_check(ri->attr->aspath, bgp->confed_id))
562 bgp->confed_id);
582 /* no bgp client-to-client reflection check. */
583 if (bgp_flag_check (bgp, BGP_FLAG_NO_CLIENT_TO_CLIENT))
605 attr->local_pref = bgp->default_local_pref;
619 if (ri->peer != bgp->peer_self && ! transparent
628 || (p->family == AF_INET6 && ri->peer != bgp->peer_self))))
635 || (p->family == AF_INET6 && ri->peer == bgp->peer_self)
723 bgp_process (struct bgp *bgp, struct bgp_node *rn, afi_t afi, safi_t safi)
737 /* bgp deterministic-med */
739 if (bgp_flag_check (bgp, BGP_FLAG_DETERMINISTIC_MED))
760 if (bgp_info_cmp (bgp, ri2, new_select))
784 if (bgp_flag_check (bgp, BGP_FLAG_DETERMINISTIC_MED)
793 if (bgp_info_cmp (bgp, ri, new_select))
803 bgp_zebra_announce (p, old_select, bgp);
817 LIST_LOOP (bgp->peer, peer, nn)
841 if (safi == SAFI_UNICAST && ! bgp->name &&
847 bgp_zebra_announce (p, new_select, bgp);
901 bgp_aggregate_decrement (peer->bgp, &rn->p, ri, afi, safi);
903 bgp_process (peer->bgp, rn, afi, safi);
920 bgp_aggregate_decrement (peer->bgp, &rn->p, ri, afi, safi);
925 if (CHECK_FLAG (peer->bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
935 bgp_process (peer->bgp, rn, afi, safi);
956 struct bgp *bgp;
964 bgp = peer->bgp;
965 rn = bgp_afi_node_get (bgp, afi, safi, p, prd);
970 && peer != bgp->peer_self && ! soft_reconfig)
992 if (aspath_loop_check (attr->aspath, bgp->as) > peer->allowas_in[afi][safi]
993 || (CHECK_FLAG(bgp->config, BGP_CONFIG_CONFEDERATION)
994 && aspath_loop_check(attr->aspath, bgp->confed_id)
1003 && IPV4_ADDR_SAME (&bgp->router_id, &attr->originator_id))
1068 if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
1082 bgp_aggregate_increment (bgp, p, ri, afi, safi);
1083 bgp_process (bgp, rn, afi, safi);
1111 /* Update bgp route dampening information. */
1112 if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
1123 bgp_aggregate_decrement (bgp, p, ri, afi, safi);
1133 /* Update bgp route dampening information. */
1134 if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
1162 bgp_aggregate_increment (bgp, p, ri, afi, safi);
1164 bgp_process (bgp, rn, afi, safi);
1209 bgp_aggregate_increment (bgp, p, new, afi, safi);
1221 bgp_process (bgp, rn, afi, safi);
1248 struct bgp *bgp;
1253 bgp = peer->bgp;
1263 rn = bgp_afi_node_get (bgp, afi, safi, p, prd);
1268 && peer != bgp->peer_self)
1295 struct bgp *bgp;
1303 bgp = peer->bgp;
1304 from = bgp->peer_self;
1308 attr.local_pref = bgp->default_local_pref;
1339 binfo.peer = bgp->peer_self;
1379 table = peer->bgp->rib[afi][safi];
1415 for (rn = bgp_table_top (peer->bgp->rib[afi][safi]); rn;
1442 table = peer->bgp->rib[afi][safi];
1474 for (rn = bgp_table_top (peer->bgp->rib[afi][safi]); rn;
1491 table = peer->bgp->rib[afi][safi];
1530 for (rn = bgp_table_top (peer->bgp->rib[afi][safi]); rn;
1554 table = peer->bgp->rib[afi][safi];
1571 struct bgp *bgp;
1577 LIST_LOOP (bm->bgp, bgp, nn)
1579 table = bgp->rib[AFI_IP][SAFI_UNICAST];
1588 table = bgp->rib[AFI_IP6][SAFI_UNICAST];
1786 bgp_static_update (struct bgp *bgp, struct prefix *p,
1797 rn = bgp_afi_node_get (bgp, afi, safi, p, NULL);
1810 info.peer = bgp->peer_self;
1821 bgp_static_withdraw (bgp, p, afi, safi);
1829 if (ri->peer == bgp->peer_self && ri->type == ZEBRA_ROUTE_BGP
1848 bgp_aggregate_decrement (bgp, p, ri, afi, safi);
1854 bgp_aggregate_increment (bgp, p, ri, afi, safi);
1855 bgp_process (bgp, rn, afi, safi);
1866 new->peer = bgp->peer_self;
1872 bgp_aggregate_increment (bgp, p, new, afi, safi);
1878 bgp_process (bgp, rn, afi, safi);
1885 bgp_static_update_vpnv4 (struct bgp *bgp, struct prefix *p, u_int16_t afi,
1891 rn = bgp_afi_node_get (bgp, afi, safi, p, prd);
1897 new->peer = bgp->peer_self;
1904 bgp_aggregate_increment (bgp, p, (struct bgp_info *) new, afi, safi);
1910 bgp_process (bgp, rn, afi, safi);
1914 bgp_static_withdraw (struct bgp *bgp, struct prefix *p, afi_t afi,
1920 rn = bgp_afi_node_get (bgp, afi, safi, p, NULL);
1924 if (ri->peer == bgp->peer_self
1932 bgp_aggregate_decrement (bgp, p, ri, afi, safi);
1934 bgp_process (bgp, rn, afi, safi);
1945 bgp_static_withdraw_vpnv4 (struct bgp *bgp, struct prefix *p, u_int16_t afi,
1951 rn = bgp_afi_node_get (bgp, afi, safi, p, prd);
1955 if (ri->peer == bgp->peer_self
1963 bgp_aggregate_decrement (bgp, p, ri, afi, safi);
1965 bgp_process (bgp, rn, afi, safi);
1978 bgp_static_set (struct vty *vty, struct bgp *bgp, char *ip_str, u_int16_t afi,
2006 rn = bgp_node_get (bgp->route[afi][safi], &p);
2054 if (! bgp_flag_check (bgp, BGP_FLAG_IMPORT_CHECK))
2059 bgp_static_withdraw (bgp, &p, afi, safi);
2062 bgp_static_update (bgp, &p, bgp_static, afi, safi);
2070 bgp_static_unset (struct vty *vty, struct bgp *bgp, char *ip_str,
2096 rn = bgp_node_lookup (bgp->route[afi][safi], &p);
2108 bgp_static_withdraw (bgp, &p, afi, safi);
2122 bgp_static_delete (struct bgp *bgp)
2133 for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn))
2143 bgp_static_withdraw_vpnv4 (bgp, &rm->p,
2155 bgp_static_withdraw (bgp, &rn->p, afi, safi);
2170 struct bgp *bgp;
2177 bgp = vty->index;
2201 prn = bgp_node_get (bgp->route[AFI_IP][SAFI_MPLS_VPN],
2224 bgp_static_update_vpnv4 (bgp, &p, AFI_IP, SAFI_MPLS_VPN, &prd, tag);
2236 struct bgp *bgp;
2245 bgp = vty->index;
2270 prn = bgp_node_get (bgp->route[AFI_IP][SAFI_MPLS_VPN],
2282 bgp_static_withdraw_vpnv4 (bgp, &p, AFI_IP, SAFI_MPLS_VPN, &prd, tag);
2612 "ipv6 bgp network X:X::X:X/M",
2620 "no ipv6 bgp network X:X::X:X/M",
2673 bgp_aggregate_route (struct bgp *bgp, struct prefix *p, struct bgp_info *rinew,
2709 table = bgp->rib[afi][safi];
2787 bgp_process (bgp, rn, afi, safi);
2833 new->peer = bgp->peer_self;
2835 new->attr = bgp_attr_aggregate_intern (bgp, origin, aspath, community, aggregate->as_set);
2839 bgp_process (bgp, rn, afi, safi);
2850 void bgp_aggregate_delete (struct bgp *, struct prefix *, afi_t, safi_t,
2854 bgp_aggregate_increment (struct bgp *bgp, struct prefix *p,
2871 child = bgp_node_get (bgp->aggregate[afi][safi], p);
2877 bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
2878 bgp_aggregate_route (bgp, &rn->p, ri, safi, safi, NULL, aggregate);
2884 bgp_aggregate_decrement (struct bgp *bgp, struct prefix *p,
2898 child = bgp_node_get (bgp->aggregate[afi][safi], p);
2904 bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
2905 bgp_aggregate_route (bgp, &rn->p, NULL, safi, safi, del, aggregate);
2911 bgp_aggregate_add (struct bgp *bgp, struct prefix *p, afi_t afi, safi_t safi,
2926 table = bgp->rib[afi][safi];
2991 bgp_process (bgp, rn, afi, safi);
3003 new->peer = bgp->peer_self;
3005 new->attr = bgp_attr_aggregate_intern (bgp, origin, aspath, community, aggregate->as_set);
3011 bgp_process (bgp, rn, afi, safi);
3016 bgp_aggregate_delete (struct bgp *bgp, struct prefix *p, afi_t afi,
3025 table = bgp->rib[afi][safi];
3062 bgp_process (bgp, rn, afi, safi);
3070 if (ri->peer == bgp->peer_self
3079 bgp_process (bgp, rn, afi, safi);
3100 struct bgp *bgp;
3113 bgp = vty->index;
3116 rn = bgp_node_get (bgp->aggregate[afi][safi], &p);
3134 bgp_aggregate_add (bgp, &p, afi, SAFI_UNICAST, aggregate);
3136 bgp_aggregate_add (bgp, &p, afi, SAFI_MULTICAST, aggregate);
3147 struct bgp *bgp;
3160 bgp = vty->index;
3163 rn = bgp_node_lookup (bgp->aggregate[afi][safi], &p);
3173 bgp_aggregate_delete (bgp, &p, afi, SAFI_UNICAST, aggregate);
3175 bgp_aggregate_delete (bgp, &p, afi, SAFI_MULTICAST, aggregate);
3487 "ipv6 bgp aggregate-address X:X::X:X/M",
3495 "ipv6 bgp aggregate-address X:X::X:X/M summary-only",
3504 "no ipv6 bgp aggregate-address X:X::X:X/M",
3513 "no ipv6 bgp aggregate-address X:X::X:X/M summary-only",
3528 struct bgp *bgp;
3548 LIST_LOOP (bm->bgp, bgp, nn)
3552 if (bgp->redist[afi][type])
3557 if (bgp->redist_metric_flag[afi][type])
3558 attr_new.med = bgp->redist_metric[afi][type];
3561 if (bgp->rmap[afi][type].map)
3563 info.peer = bgp->peer_self;
3566 ret = route_map_apply (bgp->rmap[afi][type].map, p, RMAP_BGP,
3580 bn = bgp_afi_node_get (bgp, afi, SAFI_UNICAST, p, NULL);
3584 if (bi->peer == bgp->peer_self
3603 bgp_aggregate_decrement (bgp, p, bi, afi, SAFI_UNICAST);
3609 bgp_aggregate_increment (bgp, p, bi, afi, SAFI_UNICAST);
3610 bgp_process (bgp, bn, afi, SAFI_UNICAST);
3620 new->peer = bgp->peer_self;
3625 bgp_aggregate_increment (bgp, p, new, afi, SAFI_UNICAST);
3627 bgp_process (bgp, bn, afi, SAFI_UNICAST);
3638 struct bgp *bgp;
3644 LIST_LOOP (bm->bgp, bgp, nn)
3648 if (bgp->redist[afi][type])
3650 rn = bgp_afi_node_get (bgp, afi, SAFI_UNICAST, p, NULL);
3653 if (ri->peer == bgp->peer_self
3659 bgp_aggregate_decrement (bgp, p, ri, afi, SAFI_UNICAST);
3661 bgp_process (bgp, rn, afi, SAFI_UNICAST);
3673 bgp_redistribute_withdraw (struct bgp *bgp, afi_t afi, int type)
3679 table = bgp->rib[afi][SAFI_UNICAST];
3684 if (ri->peer == bgp->peer_self
3690 bgp_aggregate_decrement (bgp, &rn->p, ri, afi, SAFI_UNICAST);
3692 bgp_process (bgp, rn, afi, SAFI_UNICAST);
4139 struct bgp *bgp;
4143 bgp = bgp_get_default ();
4195 if (binfo->peer == bgp->peer_self)
4199 vty_out (vty, "(%s)", inet_ntoa(bgp->router_id));
4235 vty_out (vty, ", localpref %d", bgp->default_local_pref);
4243 if (binfo->peer != bgp->peer_self)
4249 (bgp_confederation_peers_check(bgp, binfo->peer->as) ? "confed-external" : "external"));
4570 struct bgp *bgp;
4587 bgp = bgp_lookup_by_name (view_name);
4588 if (bgp == NULL)
4596 bgp = bgp_get_default ();
4597 if (bgp == NULL)
4610 table = bgp->rib[afi][safi];
4764 vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
4845 route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
4911 LIST_LOOP (bgp->peer, peer, nn)
4939 struct bgp *bgp;
4945 bgp = bgp_lookup_by_name (view_name);
4946 if (bgp == NULL)
4954 bgp = bgp_get_default ();
4955 if (bgp == NULL)
4974 for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_MPLS_VPN]); rn; rn = bgp_route_next (rn))
4992 route_vty_out_detail_header (vty, bgp, rm, (struct prefix_rd *)&rn->p,
5008 if ((rn = bgp_node_match (bgp->rib[afi][safi], &match)) != NULL)
5016 route_vty_out_detail_header (vty, bgp, rn, NULL, afi, safi);
5038 "show ip bgp",
5048 "show ip bgp ipv4 (unicast|multicast)",
5064 "show ip bgp A.B.C.D",
5075 "show ip bgp ipv4 (unicast|multicast) A.B.C.D",
5092 "show ip bgp vpnv4 all A.B.C.D",
5105 "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn A.B.C.D",
5128 "show ip bgp A.B.C.D/M",
5139 "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M",
5156 "show ip bgp vpnv4 all A.B.C.D/M",
5169 "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn A.B.C.D/M",
5192 "show ip bgp view WORD",
5204 "show ip bgp view WORD A.B.C.D",
5217 "show ip bgp view WORD A.B.C.D/M",
5231 "show bgp",
5240 "show bgp ipv6",
5248 "show ipv6 bgp",
5258 "show bgp X:X::X:X",
5268 "show bgp ipv6 X:X::X:X",
5277 "show ipv6 bgp X:X::X:X",
5288 "show bgp X:X::X:X/M",
5298 "show bgp ipv6 X:X::X:X/M",
5307 "show ipv6 bgp X:X::X:X/M",
5405 "show ip bgp regexp .LINE",
5418 "show ip bgp flap-statistics regexp .LINE",
5432 "show ip bgp ipv4 (unicast|multicast) regexp .LINE",
5453 "show bgp regexp .LINE",
5465 "show bgp ipv6 regexp .LINE",
5475 "show ipv6 bgp regexp .LINE",
5523 "show ip bgp prefix-list WORD",
5536 "show ip bgp flap-statistics prefix-list WORD",
5550 "show ip bgp ipv4 (unicast|multicast) prefix-list WORD",
5571 "show bgp prefix-list WORD",
5583 "show bgp ipv6 prefix-list WORD",
5593 "show ipv6 bgp prefix-list WORD",
5640 "show ip bgp filter-list WORD",
5653 "show ip bgp flap-statistics filter-list WORD",
5667 "show ip bgp ipv4 (unicast|multicast) filter-list WORD",
5688 "show bgp filter-list WORD",
5700 "show bgp ipv6 filter-list WORD",
5710 "show ipv6 bgp filter-list WORD",
5758 "show ip bgp route-map WORD",
5771 "show ip bgp flap-statistics route-map WORD",
5785 "show ip bgp ipv4 (unicast|multicast) route-map WORD",
5805 "show bgp route-map WORD",
5817 "show bgp ipv6 route-map WORD",
5827 "show ip bgp cidr-only",
5839 "show ip bgp flap-statistics cidr-only",
5852 "show ip bgp ipv4 (unicast|multicast) cidr-only",
5872 "show ip bgp community",
5884 "show ip bgp ipv4 (unicast|multicast) community",
5904 "show bgp community",
5915 "show bgp ipv6 community",
5924 "show ipv6 bgp community",
5996 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export)",
6011 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6027 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6047 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6071 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)",
6092 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6111 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6134 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6161 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match",
6177 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6194 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6215 "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6240 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) exact-match",
6262 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6282 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6306 "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6335 "show bgp community (AA:NN|local-AS|no-advertise|no-export)",
6349 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export)",
6361 "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6376 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6392 "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6411 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6431 "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6454 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6479 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export)",
6495 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6512 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6533 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)",
6557 "show bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match",
6572 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) exact-match",
6585 "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6601 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6618 "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6638 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6659 "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6683 "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6709 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match",
6726 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6744 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6766 "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match",
6977 "show ip bgp community-list WORD",
6989 "show ip bgp ipv4 (unicast|multicast) community-list WORD",
7007 "show ip bgp community-list WORD exact-match",
7020 "show ip bgp ipv4 (unicast|multicast) community-list WORD exact-match",
7040 "show bgp community-list WORD",
7051 "show bgp ipv6 community-list WORD",
7061 "show ipv6 bgp community-list WORD",
7086 "show bgp community-list WORD exact-match",
7098 "show bgp ipv6 community-list WORD exact-match",
7109 "show ipv6 bgp community-list WORD exact-match",
7169 "show ip bgp A.B.C.D/M longer-prefixes",
7182 "show ip bgp flap-statistics A.B.C.D/M longer-prefixes",
7196 "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M longer-prefixes",
7216 "show ip bgp flap-statistics A.B.C.D",
7229 "show ip bgp flap-statistics A.B.C.D/M",
7242 "show bgp X:X::X:X/M longer-prefixes",
7254 "show bgp ipv6 X:X::X:X/M longer-prefixes",
7264 "show ipv6 bgp X:X::X:X/M longer-prefixes",
7301 struct bgp *bgp;
7304 bgp = bgp_get_default ();
7306 if (! bgp)
7309 table = bgp->rib[afi][safi];
7316 vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
7333 vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
7357 vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
7414 "show ip bgp neighbors (A.B.C.D|X:X::X:X) advertised-routes",
7428 "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) advertised-routes",
7449 "show bgp neighbors (A.B.C.D|X:X::X:X) advertised-routes",
7462 "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X) advertised-routes",
7474 "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X) advertised-routes",
7505 "show ip bgp neighbors (A.B.C.D|X:X::X:X) received-routes",
7519 "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) received-routes",
7539 "show ip bgp neighbors (A.B.C.D|X:X::X:X) received prefix-filter",
7575 "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) received prefix-filter",
7629 "show bgp neighbors (A.B.C.D|X:X::X:X) received-routes",
7642 "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X) received-routes",
7653 "show bgp neighbors (A.B.C.D|X:X::X:X) received prefix-filter",
7688 "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X) received prefix-filter",
7701 "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X) received-routes",
7769 "show ip bgp neighbors (A.B.C.D|X:X::X:X) routes",
7784 "show ip bgp neighbors (A.B.C.D|X:X::X:X) flap-statistics",
7799 "show ip bgp neighbors (A.B.C.D|X:X::X:X) dampened-routes",
7814 "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) routes",
7836 "show bgp neighbors (A.B.C.D|X:X::X:X) routes",
7850 "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X) routes",
7862 "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X) routes",
8024 bgp_distance_apply (struct prefix *p, struct bgp_info *rinfo, struct bgp *bgp)
8033 if (! bgp)
8067 rn = bgp_node_lookup (bgp->route[AFI_IP][SAFI_UNICAST], p);
8075 if (bgp->distance_local)
8076 return bgp->distance_local;
8084 if (bgp->distance_ebgp)
8085 return bgp->distance_ebgp;
8090 if (bgp->distance_ibgp)
8091 return bgp->distance_ibgp;
8098 "distance bgp <1-255> <1-255> <1-255>",
8105 struct bgp *bgp;
8107 bgp = vty->index;
8109 bgp->distance_ebgp = atoi (argv[0]);
8110 bgp->distance_ibgp = atoi (argv[1]);
8111 bgp->distance_local = atoi (argv[2]);
8117 "no distance bgp <1-255> <1-255> <1-255>",
8125 struct bgp *bgp;
8127 bgp = vty->index;
8129 bgp->distance_ebgp= 0;
8130 bgp->distance_ibgp = 0;
8131 bgp->distance_local = 0;
8137 "no distance bgp",
8193 "bgp dampening <1-45> <1-20000> <1-20000> <1-255>",
8201 struct bgp *bgp;
8220 bgp = vty->index;
8221 return bgp_damp_enable (bgp, bgp_node_afi (vty), bgp_node_safi (vty),
8227 "bgp dampening <1-45>",
8234 "bgp dampening",
8240 "no bgp dampening",
8245 struct bgp *bgp;
8247 bgp = vty->index;
8248 return bgp_damp_disable (bgp, bgp_node_afi (vty), bgp_node_safi (vty));
8253 "no bgp dampening <1-45> <1-20000> <1-20000> <1-255>",
8264 "show ip bgp dampened-paths",
8275 "show ip bgp flap-statistics",
8297 struct bgp *bgp;
8303 bgp = bgp_lookup_by_name (view_name);
8304 if (bgp == NULL)
8312 bgp = bgp_get_default ();
8313 if (bgp == NULL)
8332 for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_MPLS_VPN]); rn; rn = bgp_route_next (rn))
8358 if ((rn = bgp_node_match (bgp->rib[afi][safi], &match)) != NULL)
8381 "clear ip bgp dampening",
8393 "clear ip bgp dampening A.B.C.D/M",
8406 "clear ip bgp dampening A.B.C.D",
8419 "clear ip bgp dampening A.B.C.D A.B.C.D",
8443 bgp_config_write_network_vpnv4 (struct vty *vty, struct bgp *bgp,
8457 for (prn = bgp_table_top (bgp->route[afi][safi]); prn; prn = bgp_route_next (prn))
8484 bgp_config_write_network (struct vty *vty, struct bgp *bgp,
8494 return bgp_config_write_network_vpnv4 (vty, bgp, afi, safi, write);
8497 for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn))
8542 for (rn = bgp_table_top (bgp->aggregate[afi][safi]); rn; rn = bgp_route_next (rn))
8579 bgp_config_write_distance (struct vty *vty, struct bgp *bgp)
8585 if (bgp->distance_ebgp
8586 && bgp->distance_ibgp
8587 && bgp->distance_local
8588 && (bgp->distance_ebgp != ZEBRA_EBGP_DISTANCE_DEFAULT
8589 || bgp->distance_ibgp != ZEBRA_IBGP_DISTANCE_DEFAULT
8590 || bgp->distance_local != ZEBRA_IBGP_DISTANCE_DEFAULT))
8591 vty_out (vty, " distance bgp %d %d %d%s",
8592 bgp->distance_ebgp, bgp->distance_ibgp, bgp->distance_local,