Changeset ead10d5 for networking


Ignore:
Timestamp:
06/11/2023 11:54:16 AM (12 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
12.0, 12.1, kea, ken/TL2024, ken/tuningfonts, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18, xry111/xf86-video-removal
Children:
930d002c
Parents:
fbdc09b
Message:

Updates in text, add DDNS config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • networking/connect/kea.xml

    rfbdc09b read10d5  
    1111  <!ENTITY kea-buildsize     "1.9 GB">
    1212  <!ENTITY kea-time          "5 SBU"> <!-- CHECK -->
     13  <!ENTITY kea-arm-vers      "2.2.0">
    1314]>
    1415
     
    2728
    2829    <para>
    29       The <application>ISC Kea</application> package contains the 
     30      The <application>ISC Kea</application> package contains the
    3031      server programs for DHCP. It is the successor of the
    3132      <xref linkend="dhcp"/> server which is end-of-life since December 2022.
     
    7475      <xref linkend="log4cplus"/>
    7576    </para>
    76    
     77
    7778    <para condition="html" role="usernotes">User Notes:
    7879      <ulink url="&blfs-wiki;/kea"/>
     
    136137
    137138  </sect2>
    138  
     139
    139140  <sect2 role="configuration">
    140141    <title>Configuring ISC Kea DHCP</title>
    141142
    142     <para>Consult the
    143     <ulink url="https://kea.readthedocs.io/en/kea-2.2.0/">Kea Administrator Reference Manual</ulink>
    144     for detailled information about the configuration of Kea.</para>
     143    <para>Consult the
     144    <ulink url="https://kea.readthedocs.io/en/kea-&kea-arm-vers;/">Kea Administrator Reference Manual</ulink>
     145    for detailled information about the configuration of <application>ISC Kea</application>
     146    as it is a quite capable system. The configuration shown a bare
     147    minimum to get a DHCP server running but it already includes
     148    configuration for DDNS (Dynamic DNS). That setup might be working
     149    for small networks with a few clients and low traffic. For greater
     150    installations with thousands of clients, <application>ISC Kea</application>
     151    can be configured to use databases (mariabd or postgresql) to store
     152    the leases and build a cluster with multiple nodes. It can
     153    be integrated to <ulink url="https://www.isc.org/categories/stork/">Stork</ulink>
     154    which is a management dashboard to <application>ISC Kea</application>.</para>
     155
    145156
    146157    <para>The support of IPv4, IPv6 and DDNS has been splitted into
     
    149160    files come from the keactrl agent which is uses to control the
    150161    servers in an easy way.</para>
    151    
     162
    152163    <sect3 id="kea-dhcp-config">
    153164      <title>Config Files</title>
     
    176187        <primary sortas="e-etc-kea-dhcp6.conf">/etc/kea/kea-dhcp6.conf</primary>
    177188      </indexterm>
    178 
     189-->
    179190      <indexterm zone="kea kea-dhcp-ddns-config">
    180191        <primary sortas="e-etc-kea-dhcp-ddns.conf">/etc/kea/kea-dhcp-ddns.conf</primary>
    181192      </indexterm>
    182 -->
    183193    </sect3>
    184194
     
    198208          <para>IPv4 DHCP server</para>
    199209          <para>This daemon handles requests for IPv4 addresses.
    200           Set <literal>dhcp4=yes</literal> to start it, set 
     210          Set <literal>dhcp4=yes</literal> to start it, set
    201211          <literal>dhcp4=no</literal> in case DHCP service for IPv4
    202212          is not wanted.</para>
     
    205215          <para>IPv6 DHCP server</para>
    206216          <para>This daemon handles requests for IPv6 addresses.
    207           Set <literal>dhcp6=yes</literal> to start it, set 
     217          Set <literal>dhcp6=yes</literal> to start it, set
    208218          <literal>dhcp6=no</literal> in case DHCP service for IPv6
    209219          is not wanted.</para>
     
    212222          <para>Dynamic DNS</para>
    213223          <para>This daemon is used to update a DNS server dynamically
    214           when Kea assignes an IP address to a device. 
    215           Set <literal>dhcp_ddns=yes</literal> to enable it, set 
     224          when Kea assignes an IP address to a device.
     225          Set <literal>dhcp_ddns=yes</literal> to enable it, set
    216226          <literal>dhcp_ddns=no</literal> in case dynamic DNS updates
    217227          are not wanted.</para>
     
    232242
    233243      <para>With the following command, Kea will be configured to
    234       start the dhcp service for IPv4 and the 
     244      start the dhcp service for IPv4 and the
    235245      dynamic DNS update, while the control agent and
    236246      the dhcp service for IPv6 remains down. Tweak the command to
     
    248258
    249259    <sect3 id="kea-dhcp4-config">
    250       <title>IPv4 Server Configuration</title>
    251 
    252       <para>
    253         A sample configuration file is created in <filename>/etc/kea/kea-dhcpd4.conf</filename>.
    254         Adjust the file to suit your needs or overwrite it by using
    255         the following sample as the <systemitem class="username">root</systemitem>
    256         user:
    257       </para>
    258 
    259 <screen role="nodump" ><userinput>cat &gt; /etc/kea/kea-dhcpd4.conf &lt;&lt; "EOF"
    260 <literal>// Begin /etc/kea/kea-dhcpd4.conf
    261 {
    262 "Dhcp4": {
    263     "interfaces-config": {
    264         "interfaces": [ "eth0" ]
    265     },
    266     "control-socket": {
    267         "socket-type": "unix",
    268         "socket-name": "/run/kea/kea4-ctrl-socket"
    269     },
    270     "lease-database": {
    271         "type": "memfile",
    272         "lfc-interval": 3600
    273     },
    274     "renew-timer": 900,
    275     "rebind-timer": 1800,
    276     "valid-lifetime": 3600,
    277     "option-data": [
    278         {
    279             "name": "domain-name-servers",
    280             "data": "192.168.2.1, 192.168.2.2"
    281         },
    282         {
    283             "name": "domain-search",
    284             "data": "mydomain.example.org, example.org"
    285         }
    286     ],
    287     "subnet4": [
    288         {
    289             "subnet": "192.168.2.0/24",
    290             "pools": [
    291                 {
    292                     "pool": "192.168.2.16 - 192.168.2.64"
    293                 }
    294             ],
    295             "option-data": [
    296                 {
    297                     "name: "routers",
    298                     "value": "192.168.2.254"
    299                 }
    300             ],
    301             "reservations": [
    302                 {
    303                     "hw-address": "00:11:22:33:44:55",
    304                     "ip-address": "192.168.2.65",
    305                     "hostname": "host-2-65"
    306                 },
    307                 {
    308                     "hw-address": "00:00:00:00:00:01",
    309                     "ip-address": "192.168.2.253",
    310                     "hostname": "special-host",
    311                     "option-data": [
    312                         {
    313                             "name": "domain-name-servers",
    314                             "data": "192.168.1.1"
    315                         }
    316                     ]
    317                 }
    318             ]
    319         }
    320     ]
    321 }
    322 }
    323 // End /etc/kea/kea-dhcpd4.conf</literal>
    324 EOF</userinput></screen>
    325 
    326       <note>
    327         <para>The double braces at the end of the config is not a typo.</para>
    328       </note>
    329 
    330       <para>The configuration for IPv6 is similar to the configuration
    331       of IPv4. The configuration file is <filename>/etc/kea/kea-dhcpd6.conf</filename>.</para>
     260      <title>IPv4 DHCP Server Configuration</title>
    332261
    333262      <para>
     
    344273<screen role="root"><userinput>make install-kea-dhcpd</userinput></screen>
    345274
     275      <para>
     276        A sample configuration file is created in <filename>/etc/kea/kea-dhcpd4.conf</filename>.
     277        Adjust the file to suit your needs or overwrite it by using
     278        the following sample as the <systemitem class="username">root</systemitem>
     279        user:
     280      </para>
     281
     282<screen role="nodump" ><userinput>cat &gt; /etc/kea/kea-dhcpd4.conf &lt;&lt; "EOF"
     283<literal>// Begin /etc/kea/kea-dhcpd4.conf
     284{
     285"Dhcp4": {
     286    // Add names of your network interfaces to listen on.
     287    "interfaces-config": {
     288        "interfaces": [ "eth0", "eth2" ]
     289    },
     290
     291    "control-socket": {
     292        "socket-type": "unix",
     293        "socket-name": "/tmp/kea4-ctrl-socket"
     294    },
     295
     296    "lease-database": {
     297        "type": "memfile",
     298        "lfc-interval": 3600
     299    },
     300
     301    "expired-leases-processing": {
     302        "reclaim-timer-wait-time": 10,
     303        "flush-reclaimed-timer-wait-time": 25,
     304        "hold-reclaimed-time": 3600,
     305        "max-reclaim-leases": 100,
     306        "max-reclaim-time": 250,
     307        "unwarned-reclaim-cycles": 5
     308    },
     309
     310    "renew-timer": 900,
     311    "rebind-timer": 1800,
     312    "valid-lifetime": 3600,
     313
     314    // Enable DDNS - Kea will dynamically update the DNS
     315    "ddns-send-updates" : true,
     316    "ddns-qualifying-suffix": "your.domain.tld",
     317    "dhcp-ddns" : {
     318        "enable-updates": true
     319    },
     320
     321    "subnet4": [
     322        {
     323            "subnet": "192.168.56.0/24",
     324            "pools": [ { "pool": "192.168.56.16 - 192.168.56.254" } ],
     325            "option-data": [
     326                {
     327                    "name": "domain-name",
     328                    "data": "your.domain.tld"
     329                },
     330                {
     331                    "name": "domain-name-servers",
     332                    "data": "192.168.56.2, 192.168.3.7"
     333                },
     334                {
     335                    "name": "domain-search",
     336                    "data": "your.domain.tld"
     337                },
     338                {
     339                    "name": "routers",
     340                    "data": "192.168.56.2"
     341                }
     342            ]
     343        }
     344    ],
     345
     346    "loggers": [
     347        {
     348            "name": "kea-dhcp4",
     349            "output_options": [
     350                {
     351                    "output": "/var/log/kea-dhcp4.log",
     352                    "pattern": "%D{%Y-%m-%d %H:%M:%S.%q} %-5p %m\n"
     353                }
     354            ],
     355            "severity": "INFO",
     356            "debuglevel": 0
     357        }
     358    ]
     359}
     360}
     361// End /etc/kea/kea-dhcpd4.conf</literal>
     362EOF</userinput></screen>
     363
     364      <note>
     365        <para>The double braces at the end of the config is not a typo.
     366        This is because the inner "dhcp4" block is not indented as is
     367        should be because the configuration data would move too much
     368        to the right.</para>
     369      </note>
     370
     371      <para>The configuration for IPv6 is similar to the configuration
     372      of IPv4. The configuration file is <filename>/etc/kea/kea-dhcpd6.conf</filename>.</para>
     373
     374    </sect3>
     375
     376    <sect3 id="kea-dhcp-ddns-config">
     377      <title>Dynamic DNS Configuration</title>
     378
     379      <para>
     380        If there is a <xref linkend="bind"/> server running, <application>ISC Kea</application>
     381        can update the DNS when it gives an IP address to a client.
     382        A sample configuration file is created in <filename>/etc/kea/kea-dhcp-ddns.conf</filename>.
     383        Adjust the file to suit your needs or overwrite it by using
     384        the following sample as the <systemitem class="username">root</systemitem>
     385        user:
     386      </para>
     387
     388<screen role="nodump" ><userinput>cat &gt; /etc/kea/kea-dhcp-ddns.conf &lt;&lt; "EOF"
     389<literal>// Begin /etc/kea/kea-dhcp-ddns.conf
     390{
     391"DhcpDdns": {
     392    "ip-address": "127.0.0.1",
     393    "port": 53001,
     394    "control-socket": {
     395        "socket-type": "unix",
     396        "socket-name": "/tmp/kea-ddns-ctrl-socket"
     397    },
     398
     399    "tsig-keys": [
     400        {
     401            "name"      : "rndc-key",
     402            "algorithm" : "hmac-sha256",
     403            "secret"    : "1FU5hD7faYaajQCjSdA54JkTPQxbbPrRnzOKqHcD9cM="
     404        }
     405    ],
     406
     407    "forward-ddns" : {
     408        "ddns-domains" : [
     409            {
     410                "name" : "your.domain.tld.",
     411                //"key-name" : "rndc-key",
     412                "dns-servers" : [
     413                    {
     414                        "ip-address" : "127.0.0.1",
     415                        "port" : 53
     416                    }
     417                ]
     418            }
     419        ]
     420    },
     421
     422    "reverse-ddns" : {
     423        "ddns-domains" : [
     424            {
     425                "name" : "56.168.192.in-addr.arpa.",
     426                //"key-name" : "rndc-key",
     427                "dns-servers" : [
     428                    {
     429                        "ip-address" : "127.0.0.1",
     430                        "port" : 53
     431                    }
     432                ]
     433            }
     434        ]
     435    },
     436
     437    "loggers": [
     438        {
     439            "name": "kea-dhcp-ddns",
     440            "output_options": [
     441                {
     442                    "output": "/var/log/kea-ddns.log"
     443                    "pattern": "%D{%Y-%m-%d %H:%M:%S.%q} %-5p %m\n"
     444                }
     445            ],
     446            "severity": "INFO",
     447            "debuglevel": 0
     448        }
     449    ]
     450}
     451}
     452// End /etc/kea/kea-dhcp-ddns.conf</literal>
     453EOF</userinput></screen>
    346454    </sect3>
    347455
Note: See TracChangeset for help on using the changeset viewer.