Inter VRF routing can be achieved by several methods. Following are 6 ways you can do it. There can be some more methods but most commonly you will see one of the following methods in your network.
1. Using static routes
2. Using route maps
3. Import - Export Policies plus Multi-Protocol BGP
4. Connecting two interfaces which belongs to two VRFs
5. Pointing traffic to a Firewall
6. Inter VRF Tunneling
Go here to know how to do inter VRF routing using static routes.
Go here to know how to do inter VRF routing using route-maps.
Go here to know how to do inter VRF tunneling.
In this post I am doing it using Import Export policies and Multi-Protocol BGP.
Route Distinguishers & Route Targets
Route Distinghuisher is used to identify the VRF the route came in. It is basically used to identify the VRF which the routes are generated so that it can be used for further policies to control traffic.
Route Targets on the other hand are used to exchange the routes between VRFs. You can export routes in a VRF using route-target export command and import routes in a VRF using route-target import command.
Let's see a configuration example.
R2(config)#ip vrf ONE
R2(config-vrf)#rd 65:10
R2(config)#ip vrf TWO
R2(config-vrf)#rd 65:20
R2(config)#ip vrf THREE
R2(config-vrf)#rd 65:30
For our task, RD is not useful but must be configured in order to configure address families of Multi-Protocol BGP. Following are the current routing tables with some connected and static routes.
Configuring Multi-Protocol BGP..
Address family per VRF is created which will create BGP tables per VRF / address family automatically. Within the address families, connected and static routes are redistributed.
By the configuration up to now, all the routes in separate VRFs are redistributed in to the BGP tables of corresponding VRFs. What we do using route targets are exchanging routes between BGP tables.
Configuring route targets..
Routes in VRF ONE is exported as 1:1 and imported to VRFs TWO and THREE.
Routes in VRFs TWO and THREE are exported as 2:2 and 3:3 and imported to VRF ONE..
Now let's see the routing tables..
You can see the routes have been leaked. You can use the redistribution route filtering methods of BGP to filter unwanted traffic.
1. Using static routes
2. Using route maps
3. Import - Export Policies plus Multi-Protocol BGP
4. Connecting two interfaces which belongs to two VRFs
5. Pointing traffic to a Firewall
6. Inter VRF Tunneling
Go here to know how to do inter VRF routing using static routes.
Go here to know how to do inter VRF routing using route-maps.
Go here to know how to do inter VRF tunneling.
In this post I am doing it using Import Export policies and Multi-Protocol BGP.
Route Distinguishers & Route Targets
Route Distinghuisher is used to identify the VRF the route came in. It is basically used to identify the VRF which the routes are generated so that it can be used for further policies to control traffic.
Route Targets on the other hand are used to exchange the routes between VRFs. You can export routes in a VRF using route-target export command and import routes in a VRF using route-target import command.
Let's see a configuration example.
R2(config)#ip vrf ONE
R2(config-vrf)#rd 65:10
R2(config)#ip vrf TWO
R2(config-vrf)#rd 65:20
R2(config)#ip vrf THREE
R2(config-vrf)#rd 65:30
For our task, RD is not useful but must be configured in order to configure address families of Multi-Protocol BGP. Following are the current routing tables with some connected and static routes.
Configuring Multi-Protocol BGP..
Address family per VRF is created which will create BGP tables per VRF / address family automatically. Within the address families, connected and static routes are redistributed.
By the configuration up to now, all the routes in separate VRFs are redistributed in to the BGP tables of corresponding VRFs. What we do using route targets are exchanging routes between BGP tables.
Configuring route targets..
Routes in VRF ONE is exported as 1:1 and imported to VRFs TWO and THREE.
Routes in VRFs TWO and THREE are exported as 2:2 and 3:3 and imported to VRF ONE..
Now let's see the routing tables..
You can see the routes have been leaked. You can use the redistribution route filtering methods of BGP to filter unwanted traffic.