IP Routing: BGP Configuration Guide, Cisco IOS XE Release 3S (Cisco ASR 1000)
BGP Support for MTR
Downloads: This chapterpdf (PDF - 1.42MB) The complete bookPDF (PDF - 13.54MB) | The complete bookePub (ePub - 3.13MB) | Feedback

BGP Support for MTR

BGP support for MTR introduces a new configuration hierarchy and command-line interface (CLI) commands to support multi-topology routing (MTR) topologies. The new configuration hierarchy, or scope, can be implemented by BGP independently of MTR. MTR allows the configuration of service differentiation through class-based forwarding. MTR supports multiple unicast topologies and a separate multicast topology. A topology is a subset of the underlying network (or base topology) characterized by an independent set of Network Layer Reachability Information (NLRI).

For more information, see the Multitopology Routing Configuration Guide.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

Information About BGP Support for MTR

BGP Network Scope

A new configuration hierarchy, named scope, has been introduced into the BGP protocol. To implement MTR for BGP, the scope hierarchy is required, but the scope hierarchy is not limited to MTR use. The scope hierarchy introduces some new configuration modes such as router scope configuration mode. Router scope configuration mode is entered by configuring the scope command in router configuration mode, and a collection of routing tables is created when this command is entered. BGP commands configured under the scope hierarchy are configured for a single network (globally), or on a per-VRF basis, and are referred to as scoped commands. The scope hierarchy can contain one or more address families.

MTR CLI Hierarchy Under BGP

The BGP CLI has been modified to provide backwards compatibility for pre-MTR BGP configuration and to provide a hierarchical implementation of MTR. Router configuration mode is backwards compatible with the pre-address family and pre-MTR configuration CLI. Global commands that affect all networks are configured in this configuration mode. For address-family and topology configuration, general session commands and peer templates can be configured to be used in the address-family or topology configuration modes.

After any global commands are configured, the scope is defined either globally or for a specific VRF. Address family configuration mode is entered by configuring the address-family command in router scope configuration mode or router configuration mode. Unicast is the default address family if no subaddress family (SAFI) is specified. MTR supports only the IPv4 address family with a SAFI of unicast or multicast. Entering address family configuration mode from router configuration mode configures BGP to use pre-MTR-based CLI. This configuration mode is backwards compatible with pre-existing address family configurations. Entering address family configuration mode from router scope configuration mode configures the router to use the hierarchical CLI that supports MTR. Address family configuration parameters that are not specific to a topology are entered in this address family configuration mode.

BGP topology configuration mode is entered by configuring the topology(BGP) command in address family configuration mode. Up to 32 topologies (including the base topology) can be configured on a router. The topology ID is configured by entering the bgp tid command. All address family and subaddress family configuration parameters for the topology are configured here.


Note


Configuring a scope for a BGP routing process removes CLI support for pre-MTR-based configuration.


The following shows the hierarchy levels that are used when configuring BGP for MTR implementation:

router bgp <
autonomous-system-number
>
 ! global commands 
 scope {global | vrf <
vrf-name
>}
  ! scoped commands 
  address-family {<
afi
>} [<
safi
>]
   ! address family specific commands 
   topology {<
topology-name
> | base}
    ! topology specific commands

BGP Sessions for Class-Specific Topologies

MTR is configured under BGP on a per-session basis. The base unicast and multicast topologies are carried in the global (default) session. A separate session is created for each class-specific topology that is configured under a BGP routing process. Each session is identified by its topology ID. BGP performs a best-path calculation individually for each class-specific topology. A separate RIB and FIB are maintained for each session.

Topology Translation Using BGP

Depending on the design and policy requirements for your network, you may need to install routes from a class-specific topology on one router in a class-specific topology on a neighboring router. Topology translation functionality using BGP provides support for this operation. Topology translation is BGP neighbor-session based. The neighbor translate-topology command is configured using the IP address and topology ID from the neighbor.

The topology ID identifies the class-specific topology of the neighbor. The routes in the class-specific topology of the neighbor are installed in the local class-specific RIB. BGP performs a best-path calculation on all installed routes and installs these routes into the local class-specific RIB. If a duplicate route is translated, BGP will select and install only one instance of the route per standard BGP best-path calculation behavior.

Topology Import Using BGP

Topology import functionality using BGP is similar to topology translation. The difference is that routes are moved between class-specific topologies on the same router using BGP. This function is configured by entering the import topology command. The name of the class-specific topology or base topology is specified when entering this command. Best-path calculations are run on the imported routes before they are installed into the topology RIB. This command also includes a route-map keyword to allow you to filter routes that are moved between class-specific topologies.

How to Configure BGP Support for MTR

Configuring BGP Support for MTR

Before performing the following tasks, you must have configured MTR topologies. For more details, see the “Multitopology Routing Configuration Guide.”

Activating an MTR Topology Using BGP

Perform this task to activate an MTR topology inside an address family using BGP. This task is configured on Router B in the figure below and must also be configured on Router D and Router E. In this task, a scope hierarchy is configured to apply globally and a neighbor is configured under router scope configuration mode. Under the IPv4 unicast address family, an MTR topology that applies to video traffic is activated for the specified neighbor. There is no interface configuration mode for BGP topologies.

Figure 1. BGP Network Diagram

The BGP CLI has been modified to provide backwards compatibility for pre-MTR BGP configuration and to provide a hierarchical implementation of MTR. A new configuration hierarchy, named scope, has been introduced into the BGP protocol. To implement MTR for BGP, the scope hierarchy is required, but the scope hierarchy is not limited to MTR use. The scope hierarchy introduces some new configuration modes such as router scope configuration mode. Router scope configuration mode is entered by configuring the scope command in router configuration mode, and a collection of routing tables is created when this command is entered. The following shows the hierarchy levels that are used when configuring BGP for MTR implementation:

router bgp <
autonomous-system-number
>
 ! global commands 
 scope {global | vrf <
vrf-name
>}
  ! scoped commands 
  address-family {<
afi
>} [<
safi
>]
   ! address family specific commands 
   topology {<
topology-name
> | base}
    ! topology specific commands

Before using BGP to support MTR, you should be familiar with all the concepts documented in the section, “Information About BGP Support for MTR.”

Before You Begin
  • You must be running a Cisco IOS Release 12.2(33)SRB, or later release, on any routers configured for MTR.
  • A global MTR topology configuration has been configured and activated.
  • IP routing and CEF are enabled.

Note


  • Redistribution within a topology is permitted. Redistribution from one topology to another is not permitted. This restriction is designed to prevent routing loops. You can use topology translation or topology import functionality to move routes from one topology to another.
  • Only the IPv4 address family (multicast and unicast) is supported.
  • Only a single multicast topology can be configured, and only the base topology can be specified if a multicast topology is created.

SUMMARY STEPS

    1.    enable

    2.    configure terminal

    3.    router bgp autonomous-system-number

    4.    scope {global | vrf vrf-name}

    5.    neighbor {ip-address| peer-group-name} remote-as autonomous-system-number

    6.    neighbor {ip-address| peer-group-name} transport{connection-mode {active | passive} | path-mtu-discovery | multi-session | single-session}

    7.    address-family ipv4 [mdt | multicast | unicast]

    8.    topology {base| topology-name}

    9.    bgp tid number

    10.    neighbor ip-address activate

    11.    neighbor {ip-address| peer-group-name} translate-topology number

    12.    end

    13.    clear ip bgp topology {* | topology-name} {as-number | dampening [network-address [network-mask]] | flap-statistics [network-address [network-mask]] | peer-group peer-group-name | table-map | update-group [number | ip-address]} [in [prefix-filter] | out| soft [in [prefix-filter] | out]]

    14.    show ip bgp topology {* | topology} summary


DETAILED STEPS
      Command or Action Purpose
    Step 1 enable


    Example:
    Router> enable 
     

    Enables privileged EXEC mode.

    • Enter your password if prompted.
     
    Step 2 configure terminal


    Example:
    Router# configure terminal 
     

    Enters global configuration mode.

     
    Step 3 router bgp autonomous-system-number


    Example:
    Router(config)# router bgp 45000 
     

    Enters router configuration mode to create or configure a BGP routing process.

     
    Step 4 scope {global | vrf vrf-name}


    Example:
    Router(config-router)# scope global 
     

    Defines the scope to the BGP routing process and enters router scope configuration mode.

    • BGP general session commands that apply to a single network, or a specified VRF, are entered in this configuration mode.
    • Use the global keyword to specify that BGP uses the global routing table.
    • Use the vrf keyword and vrf-name argument to specify that BGP uses a specific VRF routing table. The VRF must already exist.
     
    Step 5 neighbor {ip-address| peer-group-name} remote-as autonomous-system-number


    Example:
    Router(config-router-scope)# neighbor 172.16.1.2 remote-as 45000
     

    Adds the IP address of the neighbor in the specified autonomous system to the multiprotocol BGP neighbor table of the local router.

     
    Step 6 neighbor {ip-address| peer-group-name} transport{connection-mode {active | passive} | path-mtu-discovery | multi-session | single-session}


    Example:
    Router(config-router-scope)# neighbor 172.16.1.2 transport multi-session
     

    Enables a TCP transport session option for a BGP session.

    • Use the connection-mode keyword to specify the type of connection, either active or passive.
    • Use the path-mtu-discovery keyword to enable TCP transport path maximum transmission unit (MTU) discovery.
    • Use the multi-session keyword to specify a separate TCP transport session for each address family.
    • Use the single-session keyword to specify that all address families use a single TCP transport session.
     
    Step 7 address-family ipv4 [mdt | multicast | unicast]


    Example:
    Router(config-router-scope)# address-family ipv4 
     

    Specifies the IPv4 address family and enters router scope address family configuration mode.

    • Use the mdt keyword to specify IPv4 MDT address prefixes.
    • Use the multicast keyword to specify IPv4 multicast address prefixes.
    • Use the unicast keyword to specify the IPv4 unicast address family. By default, the router is placed in address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command.
    • Non-topology-specific configuration parameters are configured in this configuration mode.
     
    Step 8 topology {base| topology-name}


    Example:
    Router(config-router-scope-af)# topology VIDEO 
     

    Configures the topology instance in which BGP will route class-specific or base topology traffic, and enters router scope address family topology configuration mode.

     
    Step 9 bgp tid number


    Example:
    Router(config-router-scope-af-topo)# bgp tid 100
     

    Associates a BGP routing process with the specified topology ID.

    • Each topology must be configured with a unique topology ID.
     
    Step 10 neighbor ip-address activate


    Example:
    Router(config-router-scope-af-topo)#
     
    neighbor 172.16.1.2 activate
     

    Enables the BGP neighbor to exchange prefixes for the NSAP address family with the local router.

    Note   

    If you have configured a peer group as a BGP neighbor, you do not use this command because peer groups are automatically activated when any peer group parameter is configured.

     
    Step 11 neighbor {ip-address| peer-group-name} translate-topology number


    Example:
    Router(config-router-scope-af-topo)# neighbor 172.16.1.2 translate-topology 200 
     

    (Optional) Configures BGP to install routes from a topology on another router to a topology on the local router.

    • The topology ID is entered for the number argument to identify the topology on the router.
     
    Step 12 end


    Example:
    Router(config-router-scope-af-topo)# end 
     

    (Optional) Exits router scope address family topology configuration mode and returns to privileged EXEC mode.

     
    Step 13 clear ip bgp topology {* | topology-name} {as-number | dampening [network-address [network-mask]] | flap-statistics [network-address [network-mask]] | peer-group peer-group-name | table-map | update-group [number | ip-address]} [in [prefix-filter] | out| soft [in [prefix-filter] | out]]


    Example:
    Router# clear ip bgp topology VIDEO 45000
     

    Resets BGP neighbor sessions under a specified topology or all topologies.

     
    Step 14 show ip bgp topology {* | topology} summary


    Example:
    Router# show ip bgp topology VIDEO summary
     

    (Optional) Displays BGP information about a topology.

    • Most standard BGP keywords and arguments can be entered following the topology keyword.
    Note   

    Only the syntax required for this task is shown. For more details, see the Cisco IOS IP Routing: BGP Command Reference.

     

    Examples

    The following example shows summary output for the show ip bgp topology command and the VIDEO topology:

    Router# show ip bgp topology VIDEO summary
    BGP router identifier 192.168.3.1, local AS number 45000
    BGP table version is 1, main routing table version 1
    Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
    172.16.1.2      4 45000     289     289        1    0    0 04:48:44        0
    192.168.3.2     4 50000       3       3        1    0    0 00:00:27        0

    What to Do Next

    Repeat this task for every topology that you want to enable, and repeat this configuration on all neighbor routers that are to use the topologies. If you want to import routes from one MTR topology to another on the same router, proceed to the next task.

    Importing Routes from an MTR Topology Using BGP

    Perform this task to import routes from one MTR topology to another on the same router, when multiple topologies are configured on the same router. In this task, a prefix list is defined to permit prefixes from the 10.2.2.0 network, and this prefix list is used with a route map to filter routes moved from the imported topology. A global scope is configured, address family IPv4 is entered, the VIDEO topology is specified, the VOICE topology is imported, and the routes are filtered using the route map named 10NET.

    Before You Begin
    • A global topology configuration has been configured and activated.
    • IP routing and CEF are enabled.

    Note


    • Redistribution within a topology is permitted. Redistribution from one topology to another is not permitted. This restriction is designed to prevent routing loops from occurring. You can use topology translation or topology import functionality to move routes from one topology to another.
    • Only the IPv4 address family (multicast and unicast) is supported.
    • Only a single multicast topology can be configured, and only the base topology can be specified if a multicast topology is created.

    SUMMARY STEPS

      1.    enable

      2.    configure terminal

      3.    ip prefix-list list-name [seq seq-value] {deny network/length | permit network/length} [ge ge-value] [le le-value]

      4.    route-map map-name [permit | deny] [sequence-number]

      5.    match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]}

      6.    exit

      7.    router bgp autonomous-system-number

      8.    scope {global | vrf vrf-name}

      9.    address-family ipv4 [mdt | multicast | unicast]

      10.    topology {base | topology-name}

      11.    import topology {base | topology-name} [route-mapmap-name]

      12.    end


    DETAILED STEPS
        Command or Action Purpose
      Step 1 enable


      Example:
      Router> enable 
       

      Enables privileged EXEC mode.

      • Enter your password if prompted.
       
      Step 2 configure terminal


      Example:
      Router# configure terminal 
       

      Enters global configuration mode.

       
      Step 3 ip prefix-list list-name [seq seq-value] {deny network/length | permit network/length} [ge ge-value] [le le-value]


      Example:
      Router(config)# ip prefix-list TEN permit 10.2.2.0/24
       

      Configures an IP prefix list.

      • In this example, prefix list TEN permits advertising of the 10.2.2.0/24 prefix depending on a match set by the match ip address command.
       
      Step 4 route-map map-name [permit | deny] [sequence-number]


      Example:
      Router(config)# route-map 10NET
       

      Creates a route map and enters route map configuration mode.

      • In this example, the route map named 10NET is created.
       
      Step 5 match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]}


      Example:
      Router(config-route-map)# match ip address prefix-list TEN
       

      Configures the route map to match a prefix that is permitted by a standard access list, an extended access list, or a prefix list.

      • In this example, the route map is configured to match prefixes permitted by prefix list TEN.
       
      Step 6 exit


      Example:
      Router(config-route-map)# exit
       

      Exits route map configuration mode and returns to global configuration mode.

       
      Step 7 router bgp autonomous-system-number


      Example:
      Router(config)# router bgp 50000 
       

      Enters router configuration mode to create or configure a BGP routing process.

       
      Step 8 scope {global | vrf vrf-name}


      Example:
      Router(config-router)# scope global 
       

      Defines the scope to the BGP routing process and enters router scope configuration mode.

      • BGP general session commands that apply to a single network, or a specified VRF, are entered in this configuration mode.
      • Use the global keyword to specify that BGP uses the global routing table.
      • Use the vrf keyword and vrf-name argument to specify that BGP uses a specific VRF routing table. The VRF must already exist.
       
      Step 9 address-family ipv4 [mdt | multicast | unicast]


      Example:
      Router(config-router-scope)# address-family ipv4 
       

      Enters router scope address family configuration mode to configure an address family session under BGP.

      • Non-topology-specific configuration parameters are configured in this configuration mode.
       
      Step 10 topology {base | topology-name}


      Example:
      Router(config-router-scope-af)# topology VIDEO 
       

      Configures the topology instance in which BGP will route class-specific or base topology traffic, and enters router scope address family topology configuration mode.

       
      Step 11 import topology {base | topology-name} [route-mapmap-name]


      Example:
      Router(config-router-scope-af-topo)# import topology VOICE route-map 10NET
       

      (Optional) Configures BGP to move routes from one topology to another on the same router.

      • The route-map keyword can be used to filter routes that moved between topologies.
       
      Step 12 end


      Example:
      Router(config-router-scope-af-topo)# end 
       

      (Optional) Exits router scope address family topology configuration mode, and returns to privileged EXEC mode.

       

      Configuration Examples for BGP Support for MTR

      Example: Importing Routes from an MTR Topology Using BGP

      The following example shows how to configure an access list to be used by a route map named BLUE to filter routes imported from the MTR topology named VOICE. Only routes with the prefix 192.168.1.0 are imported.

      access-list 1 permit 192.168.1.0 0.0.0.255 
      route-map BLUE
       match ip address 1
       exit
      router bgp 50000 
       scope global
        neighbor 10.1.1.2 remote-as 50000
        neighbor 172.16.1.1 remote-as 60000
         address-family ipv4 
          topology VIDEO 
           bgp tid 100
           neighbor 10.1.1.2 activate 
           neighbor 172.16.1.1 activate 
           import topology VOICE route-map BLUE 
           end
      clear ip bgp topology VIDEO 50000 

      Example: Activating an MTR Topology Using BGP

      This section contains the following configuration examples:

      BGP Topology Translation Configuration

      The following example configures BGP in the VIDEO topology and configures topology translation with the 192.168.2.2 neighbor:

      router bgp 45000
       scope global
        neighbor 172.16.1.1 remote-as 50000 
        neighbor 192.168.2.2 remote-as 55000
        neighbor 172.16.1.1 transport multi-session
        neighbor 192.168.2.2 transport multi-session
         address-family ipv4 
          topology VIDEO 
           bgp tid 100
           neighbor 172.16.1.1 activate 
           neighbor 192.168.2.2 activate 
           neighbor 192.168.2.2 translate-topology 200
           end
      clear ip bgp topology VIDEO 50000 

      BGP Scope Global and VRF Configuration

      The following example shows how to configure a global scope for a unicast topology and also for a multicast topology. After exiting the router scope configuration mode, a scope is configured for the VRF named DATA.

      router bgp 45000 
       scope global
        bgp default ipv4-unicast
        neighbor 172.16.1.2 remote-as 45000 
        neighbor 192.168.3.2 remote-as 50000 
        address-family ipv4 unicast 
         topology VOICE 
         bgp tid 100 
         neighbor 172.16.1.2 activate 
         exit 
        address-family ipv4 multicast 
         topology base 
          neighbor 192.168.3.2 activate 
          exit 
         exit 
        exit 
       scope vrf DATA 
        neighbor 192.168.1.2 remote-as 40000 
        address-family ipv4 
         neighbor 192.168.1.2 activate 
         end

      BGP Topology Verification

      The following example shows summary output for the show ip bgp topology command. Information is displayed about BGP neighbors configured to use the MTR topology named VIDEO.

      Router# show ip bgp topology VIDEO summary
      
      BGP router identifier 192.168.3.1, local AS number 45000
      BGP table version is 1, main routing table version 1
      Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
      172.16.1.2      4 45000     289     289        1    0    0 04:48:44        0
      192.168.3.2     4 50000       3       3        1    0    0 00:00:27        0
      

      The following partial output displays BGP neighbor information under the VIDEO topology:

      Router# show ip bgp topology VIDEO neighbors 172.16.12 
      
      BGP neighbor is 172.16.1.2,  remote AS 45000, internal link
        BGP version 4, remote router ID 192.168.2.1
        BGP state = Established, up for 04:56:30
        Last read 00:00:23, last write 00:00:21, hold time is 180, keepalive interval is 60
      seconds
        Neighbor sessions:
          1 active, is multisession capable
        Neighbor capabilities:
          Route refresh: advertised and received(new)
        Message statistics, state Established:
          InQ depth is 0
          OutQ depth is 0
                               Sent       Rcvd
          Opens:                  1          1
          Notifications:          0          0
          Updates:                0          0
          Keepalives:           296        296
          Route Refresh:          0          0
          Total:                297        297
        Default minimum time between advertisement runs is 0 seconds
       For address family: IPv4 Unicast topology VIDEO
        Session: 172.16.1.2 session 1
        BGP table version 1, neighbor version 1/0
        Output queue size : 0
        Index 1, Offset 0, Mask 0x2
      1 update-group member
        Topology identifier: 100
      .
      .
      .
        Address tracking is enabled, the RIB does have a route to 172.16.1.2
        Address tracking requires at least a /24 route to the peer
        Connections established 1; dropped 0
        Last reset never
        Transport(tcp) path-mtu-discovery is enabled
      Connection state is ESTAB, I/O status: 1, unread input bytes: 0
      Minimum incoming TTL 0, Outgoing TTL 255
      Local host: 172.16.1.1, Local port: 11113
      Foreign host: 172.16.1.2, Foreign port: 179
      .
      .
      .

      Additional References

      Related Documents

      Related Topic

      Document Title

      Cisco IOS commands

      Cisco IOS Master Commands List, All Releases

      BGP commands

      Cisco IOS BGP Command Reference

      MTR commands

      Cisco IOS Multitopology Routing Command Reference

      Configuring Multitopology Routing

      Multitopology Routing Configuration Guide

      Technical Assistance

      Description

      Link

      The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

      http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

      Feature Information for BGP Support for MTR

      The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

      Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

      Table 1 Feature Information for BGP Support for MTR

      Feature Name

      Releases

      Feature Information

      BGP Support for MTR

      12.2(33)SRB

      Cisco IOS XE Release 3.8S

      BGP support for MTR introduces a new configuration hierarchy and command-line interface (CLI) commands to support multi-topology routing (MTR) topologies. The new configuration hierarchy, or scope, can be implemented by BGP independently of MTR. MTR allows the configuration of service differentiation through class-based forwarding. MTR supports multiple unicast topologies and a separate multicast topology. A topology is a subset of the underlying network (or base topology) characterized by an independent set of Network Layer Reachability Information (NLRI).

      In 12.2(33)SRB, this feature was introduced on the Cisco 7600.

      The following commands were introduced or modified by this feature: address-family ipv4 (BGP), bgp tid, clear ip bgp topology, import topology, neighbor translate-topology, neighbor transport, scope, show ip bgp topology, topology (BGP).