Package: netviewer
netviewerA command line utility to display network information.Information is parsed from the output of theiproute2ipcommand with the json option.netviewer [-d|--detail] <command> [<argument>...]wherecommandis one ofCommandDescriptionbridgedisplay information on all or specific bridgesbridgeslist bridgesdumpdumps the network information as a json fileinterfacedisplay information on all or specific interfacesinterfaceslist interfaceslinkdisplay information on all or specific linkslinkslist linksroutedisplay information on all or specific bridgesrouteslist routesUsing the-d/--detailflags with theinterface,bridge,routeandlinkcommands displays detailed information.Items which areupor in anunknownstate are shown in green otherwise they are shown as dim green (the loopback interface is in an unknown state but can be used, sounknownstates are also shown as green.)CommandsbridgeDisplays information about bridge devices i.e. network devices that have associatedvethdevices under them.dumpDumps the the network information as a json file to the filename passed as an argument.interfaceDisplays interface information from theip address showcommand. Pass interface names as arguments to display specific interfaces or leave blank to display all interfaces.routeDisplays routing information from theip route showcommand.linkDisplays link information from theip link showcommand.JSON inputUsing the --input option the network information can be displayed from a static json file.SVG/HTML OutputUsing the--save-svgand--save-htmloptions the output can be sent to a file instead.This utilises functionality built intorichExample SVG OutputExamplesInterfacesFor example using theinterfacescommand$ netviewer interfacesin WSL on my machine displays the following informationlo
eth0
bond0
dummy0
sit0
tunl0InterfaceAnd using theinterfacecommand for thelointerface$ netviewer interface lodisplays the following informationlo:
    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: 65536LinkRunning thelinkcommand$ netviewer link bond0Displays the followingbond0:
    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: noopLink - Detailed InfoRunning thelinkcommand with the-d/--detailoption$ netviewer -d link bond0Displays the followingbond0:
    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