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.

Configuring static routes on a routing instance

Examples of configuring static routes on a routing instance and the related commands.

In this example, the R1 vRouter is connected to the R2 vRouter through the dp0s9 interface that is bound to the RED routing instance.

Figure 1. Configuring static routes on a routing instance

The following steps create static routes for the RED routing instance.

Table 1. Configuring static routes on a routing instance
Step Command

Define the dp0s9 interface and bind it to the RED routing instance.

vyatta@R1# set interfaces dataplane dp0s9
vyatta@R1# set routing routing-instance RED interface dp0s9

Create IPv4 and IPv6 static routes under the RED routing instance.

vyatta@R1# set routing routing-instance RED protocols static route 100.1.1.0/24 next-hop 10.1.1.9
vyatta@R1# set routing routing-instance RED protocols static route6 2001::/64 next-hop 3001::2

Create IPv4 and IPv6 interface static routes under the RED routing instance.

vyatta@R1# set routing routing-instance RED protocols static interface-route 100.1.2.0/24 next-hop-interface dp0s9
vyatta@R1# set routing routing-instance RED protocols static interface-route6 2002::/64 next-hop-interface dp0s9

Create IPv4 and IPv6 blackhole static route configurations under routing instance RED.

vyatta@R1# set routing routing-instance RED protocols static route 100.1.3.0/24 blackhole
vyatta@R1# set routing routing-instance RED protocols static route6 2003::/64 blackhole

Create unreachable IPv4 and IPv6 static routes under routing instance RED.

vyatta@R1# set routing routing-instance RED protocols static route 100.1.4.0/24 unreachable
vyatta@R1# set routing routing-instance RED protocols static route6 2004::/64 unreachable

View the configuration.

vyatta@R1# show routing
routing {
       routing-instance RED {
               interface dp0s9
               protocols {
                       static {
                               route 100.1.1.0/24 {
                                       next-hop 10.1.1.9
                               }
                               route6 2001::/64 {
                                       next-hop 3001::2
                               }
                               interface-route 100.1.2.0/24 {
                                       next-hop-interface dp0s9
                               }
                               interface-route6 2002::/64 {
                                       next-hop-interface dp0s9
                               }
                               route 10.1.3.0/24 {
                                       blackhole
                               }
                               route 100.1.4.0/24 {
                                       unreachable
                               }
                               route6 2003::/64 {
                                       blackhole
                               }
                               route6 2004::/64 {                                 
                                       unreachable
                               }
                       }
               }
       }
}

The following example shows how to add route leaking between the RED and BLUE routing instances.

Each routing instance operates independently and without knowledge of other routing instances, unless the routes are imported or exported to one another by using inter-VRF route leaking. Inter-VRF route leaking allows leaking of route prefixes from one routing instance to another on the same vRouter. Both dynamic and static route leaking are supported; this example shows how to configure static route leaking.

In the following figure, the R1 vRouter has the dp0s9 interface bound to the RED routing instance and the 10.1.1.0/24 IPv4 and 2001::/64 IPv6 connected networks configured on RED. The example shows how to install a route in RED with the next hop pointing to the BLUE routing instance.
Figure 2. Route leaking between routing instances
Table 2. Route leaking between routing instances
Step Command

Configure route leaking for IPv4 and IPv6 routes by installing a route in RED with the next hop pointing to BLUE.

vyatta@R1# set routing routing-instance RED protocols static route 20.1.1.0/24 next-hop –routing-instance BLUE  next-hop 10.1.1.2
vyatta@R1# set routing routing-instance RED protocols static route6 2009::/64 next-hop-routing-instance BLUE next-hop 2001::2

View the configuration.

vyatta@R1# show routing
routing {
       routing-instance RED {
               interface dp0s9
               protocols {
                       static {
                               route 20.1.1.0/24 {
                                       next-hop-routing-instance BLUE {
                                               next-hop 10.1.1.2
                                       }
                               }
                               route6 2009::/64 {
                                       next-hop-routing-instance-v6 BLUE {
                                               next-hop 2001::2
                                       }
                               }
                       }
               }
        }
}