Download PDF
Home

1. Introduction

Static routing allows a network administrator to configure routes manually. Using the RtBrick CLI, you can configure static IPv4, IPv6, MPLS, and multicast routes.

1.1. Supported Platforms

Not all features are necessarily supported on each hardware platform. Refer to the Platform Guide for the features and the sub-features that are or are not supported by each platform.

2. Configuring Static Routes

2.1. Configuration Hierarchy

The diagram illustrates the static routes configuration hierarchy.

Static Route Configuration Hierarchy

2.2. Configuration Syntax and Commands

The following sections describe the static route configuration syntax and commands. In RBFS, next hops of static routes are configured separately, and referenced by the actual routes.

2.2.1. Static Route Configuration

This section describes how to configure the static route itself.

Syntax

set instance <instance-name> static route <attribute> <value>

Attribute Description

<instance-name>

Name of the routing instance

<afi> <prefix | label> (true | false)

Supported AFIs are ipv4, ipv6, and mpls. In case of IPv4 or IPv6, configure the prefix. In case of MPLS, configure the incoming label and BOS flag.

<safi>

Supported SAFIs are unicast, labeled-unicast, and multicast.

<nexthop-profile>

Name of the nexthop profile

Example: Static Route Configuration

{
    "rtbrick-config:route": {
      "ipv4": [
        {
          "prefix4": "10.1.1.1/32",
          "safi": "unicast",
          "nexthop-profile": "nexthop1",
          "preference": 20

        }
      ],
      "ipv6": [
        {
          "prefix6": "2001:db8:abcd:0012::0/80",
          "safi": "unicast",
          "nexthop-profile": "nexthop2"
        }
      ],
      "mpls": [
        {
          "in-label": 8888,
          "in-bos": "true",
          "safi": "unicast",
          "nexthop-profile": "nexthop1"
        }
      ]
    }
  }

2.2.2. Nexthop Profile Configuration

You can group various nexthop parameters with a nexthop profile name, and associate this nexthop profile with multiple routes.

Syntax

set instance <instance-name> static nexthop-profile <name> <attribute> <value>

Attribute Description

<instance-name>

Name of the routing instance

nexthop-profile <name>

Nexthop profile name

exit-interface <exit-interface>

Exit interface name

lookup-afi (ipv4 | ipv6 | mpls)

Lookup routing table address family where the nexthop will be resolved.

lookup-instance <lookup-instance>

Lookup routing table instance where the nexthop will be resolved.

lookup-safi (labeled-unicast | multicast | unicast)

Lookup routing table subsequent address family where the nexthop will be resolved.

nexthop <address>

IPv4/IPv6 nexthop address

out-bos (true | false)

Label BOS

out-label <out-label>

Label to be pushed

Example: Nexthop Profile Configuration

{
    "rtbrick-config:static": {
      "nexthop-profile": [
        {
          "name": "nexthop1",
          "nexthop": "2.2.2.3",
          "out-label": 4444
        },
        {
          "name": "nexthop3",
          "exit-interface": "ifp-0/0/4/4"
        }
      ]
    }
  }
Note
  • If you do not provide lookup-instance, lookup-afi and lookup-safi values, default values will be used to install the route.

  • The exit interface attribute is mandatory for link-local nexthop.

2.2.3. Conditional Profile Configuration

By using the conditional static route feature, you can make specific routes conditional. These conditional routes are installed only if the specified condition is satisfied.

You can group various conditional parameters such as match-instance, match-afi, match-safi, compare-operation, compare-type, and compare-value with a conditional profile name, and associate this conditional profile with multiple routes.

Syntax:

set instance <instance-name> static conditional-profile <name> <attribute> <value>

Attribute Description

conditional <name>

Conditional profile name

compare-operation greater-then

Conditional routing compare operation

compare-type route-count

Conditional routing compare type

compare-value <compare-value>

Conditional routing condition value

match-instance <instance-name>

Routing instance where the condition will be checked.

match-afi (ipv4 |ipv6 |mpls)

Routing tables address family (AFI) for which the condition will be checked.

match-safi (labeled-unicast |multicast |unicast)

Routing table subsequent address family (SAFI) for which the condition will be checked.

Example: Conditional Profile Configuration

{
    "rtbrick-config:conditional-profile": [
      {
        "name": "c2",
        "match-instance": "default",
        "match-afi": "ipv4",
        "match-safi": "unicast",
        "compare-type": "route-count",
        "compare-operation": "greater-than",
        "compare-value": 20
      }
    ]
  }

2.2.4. Static Multicast Route Configuration

Syntax:

set instance <instance-name> static route multicast4 <attribute> <value

Attribute Description

<instance-name>

Name of the routing instance

<source>

IPv4 multicast source address

<group>

IPv4 multicast group address

Example: Static Multicast Route Configuration

{
    "rtbrick-config:static": {
      "route": {
        "multicast4": [
          {
            "source": "10.1.1.1/32",
            "group": "232.1.1.1/32",
            "nexthop-profile": "nexthop3"
          }
        ]
      }
    }
}

3. Operational Commands

3.1. Show Commands

3.1.1. Static Routes Created by staticd

These commands show static routes as created by the static route daemon (staticd).

Syntax:

show static route <options>

Attribute Description

<afi>

Supported AFIs are ipv4, ipv6, and mpls.

<safi>

Supported SAFIs are unicast, labeled-unicast, and multicast.

instance <name>

Static routes for an instance

Example: List static routes for all instances

supervisor@dev1: cfg> show static route
Instance: default, AFI: ipv4, SAFI: unicast
Prefix/Label              Pref    Next Hop                  Interface
10.10.10.0/24             2       4.4.4.5                   -
Instance: default, AFI: ipv6, SAFI: unicast
Prefix/Label              Pref    Next Hop                  Interface
20::20/128                2       4::5                      -
supervisor@dev1: cfg>

3.1.2. Static Routes in the Routing Table

These commands show the static routes included in the final routing table.

Syntax:

show route <options> source static <options>

Attribute Description

<afi>

Supported AFIs are ipv4, ipv6, and mpls.

<safi>

Supported SAFIs are unicast, labeled-unicast, and multicast.

detail

Detailed route information

instance <name>

Routing table information for a specific instance

label <value>

Destination label

mpls

Address family

prefix <value>

Destination prefix

source

Source of the routing information

Example 1: List static routes information

supervisor@dev1: cfg> show route ipv4 source static
Instance: default, AFI: ipv4, SAFI: unicast
Prefix/Label                             Source            Pref    Next Hop                                 Interface
10.10.10.0/24                            static            2       4.4.4.5                                  ifl-0/0/1/4
supervisor@dev1: cfg>

Example 2: List detailed static routes information

supervisor@dev1: cfg> show route ipv4 source static detail
Instance: default, AFI: ipv4, SAFI: unicast
10.10.10.0/24
  Source: static, Preference: 2
    Next Hop: 4.4.4.5
      Covering prefix: 4.4.4.5/32
      Next Hop type: direct, Next Hop action: None
      Resolved in: default-ipv4-unicast
      Egress interface: ifl-0/0/1/4, NextHop MAC: 7a:00:81:64:04:04
supervisor@dev1: cfg>

Example 3: List MPLS route information

supervisor@rtbrick: cfg> show route mpls
Instance: default, AFI: mpls, SAFI: unicast
Prefix/Label    Source            Pref    Next Hop        Interface
20010           bgp               170     192:1::1        ifl-0/0/17/1001
20011           bgp               170     192:1::1        ifl-0/0/17/1001
20012           bgp               170     192:1::1        ifl-0/0/17/1001
20013           bgp               170     192:1::1        ifl-0/0/17/1001
20014           bgp               170     192:1::1        ifl-0/0/17/1001
20015           bgp               170     192:1::1        ifl-0/0/17/1001
20016           bgp               170     192:1::1        ifl-0/0/17/1001
20017           bgp               170     192:1::1        ifl-0/0/17/1001
20018           bgp               170     192:1::1        ifl-0/0/17/1001

©Copyright 2022 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrickā€™s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.