home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Show Page Sections

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 routing-instance instance-name
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.

set routing routing-instanceinstance-name [ command ]
delete routing routing-instanceinstance-name [ command ]
show routing routing-instanceinstance-name [ command ]
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.

set routing routing-instanceinstance-name interface interface-name
delete routing routing-instanceinstance-name interface interface-name
show routing routing-instanceinstance-name interface interface-name
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.

Table 1. Source routing using PBR

Step

Command

Create the SRC-ROUTE policy.

vyatta@R1# set policy route pbr SRC-ROUTE

Create rule 10 and specify the destination address to match. In this case, any destination address will match.

vyatta@R1# set policy route pbr SRC-ROUTE rule 10 destination address 0.0.0.0/0

Specify the address family for rule 10.

vyatta@R1# set policy route pbr SRC-ROUTE rule 10 address-family ipv4

Specify the source address to match. In this case, any address on subnet 192.168.10.0/24 will match.

vyatta@R1# set policy route pbr SRC-ROUTE rule 10 source address 192.168.10.0/24

Specify the accept action for rule 10.

vyatta@R1# set policy route pbr SRC-ROUTE rule 10 action accept

Specify that all packets that match should use alternate routing table 1.

vyatta@R1# set policy route pbr SRC-ROUTE rule 10 table 1

Specify the destination address to match any address.

vyatta@R1# set policy route pbr SRC-ROUTE rule 10 destination address 0.0.0.0/0

Specify the address family for rule 20.

vyatta@R1# set policy route pbr SRC-ROUTE rule 20 address-family ipv4

Specify the accept action for rule 20.

vyatta@R1# set policy route pbr SRC-ROUTE rule 20 action accept

Specify the destination address to match any address.

vyatta@R1# set policy route pbr SRC-ROUTE rule 20 destination address 0.0.0.0/0

Specify the source address to match. In this case, any address on subnet 192.168.20.0/24 will match.

vyatta@R1# set policy route pbr SRC-ROUTE rule 20 source address 192.168.20.0/24

Create the alternative routing table 2 and route default traffic to the second Internet connection.

vyatta@R1# set policy route pbr SRC-ROUTE rule 20 table 2

Commit the change.

vyatta@R1# commit

Show the alternate routing table configuration.

vyatta@R1# show policy
 policy {
        route {
                pbr SRC-ROUTE {
                        rule 10 {
                                action accept
                                address-family ipv4
                                destination {
                                        address 0.0.0.0/0
                                }
                                source {
                                        address 192.168.10.0/24
                                }
                                table 1
                        }
                        rule 20 {
                                action accept
                                address-family ipv4
                                destination {
                                        address 0.0.0.0/0
                                }
                                source {
                                        address 192.168.20.0/24
                                }
                                table 2
                        }
                }
        }
 }

Assign an address to dp0p0p1.

vyatta@R1# set interfaces dataplane dp0p0p1 address 12.34.56.33/24

Assign an address to dp0p0p2.

vyatta@R1# set interfaces dataplane dp0p0p2 address 98.76.54.44/24

Assign an address to dp0p0p3.

vyatta@R1# set interfaces dataplane dp0p0p3 address 192.168.10.254/24

Assign the policy to the interface connected to subnet 192.168.10.0/24.

vyatta@R1# set interfaces dataplane dp0p0p3 policy route pbr SRC-ROUTE

Assign an address to dp0p0p4.

vyatta@R1# set interfaces dataplane dp0p0p4 address 192.168.20.254/24

Assign the policy to the interface connected to subnet 192.168.20.0/24.

vyatta@R1# set interfaces dataplane dp0p0p4 policy route pbr SRC-ROUTE

Commit the change.

vyatta@R1# commit

Show the dataplane interface configuration.

vyatta@R1# show interfaces dataplane 
 dataplane dp0p0p1 {
     address 12.34.56.33/24
 }
 dataplane dp0p0p2 {
     address 98.76.54.44/24
 }
 dataplane dp0p0p3 {
     address 192.168.10.254/24
     policy {
         route SRC-ROUTE
     }
 }
 dataplane dp0p0p4 {
     address 192.168.20.254/24
     policy {
         route SRC-ROUTE
     }
 }