BGP prefix-lists, route-maps and communities with a provider
Accept only a default route and one prefix from the provider with a prefix-list, and tag your own prefix with a community the provider turns into a higher local preference.
Scenario
The company router R1 (AS 65001) peers with its provider ISP (AS 100) at 10.0.12.2. The provider sends a default route and several prefixes; R1's memory budget allows only the default route and 203.0.113.0/24 (the provider's hosting network). The provider's policy, already configured, gives customer routes tagged with community 100:150 a local preference of 150 (its 'preferred customer' class). Peer with the provider, filter what you accept with a prefix-list, advertise the office LAN 192.168.20.0/24 tagged 100:150, and remember that communities are only sent to a neighbour configured to receive them.
Your tasks
- R1 (AS 65001) has an Established eBGP session with the provider (10.0.12.2, AS 100).
- R1 accepts only the default route and 203.0.113.0/24 from the provider; 198.51.100.0/24 and 100.64.0.0/16 are not in its routing table.
- The provider's best path to 192.168.20.0/24 has a local preference of 150 (your route carries community 100:150).
- PC1 reaches the provider's hosting network (203.0.113.1).
The lab checks the result, not the exact commands. For example, a ping task passes only when the ping really succeeds through the network you built.