| @@ -1,416 +1,416 @@ | | | @@ -1,416 +1,416 @@ |
1 | .\" $NetBSD: netstat.1,v 1.50 2009/03/11 13:54:29 joerg Exp $ | | 1 | .\" $NetBSD: netstat.1,v 1.51 2009/05/28 14:57:42 christos Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1983, 1990, 1992, 1993 | | 3 | .\" Copyright (c) 1983, 1990, 1992, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" 3. Neither the name of the University nor the names of its contributors | | 14 | .\" 3. Neither the name of the University nor the names of its contributors |
15 | .\" may be used to endorse or promote products derived from this software | | 15 | .\" may be used to endorse or promote products derived from this software |
16 | .\" without specific prior written permission. | | 16 | .\" without specific prior written permission. |
17 | .\" | | 17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | | 18 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
19 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 19 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 20 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 21 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
22 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 22 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
23 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 23 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
24 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 24 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
25 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 25 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
26 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 26 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 | .\" SUCH DAMAGE. | | 28 | .\" SUCH DAMAGE. |
29 | .\" | | 29 | .\" |
30 | .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 | | 30 | .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 |
31 | .\" | | 31 | .\" |
32 | .Dd August 30, 2007 | | 32 | .Dd August 30, 2007 |
33 | .Dt NETSTAT 1 | | 33 | .Dt NETSTAT 1 |
34 | .Os | | 34 | .Os |
35 | .Sh NAME | | 35 | .Sh NAME |
36 | .Nm netstat | | 36 | .Nm netstat |
37 | .Nd show network status | | 37 | .Nd show network status |
38 | .Sh SYNOPSIS | | 38 | .Sh SYNOPSIS |
39 | .Nm | | 39 | .Nm |
40 | .Op Fl Aan | | 40 | .Op Fl Aan |
41 | .Op Fl f Ar address_family | | 41 | .Op Fl f Ar address_family |
42 | .Op Fl M Ar core | | 42 | .Op Fl M Ar core |
43 | .Op Fl N Ar system | | 43 | .Op Fl N Ar system |
44 | .Nm | | 44 | .Nm |
45 | .Op Fl bdgiLmnqrSsv | | 45 | .Op Fl bdgiLmnqrSsv |
46 | .Op Fl f Ar address_family | | 46 | .Op Fl f Ar address_family |
47 | .Op Fl M Ar core | | 47 | .Op Fl M Ar core |
48 | .Op Fl N Ar system | | 48 | .Op Fl N Ar system |
49 | .Nm | | 49 | .Nm |
50 | .Op Fl dn | | 50 | .Op Fl dn |
51 | .Op Fl I Ar interface | | 51 | .Op Fl I Ar interface |
52 | .Op Fl M Ar core | | 52 | .Op Fl M Ar core |
53 | .Op Fl N Ar system | | 53 | .Op Fl N Ar system |
54 | .Op Fl w Ar wait | | 54 | .Op Fl w Ar wait |
55 | .Nm | | 55 | .Nm |
56 | .Op Fl M Ar core | | 56 | .Op Fl M Ar core |
57 | .Op Fl N Ar system | | 57 | .Op Fl N Ar system |
58 | .Op Fl p Ar protocol | | 58 | .Op Fl p Ar protocol |
59 | .Nm | | 59 | .Nm |
60 | .Op Fl M Ar core | | 60 | .Op Fl M Ar core |
61 | .Op Fl N Ar system | | 61 | .Op Fl N Ar system |
62 | .Op Fl p Ar protocol | | 62 | .Op Fl p Ar protocol |
63 | .Fl P Ar pcbaddr | | 63 | .Fl P Ar pcbaddr |
64 | .Nm | | 64 | .Nm |
65 | .Op Fl i | | 65 | .Op Fl i |
66 | .Op Fl I Ar Interface | | 66 | .Op Fl I Ar Interface |
67 | .Op Fl p Ar protocol | | 67 | .Op Fl p Ar protocol |
68 | .Nm | | 68 | .Nm |
69 | .Op Fl is | | 69 | .Op Fl is |
70 | .Op Fl f Ar address_family | | 70 | .Op Fl f Ar address_family |
71 | .Op Fl I Ar Interface | | 71 | .Op Fl I Ar Interface |
72 | .Nm | | 72 | .Nm |
73 | .Op Fl s | | 73 | .Op Fl s |
74 | .Op Fl I Ar Interface | | 74 | .Op Fl I Ar Interface |
75 | .Fl B | | 75 | .Fl B |
76 | .Sh DESCRIPTION | | 76 | .Sh DESCRIPTION |
77 | The | | 77 | The |
78 | .Nm | | 78 | .Nm |
79 | command symbolically displays the contents of various network-related | | 79 | command symbolically displays the contents of various network-related |
80 | data structures. | | 80 | data structures. |
81 | There are a number of output formats, | | 81 | There are a number of output formats, |
82 | depending on the options for the information presented. | | 82 | depending on the options for the information presented. |
83 | The first form of the command displays a list of active sockets for | | 83 | The first form of the command displays a list of active sockets for |
84 | each protocol. | | 84 | each protocol. |
85 | The second form presents the contents of one of the other network | | 85 | The second form presents the contents of one of the other network |
86 | data structures according to the option selected. | | 86 | data structures according to the option selected. |
87 | Using the third form, with a | | 87 | Using the third form, with a |
88 | .Ar wait | | 88 | .Ar wait |
89 | interval specified, | | 89 | interval specified, |
90 | .Nm | | 90 | .Nm |
91 | will continuously display the information regarding packet | | 91 | will continuously display the information regarding packet |
92 | traffic on the configured network interfaces. | | 92 | traffic on the configured network interfaces. |
93 | The fourth form displays statistics about the named protocol. | | 93 | The fourth form displays statistics about the named protocol. |
94 | The fifth and sixth forms display per interface statistics for | | 94 | The fifth and sixth forms display per interface statistics for |
95 | the specified protocol or address family. | | 95 | the specified protocol or address family. |
96 | .Pp | | 96 | .Pp |
97 | The options have the following meaning: | | 97 | The options have the following meaning: |
98 | .Bl -tag -width flag | | 98 | .Bl -tag -width flag |
99 | .It Fl A | | 99 | .It Fl A |
100 | With the default display, | | 100 | With the default display, |
101 | show the address of any protocol control blocks associated with sockets; used | | 101 | show the address of any protocol control blocks associated with sockets; used |
102 | for debugging. | | 102 | for debugging. |
103 | .It Fl a | | 103 | .It Fl a |
104 | With the default display, | | 104 | With the default display, |
105 | show the state of all sockets; normally sockets used by | | 105 | show the state of all sockets; normally sockets used by |
106 | server processes are not shown. | | 106 | server processes are not shown. |
107 | .It Fl B | | 107 | .It Fl B |
108 | With the default display, | | 108 | With the default display, |
109 | show the current | | 109 | show the current |
110 | .Xr bpf 4 | | 110 | .Xr bpf 4 |
111 | peers. | | 111 | peers. |
112 | To show only the peers listening to a specific interface, | | 112 | To show only the peers listening to a specific interface, |
113 | use the | | 113 | use the |
114 | .Fl I | | 114 | .Fl I |
115 | option. | | 115 | option. |
116 | If the | | 116 | If the |
117 | .Fl s | | 117 | .Fl s |
118 | option is present, show the current | | 118 | option is present, show the current |
119 | .Xr bpf 4 | | 119 | .Xr bpf 4 |
120 | statistics. | | 120 | statistics. |
121 | .It Fl b | | 121 | .It Fl b |
122 | With the interface display (option | | 122 | With the interface display (option |
123 | .Fl i ) , | | 123 | .Fl i ) , |
124 | show bytes in and out, instead of packets in and out. | | 124 | show bytes in and out, instead of packets in and out. |
125 | .It Fl d | | 125 | .It Fl d |
126 | With either interface display (option | | 126 | With either interface display (option |
127 | .Fl i | | 127 | .Fl i |
128 | or an interval, as described below), | | 128 | or an interval, as described below), |
129 | show the number of dropped packets. | | 129 | show the number of dropped packets. |
130 | .It Fl f Ar address_family | | 130 | .It Fl f Ar address_family |
131 | Limit statistics or address control block reports to those | | 131 | Limit statistics or address control block reports to those |
132 | of the specified | | 132 | of the specified |
133 | .Ar address_family . | | 133 | .Ar address_family . |
134 | The following address families | | 134 | The following address families |
135 | are recognized: | | 135 | are recognized: |
136 | .Ar inet , | | 136 | .Ar inet , |
137 | for | | 137 | for |
138 | .Dv AF_INET ; | | 138 | .Dv AF_INET ; |
139 | .Ar inet6 , | | 139 | .Ar inet6 , |
140 | for | | 140 | for |
141 | .Dv AF_INET6 ; | | 141 | .Dv AF_INET6 ; |
142 | .Ar arp , | | 142 | .Ar arp , |
143 | for | | 143 | for |
144 | .Dv AF_ARP ; | | 144 | .Dv AF_ARP ; |
145 | .Ar ns , | | 145 | .Ar ns , |
146 | for | | 146 | for |
147 | .Dv AF_NS ; | | 147 | .Dv AF_NS ; |
148 | .Ar iso , | | 148 | .Ar iso , |
149 | for | | 149 | for |
150 | .Dv AF_ISO ; | | 150 | .Dv AF_ISO ; |
151 | .Ar atalk , | | 151 | .Ar atalk , |
152 | for | | 152 | for |
153 | .Dv AF_APPLETALK ; | | 153 | .Dv AF_APPLETALK ; |
154 | and | | 154 | and |
155 | .Ar local | | 155 | .Ar local |
156 | or | | 156 | or |
157 | .Ar unix , | | 157 | .Ar unix , |
158 | for | | 158 | for |
159 | .Dv AF_LOCAL . | | 159 | .Dv AF_LOCAL . |
160 | .It Fl g | | 160 | .It Fl g |
161 | Show information related to multicast (group address) routing. | | 161 | Show information related to multicast (group address) routing. |
162 | By default, show the IP Multicast virtual-interface and routing tables. | | 162 | By default, show the IP Multicast virtual-interface and routing tables. |
163 | If the | | 163 | If the |
164 | .Fl s | | 164 | .Fl s |
165 | option is also present, show multicast routing statistics. | | 165 | option is also present, show multicast routing statistics. |
166 | .It Fl I Ar interface | | 166 | .It Fl I Ar interface |
167 | Show information about the specified interface; | | 167 | Show information about the specified interface; |
168 | used with a | | 168 | used with a |
169 | .Ar wait | | 169 | .Ar wait |
170 | interval as described below. | | 170 | interval as described below. |
171 | If the | | 171 | If the |
172 | .Fl f Ar address_family | | 172 | .Fl f Ar address_family |
173 | option (with the | | 173 | option (with the |
174 | .Fl s | | 174 | .Fl s |
175 | option) or the | | 175 | option) or the |
176 | .Fl p Ar protocol | | 176 | .Fl p Ar protocol |
177 | option is present, show per-interface statistics on the | | 177 | option is present, show per-interface statistics on the |
178 | .Ar interface | | 178 | .Ar interface |
179 | for the specified | | 179 | for the specified |
180 | .Ar address_family | | 180 | .Ar address_family |
181 | or | | 181 | or |
182 | .Ar protocol , | | 182 | .Ar protocol , |
183 | respectively. | | 183 | respectively. |
184 | .It Fl i | | 184 | .It Fl i |
185 | Show the state of interfaces which have been auto-configured | | 185 | Show the state of interfaces which have been auto-configured |
186 | (interfaces statically configured into a system, but not | | 186 | (interfaces statically configured into a system, but not |
187 | located at boot time are not shown). | | 187 | located at boot time are not shown). |
188 | If the | | 188 | If the |
189 | .Fl a | | 189 | .Fl a |
190 | options is also present, multicast addresses currently in use are shown | | 190 | options is also present, multicast addresses currently in use are shown |
191 | for each Ethernet interface and for each IP interface address. | | 191 | for each Ethernet interface and for each IP interface address. |
192 | Multicast addresses are shown on separate lines following the interface | | 192 | Multicast addresses are shown on separate lines following the interface |
193 | address with which they are associated. | | 193 | address with which they are associated. |
194 | If the | | 194 | If the |
195 | .Fl f Ar address_family | | 195 | .Fl f Ar address_family |
196 | option (with the | | 196 | option (with the |
197 | .Fl s | | 197 | .Fl s |
198 | option) or the | | 198 | option) or the |
199 | .Fl p Ar protocol | | 199 | .Fl p Ar protocol |
200 | option is present, show per-interface statistics on all interfaces | | 200 | option is present, show per-interface statistics on all interfaces |
201 | for the specified | | 201 | for the specified |
202 | .Ar address_family | | 202 | .Ar address_family |
203 | or | | 203 | or |
204 | .Ar protocol , | | 204 | .Ar protocol , |
205 | respectively. | | 205 | respectively. |
206 | .It Fl L | | 206 | .It Fl L |
207 | Don't show link-level routes (e.g., IPv4 ARP or IPv6 neighbour cache). | | 207 | Don't show link-level routes (e.g., IPv4 ARP or IPv6 neighbour cache). |
208 | .It Fl M | | 208 | .It Fl M |
209 | Extract values associated with the name list from the specified core | | 209 | Extract values associated with the name list from the specified core |
210 | instead of the default | | 210 | instead of the default |
211 | .Pa /dev/kmem . | | 211 | .Pa /dev/kmem . |
212 | .It Fl m | | 212 | .It Fl m |
213 | Show statistics recorded by the memory management routines | | 213 | Show statistics recorded by the memory management routines |
214 | (the network manages a private pool of memory buffers). | | 214 | (the network manages a private pool of memory buffers). |
215 | .It Fl N | | 215 | .It Fl N |
216 | Extract the name list from the specified system instead of the default | | 216 | Extract the name list from the specified system instead of the default |
217 | .Pa /netbsd . | | 217 | .Pa /netbsd . |
218 | .It Fl n | | 218 | .It Fl n |
219 | Show network addresses and ports as numbers (normally | | 219 | Show network addresses and ports as numbers (normally |
220 | .Nm | | 220 | .Nm |
221 | interprets addresses and ports and attempts to display them | | 221 | interprets addresses and ports and attempts to display them |
222 | symbolically). | | 222 | symbolically). |
223 | This option may be used with any of the display formats. | | 223 | This option may be used with any of the display formats. |
224 | .It Fl P Ar pcbaddr | | 224 | .It Fl P Ar pcbaddr |
225 | Dump the contents of the protocol control block (PCB) located at kernel | | 225 | Dump the contents of the protocol control block (PCB) located at kernel |
226 | virtual address | | 226 | virtual address |
227 | .Ar pcbaddr . | | 227 | .Ar pcbaddr . |
228 | This address may be obtained using the | | 228 | This address may be obtained using the |
229 | .Fl A | | 229 | .Fl A |
230 | flag. | | 230 | flag. |
231 | The default protocol is TCP, but may be overridden using the | | 231 | The default protocol is TCP, but may be overridden using the |
232 | .Fl p | | 232 | .Fl p |
233 | flag. | | 233 | flag. |
234 | .It Fl p Ar protocol | | 234 | .It Fl p Ar protocol |
235 | Show statistics about | | 235 | Show statistics about |
236 | .Ar protocol , | | 236 | .Ar protocol , |
237 | which is either a well-known name for a protocol or an alias for it. | | 237 | which is either a well-known name for a protocol or an alias for it. |
238 | Some protocol names and aliases are listed in the file | | 238 | Some protocol names and aliases are listed in the file |
239 | .Pa /etc/protocols . | | 239 | .Pa /etc/protocols . |
240 | A null response typically means that there are no interesting numbers to | | 240 | A null response typically means that there are no interesting numbers to |
241 | report. | | 241 | report. |
242 | The program will complain if | | 242 | The program will complain if |
243 | .Ar protocol | | 243 | .Ar protocol |
244 | is unknown or if there is no statistics routine for it. | | 244 | is unknown or if there is no statistics routine for it. |
245 | .It Fl q | | 245 | .It Fl q |
246 | Show software interrupt queue setting/statistics for all protocols. | | 246 | Show software interrupt queue setting/statistics for all protocols. |
247 | .It Fl r | | 247 | .It Fl r |
248 | Show the routing tables. | | 248 | Show the routing tables. |
249 | When | | 249 | When |
250 | .Fl s | | 250 | .Fl s |
251 | is also present, show routing statistics instead. | | 251 | is also present, show routing statistics instead. |
252 | .It Fl S | | 252 | .It Fl S |
253 | Show network addresses as numbers (as with | | 253 | Show network addresses as numbers (as with |
254 | .Fl n , | | 254 | .Fl n , |
255 | but show ports symbolically). | | 255 | but show ports symbolically). |
256 | .It Fl s | | 256 | .It Fl s |
257 | Show per-protocol statistics. | | 257 | Show per-protocol statistics. |
258 | If this option is repeated, counters with a value of zero are suppressed. | | 258 | If this option is repeated, counters with a value of zero are suppressed. |
259 | .It Fl v | | 259 | .It Fl v |
260 | Show extra (verbose) detail for the routing tables | | 260 | Show extra (verbose) detail for the routing tables |
261 | .Pq Fl r , | | 261 | .Pq Fl r , |
262 | or avoid truncation of long addresses. | | 262 | or avoid truncation of long addresses. |
263 | .It Fl w Ar wait | | 263 | .It Fl w Ar wait |
264 | Show network interface statistics at intervals of | | 264 | Show network interface statistics at intervals of |
265 | .Ar wait | | 265 | .Ar wait |
266 | seconds. | | 266 | seconds. |
267 | .El | | 267 | .El |
268 | .Pp | | 268 | .Pp |
269 | The default display, for active sockets, shows the local | | 269 | The default display, for active sockets, shows the local |
270 | and remote addresses, send and receive queue sizes (in bytes), protocol, | | 270 | and remote addresses, send and receive queue sizes (in bytes), protocol, |
271 | and the internal state of the protocol. | | 271 | and the internal state of the protocol. |
272 | Address formats are of the form ``host.port'' or ``network.port'' | | 272 | Address formats are of the form ``host.port'' or ``network.port'' |
273 | if a socket's address specifies a network but no specific host address. | | 273 | if a socket's address specifies a network but no specific host address. |
274 | When known the host and network addresses are displayed symbolically | | 274 | When known the host and network addresses are displayed symbolically |
275 | according to the data bases | | 275 | according to the data bases |
276 | .Pa /etc/hosts | | 276 | .Pa /etc/hosts |
277 | and | | 277 | and |
278 | .Pa /etc/networks , | | 278 | .Pa /etc/networks , |
279 | respectively. | | 279 | respectively. |
280 | If a symbolic name for an address is unknown, or if | | 280 | If a symbolic name for an address is unknown, or if |
281 | the | | 281 | the |
282 | .Fl n | | 282 | .Fl n |
283 | option is specified, the address is printed numerically, according | | 283 | option is specified, the address is printed numerically, according |
284 | to the address family. | | 284 | to the address family. |
285 | For more information regarding | | 285 | For more information regarding |
286 | the Internet ``dot format,'' | | 286 | the Internet ``dot format,'' |
287 | refer to | | 287 | refer to |
288 | .Xr inet 3 ) . | | 288 | .Xr inet 3 ) . |
289 | Unspecified, | | 289 | Unspecified, |
290 | or ``wildcard'', addresses and ports appear as ``*''. | | 290 | or ``wildcard'', addresses and ports appear as ``*''. |
291 | You can use the | | 291 | You can use the |
292 | .Xr fstat 1 | | 292 | .Xr fstat 1 |
293 | to find out which process or processes hold references to a socket. | | 293 | to find out which process or processes hold references to a socket. |
294 | .Pp | | 294 | .Pp |
295 | The interface display provides a table of cumulative | | 295 | The interface display provides a table of cumulative |
296 | statistics regarding packets transferred, errors, and collisions. | | 296 | statistics regarding packets transferred, errors, and collisions. |
297 | The network addresses of the interface | | 297 | The network addresses of the interface |
298 | and the maximum transmission unit (``mtu'') are also displayed. | | 298 | and the maximum transmission unit (``mtu'') are also displayed. |
299 | .Pp | | 299 | .Pp |
300 | The routing table display indicates the available routes and | | 300 | The routing table display indicates the available routes and |
301 | their status. | | 301 | their status. |
302 | Each route consists of a destination host or network | | 302 | Each route consists of a destination host or network |
303 | and a gateway to use in forwarding packets. | | 303 | and a gateway to use in forwarding packets. |
304 | The flags field shows | | 304 | The flags field shows |
305 | a collection of information about the route stored as | | 305 | a collection of information about the route stored as |
306 | binary choices. | | 306 | binary choices. |
307 | The individual flags are discussed in more | | 307 | The individual flags are discussed in more |
308 | detail in the | | 308 | detail in the |
309 | .Xr route 8 | | 309 | .Xr route 8 |
310 | and | | 310 | and |
311 | .Xr route 4 | | 311 | .Xr route 4 |
312 | manual pages. | | 312 | manual pages. |
313 | The mapping between letters and flags is: | | 313 | The mapping between letters and flags is: |
314 | .Bl -column XXXX RTF_BLACKHOLE | | 314 | .Bl -column XXXX RTF_BLACKHOLE |
315 | .It 1 RTF_PROTO1 Protocol specific routing flag #1 | | 315 | .It 1 RTF_PROTO1 Protocol specific routing flag #1 |
316 | .It 2 RTF_PROTO2 Protocol specific routing flag #2 | | 316 | .It 2 RTF_PROTO2 Protocol specific routing flag #2 |
317 | .It B RTF_BLACKHOLE Just discard pkts (during updates) | | 317 | .It B RTF_BLACKHOLE Just discard pkts (during updates) |
318 | .It C RTF_CLONING Generate new routes on use | | 318 | .It C RTF_CLONING Generate new routes on use |
319 | .It c RTF_CLONED Cloned routes (generated from RTF_CLONING) | | 319 | .It c RTF_CLONED Cloned routes (generated from RTF_CLONING) |
320 | .It D RTF_DYNAMIC Created dynamically (by redirect) | | 320 | .It D RTF_DYNAMIC Created dynamically (by redirect) |
321 | .It G RTF_GATEWAY Destination requires forwarding by intermediary | | 321 | .It G RTF_GATEWAY Destination requires forwarding by intermediary |
322 | .It H RTF_HOST Host entry (net otherwise) | | 322 | .It H RTF_HOST Host entry (net otherwise) |
323 | .It L RTF_LLINFO Valid protocol to link address translation. | | 323 | .It L RTF_LLINFO Valid protocol to link address translation. |
324 | .It M RTF_MODIFIED Modified dynamically (by redirect) | | 324 | .It M RTF_MODIFIED Modified dynamically (by redirect) |
325 | .It R RTF_REJECT Host or net unreachable | | 325 | .It R RTF_REJECT Host or net unreachable |
326 | .It S RTF_STATIC Manually added | | 326 | .It S RTF_STATIC Manually added |
327 | .It U RTF_UP Route usable | | 327 | .It U RTF_UP Route usable |
328 | .It X RTF_XRESOLVE External daemon translates proto to link address | | 328 | .It X RTF_XRESOLVE External daemon translates proto to link address |
329 | .El | | 329 | .El |
330 | .Pp | | 330 | .Pp |
331 | Direct routes are created for each | | 331 | Direct routes are created for each |
332 | interface attached to the local host; | | 332 | interface attached to the local host; |
333 | the gateway field for such entries shows the address of the outgoing interface. | | 333 | the gateway field for such entries shows the address of the outgoing interface. |
334 | The refcnt field gives the | | 334 | The refcnt field gives the |
335 | current number of active uses of the route. | | 335 | current number of active uses of the route. |
336 | Connection oriented | | 336 | Connection oriented |
337 | protocols normally hold on to a single route for the duration of | | 337 | protocols normally hold on to a single route for the duration of |
338 | a connection while connectionless protocols obtain a route while sending | | 338 | a connection while connectionless protocols obtain a route while sending |
339 | to the same destination. | | 339 | to the same destination. |
340 | The use field provides a count of the number of packets | | 340 | The use field provides a count of the number of packets |
341 | sent using that route. | | 341 | sent using that route. |
342 | The mtu entry shows the mtu associated with | | 342 | The mtu entry shows the mtu associated with |
343 | that route. | | 343 | that route. |
344 | This mtu value is used as the basis for the TCP maximum | | 344 | This mtu value is used as the basis for the TCP maximum |
345 | segment size. | | 345 | segment size. |
346 | The 'L' flag appended to the mtu value indicates that | | 346 | The 'L' flag appended to the mtu value indicates that |
347 | the value is locked, and that path mtu discovery is turned off for | | 347 | the value is locked, and that path mtu discovery is turned off for |
348 | that route. | | 348 | that route. |
349 | A | | 349 | A |
350 | .Sq - | | 350 | .Sq - |
351 | indicates that the mtu for this route has not been set, and a default | | 351 | indicates that the mtu for this route has not been set, and a default |
352 | TCP maximum segment size will be used. | | 352 | TCP maximum segment size will be used. |
353 | The interface entry indicates | | 353 | The interface entry indicates |
354 | the network interface used for the route. | | 354 | the network interface used for the route. |
355 | .Pp | | 355 | .Pp |
356 | When | | 356 | When |
357 | .Nm | | 357 | .Nm |
358 | is invoked with the | | 358 | is invoked with the |
359 | .Fl w | | 359 | .Fl w |
360 | option and a | | 360 | option and a |
361 | .Ar wait | | 361 | .Ar wait |
362 | interval argument, it displays a running count of statistics related to | | 362 | interval argument, it displays a running count of statistics related to |
363 | network interfaces. | | 363 | network interfaces. |
364 | An obsolescent version of this option used a numeric parameter | | 364 | An obsolescent version of this option used a numeric parameter |
365 | with no option, and is currently supported for backward compatibility. | | 365 | with no option, and is currently supported for backward compatibility. |
366 | This display consists of a column for the primary interface (the first | | 366 | This display consists of a column for the primary interface (the first |
367 | interface found during autoconfiguration) and a column summarizing | | 367 | interface found during autoconfiguration) and a column summarizing |
368 | information for all interfaces. | | 368 | information for all interfaces. |
369 | The primary interface may be replaced with another interface with the | | 369 | The primary interface may be replaced with another interface with the |
370 | .Fl I | | 370 | .Fl I |
371 | option. | | 371 | option. |
372 | The first line of each screen of information contains a summary since the | | 372 | The first line of each screen of information contains a summary since the |
373 | system was last rebooted. | | 373 | system was last rebooted. |
374 | Subsequent lines of output show values | | 374 | Subsequent lines of output show values |
375 | accumulated over the preceding interval. | | 375 | accumulated over the preceding interval. |
376 | .Pp | | 376 | .Pp |
377 | The first character of the flags column in the | | 377 | The first character of the flags column in the |
378 | .Fl B | | 378 | .Fl B |
379 | option shows the status of the | | 379 | option shows the status of the |
380 | .Xr bpf 4 | | 380 | .Xr bpf 4 |
381 | descriptor which has three different values: | | 381 | descriptor which has three different values: |
382 | Idle ('I'), Waiting ('W') and Timed Out ('T'). | | 382 | Idle ('I'), Waiting ('W') and Timed Out ('T'). |
383 | The second character indicates wheter the promisc flag is set. | | 383 | The second character indicates whether the promisc flag is set. |
384 | The third character indicates the status of the immediate mode. | | 384 | The third character indicates the status of the immediate mode. |
385 | The fourth character indicates whether the peer will have the ability | | 385 | The fourth character indicates whether the peer will have the ability |
386 | to see the packets sent. | | 386 | to see the packets sent. |
387 | And the fifth character shows the header complete flag status. | | 387 | And the fifth character shows the header complete flag status. |
388 | .Sh SEE ALSO | | 388 | .Sh SEE ALSO |
389 | .Xr fstat 1 , | | 389 | .Xr fstat 1 , |
390 | .Xr nfsstat 1 , | | 390 | .Xr nfsstat 1 , |
391 | .Xr ps 1 , | | 391 | .Xr ps 1 , |
392 | .Xr sockstat 1 , | | 392 | .Xr sockstat 1 , |
393 | .Xr vmstat 1 , | | 393 | .Xr vmstat 1 , |
394 | .Xr inet 3 , | | 394 | .Xr inet 3 , |
395 | .Xr bpf 4 , | | 395 | .Xr bpf 4 , |
396 | .Xr hosts 5 , | | 396 | .Xr hosts 5 , |
397 | .Xr networks 5 , | | 397 | .Xr networks 5 , |
398 | .Xr protocols 5 , | | 398 | .Xr protocols 5 , |
399 | .Xr services 5 , | | 399 | .Xr services 5 , |
400 | .Xr iostat 8 , | | 400 | .Xr iostat 8 , |
401 | .Xr trpt 8 | | 401 | .Xr trpt 8 |
402 | .Sh HISTORY | | 402 | .Sh HISTORY |
403 | The | | 403 | The |
404 | .Nm | | 404 | .Nm |
405 | command appeared in | | 405 | command appeared in |
406 | .Bx 4.2 . | | 406 | .Bx 4.2 . |
407 | IPv6 support was added by WIDE/KAME project. | | 407 | IPv6 support was added by WIDE/KAME project. |
408 | .\" .Sh FILES | | 408 | .\" .Sh FILES |
409 | .\" .Bl -tag -width /dev/kmem -compact | | 409 | .\" .Bl -tag -width /dev/kmem -compact |
410 | .\" .It Pa /netbsd | | 410 | .\" .It Pa /netbsd |
411 | .\" default kernel namelist | | 411 | .\" default kernel namelist |
412 | .\" .It Pa /dev/kmem | | 412 | .\" .It Pa /dev/kmem |
413 | .\" default memory file | | 413 | .\" default memory file |
414 | .\" .El | | 414 | .\" .El |
415 | .Sh BUGS | | 415 | .Sh BUGS |
416 | The notion of errors is ill-defined. | | 416 | The notion of errors is ill-defined. |