Lab 9.2.7 The Community Attribute

Objective:

  • Use the Community Attribute to dynamically influence the routing decisions of another AS.

Scenario:

You are the network administrator of AS 400. You want to prevent AS 300 from advertising network 11.0.0.0 to any external AS. You have decided that setting the community attribute would be the best way to handle this situation.

Tasks:

  1. Configure BGP on each router and advertise each LAN. Be sure to use 3.0.0.2 on Router C and 2.0.0.2 on Router A. Use the .1 addresses on Router B. Verify that you have connectivity with the show ip bgp command and the extended ping command.
  2. We will be using a route map to attach the "no-export" attribute to advertisements about network 11.0.0.0. Therefore, the community attribute will require an access list to match up with the route map. The access list statement should be as follows:
  • RouterC(config)#access-list 1 permit 11.0.0.0 0.255.255.255

Why did we choose to permit the network?

  1. The next step is to use the send-community subcommand to cause the assigned community to be sent out. This is done as follows:
  • RouterC(config-router)#neighbor 3.0.0.1 send-community

Why are we sending the community to this neighbor?

  1. The next step is to configure a route map that will assign the no-export attribute to network 11.0.0.0 but leave other networks alone. This will be done as follows:
  • RouterC(config)#route-map SETCOMMUNITY permit 10
  • RouterC(config-route-map)#match ip address 1
  • RouterC(config-route-map)#set community no-export
  • RouterC(config-route-map)#exit
  • RouterC(config-route-map)#route-map SETCOMMUNITY permit 20

Describe what you believe each of the above commands does:

  1. The final step is to assign the route-map to a neighbor. This command is:
  • RouterC(config-router)#neighbor 3.0.0.1 route-map SETCOMMUNITY out

Why did we set the route-map to out?

  1. Go to Router A and Router B. Issue the clear ip bgp * command on each router and see if network 11.0.0.0 appears in the routing table by using the show ip bgp command.

What are your findings?

  1. On Router B, issue the command show ip bgp 11.0.0.0.

What does this command tell you?

  1. Save your configurations.