source: bootscripts/lfs/sbin/ifup.8@ f42cce0

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since f42cce0 was f42cce0, checked in by Bruce Dubbs <bdubbs@…>, 9 years ago

Update ifup and ipv4-static to better support multiple IP addresses
on an interface.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10838 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.2 KB
Line 
1ifup(8) ifup(8)
2
3NAME
4 ifup - bring a network interface up
5 ifdown - take a network interface down
6
7SYNOPSIS
8 ifup IFACE
9 ifup -h|--help
10 ifup -V|--version
11
12 ifdown IFACE
13 ifdown -h|--help
14 ifdown -V|--version
15
16DESCRIPTION
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
22OPTIONS
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
31EXAMPLES
32 ifup eth0
33 Bring up the interface defined in the file
34 /etc/sysconfig/ifconfig.eth0
35
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
44 ifdown eth0:2
45 Bring down the interface defined in the file
46 /etc/sysconfig/ifconfig.eth0:2
47
48 ONBOOT=no
49 IFACE=eth0
50 LABEL=eth0:2
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
78NOTES
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
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.
95
96 ONBOOT - If set to 'yes', the specified interface is
97 configured by the netowrk boot script.
98
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
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.
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
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
123 number of the interface. The default, if not
124 specified, is 24.
125
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
131 BROADCAST - The brodcast address for this interface,
132 e.g 192.168.1.255. If not specified,
133 the broadcast address will be calculated
134 from the IP and PREFIX.
135
136 ipv4-static-route
137
138 TYPE - The type of route, typically 'default',
139 'network', 'or host'.
140
141 IP - The IP address for a network or host, if the
142 TYPE is not 'default'.
143
144 PREFIX - The prefix for the associated IP address.
145
146 STATIC_GATEWAY - The IP address for a network route.
147
148 SOURCE - The source IP address to prefer when sending
149 to the destinations covered by the specified
150 route. (optional)
151
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
172FILES
173 /etc/sysconfig/ifconfig.*
174 definitions of network interfaces
175
176AUTHORS
177 The ifup/ifdown suite was written by Nathan Coulson
178 <nathan@linuxfromscratch.org> and Kevin P. Fleming
179 <kpfleming@linuxfromscratch.org>
180 and updated by Bruce Dubbs <bdubbs@linuxfromscratch>.
181
182SEE ALSO
183 ip(8).
184
185IFUP/IFDOWN 8 February 2015 ifup(8)
Note: See TracBrowser for help on using the repository browser.