IFUPDOWN-MULTI-INTERFACES(5)
β¨ IFUPDOWN-MULTI-INTERFACES β¨
ok so bestie, this is the ifupdown-multi-interfaces(5) page β section 5, File formats, the whole vibe π
it's the ifupdown-multi extension for the interfaces(5) file format and honestly? she ate.
π NAME π
ifupdown-multi-interfaces β the ifupdown-multi extension for the interfaces(5) file format. no cap, that's literally it π«Ά
πΈ DESCRIPTION πΈ
So. /etc/network/interfaces is the file that holds all your network interface info for the ifup(8) and ifdown(8) commands. And THIS page is about the ifupdown-multi extensions to the standard interfaces(5) file format. β¨
The way that ifupdown-multi extends ifupdown is by integrating Linux's policy routing based support for multiple default gateways on independent network connections. π₯ Like, multiple uplinks, multiple gateways, all coexisting, all in one file.
And the best part? These extensions can replace a typical shell script based approach that directly invokes a sequence of ip(8) commands for configuring multiple uplinks. Instead of a whole script girl, you get declarative syntax right there in the /etc/network/interfaces file. iconic behavior tbh π
So how does she work? ifupdown-multi records the policy information used to bring up each network interface when ifup(8) is run, and then removes the same policy routing information when ifdown(8) is run. clean up after yourself, periodt π§
π IFACE OPTIONS π
Okay so real talk first β the standard address and netmask options must be set for each interface. and the gateway option must NOT be set. like, do not. π
Then, the new multi_gateway and multi_table options must be set to configure policy routing with ifupdown-multi. Those two are the main characters, you cannot skip them. β
And additionally, the multi_gateway_weight and multi_preferred_prefixes options can be specified in order to control optional policy routing features. optional but cute, yk?
multi_gatewayaddress β the default gateway for this interface. (Required.) like genuinely required bestie.multi_tableid β the table identifier. This must be a numeric value, and every single interface must have a unique value β no sharing, that's not the vibe. Recommended range:1-1000. (Required.)multi_gateway_weightweight β sets this gateway's weight. This value is directly passed as the weight parameter to the nexthop part of anip-route(8)route object. Higher values indicate higher relative bandwidth or quality. (Optional. π«)multi_preferred_prefixesprefix [prefix]... β prefer this connection for the given prefixes. This option configures the routing policy database using theip-rule(8)command to use this connection for the specified prefixes. (Optional. π¦)
π EXAMPLES π
Example 1: the basic girlie π
The following example shows a basic configuration with two network interfaces. eth0 is on the 198.51.100.0/24 network, while eth1 is on the 203.0.113.0/24 network. Each interface stanza has a multi_gateway option, as opposed to the usual gateway option. Each interface stanza also needs a multi_table option, whose parameter is a small, unique non-negative integer. (This number will be used internally to uniquely identify an interface-specific routing table. π)
auto eth0
iface eth0 inet static
address 198.51.100.123
netmask 255.255.255.0
multi_table 1
multi_gateway 198.51.100.1
auto eth1
iface eth1 inet static
address 203.0.113.234
netmask 255.255.255.0
multi_table 2
multi_gateway 203.0.113.1
Example 2: the deluxe edition β¨
The following example shows a more complicated setup using optional ifupdown-multi parameters. It is similar to the first example, but the network connection on eth0 is preferred for most connections, and several network prefixes prefer to use one or the other network connection. it's giving β¨strategicβ¨
auto eth0
iface eth0 inet static
address 198.51.100.123
netmask 255.255.255.0
multi_table 1
multi_gateway 198.51.100.1
multi_gateway_weight 5
multi_preferred_prefixes 10.0.0.0/8
auto eth1
iface eth1 inet static
address 203.0.113.234
netmask 255.255.255.0
multi_table 2
multi_gateway 203.0.113.1
multi_gateway_weight 1
multi_preferred_prefixes 172.16.0.0/12 192.168.0.0/16
π FILES π
/etc/network/interfacesβ system-wide network interface configuration. Seeinterfaces(5). π/run/network/ifupdown-multi.*β state information used by ifupdown-multi. that's where she keeps the receipts πΎ
π«Ά SEE ALSO π«Ά
interfaces(5), ifup(8), ip(8), ip-route(8), ip-rule(8).
Linux Advanced Routing & Traffic Control HOWTO -- Chapter 4: Rules. http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.rpdb.html
ok bye bestie, that's the whole page π this was ifupdown-multi version 0.1.0, dated 17 September 2013 β yes she's a 2013 girlie and she's still serving πΈπ
π¦ iykyk
π¦ where this page comes from
- debian bookworm: ifupdown-multi 1.0.0 Β· Apache-2.0
- debian trixie: ifupdown-multi 1.0.0 Β· Apache-2.0
- ubuntu jammy: ifupdown-multi 1.0.0 Β· Apache-2.0
- ubuntu noble: ifupdown-multi 1.0.0 Β· Apache-2.0
- ubuntu resolute: ifupdown-multi 1.0.0build1 Β· Apache-2.0
- ubuntu stonking: ifupdown-multi 1.0.0build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms