Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Required Configuration Parameters

DHCP provides other configuration parameters in addition to an IP address. In fact, several additional parameters must be provided to a TCP/IP host before that host can communicate with other hosts. A host must be configured with the following:

  • Its local subnet mask

  • The address of at least one router on its subnet

  • The address of a DNS server

These parameters are provided to a DHCP client through options in the DHCP message. Chapter 9, "DHCP Options," describes all the DHCP options in detail. A few of the most commonly used options are discussed in the following sections.

Configuration Options

The syntax for specifying an option is shown in Example 3.5.

Example 3.5

option option-name option-value;

If an option statement appears within a subnet declaration, it is applied to any DHCP client in that subnet. In Example 3.6, adding a routers option statement to the declaration for the 192.168.11.0 subnet causes the DHCP server to send 192.168.11.254 as the default router address to any DHCP client on the 192.168.11.0 subnet.

Example 3.6

# Server 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;
  }

In addition to the routers option, the DHCP client also needs a subnet-mask and a domain-name-servers option. GSI maintains a DNS server at 192.168.11.253, and the subnet mask for every GSI network is the same: 255.255.255.0. The configuration file for GSI, including default routers, subnet masks, and DNS servers, is shown in Example 3.7.

Example 3.7

# Server 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;
  }
# 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;
}
# 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;
}
# Staff subnet 3
subnet 192.168.14.0 netmask 255.255.255.0 {
  range 192.168.14.1 192.168.14.253;
  # 192.168.14.254 reserved for router interface
  option routers 192.168.14.254;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 192.168.11.253;
}
# Staff subnet 4
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;
}
  • + Share This
  • 🔖 Save To Your Account