Function show

  • List routes. The command displays the contents of the routing tables or the route(s) selected by some criteria.

    Warning: Changes to the RPDB made with these commands do not become active immediately. It is assumed that after a script finishes a batch of updates, it flushes the routing cache with ip route flush cache.

    Parameters

    • options: RouteShowOptions = {}

      Parameters options to be passed down to ip.

    • globalOptions: GlobalOptions = {}

      Global parameters options that affects the command execution.

    Returns Promise<Command<RouteShowOptions> | RouteInfo[]>

    Throws

    ParametersError - Throws when passed parameters are invalid.

    Throws

    CommandError - Throws when the executed command fails.

    Example

    Import module

    import { route } from 'iproute';
    

    Show routes from all tables

    const routes = await route.show({
    table: RouteRoutingTables.All
    });

Generated using TypeDoc