User:Lzhang45/sandbox
ifupdown (network interface manager) introduction
Ifupdown is a network interface manager for Linux. The ifupdown package provides a standardized framework for the high level network configuration.
Features
The 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
history
The first version ifuodown 0.6.4-4.8 was published in 2006 and was applied by
Basic Usage
A 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"
- 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
- 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
Here 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
An updated version of ifupdown is Ifupdown2, which is for Cumulus Linux
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
References
- ^ "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.