Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Configuring a Route Map to Filter Routes on the Basis of the AS Path

    This example explains how to configure a route map to filter routes on the basis of the autonomous system (AS) path.

    Requirements

    This example uses the following software and hardware components:

    • JunosE Release 7.1.0 or higher-numbered releases
    • E Series router (ERX7xx models, ERX14xx models, the ERX310 router, the E120 router, or the E320 router)
    • ASIC-based line modules that support Fast Ethernet or Gigabit Ethernet

    Overview

    Consider the network structure shown in Figure 1. In this network, you can configure the router NY to block the router Boston from receiving any routes that originate in or pass through the router Chicago.

    Figure 1: Applying Route Maps to Routes

    Applying Route Maps to Routes

    Configuration

    Step-by-Step Procedure

    The following example demonstrates about configuring the router NY to block the router Boston from receiving any routes that originate in or pass through the router Chicago.

    To block the router Boston from receiving any routes that originate in or pass through the router Chicago:

    1. Configure the BGP routing process.
      host1(config)#router bgp 293
    2. Configure a BGP speaker with an IPv4 prefix originating within its AS.
      host1(config-router)#network 192.168.5.0 mask 255.255.255.0
    3. Add entries to the BGP neighbor table.
      host1(config-router)#neighbor 10.5.5.2 remote-as 32 host1(config-router)#neighbor 10.2.2.2 remote-as 873 host1(config-router)#neighbor 10.2.2.4 remote-as 17
    4. Apply a route map to incoming or outgoing routes.
      host1(config-router)#neighbor 10.2.2.4 route-map block1 out host1(config-router)#exit
    5. Define a BGP-related access list.
      host1(config)#ip as-path access-list boston deny _32_
    6. Specify a route map for applying routing policies to filter or modify routes.
      host1(config)#route-map block1 deny 1
    7. Match a BGP AS-path access list.
      host1(config-route-map)#match as-path boston

    Published: 2014-08-12