• Staff subnet 1
  • Staff subnet 2
  • Staff subnet
  • Centos and Ubuntu Linux distributions to assign ip address automatically to a client machine. How Does dhcp work?




    Download 96,29 Kb.
    Pdf ko'rish
    bet4/4
    Sana25.05.2024
    Hajmi96,29 Kb.
    #253150
    1   2   3   4
    Bog'liq
    DHCP server

    ethernets

    enp0s3
    , and comment out static IP related configs:
    network:
    version: 2
    renderer: networkd
    ethernets:
    ens0:
    dhcp4: yes
    Save the changes and run the following command to effect the changes.
    $ sudo netplan apply 
    For more information, see the 
    dhcpd
    and 
    dhcpd.conf
    man pages.
    $ man dhcpd
    $ man dhcpd.conf


    Examples
    # Servers subnet
    subnet 192.168.11.0 netmask 255.255.255.0 {
    range 192.168.11.1 192.168.11.251;
    # 192.168.11.252 reserved for DHCP server
    # 192.168.11.253 reserved for DNS server
    # 192.168.11.254 reserved for router interface
    option routers 192.168.11.254;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 192.168.11.253;
    # default lease = 90 days, max lease = 120 days
    default-lease-time 7776000;
    max-lease-time 10368000;
    }
    # Staff subnet 1
    subnet 192.168.12.0 netmask 255.255.255.0 {
    range 192.168.12.1 192.168.12.253;
    # 192.168.12.254 reserved for router interface
    option routers 192.168.12.254;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 192.168.11.253;
    # default lease = 30 days, max lease = 45 days
    default-lease-time 2592000;
    max-lease-time 3888000;
    }
    # Staff subnet 2
    subnet 192.168.13.0 netmask 255.255.255.0 {
    range 192.168.13.1 192.168.13.253;
    # 192.168.13.254 reserved for router interface
    option routers 192.168.13.254;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 192.168.11.253;
    # default lease = 30 days, max lease = 45 days
    default-lease-time 2592000;
    max-lease-time 3888000;
    }
    # Staff subnet
    subnet 192.168.15.0 netmask 255.255.255.0 {
    range 192.168.15.1 192.168.15.253;
    # 192.168.15.254 reserved for router interface
    option routers 192.168.15.254;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 192.168.11.253;
    # default lease = 12 hrs, max lease = 24 hrs
    default-lease-time 43200;
    max-lease-time 86400;
    }

    Document Outline


    Download 96,29 Kb.
    1   2   3   4




    Download 96,29 Kb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Centos and Ubuntu Linux distributions to assign ip address automatically to a client machine. How Does dhcp work?

    Download 96,29 Kb.
    Pdf ko'rish