home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Show Page Sections

VRF Support for BGP

VRF support for BGP

The implementation of VRF on the vRouter supports BGP.

If you configure BGP on the vRouter without specifying a VRF instance, the router uses the default routing table. BGP supports route-leaking between VRF's by using route target. To configure BGP for a particular VRF routing instance, specify the instance in the command syntax.

Note: You must configure a unique route distinguisher, before you configure BGP with a VRF routing instance. You cannot further modify the route distinguisher configuration if BGP is already configured within a routing instance. Use the following command to configure a route distinguisher:
vyatta@R1# set routing routing-instance VRF-NAME route-distinguisher RDVALUE

BGP monitor commands log messages from the default VRF, unless the name of the VRF is specified in the configuration of the routing instance.

The following BGP features are supported only on the default routing instance:

  • Extended ASN capability
  • Graceful restart
  • BGP scan timer
  • Cluster ID
  • Confederation identifier
  • Maximum AS limit

Configuring BGP on a routing instance

This example shows how to assign BGP to the RED routing instance on the IPv4 address family.

In this example the R1 vRouter and R2 vRouter consists of RED and BLUE routing instances. The R1 and R2 vRouters are connected with the RED routing instance.

Figure 1. Configuring BGP on a routing instance
Note: Ensure that you have configured the BGP AS number in the default mode prior to configuring BGP on a routing instance.
Table 1. Configuring BGP on a routing instance

Step

Command

The configuration before reassigning routing instances.

vyatta@R1# show protocols

protocols {
      bgp 2 {
         parameters {
            router-id 5.5.5.5
         }
      }
}  

Configure a unique route distinguisher before you configure BGP on a routing instance.

vyatta@R1# set routing routing-instance RED route-distinguisher 2:1

Add the AS number for the address family.

vyatta@R1# set routing routing-instance RED protocols bgp 2 neighbor 12.12.12.1 remote-as 1

Enable the IPv4 unicast address family for a neighbor on the RED routing instance.

vyatta@R1# set routing routing-instance RED protocols bgp 2 neighbor 12.12.12.1 address-family ipv4-unicast

Redistribute the IPv4 unicast static route into BGP.

vyatta@R1# set routing RED protocols bgp 2 address-family ipv4-unicast redistribute static

Configure a router ID for BGP within RED routing instance.

vyatta@R1# set routing routing-instance RED protocols bgp 2 parameters router-id 66.66.66.66

Enable all BGP logs for the RED routing instance.

vyatta@R1# set routing routing-instance RED protocols bgp 2 log all

Commit the configuration.

vyatta@R1# commit

View the candidate configuration.

vyatta@R1# show routing
routing {
  routing-instance RED {
        protocols {
                bgp 2 {
                     log {
                         all
                       }
                neighbor 12.12.12.1 {
                        address-family {
                              ipv4-unicast {
                                redistribute-static
                                }
                              }
                        remote-as 1
                        }
                parameters {
                         router-id 66.66.66.66
                         } 
                }
        }
     route-distinguisher 2:1
    }
}

View the route table for the RED routing instance.


vyatta@R1:~$ show ip bgp routing-instance RED 
BGP table version is 1, local router ID is 12.12.12.12
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal, l -labeled
S Stale
Origin codes: i -IGP, e -EGP, ? -incomplete
Network             Next Hop     Metric LocPrf Weight Path
*> 100.1.1.1/32     12.12.12.1    0      0      1      ?
*> 100.2.2.2/32     12.12.12.1    0      0      1      ?
*> 100.11.11.11/32  12.12.12.1    0      0      1      i
*> 200.1.1.1/32     12.12.12.1    0             32768  ?
*> 200.2.2.2/32     12.12.12.1    0             32768  ?
Total number of prefixes 5

Configuring inter-VRF BGP on routing instances

This example shows how to configure inter-vrf BGP between the RED and BLUE routing instances.

You can leak BGP routes from one VRF to another by ensuring that the import and export route targets match.

This example shows how to configure a route target for inter-VRF BGP route leaking. You can leak routes from one VRF to another on a BGP router that consists of two routing instances namely, RED and BLUE, by using a route target. Ensure that the import and export route targets match with each other to configure inter-VRF route leaking.
Figure 2. Configuring inter-VRF BGP on routing instances
For more information about configuring BGP on routing instances, refer to Configuring BGP on routing instances.
Table 2. Configuring inter-VRF BGP on routing instances

Step

Command

Configure a route distinguisher for the RED routing instance.

vyatta@R1# set routing routing-instance RED route-distinguisher 2:1
 

Configure a route target to export routes from the RED routing instance.

vyatta@R1# set routing routing-instance RED route-target 2:1 type export

Configure a route distinguisher for the BLUE routing instance.

vyatta@R1# set routing routing-instance BLUE route-distinguisher 2:2

Configure a route target to export routes to the BLUE routing instance.

vyatta@R1# set routing routing-instance BLUE route-target 2:1 type import

Add the RED routing instance to a network

vyatta@R1# set routing routing-instance RED protocols bgp 100 address-family ipv4-unicast network '100.11.11.11/32

Redistribute the IPv4 unicast static route into BGP.

vyatta@R1# set routing routing-instance RED protocols bgp 2 address-family ipv4-unicast redistribute static

Set a router for BGP with the RED routing instance.

vyatta@R1# set routing routing-instance RED protocols bgp 2 parameters router-id 66.66.66.66

Enable all BGP logs for the RED routing instance.

vyatta@R1# set routing routing-instance RED protocols bgp 2 log all
Commit the configuration,
vyatta@R1# commit

View the route table for the BLUE routing instance.


vyatta@R1# run show ip bgp routing-instance BLUE 
BGP table version is 1, local router ID is 0.0.0.0
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal, l -labeled
S Stale
Origin codes: i -IGP, e -EGP, ? -incomplete
Network             Next Hop     Metric LocPrf Weight Path
*> 100.1.1.1/32     12.12.12.10    0      0      1      ?
*> 100.2.2.2/32     12.12.12.10    0      0      1      ?
*> 100.11.11.11/32  12.12.12.1     0      0      1      i
*> 200.1.1.1/32     12.12.12.10    0             32768  ?
*> 200.2.2.2/32     12.12.12.10    0             32768  ?
Total number of prefixes 5

Command support for VRF routing instances

Use the guidelines in this section to determine correct syntax when adding VRF routing instances to commands. For more information about VRF, refer to . This guide includes an overview of VRF, VRF configuration examples, information about VRF-specific features, and a list of commands that support VRF routing instances.

Adding a VRF routing instance to a Configuration mode command

For most Configuration mode commands, specify the VRF routing instance at the beginning of a command. Add the appropriate VRF keywords and variable to follow the initial action (set, show, or delete) and before the other keywords and variables in the command.

Configuration mode example: syslog

The following command configures the syslog logging level for the specified syslog host. The command does not include a VRF routing instance, so the command applies to the default routing instance.

vyatta@R1# set system syslog host 10.10.10.1 facility all level debug
vyatta@R1# show system syslog
syslog {
    host 10.10.10.1 {
            facility all {
                    level debug
            }
    }
}

The following example shows the same command with the VRF routing instance (GREEN) added. Notice that routing routing-instance GREEN has been inserted between the basic action (set in the example) and the rest of the command. Most Configuration mode commands follow this convention.

vyatta@R1# set routing routing-instance GREEN system syslog host 10.10.10.1 facility all level debug
vyatta@R1# show routing 
routing {
     routing-instance GREEN {
             system {
                     syslog {
                            host 11.12.13.2:514 {
                                     facility all {
                                             level debug
                                     }
                             }
                     }
             }
     }
}

Configuration mode example: SNMP

Some features, such as SNMP, are not available on a per-routing instance basis but can be bound to a specific routing instance. For these features, the command syntax is an exception to the convention of specifying the routing instance at the beginning of Configuration mode commands.

The following example shows how to configure the SNMPv1 or SNMPv2c community and context for the RED and BLUE routing instances. The first two commands specify the RED routing instance as the context for community A and BLUE routing instance as the context for community B. The subsequent commands complete the configuration.

For more information about configuring SNMP, refer to Ciena Vyatta Network OS Remote Management Configuration Guide.

vyatta@R1# set service snmp community commA context RED
vyatta@R1# set service snmp community commB context BLUE
vyatta@R1# set service snmp view all oid 1
vyatta@R1# set service snmp community commA view all
vyatta@R1# set service snmp community commB view all
vyatta@R1# show service snmp community 
 community commA {
        context RED
        view all
 }
 community commB {
        context BLUE
        view all
 }
[edit]
vyatta@vyatta#

Adding a VRF routing instance to an Operational mode command

The syntax for adding a VRF routing instance to an Operational mode command varies according to the type of command parameters:

  • If the command does not have optional parameters, specify the routing instance at the end of the command.
  • If the command has optional parameters, specify the routing instance after the required parameters and before the optional parameters.

Operational mode examples without optional parameters

The following command displays dynamic DNS information for the default routing instance.

vyatta@vyatta:~$ show dns dynamic status

The following command displays the same information for the specified routing instance (GREEN). The command does not have any optional parameters, so the routing instance is specified at the end of the command.

vyatta@vyatta:~$ show dns dynamic status routing-instance GREEN

Operational mode example with optional parameters

The following command obtains multicast path information for the specified host (10.33.2.5). A routing instance is not specified, so the command applies to the default routing instance.

vyatta@vyatta:~$ mtrace 10.33.2.5 detail

The following command obtains multicast path information for the specified host (10.33.2.5) and routing instance (GREEN). Notice that the routing instance is specified before the optional detail keyword.

vyatta@vyatta:~$ mtrace 10.33.2.5 routing-instance GREEN detail

Operational mode example output: SNMP

The following SNMP show commands display output for routing instances.

vyatta@vyatta:~$ show snmp routing-instance 
Routing Instance SNMP Agent is Listening on for Incoming Requests:
Routing-Instance            RDID
-----------------           ----
RED                         5

vyatta@vyatta:~$ show snmp community-mapping
SNMPv1/v2c Community/Context Mapping:
Community                   Context
---------                   -------
commA                       'RED'
commB                       'BLUE'
deva                        'default'


vyatta@vyatta:~$ show snmp trap-target 
SNMPv1/v2c Trap-targets:
Trap-target                   Port   Routing-Instance Community
-----------                   ----   ---------------- ---------
1.1.1.1                              'RED'           'test'


vyatta@vyatta:~$ show snmp v3 trap-target
SNMPv3 Trap-targets:
Trap-target                   Port   Protocol Auth Priv Type   EngineID              Routing-Instance User
-----------                   ----   -------- ---- ---- ----   --------              ---------------- ----
2.2.2.2                       '162'  'udp'    'md5      'infor                       'BLUE'           'test'