Penguin
Blame: interfaces(5)
EditPageHistoryDiffInfoLikePages
Annotated edit history of interfaces(5) version 6, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
2 RolfSchumacher 2
3 /etc/network/interfaces - network interface configuration for ifup and
4 ifdown
5
6 !!DESCRIPTION
7
5 RolfSchumacher 8 /etc/network/interfaces contains network interface configuration information for the ifup(8) and ifdown(8) commands. This is where you configure how your system is connected to the network.
2 RolfSchumacher 9
10 Lines starting with `#' are ignored. A line may be extended across
11 multiple lines by making the last character a backslash.
12
13 The file consists of zero or more "iface", "mapping" and "auto" stanzas. Here is an example.
14
15 auto lo eth0
16
17 iface lo inet loopback
18
19 mapping eth0
20 script /usr/local/sbin/map-scheme
21 map HOME eth0-home
22 map WORK eth0-work
23
24 iface eth0-home inet static
25 address 192.168.1.1
26 netmask 255.255.255.0
27 up flush-mail
28
29 iface eth0-work inet dhcp
30
31 Stanzas beginning with the word "auto" are used to identify the physical interfaces to be brought up when __ifup__ is run with the __-a__ option.
32 (This option is used by the system boot scripts.) Physical interface
33 names should follow the word "auto" on the same line. There can be
34 multiple "auto" stanzas. __ifup__ brings the named interfaces up in the
35 order listed.
36
37 Stanzas beginning with the word "mapping" are used to determine how a
38 logical interface name is chosen for a physical interface that is to be
39 brought up. The first line of a mapping stanza consists of the word
40 "mapping" followed by a pattern in shell glob syntax. Each mapping
41 stanza must contain a __script__ definition. The named script is run with
42 the physical interface name as its argument and with the contents of
43 all following "map" lines in the stanza provided to it on its standard
44 input. The script must print a string on its standard output before
45 exiting.
46
47 Mapping a name consists of searching the mapping patterns and running
48 the script corresponding to the first match; the script outputs the
49 name to which the original is mapped.
50
51 __ifup__ is normally given a physical interface name as its first
52 non-option argument. __ifup__ begins by choosing this as the logical name
53 for the interface. It then maps this name repeatedly until either some
54 mapping results in a logical interface name that has been defined, in
55 which case __ifup__ attempts to bring up the physical interface as that
56 logical interface, or the name matches no pattern, in which case __ifup__
57 exits with an error.
58
59 Stanzas defining logical interfaces start with a line consisting of the
60 word "iface" followed by the name of the logical interface. In simple
61 configurations without mapping stanzas this name should simply be the
62 name of the physical interface to which it is to be applied. (The
63 default mapping script is, in effect, the __echo__ command.) The interface
64 name is followed by the name of the address family that the interface
65 uses. This will be "inet" for TCP/IP networking, but there is also
66 some support for IPX networking ("ipx"), and IPv6 networking ("inet6").
67 Following that is the name of the method used to configure the interface.
68
69 Additional options can be given on subsequent lines in the stanza.
70 Which options are available depends on the family and method, as
71 described below. Additional options can be made available by other
72 Debian packages. For example, the wireless-tools package makes available a number of options prefixed with "wireless-" which can be used to
5 RolfSchumacher 73 configure the interface using iwconfig(8)__.__
2 RolfSchumacher 74
75 Options are usually indented for clarity (as in the example above) but
76 are not required to be.
77
78 !!IFACE OPTIONS
79
80 The following "command" options are available for every family and
81 method. Each of these options can be given multiple times in a single
82 stanza, in which case the commands are executed in the order in which
83 they appear in the stanza. If one of the commands fails, none of the
84 others will be executed but the interface will still be configured.
85 (You can ensure a command never fails by suffixing "|| true".)
86
87 __up command__
88 Run__ command__ after bringing the interface up.
89
90 __pre-up command__
91 Run__ command__ before bringing the interface up.
92
93 __down command__
94 Run__ command__ before taking the interface down.
95
96 __post-down command__
97 Run__ command__ after taking the interface down.
98
99 There exists for each of the above mentioned options a directory
5 RolfSchumacher 100 __ /etc/network/if__-__<option>_____ the scripts in which are run (with no arguments) using run-parts(8) after the option itself has been processed.
2 RolfSchumacher 101
102 All of these commands have access to the following environment variables.
103
104 __IFACE__ physical name of the interface being processed
105
106 __ADDRFAM__
107 address family of the interface
108
109 __METHOD__ method of the interface (e.g., "static")
110
111 __MODE__ either__ start__ or__ stop__, depending on whether the script is called
112 by __ifup__ or __ifdown__.
113
114 __PATH__ the command search path: __ /usr/local/sbin:/usr/local/bin:__ __ /usr/sbin:/usr/bin:/sbin:/bin__
115
116 Additionally, all options given in an interface definition stanza are
117 exported to the environment in upper case with "IF_" prepended and with
118 hyphens converted to underscores and non-alphanumeric characters discarded.
119
120 __INET__ __ADDRESS__ __FAMILY__
121 This section documents the methods available in the inet address family.
122
123 __The__ __loopback__ __Method__
124 This method may be used to define the IPv4 loopback interface.
125
126 __Options__
127
128 (No options)
129
130 __The__ __static__ __Method__
131 This method may be used to define ethernet interfaces with statically
132 allocated IPv4 addresses.
133
134 __Options__
135
136 __address address__
137 Address (dotted quad) __required__
138
139 __netmask netmask__
140 Netmask (dotted quad) __required__
141
142 __broadcast broadcast_address__
143 Broadcast address (dotted quad)
144
145 __network network_address__
146 Network address (dotted quad) __required__ __for__ __2.0.x__ __kernels__
147
148 __gateway address__
149 Default gateway (dotted quad)
150
151 __pointopoint address__
152 Address of other end point (dotted quad). Note the
153 spelling of "point-to".
154
155 __media type__
156 Medium type, driver dependent
157
158 __hwaddress class____ address__
159 Hardware Address.__ class__ is one of __ether__, __ax25__, __ARCnet__ or
160 __netrom__.__ address__ is dependent on the above choice.
161
162 __mtu size__
163 MTU size
164
165 __The__ __manual__ __Method__
166 This method may be used to define interfaces for which no configuration
167 is done by default. Such interfaces can be configured manually by means
168 of __up__ and __down__ commands or /etc/network/if-*.d scripts.
169
170 __Options__
171
172 (No options)
173
174 __The__ __dhcp__ __Method__
175 This method may be used to obtain an address via DHCP with any of the
176 tools: dhclient, pump, udhcpc, dhcpcd. (They have been listed in their
177 order of precedence.) If you have a complicated DHCP setup you should
178 note that some of these clients use their own configuration files and
179 do not obtain their configuration information via __ifup__.
180
181 __Options__
182
183 __hostname hostname__
184 Hostname to be requested (pump, dhcpcd, udhcpc)
185
186 __leasehours leastime__
187 Preferred lease time in hours (pump)
188
189 __leasetime leasetime__
190 Preferred lease time in seconds (dhcpcd)
191
192 __vendor vendor__
193 Vendor class identifier (dhcpcd)
194
195 __client client_id__
196 Client identifier (dhcpcd, udhcpc)
197
198 __The__ __bootp__ __Method__
199 This method may be used to obtain an address via bootp.
200
201 __Options__
202
203 __bootfile file__
204 Tell the server to use__ file__ as the bootfile.
205
206 __server address__
207 Use the IP address __ address__ to communicate with the
208 server.
209
210 __hwaddr addr__
211 Use__ addr__ as the hardware address instead of whatever it
212 really is.
213
214 __The__ __ppp__ __Method__
215 This method uses pon/poff to configure a PPP interface. See those commands for details.
216
217 __Options__
218
219 __provider name__
220 Use__ name__ as the provider (from /etc/ppp/peers).
221
222 __The__ __wvdial__ __Method__
223 This method uses wvdial to configure a PPP interface. See that command
224 for ore details.
225
226 __Options__
227
228 __provider name__
229 Use__ name__ as the provider (from /etc/ppp/peers).
230
231 __IPX__ __ADDRESS__ __FAMILY__
232 This section documents the methods available in the ipx address family.
233
234 __The__ __static__ __Method__
235 This method may be used to setup an IPX interface. It requires the
236 __ ipx_interface__ command.
237
238 __Options__
239
240 __frame type__
241 __ type__ of ethernet frames to use (e.g. __802.2__)
242
243 __netnum id__
244 Network number
245
246 __The__ __dynamic__ __Method__
247 This method may be used to setup an IPX interface dynamically.
248
249 __Options__
250
251 __frame type__
252 __ type__ of ethernet frames to use (e.g. __802.2__)
253
254 __INET6__ __ADDRESS__ __FAMILY__
255 This section documents the methods available in the inet6 address family.
256
257 __The__ __loopback__ __Method__
258 This method may be used to define the IPv6 loopback interface.
259
260 __Options__
261
262 (No options)
263
264 __The__ __static__ __Method__
265 This method may be used to define interfaces with statically assigned
266 IPv6 addresses.
267
268 __Options__
269
270 __address address__
271 Address (colon delimited) __required__
272
273 __netmask mask__
274 Netmask (number of bits, eg 64) __required__
275
276 __gateway address__
277 Default gateway (colon delimited)
278
279 __media type__
280 Medium type, driver dependent
281
282 __hwaddress class____ address__
283 Hardware Address.__ class__ is one of __ether__, __ax25__, __ARCnet__ or
284 __netrom__.__ address__ is dependent on this choice.
285
286 __mtu size__
287 MTU size
288
289 __The__ __v4tunnel__ __Method__
290 This method may be used to setup an IPv6-over-IPv4 tunnel. It requires
291 the __ip__ command from the __iproute__ package.
292
293 __Options__
294
295 __address address__
296 Address (colon delimited) __required__
297
298 __netmask mask__
299 Netmask (number of bits, eg 64) __required__
300
301 __endpoint address__
302 Address of other tunnel endpoint (IPv4 dotted quad)
303 __required__
304
305 __local address__
306 Address of the local endpoint (IPv4 dotted quad)
307
308 __gateway address__
309 Default gateway (colon delimited)
310
311 __ttl time__
312 TTL setting
313
314 !!AUTHOR
315
5 RolfSchumacher 316 The ifupdown suite was written by Anthony Towns <aj@azure.humbug.org.au>. This manpage was contributed by Joey Hess
317 <joey@kitenet.net>.
2 RolfSchumacher 318
319 !!SEE ALSO
320
5 RolfSchumacher 321 ifup(8), iwconfig(8), run-parts(8).
322
2 RolfSchumacher 323
324
325 ----
5 RolfSchumacher 326 the old text - can be deleted if not needed any longer -- 2003-12-30 RolfSchumacher
1 perry 327 !!NAME
328
329
330 /etc/network/interfaces - network interface configuration for ifup and ifdown
331 !!DESCRIPTION
332
333
334 /etc/network/interfaces contains network interface
335 configuration information for the ifup(8) and
336 ifdown(8) commands. This is where you configure how
337 your system is connected to the network, by setting IP
338 addresses, and other related information.
339
340
341 The file can contain comments; all lines starting with `#'
342 are ignored. A line may be extended across multiple lines by
343 making the last character a \ in the usual
344 manner.
345
346
347 The file consists of zero or more
348
349
350 auto lo eth0
351
352
353 iface lo inet loopback
354
355
356 mapping eth0 script /usr/local/sbin/map-scheme map HOME
357 eth0-home map WORK eth0-work
358
359
360 iface eth0-home inet static address 192.168.1.1 netmask
361 255.255.255.0
362
363
364 iface eth0-work inet dhcp
365
366
367 Stanzas beginning with the word
368
369
370 Stanzas beginning with the word
371
372
373 Stanzas defining interfaces start with the word
374 ifconfig__(8) or
375 route(8) commands (ie, things like
376 __
377
378
379 The interface name is followed by address family the
380 interface uses -- generally this will be
381
382
383 Following that is the method used to configure the
384 interface. In the example above, this is
385
386
387 Further options may follow the
388 !!IFACE OPTIONS
389
390
391 There are currently three standard options available for all
392 interfaces, regardless of address family or method. These
393 are:
394
395
396 __up__ ''command''
397
398
399 Run ''command'' after bringing the interface up. This
400 option can be given multiple times for a single interface.
401 If so, the commands will be executed in order. If one of the
402 commands fails, none of the others will be executed, but the
403 interface will remain configured. (You can ensure a command
404 never fails by suffixing ''
405
406
407 __pre-up__ ''command''
408
409
410 Run ''command'' before bringing the interface up. This
411 option can be given multiple times for a single interface.
412 If so, the commands will be executed in order. If one of the
413 commands fails, none of the others will be executed, and the
414 interface will not be configured. (You can ensure a command
415 never fails by suffixing ''
416
417
418 __down__ ''command''
419
420
421 Run ''command'' before taking the interface down. This
422 option can be given multiple times for a single interface.
423 If so, the commands will be executed in order. If one of the
424 commands fails, none of the others will be executed, and the
425 interface will not be deconfigured. (You can ensure a
426 command never fails by suffixing
427 ''
428
429
430 __post-down__ ''command''
431
432
433 Run ''command'' after taking the interface down. This
434 option can be given multiple times for a single interface.
435 If so, the commands will be executed in order. If one of the
436 commands fails, none of the others will be executed, but the
437 interface will remain deconfigured. (You can ensure a
438 command never fails by suffixing
439 ''
440
441
442 Most methods require additional information, such as
443 address, and netmask; details about the available methods
444 and the information they require follows.
445 !!INET ADDRESS FAMILY
446
447
448 This section documents the methods available in the inet
449 address family.
450
451
452 __The loopback Method__
453
454
455 This method may be used to define the IPv4 loopback
456 interface.
457
458
459 __Options__
460
461
462 (No options)
463
464
465 __The static Method__
466
467
468 This method may be used to define ethernet interfaces with
469 statically allocated IPv4 addresses.
470
471
472 __Options__
473
474
475 __address__ ''address''
476
477
478 Address (dotted quad) __required__
479
480
481 __netmask__ ''netmask''
482
483
484 Netmask (dotted quad) __required__
485
486
487 __broadcast__ ''broadcast_address''
488
489
490 Broadcast address (dotted quad)
491
492
493 __network__ ''network_address''
494
495
496 Network address (dotted quad) __required for 2.0.x
497 kernels__
498
499
500 __gateway__ ''address''
501
502
503 Default gateway (dotted quad)
504
505
506 __pointopoint__ ''address''
507
508
509 Address of other end point (dotted quad). Note the spelling
510 of
511
512
513 __The dhcp Method__
514
515
516 This method may be used to obtain an address via DHCP with
517 any of the tools: dhclient, pump (2.2.x kernels only), or
518 dhcpcd. If you have a complicated DHCP setup you should note
519 that some of these clients use their own configuration
520 files, rather than obtaining their configuration via
521 *ifup*.
522
523
524 __Options__
525
526
527 __hostname__ ''hostname''
528
529
530 Hostname to be requested (pump, dhcpcd)
531
532
533 __leasehours__ ''leastime''
534
535
536 Preferred lease time in hours (pump)
537
538
539 __leasetime__ ''leasetime''
540
541
542 Preferred lease time in seconds (dhcpcd)
543
544
545 __vendor__ ''vendor''
546
547
548 Vendor class identifier (dhcpcd)
549
550
551 __client__ ''client_id''
552
553
554 Client identifier (dhcpcd)
555
556
557 __The bootp Method__
558
559
560 This method may be used to obtain an address via
561 bootp.
562
563
564 __Options__
565
566
567 __bootfile__ ''file''
568
569
570 Tell the server to use ''file'' as the
571 bootfile.
572
573
574 __server__ ''address''
575
576
577 Use the IP address ''address'' to communicate with the
578 server.
579
580
581 __hwaddr__ ''addr''
582
583
584 Use ''addr'' as the hardware address instead of whatever
585 it really is.
586
587
588 __The ppp Method__
589
590
591 This method uses pon/poff to configure a PPP interface. See
592 those commands for details.
593
594
595 __Options__
596
597
598 __provider__ ''name''
599
600
601 Use ''name'' as the provider (from
602 /etc/ppp/peers).
603
604
605 __The wvdial Method__
606
607
608 This method uses wvdial to configure a PPP interface. See
609 that command for ore details.
610
611
612 __Options__
613
614
615 __provider__ ''name''
616
617
618 Use ''name'' as the provider (from
619 /etc/ppp/peers).
620 !!IPX ADDRESS FAMILY
621
622
623 This section documents the methods available in the ipx
624 address family.
625
626
627 __The static Method__
628
629
630 This method may be used to setup an IPX
631 interface.
632
633
634 __Options__
635
636
637 __frame__
638
639
640 __netnum__
641
642
643 __The dynamic Method__
644
645
646 This method may be used to setup an IPX interface
647 dynamically.
648
649
650 __Options__
651
652
653 __frame__
654 !!INET6 ADDRESS FAMILY
655
656
657 This section documents the methods available in the inet6
658 address family.
659
660
661 __The loopback Method__
662
663
664 This method may be used to define the IPv6 loopback
665 interface.
666
667
668 __Options__
669
670
671 (No options)
672
673
674 __The static Method__
675
676
677 This method may be used to define interfaces with statically
678 assigned IPv6 addresses.
679
680
681 __Options__
682
683
684 __address__ ''address''
685
686
687 Address (colon delimited) __required__
688
689
690 __netmask__ ''mask''
691
692
693 Netmask (number of bits, eg 64) __required__
694
695
696 __gateway__ ''address''
697
698
699 Default gateway (colon delimited)
700
701
702 __The v4tunnel Method__
703
704
705 This method may be used to setup an IPv6-over-IPv4 tunnel.
706 It requires the __ip__ command from the __iproute__
707 package.
708
709
710 __Options__
711
712
713 __address__ ''address''
714
715
716 Address (colon delimited) __required__
717
718
719 __netmask__ ''mask''
720
721
722 Netmask (number of bits, eg 64) __required__
723
724
725 __endpoint__ ''address''
726
727
728 Address of other tunnel endpoint (IPv4 dotted quad)
729 __required__
730
731
732 __gateway__ ''address''
733
734
735 Default gateway (colon delimited)
6 CraigBox 736
1 perry 737 !!AUTHOR
738
6 CraigBox 739 The ifupdown suite was written by Anthony Towns
1 perry 740
741 !!SEE ALSO
742
743 ifup(8), ifdown(8)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 4 times)