VRF commands
This section contains VRF commands.
<operational_command> routing-instance <instance-name>
Use this command syntax when adding a VRF routing instance to an Operational mode command.
- operational_command
- A vRouter operational command, such as the show command, that comprises the command name and one or more keywords or variables, or both. Refer to the description of a specific command for the command syntax, which includes details about keywords and variables.
- instance-name
- A VRF routing instance in the form of an alphanumeric string. The leading character cannot be _ or -. You cannot use default as an instance name; it is reserved for the default routing instance.
Operational mode
When adding a VRF routing instance to an Operational mode, note the following placement of the instance:
- 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.
The following example shows how to display the update status for all hosts that are configured for dynamic DNS updates for the default routing instance.
vyatta@vyatta:~$ show dns dynamic status
The following example shows how to display the same information for the RED routing instance.
vyatta@vyatta:~$ show dns dynamic status routing-instance RED
routing routing-instance instance-name
Many vRouter commands can be configured for individual VRF routing instances. Use the following structure when adding routing instances to vRouter commands.
- instance-name
- A VRF routing instance. Alphanumeric string. The leading character cannot be _ or -. You cannot use default as an instance name; it is reserved for the default routing instance.
- command
- A vRouter command, which comprises the command name and one or more keywords or variables, or both. Refer to the description of a specific command for the command syntax, which includes details about keywords and variables.
Configuration mode
routing {
routing-instance instance-name {
command
}
}
When specifying a VRF routing instance for most Configuration mode commands, add the appropriate VRF keywords and variable to follow the initial action (set, delete, or show) and before the other keywords and variables in the command.
The following command syntax does not specify a VRF routing instance, so the command applies to the default routing instance.
set service dns dynamic interface dp0p161p1
The following example shows the syntax for the same command with the RED routing instance added. Notice that routing routing-instance instance-name has been inserted between the basic action (set in the example) and the rest of the command. Most Configuration mode commands that support VRF routing instances follow this convention.
set routing routing-instance RED service dns dynamic interface dp0p161p1
routing routing-instance instance-name interface interface-name
Binds an interface to a routing instance.
- instance-name
- A VRF routing instance. Alphanumeric string. The leading character cannot be _ or -. You cannot use default as an instance name; it is reserved for the default routing instance.
- interface-name
- The name of an interface. For information about the types of interfaces and the formats of names, refer to Ciena Vyatta Network OS LAN Interfaces Configuration Guide.
Configuration mode
routing {
routing-instance instance-name {
interface interface-name
}
}
This command binds a routing instance to an interface. You can bind multiple interfaces to a single routing instance by issuing this command separately for each interface. You cannot bind a single interface to multiple routing instances.
The binding configuration is independent of the type of interface, so the interface type is not specified.
Source routing example
A source routing example and the related commands.
This example shows how to configure a simple site using PBR on the vRouter (R1) to route traffic from two different internal subnets to two Internet links.
In this example:
- All Internet-bound traffic from subnet 192.168.10.0/24 is routed out interface dp0p0p1.
- All Internet-bound traffic from subnet 192.168.20.0/24 is routed out interface dp0p0p2.
To configure this scenario, perform the following steps in configuration mode.
Step | Command |
---|---|
Create the SRC-ROUTE policy. |
|
Create rule 10 and specify the destination address to match. In this case, any destination address will match. |
|
Specify the address family for rule 10. |
|
Specify the source address to match. In this case, any address on subnet 192.168.10.0/24 will match. |
|
Specify the accept action for rule 10. |
|
Specify that all packets that match should use alternate routing table 1. |
|
Specify the destination address to match any address. |
|
Specify the address family for rule 20. |
|
Specify the accept action for rule 20. |
|
Specify the destination address to match any address. |
|
Specify the source address to match. In this case, any address on subnet 192.168.20.0/24 will match. |
|
Create the alternative routing table 2 and route default traffic to the second Internet connection. |
|
Commit the change. |
|
Show the alternate routing table configuration. |
|
Assign an address to dp0p0p1. |
|
Assign an address to dp0p0p2. |
|
Assign an address to dp0p0p3. |
|
Assign the policy to the interface connected to subnet 192.168.10.0/24. |
|
Assign an address to dp0p0p4. |
|
Assign the policy to the interface connected to subnet 192.168.20.0/24. |
|
Commit the change. |
|
Show the dataplane interface configuration. |
|