Subnetworks

 < Day Day Up > 



If you are dividing your network space into several subnetworks, you could use a single DHCP server to manage them. In that case, you would have a subnet declaration for each subnetwork. If you are setting up your own small network, you would use a network address beginning with 192.168. The range would specify possible IP addresses within that network. So for a network with the address 192.168.0.0, you would create a subnet declaration with the netmask 255.255.255.0. Within this declaration, you would place a range declaration along with any other information you want to give to your client hosts. In the following example, a range of IP addresses beginning from 192.168.0.1 to 192.168.0.75 can be allocated to the hosts on that network:

subnet 192.168.0.0 netmask 255.255.255.0 {  range 192.168.0.5 192.168.0.75; }

You may want to specify different policies for each subnetwork, such as different lease times. Any entries in a subnet declaration will override global settings. So if you already have a global lease time set, a lease setting in a subnet declaration will override it for that subnet. The next example sets different lease times for different subnets, as well as different address allocations. The lease times for the first subnet are taken from the global lease time settings, whereas the second subnet defines its own lease times:

default-lease-time 21600; max-lease-time 43200;     subnet 192.168.1.0 netmask 255.255.255.0 {       range 192.168.0.5 192.168.0.75;       } subnet 192.168.1.128 netmask 255.255.255.252 {       range 192.168.0.129 192.168.0.215;       default-lease-time 56000;       max-lease-time 62000;        } 

If your subnetworks are part of the same physical network, then you need to inform the server of this fact by declaring them as shared networks. You do this by placing subnet declarations within a shared-network declaration, specifying the shared network's name. The name used can be any descriptive name, though you can use the domain name. Any options specified within the shared-network declaration and outside the subnet declarations will be global to those subnets. In the next example, the subnets are part of the same physical network and so are placed within a shared-network declaration.

shared-network mytrek.com { default-lease-time 21600; max-lease-time 43200; subnet 192.168.1.0 netmask 255.255.255.0 {         range 192.168.0.5 192.168.0.75;         } subnet 192.168.1.128 netmask 255.255.255.252 {         range 192.168.0.129 192.168.0.215;         default-lease-time 56000;         max-lease-time 62000;         } }
Note 

Within a network, you could have subnets that run DHCP servers and some that don't. In that case you can use the DHCP Relay Agent to let DHCP clients on a subnet without a DHCP server to use a DHCP server running on another subnet. The DHCP Relay Agent is dhcrelay and can be managed with the service command. It is configured with /etc/sysconfig/dhcrelay file, where you can specify the network interfaces to receive requests from and the DHCP servers to use.



 < Day Day Up > 



Red Hat(c) The Complete Reference
Red Hat Enterprise Linux & Fedora Edition (DVD): The Complete Reference
ISBN: 0072230754
EAN: 2147483647
Year: 2004
Pages: 328

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net