Configure BGP4 Route Map Matching on a Static Network

You can configure route map that matches on a static network.

About this task

In this task, a route-map is configured to match on the BGP4 static network. The device is then configured to filter the outgoing route updates to a specified BGP neighbor according to the set of attributes defined in the configured route map.

Procedure

  1. Access global configuration mode.
    device# configure terminal
  2. Create a route map instance and allow a matching pattern.
    device(config)# route-map mystaticroutemap3 permit 1
    This example creates a route map instance named mystaticroutemap3 and allows a matching pattern of 1.
  3. Configure the route map to match on BGP4 static network routes.
    device(config-routemap-mystaticroutemap3/permit/1)# match protocol bgp static-network
  4. Specify a BGP local-preference path attribute in the route map instance.
    device(config-routemap-mystaticroutemap3/permit/1)# set local-preference 150
  5. Configure the BGP community attribute for the route map instance not to export to the next AS.
    device(config-routemap-mystaticroutemap3/permit/1)# set community no-export
  6. Exit route map configuration mode.
    device(config-routemap-mystaticroutemap3/permit/1)# exit
  7. Access BGP configuration mode.
    device(config)# router bgp
  8. Access IPv4 address family configuration mode.
    device(config-bgp-router)# address-family ipv4 unicast
  9. Filter the outgoing route updates to a BGP neighbor.
    device (config-bgp-ipv4u)# neighbor 10.1.2.3 route-map out mystaticroutemap3
    This example instructs the route map to filter outgoing route updates to 10.1.2.3 according to the attributes that are defined in mystaticroutemap3.

Example

The following example summarizes the commands in this procedure.

device# configure terminal
device(config)# route-map mystaticroutemap3 permit 1
device(config-routemap-mystaticroutemap3/permit/1)# match protocol bgp static-network
device(config-routemap-mystaticroutemap3/permit/1)# set local-preference 150
device(config-routemap-mystaticroutemap3/permit/1)# set community no-export
device(config-routemap-mystaticroutemap3/permit/1)# exit
device(config)# router bgp
device(config-bgp)# address-family ipv4 unicast
device(config-bgp-ipv4u)# neighbor 10.1.2.3 route-map out mystaticroutemap3