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