ifupdown (network interface manager) introduction
editIfupdown is a network interface manager for Linux. The ifupdown package provides a standardized framework for the high level network configuration.
Features
editThe tool configures network by setting configuration files to make this job simple and automatic. By editing system file "/etc/network/interfaces", users can easily change network configuration.
Ifupdown also provides useful softwares ifup and ifdown. They offer high level network configuration dictated by the configuration file "/etc/network/interfaces". Ifup is for bringing a network interface up and ifdown is for taking a network interface down.
Ifupdown can be used to set up various interfaces, such as loopback network interface, network interface served by the DHCP, wireless LAN interface and so on[1].
history
editThe first version ifuodown 0.6.4-4.8 was published in 2006 and was applied by Ubuntu system. Up to 2016, this tool has published 199 versions[1] on Ubuntu and 99 versions on Debian[2]. The latest version is ifupdown 0.8. An updated tool ifupdown2 is available to improve the limitations of existing network interface configuration.
Basic Usage
editA basic way to configure network is, first edit file "/etc/network/interfaces", then use basic ifup/ifdown command to bring up or take down a interface.[2]
Basic syntax of file "/etc/network/interfaces"
edit- auto <interface_name>
Start interface <interface_name> upon start of the system.
- allow-hotplug <interface_name>
Start interface <interface_name> when the kernel detects a hotplug event from the interface.
- Lines started with "iface <config_name> ..."
Define the network configuration <config_name>.
- Lines started with "mapping <interface_name_glob>"
Define mapping value of <config_name> for the matching <interface_name>.
- A line starting with a hash "#"
Ignore as comments (end-of-line comments are not supported).
- A line ending with a backslash "\"
Extend the configuration to the next line.
Basic network configuration commands
edit- ifup <interface_name>
Bring up a network interface <interface_name> with the configuration <interface_name> if "iface <interface_name>" stanza exists in file "/etc/network/interfaces".
- ifup <interface_name>
Take down a network interface <interface_name> with the configuration <interface_name> if "iface <interface_name>" stanza exists in file "/etc/network/interfaces".
Basic Usage Example
editHere is an example of file "/etc/network/interfaces" in Debian operating system.
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet6 auto
iface eth0 inet static
address 45.79.155.57/24
gateway 45.79.155.1
There are two interfaces configured in this example: eth0 interface and loopback network interface.
Updated Version
editAn updated version of ifupdown is Ifupdown2, which is for Cumulus Linux[3] 2.1 and later uses. There are some notable differences between the two versions. However, the Ifupdown2 is backward compatible with ifupdown. Some commands are different in ifupdown2[4].
Ifupdown2 is introducing to solve existing shortcomings when applied to network switches.
- The lack of ability to handle interface dependencies.
- Incremental updates to interface configuration without disruption.
- Interface configuration validation.
See also
editReferences
edit- ^ "Chapter 5. Network setup". www.debian.org. Retrieved 2016-09-15.
{{cite web}}
: no-break space character in|title=
at position 8 (help) - ^ "Chapter 5. Network setup". www.debian.org. Retrieved 2016-09-15.
{{cite web}}
: no-break space character in|title=
at position 8 (help) - ^ "Cumulus Linux Overview | Cumulus Networks". cumulusnetworks.com. Retrieved 2016-09-15.
- ^ "Comparing ifupdown2 Commands with ifupdown Commands". Cumulus Networks® Knowledge Base. Retrieved 2016-09-15.