Configuring Interfaces

Configuration Hierarchy

The diagram illustrates the interface configuration hierarchy.

Interface Configuration Hierarchy

Configuration Syntax and Commands

The following sections describe the interface configuration syntax and commands.

MTU Profile Configuration

This section describes how to configure MTU profiles.

Syntax:

set forwarding-options mtu-profile <attribute> <value>

Attribute Description

mtu-profile <mtu-profile-name>

MTU profile name

mtu-size <mtu-size>

MTU size. Range: 64 to 9216 bytes

mtu-type <mtu-type>

Specify the MTU type:

  • physical: Port based MTU profile

  • pppoe: subscriber IFL-based MTU profile for L2TP and PPPoE. This MTU profile is used by PPPoE subscribers to set the default MTU size of 1492. A configured size of 1492 bytes limits the size of the IPv4 or IPv6 header plus payload.

  • ipv4: MTU profile of type IPv4. Only IPv4 traffic on the logical interface will be impacted.

  • ipv6: MTU profile of type IPv6. Only IPv6 traffic on the logical interface will be impacted.

  • ip: MTU profile of type IP. Both IPv4 and IPv6 traffic on the logical interface will be impacted.

action <mtu-action>

Specify the MTU action. The following options are supported:
drop: This indicates that when the MTU check fails, the action "drop" is performed.
redirect-to-cpu: This is an action of redirecting packets to the CPU in a traffic behavior. A redirect-to-cpu action must be configured for fragmentation to occur.

Example 1: Configuration of the MTU Profile for the Physical Port

{
  "ietf-restconf:data": {
    "rtbrick-config:forwarding-options": {
      "mtu-profile": [
        {
          "mtu-profile-name": "portMtu",
          "size": 5000,
          "type": "physical",
          "action": "redirect-to-cpu"
        }
      ]
    }
  }
}

Example 2: MTU Profile Configuration of Type IPv4

{
  "ietf-restconf:data": {
    "rtbrick-config:forwarding-options": {
      "mtu-profile": [
        {
          "mtu-profile-name": "ipv4Mtu",
          "size": 1300,
          "type": "ipv4",
          "action": "redirect-to-cpu"
        }
      ]
    }
  }
}

Example 3: MTU Profile Configuration of Type IPv6

{
  "ietf-restconf:data": {
    "rtbrick-config:forwarding-options": {
      "mtu-profile": [
        {
          "mtu-profile-name": "ipv6Mtu",
          "size": 1400,
          "type": "ipv6",
          "action": "redirect-to-cpu"
        }
      ]
    }
  }
}

Example 4: Configuration of the MTU Profile for PPPoE

{
  "ietf-restconf:data": {
    "rtbrick-config:forwarding-options": {
      "mtu-profile": [
        {
          "mtu-profile-name": "pppoeMtu",
          "size": 1492,
          "type": "pppoe",
          "action": "redirect-to-cpu"
        }
      ]
    }
  }
}

Enabling Hostpath Fragmentation

This section describes how to enable or disable fragmentation by CPU. It is necessary to configure MTU profile action "redirect-to-cpu" so that fragmentation takes place. By default, fragmentation is disabled.

Syntax:

set forwarding-options fragmentation ipv4 state <value>

Attribute Description

disabled | cpu

Enables fragmentation of IPv4 packets.
There are two options:
disabled—Fragmentation is disabled. It is the default setting.
cpu—Fragmentation is performed by CPU.

Example: Configuration of Hostpath Fragmentation

{
  "ietf-restconf:data": {
    "rtbrick-config:forwarding-options": {
      "fragmentation": {
        "ipv4": {
          "state": "cpu"
        }
      }
    }
  }
}

Physical Interface Configuration

This section describes configuration options at the physical interface (IFP) level.

Syntax:

set interface <interface-name> <attribute> <value>

Attribute Description

<interface-name>

Name of the interface. Example: ifp-0/0/1.

admin-status <down|up>

Administrative state of the interface.

auto-negotiation <true|false>

Enable or disable auto-negotiation.

class-of-service <profile-name>

Apply class-of-service profile name.

description

Configure physical interface description.

host-if <container-interface>

Configure a host interface. For example, if the container interface eth1 connects to the host interface vethXYZ123, use this command option to bound hostif-0/0/1 to eth1. Please note the Linux virtual ethernet (veth) interface needs to be created separately. It cannot be created via RBFS configuration.

forward-error-correction <fec-type>

Configure Forward Error Correction (FEC) on the physical interface. FEC allows you to send the required information to correct errors through the link along with the payload data. A benefit of "forward" in FEC is that errors detected at the receiver do not need to be retransmitted. Currently, the supported FEC types are: base-r, rsfec, none.

NOTE: rsfec is the only FEC supported for 100G on the QAX platform.

link-training <true|false>

Enable or disable link training.

master <true|false>

Memif role, master or slave, applicable only to memif interface. One end needs to be configured as master, and the other one as slave.

memif-id <id>

Configure memif ID , applicable only to memif interface. Needs to match on both ends.

mtu-profile <mtu-profile-name>

Attach MTU profile to a physical interface. This is a mandatory attribute.

mru <size>

Maximum receive unit size on the physical interface.

speed <speed>

Configure speed mode for the interface. Port speed refers to the maximum amount of data transmitted. The speed value is specified in Gigabits per second (Gbps).

Currently, RBFS supports 10G and 100G ports, and you can make the following changes:

  • 100G port speed can be changed to 40G

  • 10G port speed can be changed to 1G

Example 1: Physical Interface Configuration

{
    "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/1",
        "description": "Link to leaf1",
        "speed": "10G",
        "mtu-profile": "portMtu",
        "mru": 5000
      }
    ]
}

Example 2: Memory Interface Configuration

A End:

{
    "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/1",
        "description": "Master",
        "memif-id": 11,
        "master": "true",
      }
    ]
}

B End:

{
    "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/1",
        "description": "Slave",
        "memif-id": 11,
        "master": "false",
      }
    ]
  }

Example 3: Host Interface Configuration

{
    "rtbrick-config:interface": [
        "name": "ifp-0/0/1",
        "description": "Represents eth1 as ifp-0/0/1 in RBFS",
        "host-if": "eth1",
    ]
}

Example 4: MRU Configuration for Physical Interface

{
    "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/7",
        "mru": 5000
      }
    ]
  }

Example 5: FEC Configuration for Physical Interface

{
    "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/40",
        "forward-error-correction": "base-r"
      }
    ]
  }

Logical Interface Configuration

This section describes configuration options at the logical interface (IFL) level.

Syntax:

set interface <interface-name> unit <unit-id> <attribute> <value>

Attribute Description

unit <unit-id>

Create a logical interface (also referred to as a sub-interface) under the physical interface.

admin-status <down|up>

Administrative state of the logical interface.

class-of-service <profile-name>

Apply class-of-service profile name.

description <description>

Description of the logical interface.

inner-vlan <inner-vlan-id>

Inner VLAN ID.

instance <instance>

Assign the logical interface to an instance.

ipv4-admin-status <down|up>

Enable or disable IPv4.

ipv4-mtu-profile <ipv4-mtu-profile>

Attach IPv4 MTU profile to an L3 interface.

ipv6-admin-status <down|up>

Enable or disable IPv6.

ipv6-mtu-profile <ipv6-mtu-profile>

Attach IPv6 MTU profile to an L3 interface.

ip-mtu-profile <ip-mtu-profile>

Attach IP MTU profile to an L3 interface.

mpls-admin-status <down|up>

Enable or disable MPLS.

mpls-mtu <mpls-mtu-size>

MPLS maximum transmission unit size.

neighbor <ipv4|ipv6> <ip-address> mac <mac-address>

Configure a static IPv4 or IPv6 neighbor.

unnumbered interface <loopback-interface-name>

Configure an un-numbered interface.

vlan <outer-vlan-id>

Outer VLAN ID.

Example 1: Logical Interface Configuration with IPv4 MTU Profile

 {
   "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/1",
        "unit": [
          {
            "unit-id": 1,
            "description": "VLAN 101",
            "instance": "default",
            "ipv4-mtu-profile": "ipv4Mtu"

          }
        ]
      }
   ]
 }

Example 2: Logical Interface Configuration with IPv6 MTU Profile

 {
   "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/1",
        "unit": [
          {
            "unit-id": 1,
            "description": "VLAN 101",
            "instance": "default",
            "ipv6-mtu-profile": "ipv6Mtu"

          }
        ]
      }
   ]
}

Example 3: Logical Interface Configuration with IP MTU Profile

 {
   "rtbrick-config:interface": [
      {
        "name": "ifp-0/0/1",
        "unit": [
          {
            "unit-id": 1,
            "description": "VLAN 101",
            "instance": "default",
            "ip-mtu-profile": "ipMtu"

          }
        ]
      }
   ]
}

Interface Address Configuration

This section describes how to configure interface IP addresses.

Syntax:

set interface <interface-name> unit <unit-id> address <afi> <attribute> <value>

Attribute Description

<afi>

Address family identifier (AFI). Supported values: ipv4 and ipv6

<prefix4|prefix6>

Assign IPv4 or IPv6 address to the interface unit.

community <community-value>

Configure list of communities associated with the address.

extended-community <community-value>

Configure list of extended communities associated with the address.

label <label-value>

Configure label associated with the address.
Supported MPLS label values are 0 - 1048575. The reserved MPLS label range is 0 - 15. In RBFS, BGP uses the label range 20000 - 100000. It is recommended to assign label values outside of these reserved ranges to avoid conflicts.

secondary <true|false>

Configure a secondary IPv4 address.

Example: Interface Address Configuration

{
    "rtbrick-config:interface": [
      {
        "name": "lo-0/0/1",
        "unit": [
          {
            "unit-id": 1,
            "address": {
              "ipv4": [
                {
                  "prefix4": "198.51.100.103/24",
                  "label": 12346
                }
              ]
            }
          }
        ]
      }
    ]
  }

Global Interface Configuration

This section describes a configuration option applied globally to all interfaces.

Syntax:

set global interface all <attribute> <value>

Attribute Description

admin-status <up|down>

Configure state of the interface.

  • The interface level enable/disable command has higher precedence than the global interface enable/disable command.

  • You can disable all unused physical interfaces.

  • Before executing the global interface disable all command ensure that all physical interfaces are in the link Up state.

Example: Enabling or Disabling all Interfaces

{
  "ietf-restconf:data": {
    "rtbrick-config:global": {
      "interface": {
        "all": {
          "admin-status": "down"
        }
      }
    }
  }
}