Cumulus Linux: Useful Commands

Version 4

    This post lists several Cumulus Linux Useful commands.

     

     

    References

     

    Useful commands

    Shows the current interface status and MAC address.

    # ip -br link show

    lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>

    eth0             UP             7c:fe:90:40:9e:b6 <BROADCAST,MULTICAST,UP,LOWER_UP>

    eth1             DOWN           7c:fe:90:40:9e:b7 <BROADCAST,MULTICAST>

    swp1             DOWN           7c:fe:90:40:9e:bc <BROADCAST,MULTICAST>

    swp2             DOWN           7c:fe:90:40:9e:be <BROADCAST,MULTICAST>

    swp3             DOWN           7c:fe:90:40:9e:b8 <BROADCAST,MULTICAST>

    swp4             DOWN           7c:fe:90:40:9e:ba <BROADCAST,MULTICAST>

    swp5             UP             7c:fe:90:40:9e:b4 <BROADCAST,MULTICAST,UP,LOWER_UP>

    swp6             UP             7c:fe:90:40:9e:b6 <BROADCAST,MULTICAST,UP,LOWER_UP>

    swp7             DOWN           7c:fe:90:40:9e:b0 <BROADCAST,MULTICAST>

    swp8             DOWN           7c:fe:90:40:9e:b2 <BROADCAST,MULTICAST>

    swp9             DOWN           7c:fe:90:40:9e:ac <BROADCAST,MULTICAST>

    swp10            DOWN           7c:fe:90:40:9e:ae <BROADCAST,MULTICAST>

    swp11            DOWN           7c:fe:90:40:9e:a8 <BROADCAST,MULTICAST>

    swp12            DOWN           7c:fe:90:40:9e:aa <BROADCAST,MULTICAST>

    swp13            DOWN           7c:fe:90:40:9e:a4 <BROADCAST,MULTICAST>

    swp14            DOWN           7c:fe:90:40:9e:a6 <BROADCAST,MULTICAST>

    swp15            DOWN           7c:fe:90:40:9e:a0 <BROADCAST,MULTICAST>

    swp16            DOWN           7c:fe:90:40:9e:a2 <BROADCAST,MULTICAST>

    swp17            DOWN           7c:fe:90:40:9e:80 <BROADCAST,MULTICAST>

    swp18            DOWN           7c:fe:90:40:9e:82 <BROADCAST,MULTICAST>

    swp19            DOWN           7c:fe:90:40:9e:84 <BROADCAST,MULTICAST>

    swp20            DOWN           7c:fe:90:40:9e:86 <BROADCAST,MULTICAST>

    swp21            DOWN           7c:fe:90:40:9e:88 <BROADCAST,MULTICAST>

    swp22            DOWN           7c:fe:90:40:9e:8a <BROADCAST,MULTICAST>

    swp23            DOWN           7c:fe:90:40:9e:8c <BROADCAST,MULTICAST>

    swp24            DOWN           7c:fe:90:40:9e:8e <BROADCAST,MULTICAST>

    swp25            DOWN           7c:fe:90:40:9e:90 <BROADCAST,MULTICAST>

    swp26            DOWN           7c:fe:90:40:9e:92 <BROADCAST,MULTICAST>

    swp27            DOWN           7c:fe:90:40:9e:94 <BROADCAST,MULTICAST>

    swp28            DOWN           7c:fe:90:40:9e:96 <BROADCAST,MULTICAST>

    swp29            DOWN           7c:fe:90:40:9e:98 <BROADCAST,MULTICAST>

    swp30            DOWN           7c:fe:90:40:9e:9a <BROADCAST,MULTICAST>

    swp31            DOWN           7c:fe:90:40:9e:9c <BROADCAST,MULTICAST>

    swp32            DOWN           7c:fe:90:40:9e:9e <BROADCAST,MULTICAST>

    swid0_eth        UNKNOWN        7c:fe:90:40:9e:80 <BROADCAST,MULTICAST,UP,LOWER_UP>

    Shows the current UP interface status and MAC address.

    # ip -br link show up

    lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>

    eth0             UP             7c:fe:90:40:9e:b6 <BROADCAST,MULTICAST,UP,LOWER_UP>

    swp5             UP             7c:fe:90:40:9e:b4 <BROADCAST,MULTICAST,UP,LOWER_UP>

    swp6             UP             7c:fe:90:40:9e:b6 <BROADCAST,MULTICAST,UP,LOWER_UP>

    swid0_eth        UNKNOWN        7c:fe:90:40:9e:80 <BROADCAST,MULTICAST,UP,LOWER_UP>

    ip -br addr show up

    Shows the current UP interface status and IP address.

    # ip -br addr show up

    lo               UNKNOWN        127.0.0.1/8 ::1/128

    eth0             UP             10.20.2.70/16 fe80::7efe:90ff:fe40:9eb6/64

    swp5             UP             fe80::7efe:90ff:fe40:9eb4/64

    swp6             UP             fe80::7efe:90ff:fe40:9eb6/64

    swid0_eth        UNKNOWN        fe80::fdff:e5ff:fee2:0/64

     

    netshow counters

    Shows the UP interfaces' basic counters.

    # netshow counters

     

        Port    Speed    Mode                 Ucast    Mcast    Broadcast    Errors

    --  ------  -------  -------------  --  -------  -------  -----------  --------

    UP  swp5    100G     NotConfigured  RX        2    21201           28         0

                                        TX        1    16791            0         0

    UP  swp6    40G      NotConfigured  RX      280    21320         9926         0

                                        TX      140    16966            0         0

     

    netshow interface

    Shows the interface configuration: Operational status, name, speed, MTU, mode, and IP.

    # netshow interface

     

           Name    Speed      MTU  Mode           Summary

    -----  ------  -------  -----  -------------  ------------------------

    UP     lo      N/A      65536  Loopback       IP: 127.0.0.1/8, ::1/128

    UP     eth0    1G        1500  Mgmt           IP: 10.20.2.70/16(DHCP)

    ADMDN  eth1    0M        1500  Mgmt

    UP     swp5    100G      1500  NotConfigured

    UP     swp6    40G       9000  NotConfigured

     

    netshow lldp

    Shows the remote LLDP information.

    # netshow lldp

    Local Port    Speed    Mode                 Remote Port        Remote  Host     Summary

    ------------  -------  -------------  ----  -----------------  ---------------  -----------------------

    eth0          1G       Mgmt           ====  19                 MTI-F1-FAE-SW06  IP: 10.20.2.70/16(DHCP)

    swp5          100G     NotConfigured  ====  e4:1d:2d:f2:a4:89

    swp6          40G      NotConfigured  ====  e4:1d:2d:f2:a4:5d

     

    ifquery -a

    Shows the /etc/network/interfaces configuration file.

    # ifquery  -a

    auto lo

    iface lo inet loopback

     

     

    auto eth0

    iface eth0 inet dhcp

     

     

    auto swp5

    iface swp5

      link-speed 100000

      mtu 1500

     

     

    auto swp6

    iface swp6

      link-speed 40000

      mtu 9000

     

     

    Shows interface configuration.

    # ip link show

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default

        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000

        link/ether 7c:fe:90:40:9e:b6 brd ff:ff:ff:ff:ff:ff

    3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000

        link/ether 7c:fe:90:40:9e:b7 brd ff:ff:ff:ff:ff:ff

    4: swp1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:bc brd ff:ff:ff:ff:ff:ff

    5: swp2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:be brd ff:ff:ff:ff:ff:ff

    6: swp3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:b8 brd ff:ff:ff:ff:ff:ff

    7: swp4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:ba brd ff:ff:ff:ff:ff:ff

    8: swp5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:b4 brd ff:ff:ff:ff:ff:ff

    9: swp6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:b6 brd ff:ff:ff:ff:ff:ff

    10: swp7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:b0 brd ff:ff:ff:ff:ff:ff

    11: swp8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:b2 brd ff:ff:ff:ff:ff:ff

    12: swp9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:ac brd ff:ff:ff:ff:ff:ff

    13: swp10: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:ae brd ff:ff:ff:ff:ff:ff

    14: swp11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:a8 brd ff:ff:ff:ff:ff:ff

    15: swp12: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:aa brd ff:ff:ff:ff:ff:ff

    16: swp13: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:a4 brd ff:ff:ff:ff:ff:ff

    17: swp14: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:a6 brd ff:ff:ff:ff:ff:ff

    18: swp15: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:a0 brd ff:ff:ff:ff:ff:ff

    19: swp16: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:a2 brd ff:ff:ff:ff:ff:ff

    20: swp17: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:80 brd ff:ff:ff:ff:ff:ff

    21: swp18: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:82 brd ff:ff:ff:ff:ff:ff

    22: swp19: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:84 brd ff:ff:ff:ff:ff:ff

    23: swp20: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:86 brd ff:ff:ff:ff:ff:ff

    24: swp21: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:88 brd ff:ff:ff:ff:ff:ff

    25: swp22: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:8a brd ff:ff:ff:ff:ff:ff

    26: swp23: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:8c brd ff:ff:ff:ff:ff:ff

    27: swp24: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:8e brd ff:ff:ff:ff:ff:ff

    28: swp25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:90 brd ff:ff:ff:ff:ff:ff

    29: swp26: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:92 brd ff:ff:ff:ff:ff:ff

    30: swp27: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:94 brd ff:ff:ff:ff:ff:ff

    31: swp28: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:96 brd ff:ff:ff:ff:ff:ff

    32: swp29: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:98 brd ff:ff:ff:ff:ff:ff

    33: swp30: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:9a brd ff:ff:ff:ff:ff:ff

    34: swp31: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:9c brd ff:ff:ff:ff:ff:ff

    35: swp32: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 500

        link/ether 7c:fe:90:40:9e:9e brd ff:ff:ff:ff:ff:ff

    36: swid0_eth: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000

        link/ether 7c:fe:90:40:9e:80 brd ff:ff:ff:ff:ff:ff

     

    restart switchd.service

     

    Restarts the driver.

    # systemctl restart switchd.service