Networking: Difference between revisions

imported>Hypnosis2839
VLAN's: rename section, also usePredictableInterfaceNames was meant for backwards compat
imported>Hypnosis2839
clean up intro and minor formatting changes
Line 1: Line 1:
This site provides snippets for configuring your network ''just right'' for the use case you are looking for. All configuration is for <code>configuration.nix</code>
Networking config always goes in your system configuration.


== Configuration ==
== Configuration ==
Line 62: Line 62:
== 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:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 108: Line 108:
{{ic|enp2s1}} is a normal network interface at {{ic|192.168.1.2}} with no VLAN information.
{{ic|enp2s1}} is a normal network interface at {{ic|192.168.1.2}} with no VLAN information.


{{ic|enp2s0}} is the virtual LAN trunk, with two tagged VLANs, {{ic|vlan100}} and {{ic|vlan101}}.
{{ic|enp2s0}} is the virtual LAN trunk with two tagged VLANs, {{ic|vlan100}} and {{ic|vlan101}}.


{{ic|vlan100}} is in the {{ic|10.1.1.X}} network and {{ic|vlan101}} is in the {{ic|10.10.10.X}} network.
{{ic|vlan100}} is in the {{ic|10.1.1.X}} network and {{ic|vlan101}} is in the {{ic|10.10.10.X}} network.