Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АрхитектураБиологияГеографияДругоеИностранные языки
ИнформатикаИсторияКультураЛитератураМатематика
МедицинаМеханикаОбразованиеОхрана трудаПедагогика
ПолитикаПравоПрограммированиеПсихологияРелигия
СоциологияСпортСтроительствоФизикаФилософия
ФинансыХимияЭкологияЭкономикаЭлектроника

Example of configuration dhcpd.conf

Configure and maintenance of the DHCP server | Configuration file dhcpd.conf | Configuration parameters and options |


Читайте также:
  1. Configuration file dhcpd.conf
  2. Configuration parameters and options
  3. EXAMPLE OF DETERMINATION OF PARAMETERS OF EJECOR GAS GENERATOR
  4. Examples
  5. Examples
  6. Examples

Consider a typical configuration of dhcpd.conf, that help us understand the main capability for ISC DHCPD.

 

# option definitions common to all supported networks

default-lease-time 86400;

max-lease-time 604800;

get-lease-hostname true;

option subnet-mask 255.255.255.0;

option domain-name ''example.org'';

option domain-name-servers 192.168.0.135, 192.168.0.130;

# A slightly different configuration for an internal subnet

subnet 192.168.0.0 netmask 255.255.255.0 {

option routers 192.168.0.1;

option broadcast-address 192.168.0.255;

range 192.168.0.30 192.168.0.70;

}

subnet 192.168.1.0 netmask 255.255.255.0 {

option routers 192.168.1.1;

option broadcast-address 192.168.1.255;

range 192.168.1.80 192.168.1.160;

}

# Hosts which require special configuration options can be listed in host# statements. Fixed IP addresses can also be specified by hardware address

group {

use-host-decl-names on;

host test1{

hardware ethernet 00:17:76:82:3B:C2;

fixed-address 192.168.0.8;

}

host test2{

hardware ethernet 00:17:76:82:3B:2F;

fixed-address 192.168.0.9;

}

}

This is an example configuration of server, which combine and serve two subnets. Server dynamically assigns IP-address to DHCP-clients of both subnetworks and gets fixed IP-addresses to some clients using MAC-addresses. All lines that begin sign (#) are comments. The first few rows of files define a parameters and options which will share by the all clients in the all subnets. Each of the first three parameters defines one aspect of dhcpd server processing for dynamic assignment of addresses.

default-lease-time

Time should be the length in seconds that will be assigned to a lease if the client requesting the lease does not ask for a specific expiration time. In our case, the default lease time is one day.

max-lease-time

Time should be the maximum length in seconds that will be assigned to a lease.

Lease time is limited by this maximum in spite of lease time which is specified in client’s reauest. In our case – 1 week.

get-lease-hostname

The get-lease-hostnames statement is used to tel dhcpd whether or not to look up the domain name corresponding to the IP address of each address in the lease pool and use that address for the DHCP hostname option.

To resolve the name DNS is used. Search for host names for all dynamically assigned addresses significantly increases the time required to run the daemon. Flag True usually is used only in small networks, otherwise is used flag false.

The next four lines are a key parametrs. They begin with the word option and the follow the name of the key and it’s assigned value. Keys define the values of the parameters used by the client. We assign the clients subnet mask, domain name, and address of the domain name.

To determine the subnets which relate to the server parameter subnet is used. Identification of the networks is based on IP-ddresses and network masks - both elements are required for the operator subnet. dhcpd will get configuration only to the clients of these networks. Each subnet, which is physically connected to the server must has a separate subnet statement, even in case of non clients are in this subnets. Information about subnets is a strictly required parameter during dhcpd server boot. There are two subnets in the example – 192.168.0.0/24 и 192.168.1.0/24

Parameters and options within the subnet statement would be applied only inside subnet and its clients. In our example these parameters determine router and broadcast addresses used by clients. Parameter range is more interesting because it directly connected with one of the key features of DHCP. The range parameter specifies the range of addresses for dynamic allocation. the range parameter defined by a pair of addresses: minimum and maximum values, that can be used for dynamic allocation. In our case, the addresses are allocated from the range 192.168.0.30-192.168.0.70 and 192.168.1.80-192.168.1.160. It could be more than one range parameters in the same subnet statement. It is used to create a separate sequence of dynamically allocated addresses. For example, it can be useful when some hosts have has static addresses and you don’t want to reassign them. Enabling the range parameter will provide any DHCP client the ability to get IP-address, otherwise the mechanism of dynamic address allocation will be disabled.

If parameters are to be applied to a group of declarations which are not related strictly on a per-subnet basis, the group declaration can be used. In case of our example group operator united all the host parameters. Parameter use-host-decl-names is enabled for all clients in group and makes dhcpd to assign to each client host name specified in the host parameter. Also example shows how to assign a fixed IP-addresses using hardware addresses.

 

 


3. KEY QUESTIONS

3.1 Explain the purpose of DHCP.

3.2 What will the key if n set in dhcpd command?

3.3 Which topology operators are used in the file dhcpd.conf? Give a short description of them.

3.4 Explain the purpose of parameter range. In which case this parameter is required to use?

3.5 Which parameter can be used to assign to client a fixed address?

3.6 Explain the purpose of file dhcpd.leases.

4. HOME WORK

4.1 Learn the key points.

4.2 Prepare the answers to key questions.

 

5. LAB

5.1 DHCP server is configured for subnets 192.168.(n+20).0/26, 192.168.(n+20).64/26, 192.168.(n+40).0/29 (n – student’s workspace number). To do this you must first configure network interface with appropriate aliases.

5.2 Configure dynamic assigning IP-addresses for subnet 192.168.(n+20).0/26, as a gateway set router’s ip address 192.168.(n+20).1, the same dns server and use “student.org” as domain name. Default lease time set to two astronomic hours, max lease time set to five hours.

5.3 Duplicate configuration from p.5.2 for subnet 192.168.(n+20).64/26.

5.4 Provide assigning a fixed address for the segment 192.168.(n+40).0/29 for the next MAC addresses: 08:00:07:26:c0:a5, 08:00:07:26:c0:a6, 08:00:07:26:c0:a7, 08:00:07:26:c0:a8, 08:00:07:26:c0:a9. As the hostname use cmpN (N – host number). As a gateway and DNS server use the first range IP-address. As domain name use “student.org”. Default lease time set to one day, max lease time set to one week.

5.5 Dhcpd server configuration file and lease file should be created in the student’s home directory. To avoid conflict with diskless boot server dhcpd server have to be started on the port 200n (n – student’s workspace number). Interface which are listening clients request is the physical interface of PC.

 

6. REQUIREMENTS FOR THE PROTOCOL

6.1 Name of laboratory work.

6.2 Objective of the work.

6.3 Results of the home work.

6.4 Brief description of the work has been doing.

6.5 The conclusions.

6.6 Date, signature of the student, teacher’s visa

 


Дата добавления: 2015-08-27; просмотров: 69 | Нарушение авторских прав


<== предыдущая страница | следующая страница ==>
File dhcpd.leases| Lab B: Установка и настойка DHCP сервера

mybiblioteka.su - 2015-2024 год. (0.009 сек.)