Step 3

Once the target network has been identified during a DDoS attack, apply an outbound policy or export policy to one router (in our example, R1) within the provider network so that the route to the target network is advertised to the other edge routers within the community 666:0.
The following example creates a static route on R1 to the target network with a static export policy that applies to the community. When the attack targets change, you only need to create or delete static routes to the target networks. The policy exports them to the edge BGP speakers with the selected community attribute values attached.
R1.1 # edit policy BH_COMM_APPLY
entry bh-comm-apply {
		if match any  {
			nlri any/32;
		} then {
			community set “666:0”;
R1.2 # configure iproute add
R1.3 # enable bgp export static export-policy BH_COMM_APPLY

Alternatively, you can apply the policy as an outbound policy as below:

R1.10 # configure bgp neighbor route-policy out BH_COMM_APPLYR1.11 
# configure bgp neighbor route-policy out BH_COMM_APPLYR1.12 
# configure bgp neighbor route-policy out BH_COMM_APPLY