Networking: Difference between revisions
→Port forwarding: Explain that both sections are the same configuration |
Add link aggregation |
||
| Line 115: | Line 115: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= IPv6 = | == IPv6 == | ||
== Prefix delegation with fixed DUID == | === Prefix delegation with fixed DUID === | ||
Sometimes the hosting provider manages IPv6 networks via a so-called ''DUID'' or ''clientid''. This snippet is required to make the network routable: | Sometimes the hosting provider manages IPv6 networks via a so-called ''DUID'' or ''clientid''. This snippet is required to make the network routable: | ||
| Line 157: | Line 157: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== IPv6-mostly == | === IPv6-mostly === | ||
For IPv6 mostly networks the situation in Linux is a little bit dire. | For IPv6 mostly networks the situation in Linux is a little bit dire. | ||
| Line 190: | Line 190: | ||
* https://nlnet.nl/project/IPv6-monostack/ | * https://nlnet.nl/project/IPv6-monostack/ | ||
= VLANs = | == VLANs == | ||
Refer to [https://nixos.org/manual/nixos/stable/options.html#opt-networking.vlans {{ic|networking.vlans}} in the manual]. | Refer to [https://nixos.org/manual/nixos/stable/options.html#opt-networking.vlans {{ic|networking.vlans}} in the manual]. | ||
| Line 232: | Line 232: | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Link aggregation == | |||
[https://en.wikipedia.org/wiki/Link_aggregation '''Link aggregation'''], also known as '''bonding''' or '''trunking''' is the combining of multiple network links in parallel. This guide focuses on creating a Link Aggregation Group ('''LAG''', '''bond''', or '''trunk''') using LACP (Link Aggregation Content Protocol). | |||
{| class="wikitable" | |||
|+Bonding modes | |||
! Bonding mode !! Description !! Switch configuration | |||
|- | |||
| <code>balance-rr</code> || Transmit packets round-robin. || Requires static EtherChannel enabled, not LACP-negotiated. | |||
|- | |||
| <code>active-backup</code> || Only one slave in the bond in active. If it fails, another one is picked to be active. || No configuration required on the switch. | |||
|- | |||
| <code>balance-xor</code> || Transmit packets based on the selected transmit hash policy. || Requires static EtherChannel enabled, not LACP-negotiated. | |||
|- | |||
| <code>broadcast</code> || Transmit everything on all slave interfaces. || Requires static EtherChannel enabled, not LACP-negotiated. | |||
|- | |||
| <code>802.3ad</code> || IEEE 802.3ad Dynamic link aggregation. Transmits packets based on the selected transmit hash policy. || Requires LACP-negotiated EtherChannel enabled. In simpler terms, dynamic LACP. | |||
|- | |||
| <code>balance-tlb</code> || Adaptive transmit load balancing || No configuration required on the switch. | |||
|- | |||
| <code>balance-alb</code> || Adaptive load balancing || No configuration required on the switch. | |||
|} | |||
{{Expansion|Missing info about bonds specific to Open vSwitch (OVS) like balance-slb and balance-tcp.}} | |||
=== NetworkManager === | |||
{{Warning|This has not been fully tested.}} | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
networking.networkmanager.ensureProfiles.profiles = { | |||
"Bond connection 1" = { | |||
bond = { | |||
downdelay = "0"; | |||
miimon = "1"; | |||
mode = "802.3ad"; # dynamic LACP | |||
updelay = "0"; | |||
}; | |||
connection = { | |||
id = "Bond connection 1"; | |||
interface-name = "bond0"; # Make sure this matches the controller properties | |||
type = "bond"; | |||
}; | |||
ipv4 = { | |||
method = "auto"; | |||
}; | |||
ipv6 = { | |||
addr-gen-mode = "stable-privacy"; | |||
method = "auto"; | |||
}; | |||
proxy = { }; | |||
}; | |||
# No more automatically generated "Wired connection 1" | |||
"bond0 port 1" = { | |||
connection = { | |||
id = "bond0 port 1"; | |||
type = "ethernet"; | |||
interface-name = "eth1"; # Replace this | |||
controller = "bond0"; | |||
port-type = "bond"; | |||
}; | |||
}; | |||
"bond0 port 2" = { | |||
connection = { | |||
id = "bond0 port 2"; | |||
type = "ethernet"; | |||
interface-name = "eth2"; # Replace this | |||
controller = "bond0"; | |||
port-type = "bond"; | |||
}; | |||
}; | |||
}; | |||
</nowiki>}} | |||
=== systemd-networkd === | |||
=== legacy scripted networking? === | |||
=== Teaming === | |||
Using the teaming driver provides more configuration capabilities since more descision-making is done in userspace <ref>https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/networking_guide/sec-comparison_of_network_teaming_to_bonding#sec-Comparison_of_Network_Teaming_to_Bonding</ref>. | |||
{{Expansion|Missing information about teaming.}} | |||
== References == | |||
<references /> | |||
[[Category:Networking]] | [[Category:Networking]] | ||