If you are not in the context of the virtual router that has the VRF, you access the
VRF as follows:
host1(config)#virtual-router boston:vrfa
host1:boston:vrfa(config)#
The following commands illustrate one way to configure OSPF; you can configure
RIP and IS-IS similarly:
host1(config)#ip vrf vrfa
host1(config-vrf)#rd 100:5
host1(config-vrf)#route-target both 100:5
host1(config-vrf)#exit
host1(config)#virtual-router :vrfa
host1:default:vrfa(config)#router ospf 100
host1:default:vrfa(config-router)#redistribute bgp
At this point you proceed with the IGP configuration for the VRF.
Configuring the IGP Outside the VRF Context
The RIP and OSPF protocols also enable you to specify a VRF and configure the
protocol without actually entering the VRF context.
For example, for OSPF you might issue the following command and then complete
OSPF configuration tasks for VRF A:
host1(config)#router ospf 100 vrf vrfa
For RIP, you create the RIP process, specify the address family for the VRF, and
specify redistribution of BGP routes for VRF A:
host1(config)#router rip 100
host1(config-router)#address-family ipv4 vrf vrfa
host1(config-router-af)#redistribute bgp
At this point you proceed with RIP configuration for the VRF. For information about
configuring IS-IS, OSPF, or RIP as the IGP, see the JUNOSe IP, IPv6, and IGP
Configuration Guide. For information about configuring BGP as the IGP, see
“Configuring BGP Routing” on page 3.
virtual-router
■ Use to access a VRF to configure it with an IGP to learn routes from a CE router.
■ To access the VRF from its VR context (in this example, the default VR):
host1(config)#virtual-router :vrfsouthie
host1:default:southie(config)#
■ To access the VRF from the context of a different VR:
host1(config)#virtual-router boston:southie
host1:boston:southie(config)#
Configuring BGP VPN Services ■ 437
Chapter 5: Configuring BGP-MPLS Applications