ifup.8 6.2 KB

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