diff --git a/static/docs/main/_sources/contents/nodeconfig.rst.txt b/static/docs/main/_sources/contents/nodeconfig.rst.txt index d22d5129..83780429 100644 --- a/static/docs/main/_sources/contents/nodeconfig.rst.txt +++ b/static/docs/main/_sources/contents/nodeconfig.rst.txt @@ -242,6 +242,24 @@ To configure a bonded (link aggreagtion) network interface the following command Note: the netnames of the member interterfaces need to match the "netname" of the bonded interface until the first "_" (in the example bond0) +Additional networks +------------------- + +Additional networks for the node can also be configured. +You will have provide all the necessary network information. + +.. code-block:: shell + + wwctl node set \ + --netdev ib0 \ + --hwaddr aa:bb:cc:dd:ee:ff \ + --ipaddr 10.0.20.1 \ + --netmask 255.255.252.0 \ + --netname iband \ + --type infiniband \ + n001 + + Node Discovery -------------- diff --git a/static/docs/main/_sources/contents/setup.rst.txt b/static/docs/main/_sources/contents/setup.rst.txt index 78788d32..0d292721 100644 --- a/static/docs/main/_sources/contents/setup.rst.txt +++ b/static/docs/main/_sources/contents/setup.rst.txt @@ -71,3 +71,114 @@ Here is an example of how the cluster's address can be divided for a * ``10.0.2.1 - 10.0.2.255``: Static node addresses * ``10.0.3.1 - 10.0.3.255``: IPMI and/or out of band addresses for the compute nodes + +Multiple networks +================= + +It is possible to configure several networks not just for the nodes but also for the management of ``dhcpd`` and ``tftp``. +There are two ways to achive this: + +1. Add the networks to the templates of ``dhcpd`` and/or the ``dnsmasq`` template directly. +2. Add the networks to a dummy node and change the templates of ``dhcp`` and ``dnsmasq`` accordingly. + +As the first solution is trivial only the second way is described in the following lines. + +As first the first step, add the dummy node. + +.. code-block:: shell + + wwctl node add deliverynet + +Now you will have to add the delivery networks to this node. + +.. code-block:: shell + + wwctl node set \ + --ipaddr 10.0.20.250 \ + --netmask 255.255.255.0 \ + --netname deliver1 \ + --nettagadd network=10.0.20.0,dynstart=10.10.20.10,dynend=10.10.20.50 \ + deliverynet + + wwctl node set \ + --ipaddr 10.0.30.250 \ + --netmask 255.255.255.0 \ + --netname deliver2 \ + --nettagadd network=10.0.30.0,dynstart=10.10.30.10,dynend=10.10.30.50 \ + deliverynet + +The ip address is used as the network address of host in the delivery network and an additional tags is used for definition of the network itself and the dynamic dhcp range. +You can check the result with ``wwctl node list``. + +.. code-block:: console + + # wwctl node list -a deliverynet + NODE FIELD PROFILE VALUE + deliverynet Id -- deliverynet + deliverynet Comment default This profile is automatically included for each node + deliverynet ContainerName default leap15.5 + deliverynet Ipxe -- (default) + deliverynet RuntimeOverlay -- (generic) + deliverynet SystemOverlay -- (wwinit) + deliverynet Root -- (initramfs) + deliverynet Init -- (/sbin/init) + deliverynet Kernel.Args -- (quiet crashkernel=no vga=791 net.naming-scheme=v238) + deliverynet Profiles -- default + deliverynet PrimaryNetDev -- (deliver1) + deliverynet NetDevs[deliver2].Type -- (ethernet) + deliverynet NetDevs[deliver2].OnBoot -- (true) + deliverynet NetDevs[deliver2].Ipaddr -- 10.0.30.250 + deliverynet NetDevs[deliver2].Netmask -- 255.255.255.0 + deliverynet NetDevs[deliver2].Tags[dynend] -- 10.10.30.50 + deliverynet NetDevs[deliver2].Tags[dynstart] -- 10.10.30.10 + deliverynet NetDevs[deliver2].Tags[network] -- 10.0.30.0 + deliverynet NetDevs[deliver1].Type -- (ethernet) + deliverynet NetDevs[deliver1].OnBoot -- (true) + deliverynet NetDevs[deliver1].Ipaddr -- 10.0.20.250 + deliverynet NetDevs[deliver1].Netmask -- 255.255.255.0 + deliverynet NetDevs[deliver1].Primary -- (true) + deliverynet NetDevs[deliver1].Tags[network] -- 10.0.20.0 + deliverynet NetDevs[deliver1].Tags[dynend] -- 10.10.20.50 + deliverynet NetDevs[deliver1].Tags[dynstart] -- 10.10.20.10 + +Now the templates of ``dhcpd`` and/or ``dnsmasq`` must be modified. +You can edit the configuration files. + +.. code-block:: shell + + wwctl overlay edit host etc/dhcpd.conf.ww + wwctl overlay edit host etc/dnsmasq.d/ww4-hosts.ww + +For the ``dhcp`` template you should add following lines + +.. code-block:: + + {{/* multiple networks */}} + {{- range $node := $.AllNodes}} + {{- if eq $node.Id.Get "deliverynet" }} + {{- range $netname, $netdev := $node.NetDevs}} + # network {{ $netname }} + subnet {{$netdev.Tags.network.Get}} netmask {{$netdev.Netmask.Get}} { + max-lease-time 120; + range {{$netdev.Tags.dynstart.Get}} {{$netdev.Tags.dynend.Get}}; + next-server {{$netdev.Ipaddr.Get}}; + } + {{- end }} + {{- end }} + {{- end }} + +and for the ``dnsmasq`` the following lines should be added + +.. code-block:: + + {{/* multiple networks */}} + {{- range $node := $.AllNodes}} + {{- if eq $node.Id.Get "deliverynet" }} + {{- range $netname, $netdev := $node.NetDevs}} + # network {{ $netname }} + dhcp-range={{$netdev.Tags.dynstart.Get}},{{$netdev.Tags.dynend.Get}},{{$netdev.Netmask.Get}},6h + {{- end }} + {{- end }} + {{- end }} + +Note that the ``{{- if eq $node.Id.Get "deliverynet" }}`` is used to identify the dummy host which carries the network information. diff --git a/static/docs/main/contents/nodeconfig.html b/static/docs/main/contents/nodeconfig.html index d7cf6ac6..9e9ade44 100644 --- a/static/docs/main/contents/nodeconfig.html +++ b/static/docs/main/contents/nodeconfig.html @@ -72,6 +72,7 @@
  • Configuring the Node’s Container Image
  • @@ -341,6 +342,21 @@

    Configuring the Node’s Network +

    Additional networks

    +

    Additional networks for the node can also be configured. +You will have provide all the necessary network information.

    +
    wwctl node set \
    +  --netdev ib0 \
    +  --hwaddr aa:bb:cc:dd:ee:ff \
    +  --ipaddr 10.0.20.1 \
    +  --netmask 255.255.252.0 \
    +  --netname iband \
    +  --type infiniband \
    +  n001
    +
    +
    +

    Node Discovery

    The hwaddr of a node can be automatically discovered by setting diff --git a/static/docs/main/contents/setup.html b/static/docs/main/contents/setup.html index 5d4fc8f3..25ac9c0d 100644 --- a/static/docs/main/contents/setup.html +++ b/static/docs/main/contents/setup.html @@ -56,6 +56,7 @@

  • Operating System Installation
  • Network
  • Addressing
  • +
  • Multiple networks
  • Warewulf Installation
  • @@ -183,6 +184,103 @@

    Addressing +

    Multiple networks

    +

    It is possible to configure several networks not just for the nodes but also for the management of dhcpd and tftp. +There are two ways to achive this:

    +
      +
    1. Add the networks to the templates of dhcpd and/or the dnsmasq template directly.

    2. +
    3. Add the networks to a dummy node and change the templates of dhcp and dnsmasq accordingly.

    4. +
    +

    As the first solution is trivial only the second way is described in the following lines.

    +

    As first the first step, add the dummy node.

    +
    wwctl node add deliverynet
    +
    +
    +

    Now you will have to add the delivery networks to this node.

    +
    wwctl node set \
    +  --ipaddr 10.0.20.250 \
    +  --netmask 255.255.255.0 \
    +  --netname deliver1 \
    +  --nettagadd network=10.0.20.0,dynstart=10.10.20.10,dynend=10.10.20.50 \
    +  deliverynet
    +
    +wwctl node set \
    +  --ipaddr 10.0.30.250 \
    +  --netmask 255.255.255.0 \
    +  --netname deliver2 \
    +  --nettagadd network=10.0.30.0,dynstart=10.10.30.10,dynend=10.10.30.50 \
    +  deliverynet
    +
    +
    +

    The ip address is used as the network address of host in the delivery network and an additional tags is used for definition of the network itself and the dynamic dhcp range. +You can check the result with wwctl node list.

    +
    # wwctl node list -a deliverynet
    +NODE         FIELD                             PROFILE  VALUE
    +deliverynet  Id                                --       deliverynet
    +deliverynet  Comment                           default  This profile is automatically included for each node
    +deliverynet  ContainerName                     default  leap15.5
    +deliverynet  Ipxe                              --       (default)
    +deliverynet  RuntimeOverlay                    --       (generic)
    +deliverynet  SystemOverlay                     --       (wwinit)
    +deliverynet  Root                              --       (initramfs)
    +deliverynet  Init                              --       (/sbin/init)
    +deliverynet  Kernel.Args                       --       (quiet crashkernel=no vga=791 net.naming-scheme=v238)
    +deliverynet  Profiles                          --       default
    +deliverynet  PrimaryNetDev                     --       (deliver1)
    +deliverynet  NetDevs[deliver2].Type            --       (ethernet)
    +deliverynet  NetDevs[deliver2].OnBoot          --       (true)
    +deliverynet  NetDevs[deliver2].Ipaddr          --       10.0.30.250
    +deliverynet  NetDevs[deliver2].Netmask         --       255.255.255.0
    +deliverynet  NetDevs[deliver2].Tags[dynend]    --       10.10.30.50
    +deliverynet  NetDevs[deliver2].Tags[dynstart]  --       10.10.30.10
    +deliverynet  NetDevs[deliver2].Tags[network]   --       10.0.30.0
    +deliverynet  NetDevs[deliver1].Type            --       (ethernet)
    +deliverynet  NetDevs[deliver1].OnBoot          --       (true)
    +deliverynet  NetDevs[deliver1].Ipaddr          --       10.0.20.250
    +deliverynet  NetDevs[deliver1].Netmask         --       255.255.255.0
    +deliverynet  NetDevs[deliver1].Primary         --       (true)
    +deliverynet  NetDevs[deliver1].Tags[network]   --       10.0.20.0
    +deliverynet  NetDevs[deliver1].Tags[dynend]    --       10.10.20.50
    +deliverynet  NetDevs[deliver1].Tags[dynstart]  --       10.10.20.10
    +
    +
    +

    Now the templates of dhcpd and/or dnsmasq must be modified. +You can edit the configuration files.

    +
    wwctl overlay edit host etc/dhcpd.conf.ww
    +wwctl overlay edit host etc/dnsmasq.d/ww4-hosts.ww
    +
    +
    +

    For the dhcp template you should add following lines

    +
    {{/* multiple networks */}}
    +{{- range $node := $.AllNodes}}
    +{{- if eq $node.Id.Get "deliverynet" }}
    +{{- range $netname, $netdev := $node.NetDevs}}
    +# network {{ $netname }}
    +subnet {{$netdev.Tags.network.Get}} netmask {{$netdev.Netmask.Get}} {
    +    max-lease-time 120;
    +    range {{$netdev.Tags.dynstart.Get}} {{$netdev.Tags.dynend.Get}};
    +    next-server {{$netdev.Ipaddr.Get}};
    +}
    +{{- end }}
    +{{- end }}
    +{{- end }}
    +
    +
    +

    and for the dnsmasq the following lines should be added

    +
    {{/* multiple networks */}}
    +{{- range $node := $.AllNodes}}
    +{{- if eq $node.Id.Get "deliverynet" }}
    +{{- range $netname, $netdev := $node.NetDevs}}
    +# network {{ $netname }}
    +dhcp-range={{$netdev.Tags.dynstart.Get}},{{$netdev.Tags.dynend.Get}},{{$netdev.Netmask.Get}},6h
    +{{- end }}
    +{{- end }}
    +{{- end }}
    +
    +
    +

    Note that the {{- if eq $node.Id.Get "deliverynet" }} is used to identify the dummy host which carries the network information.

    +

    diff --git a/static/docs/main/index.html b/static/docs/main/index.html index 1ce3027b..e1b2b75e 100644 --- a/static/docs/main/index.html +++ b/static/docs/main/index.html @@ -134,6 +134,7 @@

    User GuideOperating System Installation
  • Network
  • Addressing
  • +
  • Multiple networks
  • Warewulf Installation