ifup.8 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ifup(8) ifup(8)
  2. NAME
  3. ifup - bring a network interface up
  4. ifdown - take a network interface down
  5. SYNOPSIS
  6. ifup IFACE
  7. ifup -h|--help
  8. ifup -V|--version
  9. ifdown IFACE
  10. ifdown -h|--help
  11. ifdown -V|--version
  12. DESCRIPTION
  13. The ifup and ifdown commands may be used to configure
  14. (or, respectively, deconfigure) a network interface based
  15. on interface definitions in the file
  16. /etc/sysconfig/ifconfig.IFACE.
  17. OPTIONS
  18. A summary of options is included below.
  19. -h, --help
  20. Show summary of options.
  21. -V, --version
  22. Show version information.
  23. EXAMPLES
  24. ifup eth0
  25. Bring up the interface defined in the file
  26. /etc/sysconfig/ifconfig.eth0
  27. ONBOOT=no
  28. IFACE=eth0
  29. SERVICE=ipv4-static
  30. IP=192.168.1.22
  31. GATEWAY=192.168.1.1
  32. PREFIX=24
  33. BROADCAST=192.168.1.255
  34. ifdown eth0:2
  35. Bring down the interface defined in the file
  36. /etc/sysconfig/ifconfig.eth0:2
  37. ONBOOT=no
  38. IFACE=eth0:2
  39. SERVICE=dhcpcd
  40. DHCP_START="--waitip"
  41. DHCP_STOP="-k"
  42. # Set PRINTIP="yes" to have the script print the DHCP IP address
  43. PRINTIP="yes"
  44. # Set PRINTALL="yes" to print the DHCP assigned values for
  45. # IP, SM, DG, and 1st NS.
  46. PRINTALL="no"
  47. ifup br0
  48. Bring up the interface defined in the file
  49. /etc/sysconfig/ifconfig.br0
  50. ONBOOT=yes
  51. IFACE=br0
  52. SERVICE="bridge ipv4-static"
  53. IP=192.168.1.22
  54. GATEWAY=192.168.1.1
  55. PREFIX=24
  56. BROADCAST=192.168.1.255
  57. STP=no # Spanning tree protocol, default no
  58. INTERFACE_COMPONENTS=eth0 # Add to IFACE
  59. IP_FORWARD=true
  60. NOTES
  61. The program does not configure network interfaces direct-
  62. ly. It runs scripts defined by the SERVICE variable in
  63. the network configuration file.
  64. The configuration files must have the following environ-
  65. ment variables set:
  66. IFACE - The interface to configure, e.g. eth0. It must
  67. be available in /sys/class/net.
  68. SERVICE - The service script to run to bring up the inter-
  69. face. Standard services are ipv4-static and
  70. ipv4-static-route. Other services such as dhcp
  71. or bridge may be installed. This value may
  72. be a list of services when the interface is a
  73. compound device such as a bridge.
  74. ONBOOT - If set to 'yes', the specified interface is
  75. configured by the netowrk boot script.
  76. GATEWAY - The default IP address to use for routing if
  77. the destination IP address is not in a static
  78. route or on a local network, e.g., 192.168.1.1.
  79. For secondary IP addresses on an interface, this
  80. parameter should not be specified.
  81. INTERFACE_COMPONENTS - A list of component interfaces
  82. only needed for a compound device such as a bridge.
  83. This list is normally a single value, e.g. eth0,
  84. for use with a virtual host such as kvm.
  85. Other paramters that are service specific include:
  86. ipv4-static
  87. IP - The IP address of the interface,
  88. e.g. 192.168.1.2.
  89. PREFIX - The number of bits that specify the network
  90. number of the interface. The default, if not
  91. specified, is 24.
  92. BROADCAST - The brodcast address for this interface,
  93. e.g 192.168.1.255. If not specified,
  94. the broadcast address will be calculated
  95. from the IP and PREFIX.
  96. ipv4-static-route
  97. TYPE - The type of route, typically 'default',
  98. 'network', 'or host'.
  99. IP - The IP address for a network or host, if the
  100. TYPE is not 'default'.
  101. PREFIX - The prefix for the associated IP address.
  102. GATEWAY - The IP address for a network route.
  103. SOURCE - The source IP address to prefer when sending
  104. to the destinations covered by the specified
  105. route. (optional)
  106. dhcp/dhclient
  107. DHCP_START - Optional parameters to pass to the dhcp client
  108. at startup.
  109. DHCP_STOP - Optional paremeters to pass to the dhcp client
  110. at shutdown.
  111. PRINTIP - Flag to print the dhcp address to stdout
  112. PRINTALL - Flag to print all obtained dhcp data to stdout
  113. bridge
  114. IP_FORWARD - An optional flag to enable the system to forward
  115. inbound IP packets received by one interface to
  116. another outbound interface.
  117. STP - Set bridge spanning tree protocol. Default is no.
  118. FILES
  119. /etc/sysconfig/ifconfig.*
  120. definitions of network interfaces
  121. AUTHORS
  122. The ifup/ifdown suite was written by Nathan Coulson
  123. <nathan@linuxfromscratch.org> and Kevin P. Fleming
  124. <kpfleming@linuxfromscratch.org>
  125. and updated by Bruce Dubbs <bdubbs@linuxfromscratch>.
  126. SEE ALSO
  127. ip(8).
  128. IFUP/IFDOWN 8 April 2012 ifup(8)