To assign an IP address to an interface in the VRF or virtual-router routing instance, configure the local address for that routing instance. A local address is any IP address derived from an interface that is assigned to the routing instance.
To assign an interface to a routing instance, include the interface statement at the [edit routing-instances routing-instance-name] hierarchy level:
- [edit routing-instances routing-instance-name]
- interface interface-name;
To configure an IP address for a loopback interface, include the address statement at the [edit interfaces interface-name unit logical-unit-number family inet] hierarchy level:
- [edit interfaces interface-name unit logical-unit-number family inet]
- address address;
![]() |
Note: If you are assigning Internet Protocol Security (IPSec) or generic routing encapsulation (GRE) tunnel interfaces without IP addresses in the routing instance, include a loopback interface to the routing instance. To do this, include the lo0.n option at the [edit routing-instances routing-instance-name interface] hierarchy level. n cannot be 0, because lo0.0 is reserved for the main router (and not appropriate for use with routing instances). Also, an IP address must be assigned to this loopback interface in order to work. To set an IP address for a loopback interface, include the address statement at the [edit interfaces lo0 unit logical-unit-number family inet] hierarchy level. |
For more information about assigning an IP address to an interface in the VRF, see the JUNOS VPNs Configuration Guide.