1ROUTE(8) 386BSD System Manager's Manual ROUTE(8) 2 3NNAAMMEE 4 rroouuttee - manually manipulate the routing tables (Interim) 5 6SSYYNNOOPPSSIISS 7 rroouuttee [--nn] [--qq] [--vv] _c_o_m_m_a_n_d [[_m_o_d_i_f_i_e_r_s] _a_r_g_s] 8 9DDEESSCCRRIIPPTTIIOONN 10 RRoouuttee is a program used to manually manipulate the network routing 11 tables. It normally is not needed, as the system routing table 12 management daemon, routed(8), should tend to this task. 13 14 Options supported by rroouuttee: 15 16 --nn Prevent attempts to print host and network names symbolically 17 when reporting actions. 18 19 --vv (verbose) Print additional details. 20 21 --qq Suppress all output. 22 23 Commands accepted by rroouuttee: 24 25 aadddd Add a route. 26 fflluusshh Remove all routes. 27 ddeelleettee Delete a specific route. 28 cchhaannggee Change aspects of a route (such as its gateway). 29 ggeett Lookup and display the route for a destination. 30 mmoonniittoorr Continuously report any changes to the routing information 31 base, routing lookup misses, or suspected network 32 partionings. 33 34 The monitor command has the syntax 35 36 rroouuttee [--nn] mmoonniittoorr 37 38 The flush command has the syntax 39 40 rroouuttee [--nn] fflluusshh [_f_a_m_i_l_y] 41 42 Where the address family may be specified by any of the --oossii, --xxnnss, or 43 --iinneett keywords. 44 45 The other commands have the following syntax: 46 47 rroouuttee [--nn] _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 48 49 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 50 next-hop gateway to which packets should be addressed. Routes to a 51 particular host are distinguished from those to a network by interpreting 52 the Internet address associated with _d_e_s_t_i_n_a_t_i_o_n. The optional keywords 53 --nneett and --hhoosstt force the destination to be interpreted as a network or a 54 host, respectively. Otherwise, if the _d_e_s_t_i_n_a_t_i_o_n has a ``local address 55 part'' of INADDR_ANY , or if the _d_e_s_t_i_n_a_t_i_o_n is the symbolic name of a 56 network, then the route is assumed to be to a network; otherwise, it is 57 presumed to be a route to a host. 58 59 For example, 128.32 is interpreted as --hhoosstt 128.0.0.32; 128.32.130 is 60 interpreted as --hhoosstt 128.32.0.130; --nneett 128.32 is interpreted as 61 128.32.0.0; and --nneett 128.32.130 is interpreted as 128.32.130.0. 62 63 If the route is via an interface rather than via a gateway, the 64 --iinntteerrffaaccee modifier should be specified; the gateway given is the address 65 of this host on the common network, indicating the interface to be used 66 for transmission. 67 68 The optional modifiers --xxnnss, and --oossii specify that all subsequent 69 addresses are in the XNS or OSI address families, and the names must be 70 numeric specifications rather than symbolic names. 71 72 The optional --nneettmmaasskk qualifier is intended to achieve the effect of an 73 OSI ESIS redirect with the netmask option. One specifies an additional 74 ensuing address parameter (to be interpreted as a network mask). The 75 implicit network mask generated in the inet case can be overridden by 76 making sure this option follows the destination parameter. 77 78 The optional modifiers --rrtttt, --rrttttvvaarr, --sseennddppiippee, --rreeccvvppiippee, --mmttuu, 79 --hhooppccoouunntt, --eexxppiirree, and --sssstthhrreesshh provide initial values to metrics 80 maintained in the routing entry. These may be individually locked by 81 preceding each such modifier to be locked by the --lloocckk meta-modifier, or 82 one can specify that all ensuing metrics may be locked by the --lloocckkrreesstt 83 meta-modifier. 84 85 In a cchhaannggee or aadddd command where the destination and gateway are not 86 sufficient to specify the route (as in the ISO case where several 87 interfaces may have the same address), the --iiffpp or --iiffaa modifiers may be 88 used to determine the interface or interface address. 89 90 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 91 first as a host name using gethostbyname(3). If this lookup fails, 92 getnetbyname(3) is then used to interpret the name as that of a network. 93 94 RRoouuttee uses a routing socket and the new message types RTM_ADD, 95 RTM_DELETE, RTM_GET, and RTM_CHANGE. As such, only the super-user may 96 modify the routing tables. 97 98 If the fflluusshh command is specified, rroouuttee will ``flush'' the routing 99 tables of all gateway entries. One can choose to flush only those routes 100 whose destinations are of a given address family, by specifying an 101 optional keyword describing which address family. 102 103DDIIAAGGNNOOSSTTIICCSS 104 aadddd [[hhoosstt || nneettwwoorrkk ]] %%ss:: ggaatteewwaayy %%ss ffllaaggss %%xx 105 The specified route is being added to the tables. The values 106 printed are from the routing table entry supplied in the ioctl(2) 107 call. If the gateway address used was not the primary address of 108 the gateway (the first one returned by gethostbyname(3)), the 109 gateway address is printed numerically as well as symbolically. 110 111 ddeelleettee [[ hhoosstt &&|| nneettwwoorrkk ]] %%ss:: ggaatteewwaayy %%ss ffllaaggss %%xx 112 As above, but when deleting an entry. 113 114 %%ss %%ss ddoonnee 115 When the fflluusshh command is specified, each routing table entry 116 deleted is indicated with a message of this form. 117 118 NNeettwwoorrkk iiss uunnrreeaacchhaabbllee 119 An attempt to add a route failed because the gateway listed was 120 not on a directly-connected network. The next-hop gateway must 121 be given. 122 123 nnoott iinn ttaabbllee 124 A delete operation was attempted for an entry which wasn't 125 present in the tables. 126 127 rroouuttiinngg ttaabbllee oovveerrffllooww 128 An add operation was attempted, but the system was low on 129 resources and was unable to allocate memory to create the new 130 entry. 131 132SSEEEE AALLSSOO 133 netintro(4), route(4), esis(4), routed(8), XNSrouted(8) 134 135HHIISSTTOORRYY 136 The rroouuttee command appeared in 4.2BSD. 137 138BBUUGGSS 139 The first paragraph may have slightly exaggerated routed's abilities. 140 1414.2 Berkeley Distribution March 16, 1991 3 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199