First, the experimental topology:
Second, the experimental requirements:
1, R4, R1, R3, R2 respectively in the BGP process deployment neighbor Send Community attribute command;
2, R4 deployment ACL crawl 4.4.4.4 traffic, Route-map named as, call ACL, set community Local-as, and call Route-map as out in the BGP process;
3, verify: R1, R3 have 4.4.4.4, but R2 have no 4.4.4.0 route entry?
Third, command deployment:
R4 (config) #route-map as permit 10
R4 (config-route-map) #match IP address 10
R4 (config-route-map) #set Community Local-as
R4 (config-route-map) # #route-map as permit 1000
R4 (config) #router BGP 4
R4 (config-router) #neighbor 14.1.1.1 Route-map as Out
Four, verify:
R1#show IP BGP 4.4.4.4
BGP routing table entry for 4.4.4.0/24, version 4
Paths: (1 available, best #1, table default-ip-routing-table, not advertised outside local as)
Flag:0x8a0
Advertised to Update-groups:
2
4
14.1.1.4 from 14.1.1.4 (4.4.4.4)
Origin IGP, Metric 0, Localpref, valid, external, best
Community:local-as
R3#show IP BGP 4.4.4.4
BGP routing table entry for 4.4.4.0/24, version 4
Paths: (1 available, best #1, table default-ip-routing-table, not advertised outside local as)
Flag:0x8a0
Not advertised to any peer
4
1.1.1.1 (Metric 156160) from 1.1.1.1 (1.1.1.1)
Origin IGP, Metric 0, Localpref, valid, confed-internal, best
Community:local-as
R2#show IP BGP 4.4.4.4
% Network not in table
51-Advanced Routing: BGP Community properties: Local-as