...
Code Block |
---|
admin@XorPlus# set protocols bgp ipv4-unicast neighbor 2.2.2.2 in route-map map1 admin@XorPlus# commit |
BGP Community Lists
You can use community lists to define a BGP community to tag one or more routes. You can then use the communities to apply a route policy on either egress or ingress.
The BGP community list can be either standard or expanded. The standard BGP community list is a pair of values (such as 100:100) that can be tagged on a specific prefix and advertised to other neighbors or applied on route ingress. Or, it can be one of four BGP default communities:
- internet: a BGP community that matches all routes
- local-AS: a BGP community that restricts routes to your confederation’s sub-AS
- no-advertise: a BGP community that is not advertised to anyone
- no-export: a BGP community that is not advertised to the eBGP peer
An expanded BGP community list takes a regular expression of communities and matches the listed communities.
When the neighbor receives the prefix, it examines the community value and takes action accordingly, such as permitting or denying the community member in the routing policy.
Here is an example of a standard community list filter:
Code Block |
---|
admin@Xorplus# set routing community-list standard COMMUNITY1 permit community 100:100
admin@Xorplus# commit |
You can apply the community list to a route map to define the routing policy:
Code Block |
---|
admin@Xorplus# set routing route-map GlobalMap order 10 match community COMMUNITY1
admin@Xorplus# set routing route-map GlobalMap order 10 matching-policy permit
admin@Xorplus# commit |