Skip to main content

iproute2 network information viewer

Project description

netviewer

A command line utility to display network information.

Information is parsed from the output of the iproute2 ip command with the json option.

netviewer [-d|--detail] <command> [<argument>...]

where command is one of

Command Description
bridge display information on all or specific bridges
bridges list bridges
dump dumps the network information as a json file
interface display information on all or specific interfaces
interfaces list interfaces
link display information on all or specific links
links list links
route display information on all or specific bridges
routes list routes

Using the -d/--detail flags with the interface, bridge, route and link commands displays detailed information.

Items which are up or in an unknown state are shown in green otherwise they are shown as dim green (the loopback interface is in an unknown state but can be used, so unknown states are also shown as green.)

Commands

bridge

Displays information about bridge devices i.e. network devices that have associated veth devices under them.

dump

Dumps the the network information as a json file to the filename passed as an argument.

interface

Displays interface information from the ip address show command. Pass interface names as arguments to display specific interfaces or leave blank to display all interfaces.

route

Displays routing information from the ip route show command.

link

Displays link information from the ip link show command.

JSON input

Using the --input option the network information can be displayed from a static json file.

SVG/HTML Output

Using the --save-svg and --save-html options the output can be sent to a file instead.

This utilises functionality built into rich

Example SVG Output

bond0 output

Examples

Interfaces

For example using the interfaces command

$ netviewer interfaces

in WSL on my machine displays the following information

lo
eth0
bond0
dummy0
sit0
tunl0

Interface

And using the interface command for the lo interface

$ netviewer interface lo

displays the following information

lo:
    index: 1
    type: loopback
    state: unknown
    ipv4:
        scope: host
        ip: 127.0.0.1/8
        preferred lifetime: forever
        valid lifetime: forever
    ipv6:
        scope: host
        ip: ::1/128
        preferred lifetime: forever
        valid lifetime: forever
    flags: LOOPBACK, UP, LOWER_UP
    mtu:
        size: 65536

Link

Running the link command

$ netviewer link bond0

Displays the following

bond0:
    index: 2
    state: down
    type: ether
    address: 96:b5:c9:e7:ed:ff
    broadcast: ff:ff:ff:ff:ff:ff
    flags: BROADCAST, MULTICAST, MASTER
    mtu: 1500
    namespace id: 0
    group: default
    queue type: noop

Link - Detailed Info

Running the link command with the -d/--detail option

$ netviewer -d link bond0

Displays the following

bond0:
    index: 2
    state: down
    type: ether
    address: 96:b5:c9:e7:ed:ff
    broadcast: ff:ff:ff:ff:ff:ff
    flags: BROADCAST, MULTICAST, MASTER
    mtu: 1500
    namespace id: 0
    group: default
    queue type: noop
    link info:
        type: bond
        mode: balance-rr
        miimon: 0
        up delay: 0ms
        down delay: 0ms
        peer notifier delay: 0ms
        use carrier: true (1)
        ARP interval: 0ms
        ARP validate: active
        arp all targets: any
        primary reselect: always
        failover mac: none
        transmit hash policy: layer2
        resend IGMP: 1
        all slaves active: dropped
        minimum links: 0
        lp interval: 1s
        packets per slave: 1
        LACP rate: slow
        LACP aggregation selection logic: stable
        tb mode dynamic shuffling: 1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netviewer-0.1.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netviewer-0.1.0-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file netviewer-0.1.0.tar.gz.

File metadata

  • Download URL: netviewer-0.1.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for netviewer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 899ff407010d2a1d249b42bb7a34b6535e7f800aac12addb0890f97a03c5b82b
MD5 42ba6766cfcaa6259b72cdba261c6bac
BLAKE2b-256 8244ede681cd8407cc2ddfc191c16669387836f4624b16de098fba10f8da0960

See more details on using hashes here.

File details

Details for the file netviewer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: netviewer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for netviewer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd5fed3abac15d3407f90159e86b9f1d6c5bc6f304b9305bada33547d1d08655
MD5 4761b153d52f30d590549623b93e52e5
BLAKE2b-256 190dd4c07cb46713cc65ad295bbadf3d69b6e3c3309993f5a08440b7a4a54c86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page