ROUTE(8) 1990 ROUTE(8) NNAAMMEE route - manually manipulate the routing tables (Interim) SSYYNNOOPPSSIISS rroouuttee [ --nn ] [ --qq ] [ --vv ] _c_o_m_m_a_n_d [ [ _m_o_d_i_f_i_e_r_s ] _a_r_g_s ] DDEESSCCRRIIPPTTIIOONN _R_o_u_t_e is a program used to manually manipulate the network routing tables. It normally is not needed, as the system routing table management daemon, _r_o_u_t_e_d(8C), should tend to this task. _R_o_u_t_e accepts five commands: _a_d_d, to add a route, _f_l_u_s_h, to remove all routes, _d_e_l_e_t_e, to delete a specific route, _c_h_a_n_g_e, to changes aspects of a route (such as its gateway), and _m_o_n_i_t_o_r, to report any changes to the routing informa- tion base, routing lookup misses, or suspected network par- tionings. The monitor command has the syntax rroouuttee [ --nn ] mmoonniittoorr The flush command has the syntax rroouuttee [ --nn ] [ --nn ] fflluusshh [ _f_a_m_i_l_y ] where the address family may be specified by any of the -- oossii, --xxnnss, or --iinneett keywords. The other commands have the following syntax: rroouuttee [ -_n ] _c_o_m_m_a_n_d [ --nneett | --hhoosstt ] _d_e_s_t_i_n_a_t_i_o_n _g_a_t_e_w_a_y where _d_e_s_t_i_n_a_t_i_o_n is the destination host or network, _g_a_t_e_- _w_a_y is the next-hop gateway to which packets should be addressed. Routes to a particular host are distinguished from those to a network by interpreting the Internet address associated with _d_e_s_t_i_n_a_t_i_o_n. The optional keywords --nneett and --hhoosstt force the destination to be interpreted as a network or a host, respectively. Otherwise, if the _d_e_s_t_i_n_a_t_i_o_n has a ``local address part'' of INADDR_ANY, or if the _d_e_s_t_i_n_a_- _t_i_o_n is the symbolic name of a network, then the route is assumed to be to a network; otherwise, it is presumed to be a route to a host. For example, 128.32 is interpreted as -_h_o_s_t 128.0.0.32, 128.32.130 is interpreted as -_h_o_s_t 128.32.0.130; -_n_e_t _1_2_8._3_2 is interpreted as 128.32.0.0, and -_n_e_t _1_2_8._3_2._1_3_0 is inter- preted as 128.32.130.0. If the route is via an interface rather than via a gateway, the -_i_n_t_e_r_f_a_c_e modifier should be specified; the gateway given is the address of this host on the common network, Printed 7/27/90 June 1 ROUTE(8) 1990 ROUTE(8) indicating the interface to be used for transmission. The optional modifiers -_x_n_s, and -_o_s_i specify that all sub- sequent addresses are in the XNS or OSI address families, and the names must be numeric specifications rather than symbolic names. The optional -_n_e_t_m_a_s_k qualifier is intended to acheieve the effect of an OSI ESIS redirect with the netmask option. One specifies an additional ensuing address parameter (to be interpreted as a network mask). One can override the impli- cit network mask generated in the inet case by making sure this option follows the destination parameter. The optional modifiers -_r_t_t, -_r_t_t_v_a_r, -_s_e_n_d_p_i_p_e, -_r_e_c_v_p_i_p_e, -_m_t_u, -_h_o_p_c_o_u_n_t, -_e_x_p_i_r_e, and -_s_s_t_h_r_e_s_h provide initial values to metrics maintained in the routing entry. These may be individually locked by preceding each such modifier to be locked by the -_l_o_c_k meta-modifier, or one can specify that all ensuing metrics may be locked by the -_l_o_c_k_r_e_s_t meta-modifier. All symbolic names specified for a _d_e_s_t_i_n_a_t_i_o_n or _g_a_t_e_w_a_y are looked up first as a host name using _g_e_t_h_o_s_t_b_y_n_a_m_e(3N). If this lookup fails, _g_e_t_n_e_t_b_y_n_a_m_e(3N) is then used to interpret the name as that of a network. _R_o_u_t_e uses a routing socket and the new message types RTM_ADD, RTM_DELETE, and RTM_CHANGE. As such, only the super-user may modify the routing tables. If the fflluusshh command is specified, _r_o_u_t_e will ``flush'' the routing tables of all gateway entries. One can choose to flush only those routes whose destinations are of a given address family, by specifying an optional keyword describing which address family. The --nn option prevents attempts to print host and network names symbolically when reporting actions. The --vv option causes additional details to be printed. The --qq option supresses all output. DDIIAAGGNNOOSSTTIICCSS ``aadddd [[ hhoosstt || nneettwwoorrkk ]] %%ss:: ggaatteewwaayy %%ss ffllaaggss %%xx'' The specified route is being added to the tables. The values printed are from the routing table entry supplied in the _i_o_c_t_l call. If the gateway address used was not the primary address of the gateway (the first one returned by _g_e_t_h_o_s_t_b_y_n_a_m_e), the gateway address is printed numerically as well as symbolically. Printed 7/27/90 June 2 ROUTE(8) 1990 ROUTE(8) ``ddeelleettee [[ hhoosstt || nneettwwoorrkk ]] %%ss:: ggaatteewwaayy %%ss ffllaaggss %%xx'' As above, but when deleting an entry. ``%%ss %%ss ddoonnee'' When the --ff flag is specified, each routing table entry deleted is indicated with a message of this form. ``NNeettwwoorrkk iiss uunnrreeaacchhaabbllee'' An attempt to add a route failed because the gateway listed was not on a directly-connected network. The next-hop gate- way must be given. ``nnoott iinn ttaabbllee'' A delete operation was attempted for an entry which wasn't present in the tables. ``rroouuttiinngg ttaabbllee oovveerrffllooww'' An add operation was attempted, but the system was low on resources and was unable to allocate memory to create the new entry. SSEEEE AALLSSOO netintro(4), routed(8), XNSrouted(8) Printed 7/27/90 June 3