Route Leaking Configuration
Configuring Route Leaking from one instance to another
To configure route leaking from one instance to another, configure the "import-rib" for the routing instance (AFI/SAFI).
Syntax:
| Attribute | Value |
|---|---|
|
Name of the routing instance to which routes will be imported to. |
|
Address family identifier (AFI). Supported values: ipv4, ipv6. |
|
Subsequent address family identifier (SAFI). Supported values: unicast. |
|
Specifies the routing instance from which the routes will be imported. |
In the following example, IPv4 and IPv6 unicast routes will be copied from the “vrf-blue” to “vrf-red” instance RIB.
set instance vrf-red address-family ipv4 unicast import-rib vrf-blue set instance vrf-red address-family ipv6 unicast import-rib vrf-blue
The following is an example of JSON output showing the instance configuration.
supervisor@rtbrick>LEAF01: cfg> show config instance vrf-red
{
"rtbrick-config:instance": [
{
"name": "vrf-red",
"address-family": [
{
"afi": "ipv4",
"safi": "unicast",
"import-rib": [
{
"instance": "vrf-blue"
}
]
},
{
"afi": "ipv6",
"safi": "unicast",
"import-rib": [
{
"instance": "vrf-blue"
}
]
}
]
}
]
}
Configuring Route Leaking with Policy
You can attach a policy to import selective routes as per the required criteria.
Syntax:
| Attribute | Value |
|---|---|
|
Name of the routing instance to which routes will be imported to. |
|
Address family identifier (AFI). Supported values: ipv4, ipv6. |
|
Subsequent address family identifier (SAFI). Supported values: unicast. |
|
Name of the routing instance to which routes will be imported. |
|
Name of the routing instance to which routes will be imported based on the specified policy. |
In the following example, the policy match_ipv4_prefix is attached to the ‘vrf-blue’ instance.
set instance vrf-red address-family ipv4 unicast import-rib vrf-blue policy match_ipv4_prefix
Example: The following is an example of JSON output of the above configuration.
{
"rtbrick-config:instance": [
{
"name": "vrf-red",
"address-family": [
{
"afi": "ipv4",
"safi": "unicast",
"import-rib": [
{
"instance": "vrf-blue",
"policy": "match_ipv4_prefix"
}
]
}
]
}
]
}