- Connect to the CLI
- Entering CLI commands
- Command Line Interface Commands
- exit
- set interface interface failure failure
- set level level
- set node node
- show forwarding
- show forwarding prefix prefix
- show fsm fsm
- show interface interface
- show interface interface fsm history
- show interface interface fsm verbose-history
- show interface interface queues
- show interfaces
- show kernel addresses
- show kernel links
- show kernel route table table prefix prefix
- show kernel routes
- show kernel routes table table
- show node
- show node fsm history
- show node fsm verbose-history
- show nodes
- show nodes level
- show route prefix prefix
- show route prefix prefix owner owner
- show routes
- show spf
- show spf direction direction
- show spf direction direction destination destination
- show tie-db
- stop
Go to the top of the directory where the rift-python repository was cloned (in this example we assume it was cloned into your home directory):
$ cd ${HOME}/rift-python
Make sure your virtual environment (that was created during the installation process) is activated:
$ source env/bin/activate (env) $
Start the rift package:
(env) $ python rift Command Line Interface (CLI) available on port 61375
Optionally you may pass a topology YAML file as a command-line argument:
(env) $ python rift topology/two_by_two_by_two.yaml Command Line Interface (CLI) available on port 61377
When you start the Python RIFT protocol engine, it reports a port number that you can use to connect one or more CLI sessions.
You can connect to the Command Line Interface (CLI) using a Telnet client. Assuming you are connecting from the same device as where the RIFT engine is running, the hostname is localhost.
$ telnet localhost 61377 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. agg_101>
You should get a prompt containing the name of the current RIFT node. In this example the name of the current RIFT node is "agg_101".
You can enter CLI commands at the CLI prompt. For example, try entering the help command:
agg_101> help exit set interface <interface> failure <failure> set level <level> set node <node> show forwarding show forwarding prefix <prefix> show fsm lie show fsm ztp show interface <interface> show interface <interface> fsm history show interface <interface> fsm verbose-history show interface <interface> queues show interfaces show kernel addresses show kernel links show kernel route table <table> prefix <prefix> show kernel routes show kernel routes table <table> show node show node fsm history show node fsm verbose-history show nodes show nodes level show route prefix <prefix> show route prefix <prefix> owner <owner> show routes show spf show spf direction <direction> show spf direction <direction> destination <destination> show tie-db stop
If you are connected to the CLI using Telnet, you can use the following keys for editing:
-
Cursor-Left: Move cursor on character left.
-
Cursor-Right: Move cursor on character right
-
Cursor-Up or Control-P: Go to the previous command in command history.
-
Cursor-Down or Control-N: Go to the next command in command history.
-
Control-A: Move cursor to the start of the line.
-
Control-E: Move cursor to the end of the line.
The CLI does not yet support any of the following features:
-
Command completion: you must manually enter the complete command; you cannot enter partial commands or use tab to complete commands.
-
Interactive context-sensitive help: you can enter "help" or "?" and press enter at the end of a partial command line to get context-sensitive help. But after reading the help text, you must manually re-enter the command line.
The "exit command closes the CLI session.
Example:
(env) $ python rift topology/two_by_two_by_two.yaml Command Line Interface (CLI) available on port 50102
$ telnet localhost 50102 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. agg_101> exit agg_101> Connection closed by foreign host. $
Normally, the RIFT engine continues to run when a CLI session is closed. However, if the RIFT engine was started interactively using the --interactive command line option, then exiting the CLI also causes the RIFT engine to stop:
Example:
(env) $ python rift --interactive topology/two_by_two_by_two.yaml agg_101> exit (env) $
The "set interface interface failure failure" enables or disables a simulated failure of an interface.
The failure parameter can be one of the following:
| failure | Meaning |
|---|---|
| ok | The interface is OK. There is no failure. |
| failed | There is a bi-directional failure on the interface. Both sent and received packets are dropped. |
| tx-failed | There is a uni-directional failure on the interface. Sent (TX) packets are dropped. Received (RX) packets are delivered. |
| rx-failed | There is a uni-directional failure on the interface. Sent (TX) packets are delivered. Received (RX) packets are dropped. |
Example:
node1> set interface if1 failure failed
The "set level level" command changes the level of the currently active RIFT node.
The valid values for the level parameter are undefined, leaf, leaf-to-leaf, superspine, or an integer non-negative number.
These level values are mapped to the parameters in the protocol specification as follows:
| level value | LEAF_ONLY | LEAF_2_LEAF | TOP_OF_FABRIC_FLAG | CONFIGURED_LEVEL |
|---|---|---|---|---|
| undefined | false | false | false | UNDEFINED_LEVEL |
| leaf | true | false | false | UNDEFINED_LEVEL (see note 1) |
| leaf-to-leaf | true | true | false | UNDEFINED_LEVEL (see note 1) |
| superspine | false | false | true | UNDEFINED_LEVEL (see note 2) |
| integer non-negative number | true if level = 0, false otherwise | false | false | level |
Note 1: Even if the CONFIGURED_LEVEL is UNDEFINED_LEVEL, nodes with the LEAF_ONLY flag set will advertise level leaf_level (= 0) in the sent LIE packets.
Note 2: Event if CONFIGURED_LEVEL is UNDEFINED_LEVEL, nodes with the TOP_OF_FABRIC_FLAG set will advertise level top_of_fabric_level (= 24) in the sent LIE packets.
Example:
core_1> set level undefined
The "set node node-name" command changes the currently active RIFT node to the node with the specified RIFT node name:
Note: you can get a list of RIFT nodes present in the current RIFT protocol engine using the show nodes command.
Example:
agg_101> set node core_1 core_1>
The "show forwarding" command shows all routes in the Forwarding Information Base (FIB) of the current node. It shows both the IPv4 FIB and the IPv6 FIB.
Example:
agg_101> show forwarding IPv4 Routes: +---------------+-----------+-----------------------+ | Prefix | Owner | Next-hops | +---------------+-----------+-----------------------+ | 0.0.0.0/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.1.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.2.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.3.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.4.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.1.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.2.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.3.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.4.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 99.99.99.0/24 | South SPF | if_101_1001 127.0.0.1 | | | | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ IPv6 Routes: +--------+-----------+--------------------+ | Prefix | Owner | Next-hops | +--------+-----------+--------------------+ | ::/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +--------+-----------+--------------------+
The "show forwarding prefix prefix" command shows the route for a given prefix in the Forwarding Information Base (FIB) of the current node.
Parameter prefix must be an IPv4 prefix or an IPv6 prefix
Example:
agg_101> show forwarding prefix ::/0 +--------+-----------+--------------------+ | Prefix | Owner | Next-hops | +--------+-----------+--------------------+ | ::/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +--------+-----------+--------------------+
The "show fsm fsm" command shows the definition of the specified Finite State Machine (FSM).
Parameter fsm specifies the name of the FSM and can be one of the following values:
- lie: Show the Link Information Element (LIE) FSM.
- ztp: Show the Zero Touch Provisioning (ZTP) FSM.
Example:
agg_101> show fsm lie States: +-----------+ | State | +-----------+ | ONE_WAY | +-----------+ | TWO_WAY | +-----------+ | THREE_WAY | +-----------+ Events: +-------------------------------+---------+ | Event | Verbose | +-------------------------------+---------+ | TIMER_TICK | True | +-------------------------------+---------+ | LEVEL_CHANGED | False | +-------------------------------+---------+ | HAL_CHANGED | False | +-------------------------------+---------+ . . . . . . . . . +-------------------------------+---------+ | LIE_CORRUPT | False | +-------------------------------+---------+ | SEND_LIE | True | +-------------------------------+---------+ Transitions: +------------+-----------------------------+-----------+-------------------------+-------------+ | From state | Event | To state | Actions | Push events | +------------+-----------------------------+-----------+-------------------------+-------------+ | ONE_WAY | TIMER_TICK | - | - | SEND_LIE | +------------+-----------------------------+-----------+-------------------------+-------------+ | ONE_WAY | LEVEL_CHANGED | ONE_WAY | update_level | SEND_LIE | +------------+-----------------------------+-----------+-------------------------+-------------+ | ONE_WAY | HAL_CHANGED | - | store_hal | - | +------------+-----------------------------+-----------+-------------------------+-------------+ . . . . . . . . . . . . . . . . . . +------------+-----------------------------+-----------+-------------------------+-------------+ | THREE_WAY | LIE_CORRUPT | ONE_WAY | - | - | +------------+-----------------------------+-----------+-------------------------+-------------+ | THREE_WAY | SEND_LIE | - | send_lie | - | +------------+-----------------------------+-----------+-------------------------+-------------+ State entry actions: +---------+---------+ | State | Actions | +---------+---------+ | ONE_WAY | cleanup | +---------+---------+
The "show interface interface" command reports more detailed information about a single interface. If there is a neighbor on the interface, the command also shows details about that neighbor.
The interface parameter is the name of an interface of the current node. You can get a list of interfaces of the current node using the show interfaces command.
Example of an interface which does have a neighbor (adjacency in state THREE_WAY):
agg_101> show interface if_101_1001 Interface: +--------------------------------------+--------------------------------------------+ | Interface Name | if_101_1001 | | Advertised Name | agg_101-if_101_1001 | | Interface IPv4 Address | 127.0.0.1 | | Metric | 1 | | Receive LIE IPv4 Multicast Address | 224.0.0.81 | | Transmit LIE IPv4 Multicast Address | 224.0.0.91 | | Receive LIE IPv6 Multicast Address | FF02::0078 | | Transmit LIE IPv6 Multicast Address | FF02::0078 | | Receive LIE Port | 20033 | | Transmit LIE Port | 20034 | | Receive TIE Port | 20035 | | System ID | 101 | | Local ID | 3 | | MTU | 1500 | | POD | 0 | | State | THREE_WAY | | Received LIE Accepted or Rejected | Accepted | | Received LIE Accept or Reject Reason | This node is not leaf and neighbor is leaf | | Neighbor | True | +--------------------------------------+--------------------------------------------+ Neighbor: +----------------------------------+-----------------------+ | Name | edge_1001-if_1001_101 | | System ID | 1001 | | IPv4 Address | 127.0.0.1 | | LIE UDP Source Port | 65344 | | Link ID | 1 | | Level | 0 | | Flood UDP Port | 10001 | | MTU | 1500 | | POD | 0 | | Hold Time | 3 | | Not a ZTP Offer | True | | You Are Not a ZTP Flood Repeater | True | | Your System ID | 101 | | Your Local ID | 3 | +----------------------------------+-----------------------+
Example of an interface which does not have a neighbor (adjacency in state ONE_WAY):
agg_101> show interface if_101_1 Interface: +--------------------------------------+------------------+ | Interface Name | if_101_1 | | Advertised Name | agg_101-if_101_1 | | Interface IPv4 Address | 127.0.0.1 | | Metric | 1 | | Receive LIE IPv4 Multicast Address | 224.0.0.81 | | Transmit LIE IPv4 Multicast Address | 224.0.0.71 | | Receive LIE IPv6 Multicast Address | FF02::0078 | | Transmit LIE IPv6 Multicast Address | FF02::0078 | | Receive LIE Port | 20001 | | Transmit LIE Port | 20002 | | Receive TIE Port | 20004 | | System ID | 101 | | Local ID | 1 | | MTU | 1500 | | POD | 0 | | State | ONE_WAY | | Received LIE Accepted or Rejected | Rejected | | Received LIE Accept or Reject Reason | Level mismatch | | Neighbor | False | +--------------------------------------+------------------+
The "show interface interface fsm history" command shows the 25 most recent "interesting" executed events for the Link Information Element (LIE) Finite State Machine (FSM) associated with the interface. The most recent event is at the top.
This command only shows the "interesting" events, i.e. it does not show any events that are marked as "verbose" by the "show fsm lie" command. Use the "show interface interface fsm verbose-history" command if you want to see all events.
Example:
agg_101> show interface if_101_1001 fsm history +----------+-------------+---------+---------+------------------+---------------+-----------+----------+ | Sequence | Time | Verbose | From | Event | Actions and | To | Implicit | | Nr | Delta | Skipped | State | | Pushed Events | State | | +----------+-------------+---------+---------+------------------+---------------+-----------+----------+ | 313 | 2087.427679 | 2 | TWO_WAY | VALID_REFLECTION | | THREE_WAY | False | +----------+-------------+---------+---------+------------------+---------------+-----------+----------+ | 223 | 0.017177 | 3 | ONE_WAY | NEW_NEIGHBOR | SEND_LIE | TWO_WAY | False | +----------+-------------+---------+---------+------------------+---------------+-----------+----------+
The "show interface interface fsm verbose-history" command shows the 25 most recent executed events for the Link Information Element (LIE) Finite State Machine (FSM) associated with the interface. The most recent event is at the top.
This command shows all events, including the events that are marked as verbose by the "show fsm lie" command. Because of this, the output tends to be dominated by non-interesting verbose events such as timer ticks and the sending and receiving of periodic LIE messages. Use the "show interface interface fsm history" command if you only want to see "interesting" events.
Example:
agg_101> show interface if_101_1001 fsm verbose-history +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ | Sequence | Time | Verbose | From | Event | Actions and | To | Implicit | | Nr | Delta | Skipped | State | | Pushed Events | State | | +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ | 316353 | 0.486001 | 0 | THREE_WAY | LIE_RECEIVED | process_lie | None | False | +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ | 316277 | 0.017974 | 0 | THREE_WAY | SEND_LIE | send_lie | None | False | +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ | 316254 | 0.002745 | 0 | THREE_WAY | TIMER_TICK | check_hold_time_expired | None | False | | | | | | | SEND_LIE | | | +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ . . . . . . . . . . . . . . . . . . . . . . . . . . . +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ | 315302 | 0.002144 | 0 | THREE_WAY | TIMER_TICK | check_hold_time_expired | None | False | | | | | | | SEND_LIE | | | +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+ | 315242 | 0.983821 | 0 | THREE_WAY | LIE_RECEIVED | process_lie | None | False | +----------+----------+---------+-----------+--------------+-------------------------+-------+----------+
The "show interface interface queues" command shows flooding queues:
| Queue name | Messages in queue |
|---|---|
| Transmit queue | The TIE headers that need to be transmitted in a TIE message over this interface |
| Retransmit queue | The TIE headers that need to be re-transmitted in a TIE message over this interface |
| Request queue | The TIE headers that need to be requested in a TIRE message over this interface |
| Acknowledge queue | The TIE headers that need to be acknowledged in a TIRE message over this interface |
When the flooding has converged, all queues are expected to be empty. A queue that is persistently non-empty indicates a problem in flooding convergence.
Example:
agg_101> show interface if_101_1 queues Transmit queue: +-----------+------------+------+--------+--------+-----------+-------------+ | Direction | Originator | Type | TIE Nr | Seq Nr | Remaining | Origination | | | | | | | Lifetime | Time | +-----------+------------+------+--------+--------+-----------+-------------+ Retransmit queue: +-----------+------------+------+--------+--------+-----------+-------------+ | Direction | Originator | Type | TIE Nr | Seq Nr | Remaining | Origination | | | | | | | Lifetime | Time | +-----------+------------+------+--------+--------+-----------+-------------+ Request queue: +-----------+------------+------+--------+--------+-----------+-------------+ | Direction | Originator | Type | TIE Nr | Seq Nr | Remaining | Origination | | | | | | | Lifetime | Time | +-----------+------------+------+--------+--------+-----------+-------------+ Acknowledge queue: +-----------+------------+------+--------+--------+-----------+-------------+ | Direction | Originator | Type | TIE Nr | Seq Nr | Remaining | Origination | | | | | | | Lifetime | Time | +-----------+------------+------+--------+--------+-----------+-------------+
The "show interfaces" command reports a summary of all RIFT interfaces (i.e. interfaces on which RIFT is running) on the currently active RIFT node.
Use the "show interface interface" to see all details about any particular interface.
agg_101> show interfaces +-------------+-----------------------+-----------+-----------+ | Interface | Neighbor | Neighbor | Neighbor | | Name | Name | System ID | State | +-------------+-----------------------+-----------+-----------+ | if_101_1 | | | ONE_WAY | +-------------+-----------------------+-----------+-----------+ | if_101_1001 | edge_1001-if_1001_101 | 1001 | THREE_WAY | +-------------+-----------------------+-----------+-----------+ | if_101_1002 | edge_1002-if_1002_101 | 1002 | THREE_WAY | +-------------+-----------------------+-----------+-----------+ | if_101_2 | core_2-if_2_101 | 2 | THREE_WAY | +-------------+-----------------------+-----------+-----------+
The "show kernel addresses" command reports a summary of all addresses in the Linux kernel on which the RIFT engine is running.
real2> show kernel addresses Kernel Addresses: +-----------+---------------------------+-----------+-----------+---------+ | Interface | Address | Local | Broadcast | Anycast | | Name | | | | | +-----------+---------------------------+-----------+-----------+---------+ | lo | 127.0.0.1 | 127.0.0.1 | | | +-----------+---------------------------+-----------+-----------+---------+ | lo | 88.88.2.1 | 88.88.2.1 | | | +-----------+---------------------------+-----------+-----------+---------+ | veth-a2 | 99.99.1.2 | 99.99.1.2 | | | +-----------+---------------------------+-----------+-----------+---------+ | veth-b2 | 99.99.2.2 | 99.99.2.2 | | | +-----------+---------------------------+-----------+-----------+---------+
If this command is executed on a platform that does not support the Netlink interface to the kernel routing table (i.e. any non-Linux platform including BSD and macOS) the following error message is reported:
agg_101> show kernel addresses Kernel networking not supported on this platform
The "show kernel links" command reports a summary of all links in the Linux kernel on which the RIFT engine is running.
real2> show kernel links Kernel Links: +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+ | Interface | Interface | Hardware | Hardware | Link Type | MTU | Flags | | Name | Index | Address | Broadcast | | | | | | | | Address | | | | +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+ | lo | 1 | 00:00:00:00:00:00 | 00:00:00:00:00:00 | | 65536 | UP | | | | | | | | LOOPBACK | | | | | | | | RUNNING | | | | | | | | LOWER_UP | +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+ | tunl0 | 2 | 00:00:00:00:08:00 | 00:00:00:00:c4:00 | 0 | 1480 | NOARP | +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+ | ip6tnl0 | 3 | 00:00:00:00:00:00 | 00:00:00:00:00:00 | 0 | 1452 | NOARP | +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+ | veth-a2 | 4 | b2:cd:9f:06:78:ab | ff:ff:ff:ff:ff:ff | 5 | 1500 | UP | | | | | | | | BROADCAST | | | | | | | | RUNNING | | | | | | | | MULTICAST | | | | | | | | LOWER_UP | +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+ | veth-b2 | 6 | 0a:6b:39:ab:a9:e9 | ff:ff:ff:ff:ff:ff | 7 | 1500 | UP | | | | | | | | BROADCAST | | | | | | | | RUNNING | | | | | | | | MULTICAST | | | | | | | | LOWER_UP | +-----------+-----------+-------------------+-------------------+-----------+-------+-----------+
If this command is executed on a platform that does not support the Netlink interface to the kernel routing table (i.e. any non-Linux platform including BSD and macOS) the following error message is reported:
agg_101> show kernel links Kernel networking not supported on this platform
The "show kernel route table table prefix prefix" command reports the details of a single route in the route table in the Linux kernel on which the RIFT engine is running.
Parameter table must be local, main, default, unspecified, or a number in the range 0-255.
Parameter prefix must be an IPv4 prefix or an IPv6 prefix
real2> show kernel route table main prefix 99.99.1.0/24 +--------------------------+--------------+ | Table | Main | | Address Family | IPv4 | | Destination | 99.99.1.0/24 | | Type | Unicast | | Protocol | Kernel | | Scope | Link | | Next-hops | veth-a2 | | Priority | | | Preference | | | Preferred Source Address | 99.99.1.2 | | Source | | | Flow | | | Encapsulation Type | | | Encapsulation | | | Metrics | | | Type of Service | 0 | | Flags | 0 | +--------------------------+--------------+
If this command is executed on a platform that does not support the Netlink interface to the kernel routing table (i.e. any non-Linux platform including BSD and macOS) the following error message is reported:
agg_101> show kernel route table main prefix 0.0.0.0/0 Kernel networking not supported on this platform
The "show kernel routes" command reports a summary of all routes in the Linux kernel on which the RIFT engine is running.
real2> show kernel routes Kernel Routes: +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Table | Address | Destination | Type | Protocol | Outgoing | Gateway | Weight | | | Family | | | | Interface | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Unspecified | IPv6 | ::/0 | Unreachable | Kernel | lo | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Unspecified | IPv6 | ::/0 | Unreachable | Kernel | lo | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Main | IPv4 | 0.0.0.0/0 | Unicast | RIFT | veth-a2 | 99.99.1.1 | 1 | | | | | | | veth-b2 | 99.99.2.1 | 1 | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Main | IPv4 | 99.99.1.0/24 | Unicast | Kernel | veth-a2 | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Main | IPv4 | 99.99.2.0/24 | Unicast | Kernel | veth-b2 | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Main | IPv6 | fe80::/64 | Unicast | Kernel | veth-a2 | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Main | IPv6 | fe80::/64 | Unicast | Kernel | veth-b2 | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Local | IPv4 | 88.88.2.1/32 | Local | Kernel | lo | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ . . . . . . . . . . . . . . . . . . . . . . . . . . . +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+ | Local | IPv6 | ff00::/8 | Unicast | Boot | veth-b2 | | | +-------------+---------+-------------------------------+-------------+----------+-----------+-----------+--------+
If this command is executed on a platform that does not support the Netlink interface to the kernel routing table (i.e. any non-Linux platform including BSD and macOS) the following error message is reported:
agg_101> show kernel routes Kernel networking not supported on this platform
The "show kernel routes table table" command reports a summary of all routes in a specific route table in the Linux kernel on which the RIFT engine is running.
Parameter table must be local, main, default, unspecified, or a number in the range 0-255.
real2> show kernel routes table main Kernel Routes: +-------+---------+--------------+---------+----------+-----------+-----------+--------+ | Table | Address | Destination | Type | Protocol | Outgoing | Gateway | Weight | | | Family | | | | Interface | | | +-------+---------+--------------+---------+----------+-----------+-----------+--------+ | Main | IPv4 | 0.0.0.0/0 | Unicast | RIFT | veth-a2 | 99.99.1.1 | 1 | | | | | | | veth-b2 | 99.99.2.1 | 1 | +-------+---------+--------------+---------+----------+-----------+-----------+--------+ | Main | IPv4 | 99.99.1.0/24 | Unicast | Kernel | veth-a2 | | | +-------+---------+--------------+---------+----------+-----------+-----------+--------+ | Main | IPv4 | 99.99.2.0/24 | Unicast | Kernel | veth-b2 | | | +-------+---------+--------------+---------+----------+-----------+-----------+--------+ | Main | IPv6 | fe80::/64 | Unicast | Kernel | veth-a2 | | | +-------+---------+--------------+---------+----------+-----------+-----------+--------+ | Main | IPv6 | fe80::/64 | Unicast | Kernel | veth-b2 | | | +-------+---------+--------------+---------+----------+-----------+-----------+--------+
If this command is executed on a platform that does not support the Netlink interface to the kernel routing table (i.e. any non-Linux platform including BSD and macOS) the following error message is reported:
agg_101> show kernel routes table main Kernel networking not supported on this platform
The "show node" command reports the details for the currently active RIFT node:
Example:
agg_101> show node Node: +---------------------------------------+------------------+ | Name | agg_101 | | Passive | False | | Running | True | | System ID | 101 | | Configured Level | 1 | | Leaf Only | False | | Leaf 2 Leaf | False | | Superspine Flag | True | | Zero Touch Provisioning (ZTP) Enabled | False | | ZTP FSM State | UPDATING_CLIENTS | | ZTP Hold Down Timer | Stopped | | Highest Available Level (HAL) | None | | Highest Adjacency Three-way (HAT) | None | | Level Value | 1 | | Multicast Loop | True | | Receive LIE IPv4 Multicast Address | 224.0.0.81 | | Transmit LIE IPv4 Multicast Address | 224.0.0.120 | | Receive LIE IPv6 Multicast Address | FF02::0078 | | Transmit LIE IPv6 Multicast Address | FF02::0078 | | Receive LIE Port | 20102 | | Transmit LIE Port | 10000 | | LIE Send Interval | 1.0 secs | | Receive TIE Port | 10001 | +---------------------------------------+------------------+ Received Offers: +-------------+-----------+-------+-----------------+-----------+-------+------------+---------+--------------------------+ | Interface | System ID | Level | Not A ZTP Offer | State | Best | Best 3-Way | Removed | Removed Reason | +-------------+-----------+-------+-----------------+-----------+-------+------------+---------+--------------------------+ | if_101_1 | 1 | 24 | True | ONE_WAY | False | False | True | Not a ZTP offer flag set | +-------------+-----------+-------+-----------------+-----------+-------+------------+---------+--------------------------+ | if_101_1001 | 1001 | 0 | True | THREE_WAY | False | False | True | Not a ZTP offer flag set | +-------------+-----------+-------+-----------------+-----------+-------+------------+---------+--------------------------+ | if_101_1002 | 1002 | 0 | True | THREE_WAY | False | False | True | Not a ZTP offer flag set | +-------------+-----------+-------+-----------------+-----------+-------+------------+---------+--------------------------+ | if_101_2 | 2 | 2 | True | THREE_WAY | False | False | True | Not a ZTP offer flag set | +-------------+-----------+-------+-----------------+-----------+-------+------------+---------+--------------------------+ Sent Offers: +-------------+-----------+-------+-----------------+-----------+ | Interface | System ID | Level | Not A ZTP Offer | State | +-------------+-----------+-------+-----------------+-----------+ | if_101_1 | None | 1 | False | ONE_WAY | +-------------+-----------+-------+-----------------+-----------+ | if_101_1001 | 1001 | 1 | False | THREE_WAY | +-------------+-----------+-------+-----------------+-----------+ | if_101_1002 | 1002 | 1 | False | THREE_WAY | +-------------+-----------+-------+-----------------+-----------+ | if_101_2 | 2 | 1 | False | THREE_WAY | +-------------+-----------+-------+-----------------+-----------+
The "show node fsm history" command shows the 25 most recent "interesting" executed events for the Zero Touch Provisioning (ZTP) Finite State Machine (FSM) associated with the currently active node. The most recent event is at the top.
This command only shows the "interesting" events, i.e. it does not show any events that are marked as "verbose" by the "show fsm ztp" command. Use the "show node fsm verbose-history" command if you want to see all events.
Example:
agg_101> show node fsm history +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ | Sequence | Time | Verbose | From | Event | Actions and | To | Implicit | | Nr | Delta | Skipped | State | | Pushed Events | State | | +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ | 172980 | 2070.046668 | 0 | COMPUTE_BEST_OFFER | COMPUTATION_DONE | no_action | UPDATING_CLIENTS | False | | | | | | | update_all_lie_fsms_with_computation_results | | | +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ | 172979 | 0.000207 | 0 | HOLDING_DOWN | HOLD_DOWN_EXPIRED | purge_offers | COMPUTE_BEST_OFFER | False | | | | | | | stop_hold_down_timer | | | | | | | | | level_compute | | | | | | | | | COMPUTATION_DONE | | | +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ | 172978 | 0.000187 | 0 | HOLDING_DOWN | LOST_HAT | no_action | None | False | +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ . . . . . . . . . . . . . . . . . . . . . . . . . . . +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ | 58 | 0.000430 | 2 | UPDATING_CLIENTS | BETTER_HAL | no_action | COMPUTE_BEST_OFFER | False | | | | | | | stop_hold_down_timer | | | | | | | | | level_compute | | | | | | | | | COMPUTATION_DONE | | | +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+ | 3 | 0.013643 | 0 | COMPUTE_BEST_OFFER | COMPUTATION_DONE | no_action | UPDATING_CLIENTS | False | | | | | | | update_all_lie_fsms_with_computation_results | | | +----------+-------------+---------+--------------------+-------------------+----------------------------------------------+--------------------+----------+
The "show node fsm verbose-history" command shows the 25 most recent executed events for the Zero Touch Provisioning (ZTP) Finite State Machine (FSM) associated with the currently active node. The most recent event is at the top.
This command shows all events, including the events that are marked as verbose by the "show fsm ztp" command. Because of this, the output tends to be dominated by non-interesting verbose events such as processing periodic offers received from neighbors. Use the "show node fsm history" command if you only want to see "interesting" events.
Example:
agg_101> show node fsm verbose-history +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ | Sequence | Time | Verbose | From | Event | Actions and | To | Implicit | | Nr | Delta | Skipped | State | | Pushed Events | State | | +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ | 482554 | 0.215404 | 0 | UPDATING_CLIENTS | NEIGHBOR_OFFER | update_or_remove_offer | None | False | +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ | 482553 | 0.000034 | 0 | UPDATING_CLIENTS | NEIGHBOR_OFFER | update_or_remove_offer | None | False | +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ | 482476 | 0.014348 | 0 | UPDATING_CLIENTS | NEIGHBOR_OFFER | update_or_remove_offer | None | False | +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ . . . . . . . . . . . . . . . . . . . . . . . . . . . +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ | 481836 | 0.000660 | 0 | UPDATING_CLIENTS | NEIGHBOR_OFFER | update_or_remove_offer | None | False | +----------+----------+---------+------------------+----------------+------------------------+-------+----------+ | 481736 | 0.997336 | 0 | UPDATING_CLIENTS | NEIGHBOR_OFFER | update_or_remove_offer | None | False | +----------+----------+---------+------------------+----------------+------------------------+-------+----------+
The "show nodes" command shows a summary of all RIFT nodes running in the RIFT protocol engine.
You can make anyone of the listed nodes the currently active node using the "set node node" command.
Example:
agg_101> show nodes +-----------+--------+---------+ | Node | System | Running | | Name | ID | | +-----------+--------+---------+ | agg_101 | 101 | True | +-----------+--------+---------+ | agg_102 | 102 | True | +-----------+--------+---------+ | agg_201 | 201 | True | +-----------+--------+---------+ | agg_202 | 202 | True | +-----------+--------+---------+ | core_1 | 1 | True | +-----------+--------+---------+ | core_2 | 2 | True | +-----------+--------+---------+ | edge_1001 | 1001 | True | +-----------+--------+---------+ | edge_1002 | 1002 | True | +-----------+--------+---------+ | edge_2001 | 2001 | True | +-----------+--------+---------+ | edge_2002 | 2002 | True | +-----------+--------+---------+
The "show nodes level" command shows information on automatic level derivation procedures for all RIFT nodes in the RIFT topology:
Example:
agg_101> show nodes level +-----------+--------+---------+------------+-------+ | Node | System | Running | Configured | Level | | Name | ID | | Level | Value | +-----------+--------+---------+------------+-------+ | agg_101 | 101 | True | undefined | 23 | +-----------+--------+---------+------------+-------+ | agg_102 | 102 | True | undefined | 23 | +-----------+--------+---------+------------+-------+ | agg_201 | 201 | True | undefined | 23 | +-----------+--------+---------+------------+-------+ | agg_202 | 202 | True | undefined | 23 | +-----------+--------+---------+------------+-------+ | core_1 | 1 | True | superspine | 24 | +-----------+--------+---------+------------+-------+ | core_2 | 2 | True | superspine | 24 | +-----------+--------+---------+------------+-------+ | edge_1001 | 1001 | True | leaf | 0 | +-----------+--------+---------+------------+-------+ | edge_1002 | 1002 | True | undefined | 22 | +-----------+--------+---------+------------+-------+ | edge_2001 | 2001 | True | undefined | 23 | +-----------+--------+---------+------------+-------+ | edge_2002 | 2002 | True | leaf | 0 | +-----------+--------+---------+------------+-------+
The "show route prefix prefix" command shows the routes for a given prefix in the Routing Information Base (RIB) of the current node.
Parameter prefix must be an IPv4 prefix or an IPv6 prefix
Example:
agg_101> show route prefix ::/0 +--------+-----------+--------------------+ | Prefix | Owner | Next-hops | +--------+-----------+--------------------+ | ::/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +--------+-----------+--------------------+
The "show route prefix prefix owner owner" command shows the routes for a given prefix and a given owner in the Routing Information Base (RIB) of the current node.
Parameter prefix must be an IPv4 prefix or an IPv6 prefix.
Parameter owner must be south-spf or north-spf.
Example:
agg_101> show route prefix ::/0 owner north-spf +--------+-----------+--------------------+ | Prefix | Owner | Next-hops | +--------+-----------+--------------------+ | ::/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +--------+-----------+--------------------+
The "show routes" command shows all routes in the Routing Information Base (RIB) of the current node. It shows both the IPv4 RIB and the IPv6 RIB.
Example:
agg_101> show routes IPv4 Routes: +---------------+-----------+-----------------------+ | Prefix | Owner | Next-hops | +---------------+-----------+-----------------------+ | 0.0.0.0/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.1.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.2.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.3.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.1.4.0/24 | South SPF | if_101_1001 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.1.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.2.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.3.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 1.2.4.0/24 | South SPF | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ | 99.99.99.0/24 | South SPF | if_101_1001 127.0.0.1 | | | | if_101_1002 127.0.0.1 | +---------------+-----------+-----------------------+ IPv6 Routes: +--------+-----------+--------------------+ | Prefix | Owner | Next-hops | +--------+-----------+--------------------+ | ::/0 | North SPF | if_101_1 127.0.0.1 | | | | if_101_2 127.0.0.1 | +--------+-----------+--------------------+
The "show spf" command shows the results of the most recent Shortest Path First (SPF) execution for the current node.
Note: the SPF algorithm is also known as the Dijkstra algorithm.
Example:
agg_101> show spf SPF Statistics: +---------------+----+ | SPF Runs | 4 | +---------------+----+ | SPF Deferrals | 19 | +---------------+----+ South SPF Destinations: +------------------+------+-------------+------+-----------------------+ | Destination | Cost | Predecessor | Tags | Next-hops | | | | System IDs | | | +------------------+------+-------------+------+-----------------------+ | 101 (agg_101) | 0 | | | | +------------------+------+-------------+------+-----------------------+ | 1001 (edge_1001) | 1 | 101 | | if_101_1001 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1002 (edge_1002) | 1 | 101 | | if_101_1002 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.1.1.0/24 | 2 | 1001 | | if_101_1001 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.1.2.0/24 | 2 | 1001 | | if_101_1001 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.1.3.0/24 | 2 | 1001 | | if_101_1001 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.1.4.0/24 | 2 | 1001 | | if_101_1001 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.2.1.0/24 | 2 | 1002 | | if_101_1002 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.2.2.0/24 | 2 | 1002 | | if_101_1002 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.2.3.0/24 | 2 | 1002 | | if_101_1002 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 1.2.4.0/24 | 2 | 1002 | | if_101_1002 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ | 99.99.99.0/24 | 2 | 1001 | 9992 | if_101_1001 127.0.0.1 | | | | 1002 | 9991 | if_101_1002 127.0.0.1 | +------------------+------+-------------+------+-----------------------+ North SPF Destinations: +---------------+------+-------------+------+--------------------+ | Destination | Cost | Predecessor | Tags | Next-hops | | | | System IDs | | | +---------------+------+-------------+------+--------------------+ | 1 (core_1) | 1 | 101 | | if_101_1 127.0.0.1 | +---------------+------+-------------+------+--------------------+ | 2 (core_2) | 1 | 101 | | if_101_2 127.0.0.1 | +---------------+------+-------------+------+--------------------+ | 101 (agg_101) | 0 | | | | +---------------+------+-------------+------+--------------------+ | 0.0.0.0/0 | 2 | 1 | | if_101_1 127.0.0.1 | | | | 2 | | if_101_2 127.0.0.1 | +---------------+------+-------------+------+--------------------+ | ::/0 | 2 | 1 | | if_101_1 127.0.0.1 | | | | 2 | | if_101_2 127.0.0.1 | +---------------+------+-------------+------+--------------------+
The "show spf direction direction" command shows the results of the most recent Shortest Path First (SPF) execution for the current node in the specified direction.
Parameter direction must be south or north
Example:
agg_101> show spf direction north North SPF Destinations: +---------------+------+-------------+------+--------------------+ | Destination | Cost | Predecessor | Tags | Next-hops | | | | System IDs | | | +---------------+------+-------------+------+--------------------+ | 1 (core_1) | 1 | 101 | | if_101_1 127.0.0.1 | +---------------+------+-------------+------+--------------------+ | 2 (core_2) | 1 | 101 | | if_101_2 127.0.0.1 | +---------------+------+-------------+------+--------------------+ | 101 (agg_101) | 0 | | | | +---------------+------+-------------+------+--------------------+ | 0.0.0.0/0 | 2 | 1 | | if_101_1 127.0.0.1 | | | | 2 | | if_101_2 127.0.0.1 | +---------------+------+-------------+------+--------------------+ | ::/0 | 2 | 1 | | if_101_1 127.0.0.1 | | | | 2 | | if_101_2 127.0.0.1 | +---------------+------+-------------+------+--------------------+
The "show spf direction direction destination destination" command shows the results of the most recent Shortest Path First (SPF) execution for the specified destination on the current node in the specified direction.
Parameter direction must be south or north
Parameter destination must be one of the following:
- The system-id of a node (an integer)
- An IPv4 prefix
- An IPv6 prefix
Example:
agg_101> show spf direction north destination ::/0 +-------------+------+-------------+------+--------------------+ | Destination | Cost | Predecessor | Tags | Next-hops | | | | System IDs | | | +-------------+------+-------------+------+--------------------+ | ::/0 | 2 | 1 | | if_101_1 127.0.0.1 | | | | 2 | | if_101_2 127.0.0.1 | +-------------+------+-------------+------+--------------------+
Example:
agg_101> show spf direction north destination 5 Destination 5 not present
The "show tie-db" command shows the contents of the Topology Information Element Database (TIE-DB) for the current node.
Note: the TIE-DB is also known as the Link-State Database (LSDB)
Example:
agg_101> show tie-db +-----------+------------+--------+--------+--------+----------+-----------------------+ | Direction | Originator | Type | TIE Nr | Seq Nr | Lifetime | Contents | +-----------+------------+--------+--------+--------+----------+-----------------------+ | South | 1 | Node | 1 | 5 | 603378 | Name: core_1 | | | | | | | | Level: 2 | | | | | | | | Neighbor: 101 | | | | | | | | Level: 1 | | | | | | | | Cost: 1 | | | | | | | | Bandwidth: 100 Mbps | | | | | | | | Link: 1-1 | | | | | | | | Neighbor: 102 | | | | | | | | Level: 1 | | | | | | | | Cost: 1 | | | | | | | | Bandwidth: 100 Mbps | | | | | | | | Link: 2-1 | | | | | | | | Neighbor: 201 | | | | | | | | Level: 1 | | | | | | | | Cost: 1 | | | | | | | | Bandwidth: 100 Mbps | | | | | | | | Link: 3-1 | | | | | | | | Neighbor: 202 | | | | | | | | Level: 1 | | | | | | | | Cost: 1 | | | | | | | | Bandwidth: 100 Mbps | | | | | | | | Link: 4-1 | +-----------+------------+--------+--------+--------+----------+-----------------------+ | South | 1 | Prefix | 1 | 1 | 603378 | Prefix: 0.0.0.0/0 | | | | | | | | Metric: 1 | | | | | | | | Prefix: ::/0 | | | | | | | | Metric: 1 | +-----------+------------+--------+--------+--------+----------+-----------------------+ . . . . . . . . . . . . . . . . . . . . . . . . +-----------+------------+--------+--------+--------+----------+-----------------------+ | North | 1002 | Prefix | 1 | 1 | 603378 | Prefix: 1.2.1.0/24 | | | | | | | | Metric: 1 | | | | | | | | Prefix: 1.2.2.0/24 | | | | | | | | Metric: 1 | | | | | | | | Prefix: 1.2.3.0/24 | | | | | | | | Metric: 1 | | | | | | | | Prefix: 1.2.4.0/24 | | | | | | | | Metric: 1 | | | | | | | | Prefix: 99.99.99.0/24 | | | | | | | | Metric: 1 | | | | | | | | Tag: 9992 | +-----------+------------+--------+--------+--------+----------+-----------------------+
The "stop command closes the CLI session and terminates the RIFT engine.
Note: The stop command is similar to the exit command, except that the exit command leaves the RIFT engine running when executed from a Telnet session.
Example:
(env) $ python rift topology/two_by_two_by_two.yaml Command Line Interface (CLI) available on port 50102
$ telnet localhost 50102 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. agg_101> stop $