Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

policy route route-map <map-name> rule <rule-num> set community <community>

Modifies a BGP community only if it matches a prefix-list.

set policy route route-map map-name rule rule-num action [ permit | deny ]
set policy route route-map map-name rule rule-num match ip address prefix-list prefix-num
set policy route route-map map-name rule rule-num set community { AA:NN | local-AS | no-advertise | no-export | internet | none }
map-name
The name of a defined route map.
list-num
The number of a defined community list.
rule-num
The number of a defined community list rule.
aa:nn
Specifies the community in 4-octet, AS-value format.
local-AS
Advertises communities in local AS only (NO_EXPORT_SUBCONFED).
no-advertise
Does not advertise this route to any peer (NO_ADVERTISE).
no-export
Does not advertise outside of this AS of confederation boundary (NO_EXPORT).
internet
Specifies the 0 symbolic Internet community.
none
Specifies no communities.

Configuration mode


policy {
    route {
        route-map map-name {
            rule rule-num {
                action {
                        deny
                        permit
                match {
                    ip {
                        address {
                            prefix-list prefix-num {
                               set {
                                   community AA:NN
                                   local-AS 
                                   no-advertise 
                                   no-export 
                                   internet
                                   none
                                   }
                              }
                           }
                        }
                    }
                }
            }
        }
    }
}

Use the set form of this command to to modify the BGP community attribute in a route.

Note: The community list must already be defined.