Difference between revisions of "VMware Server 2.0 DHCP Configuration"
(→Configuring the VMware Server DHCP Server on Linux Hosts) |
m (Text replacement - "<google>BUY_VMWARE_SERVER_2_BOTTOM</google>" to "<htmlet>vmware</htmlet>") |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | In order for a client to connect to a TCP/IP based network, it needs a Internet Protocol (IP) address which uniquely identifies it among the other devices connected to the network. In addition, the addresses of one or more DNS servers and a gateway may optionally be configured. One way to configure this is to manually assign this information to each client on the network. Whilst this approach can work for small network, it quickly becomes unmanageable in larger enterprises. To alleviate this problem, the Dynamic Host Configuration Protocol was created. This takes the form of one or more servers on a network which dynamically allocate IP addresses and other network configuration information to network clients. | + | <table border="0" cellspacing="0" width="100%"> |
+ | <tr> | ||
+ | <td width="20%">[[VMware Server NAT Configuration|Previous]]<td align="center">[[VMware Server 2.0 Essentials|Table of Contents]]<td width="20%" align="right">[[Managing VMware Server 2.0 Virtual Disks|Next]]</td> | ||
+ | <tr> | ||
+ | <td width="20%">VMware Server NAT Configuration<td align="center"><td width="20%" align="right">Managing VMware Server 2.0 Virtual Disks</td> | ||
+ | </table> | ||
+ | <hr> | ||
+ | |||
+ | |||
+ | <htmlet>vmware</htmlet> | ||
+ | |||
+ | |||
+ | In order for a client to connect to a TCP/IP based network, it needs a Internet Protocol (IP) address which uniquely identifies it among the other devices connected to the network. In addition, the addresses of one or more DNS servers and a gateway may optionally be configured. One way to configure this is to manually assign this information to each client on the network. Whilst this approach can work for a small network, it quickly becomes unmanageable in larger enterprises. To alleviate this problem, the Dynamic Host Configuration Protocol was created. This takes the form of one or more servers on a network which dynamically allocate IP addresses and other network configuration information to network clients. | ||
As outlined in the chapter entitled [[VMware Server Virtual Network Architecture]], the VMware Server infrastructure includes a built-in Dynamic Host Control Protocol (DHCP) server for the purpose of assigning dynamic IP addresses, DNS and gateway information to virtual machines running in NAT and Host Only virtual networks. Virtual machines running on a bridged VMware Server virtual network must either have a static IP address assigned, or obtain one from a DHCP server running on the external network to which the bridge connects. | As outlined in the chapter entitled [[VMware Server Virtual Network Architecture]], the VMware Server infrastructure includes a built-in Dynamic Host Control Protocol (DHCP) server for the purpose of assigning dynamic IP addresses, DNS and gateway information to virtual machines running in NAT and Host Only virtual networks. Virtual machines running on a bridged VMware Server virtual network must either have a static IP address assigned, or obtain one from a DHCP server running on the external network to which the bridge connects. | ||
− | As with any other DHCP server, the one embedded into VMware Server provides a number of different configuration options. As such, this chapter will focus | + | As with any other DHCP server, the one embedded into VMware Server provides a number of different configuration options. As such, this chapter will focus on configuring the VMware Server DHCP server on both Linux and Windows host operating systems. |
== Static and DHCP IP Address Allocation Ranges == | == Static and DHCP IP Address Allocation Ranges == | ||
Line 14: | Line 26: | ||
<tr bgcolor="#cccccc" style="color:black" valign="top"> | <tr bgcolor="#cccccc" style="color:black" valign="top"> | ||
<th> | <th> | ||
− | + | IP Range | |
</th> | </th> | ||
<th> | <th> | ||
− | + | Description | |
</th> | </th> | ||
</tr> | </tr> | ||
− | |||
<tr> | <tr> | ||
<td> | <td> | ||
− | + | ''subnet''.1 | |
</td> | </td> | ||
<td> | <td> | ||
Line 29: | Line 40: | ||
</td> | </td> | ||
</tr> | </tr> | ||
− | |||
<tr bgcolor="#e9e9e6"> | <tr bgcolor="#e9e9e6"> | ||
<td>''subnet''.2 - ''subnet''.127</td> | <td>''subnet''.2 - ''subnet''.127</td> | ||
<td>Reserved for use as static addresses for virtual machines which are not configured to obtain an IP address from the VMware DHCP server. Example: 192.168.33.2 - 192.168.33.127</td> | <td>Reserved for use as static addresses for virtual machines which are not configured to obtain an IP address from the VMware DHCP server. Example: 192.168.33.2 - 192.168.33.127</td> | ||
</tr> | </tr> | ||
− | |||
<tr> | <tr> | ||
<td> | <td> | ||
− | + | ''subnet''.128 - ''subnet''.253 | |
</td> | </td> | ||
<td> | <td> | ||
Line 51: | Line 60: | ||
<tr> | <tr> | ||
<td> | <td> | ||
− | + | ''subnet''.255 | |
</td> | </td> | ||
<td> | <td> | ||
Line 64: | Line 73: | ||
<tr bgcolor="#cccccc" style="color:black" valign="top"> | <tr bgcolor="#cccccc" style="color:black" valign="top"> | ||
<th> | <th> | ||
− | + | IP Range | |
</th> | </th> | ||
<th> | <th> | ||
− | + | Description | |
</th> | </th> | ||
</tr> | </tr> | ||
Line 73: | Line 82: | ||
<tr> | <tr> | ||
<td> | <td> | ||
− | + | ''subnet''.1 | |
</td> | </td> | ||
<td> | <td> | ||
Line 92: | Line 101: | ||
<tr bgcolor="#e9e9e6"> | <tr bgcolor="#e9e9e6"> | ||
<td> | <td> | ||
− | + | ''subnet''.128 - ''subnet''.253 | |
</td> | </td> | ||
<td> | <td> | ||
Line 106: | Line 115: | ||
<tr bgcolor="#e9e9e6"> | <tr bgcolor="#e9e9e6"> | ||
<td> | <td> | ||
− | + | ''subnet''.255 | |
</td> | </td> | ||
<td> | <td> | ||
Line 130: | Line 139: | ||
− | The range IP address pool ( | + | The range of the IP address pool (essentially the range of addresses from which the DHCP server can allocate addresses to clients) may be altered by changing ''Start IP address'' and ''End IP address'' fields. |
Also available for configuration are the lease values. A lease time is the duration for which an IP address is assigned to the same network client before it is returned to the pool for future use by another client. The lease time may be anything from a few minutes up to thousands of days. The optimal lease value depends on the network. If the virtual network environment is one in which virtual machines are frequently created and destroyed it is better to have a shorter lease time to prevent the pool of available IP addresses being exhausted. The reason for this being that the DHCP server will reserve IP addresses long beyond the life expectancy of the virtual machines to which they are assigned, thereby limiting the pool of available addresses for new virtual machines. For more virtual networks with a low turnover of virtual machines, longer lease times are often preferred, allowing each virtual machine to retain the same IP address for as long as possible. | Also available for configuration are the lease values. A lease time is the duration for which an IP address is assigned to the same network client before it is returned to the pool for future use by another client. The lease time may be anything from a few minutes up to thousands of days. The optimal lease value depends on the network. If the virtual network environment is one in which virtual machines are frequently created and destroyed it is better to have a shorter lease time to prevent the pool of available IP addresses being exhausted. The reason for this being that the DHCP server will reserve IP addresses long beyond the life expectancy of the virtual machines to which they are assigned, thereby limiting the pool of available addresses for new virtual machines. For more virtual networks with a low turnover of virtual machines, longer lease times are often preferred, allowing each virtual machine to retain the same IP address for as long as possible. | ||
Line 140: | Line 149: | ||
== Configuring the VMware Server DHCP Server on Linux Hosts == | == Configuring the VMware Server DHCP Server on Linux Hosts == | ||
− | The built-in DHCP server is configured on Linux host systems by manually editing the DHCP configuration files. There is one DHCP configuration for each HostOnly or NAT virtual network. These files can be found in: | + | The built-in DHCP server is configured on Linux host systems by manually editing the DHCP configuration files. There is one DHCP configuration file for each HostOnly or NAT virtual network. These files can be found in: |
/etc/vmware/vmnet''n''/dhcpd/dhcpd.conf | /etc/vmware/vmnet''n''/dhcpd/dhcpd.conf | ||
− | where ''n'' represents the number of the virtual network, for example ''/etc/vmware/vmnet1/dhcpd/dhcpd.conf''. A typical dhcp.conf file will read as follows when | + | where ''n'' represents the number of the virtual network, for example ''/etc/vmware/vmnet1/dhcpd/dhcpd.conf''. A typical dhcp.conf file will read as follows when viewed in a suitable text editor: |
<pre> | <pre> | ||
Line 162: | Line 171: | ||
The file conforms to the standard dhcpd.conf file, and extensive details can be obtain via the Linux dhcpd.conf ''man'' page. The default settings are as follows: | The file conforms to the standard dhcpd.conf file, and extensive details can be obtain via the Linux dhcpd.conf ''man'' page. The default settings are as follows: | ||
− | * '''allow unkown-clients''' - Controls whether the DHCP server is permitted to assign IP addresses to | + | * '''allow unkown-clients''' - Controls whether the DHCP server is permitted to assign IP addresses to clients which do not have a host declaration. |
* '''default-lease-time''' - The length of lease (in seconds) associated with an IP address when the requesting client does not specify a required lease time. | * '''default-lease-time''' - The length of lease (in seconds) associated with an IP address when the requesting client does not specify a required lease time. | ||
Line 168: | Line 177: | ||
* '''max-lease-time''' - The maximum permitted lease time, in seconds, allowed for an IP address by the DHCP server. A request for a greater lease length by a client will be fulfilled at using the max-lease-time value. | * '''max-lease-time''' - The maximum permitted lease time, in seconds, allowed for an IP address by the DHCP server. A request for a greater lease length by a client will be fulfilled at using the max-lease-time value. | ||
− | * '''subnet / netmask | + | * '''subnet / netmask''' - The Class C subnet and netmask for the HostOnly or NAT virtual network to which the DHCP server is assigned. |
* '''range''' - The range of addresses which constitute the pool from which IP addresses may be dynamically allocated to clients by the DHCP server. | * '''range''' - The range of addresses which constitute the pool from which IP addresses may be dynamically allocated to clients by the DHCP server. | ||
Line 177: | Line 186: | ||
* '''option domain-name''' - The optional name of the network domain. For example, ''techotopia.com''. | * '''option domain-name''' - The optional name of the network domain. For example, ''techotopia.com''. | ||
+ | |||
+ | |||
+ | <htmlet>vmware</htmlet> |
Latest revision as of 18:49, 29 May 2016
Previous | Table of Contents | Next |
VMware Server NAT Configuration | Managing VMware Server 2.0 Virtual Disks |
Purchase and download the full PDF and ePub editions of this VMware eBook for only $8.99 |
In order for a client to connect to a TCP/IP based network, it needs a Internet Protocol (IP) address which uniquely identifies it among the other devices connected to the network. In addition, the addresses of one or more DNS servers and a gateway may optionally be configured. One way to configure this is to manually assign this information to each client on the network. Whilst this approach can work for a small network, it quickly becomes unmanageable in larger enterprises. To alleviate this problem, the Dynamic Host Configuration Protocol was created. This takes the form of one or more servers on a network which dynamically allocate IP addresses and other network configuration information to network clients.
As outlined in the chapter entitled VMware Server Virtual Network Architecture, the VMware Server infrastructure includes a built-in Dynamic Host Control Protocol (DHCP) server for the purpose of assigning dynamic IP addresses, DNS and gateway information to virtual machines running in NAT and Host Only virtual networks. Virtual machines running on a bridged VMware Server virtual network must either have a static IP address assigned, or obtain one from a DHCP server running on the external network to which the bridge connects.
As with any other DHCP server, the one embedded into VMware Server provides a number of different configuration options. As such, this chapter will focus on configuring the VMware Server DHCP server on both Linux and Windows host operating systems.
Static and DHCP IP Address Allocation Ranges
When a NAT or HostOnly network is created it is assigned a Class C IP subnet address range (for example 192.168.33.0 - 192.168.33.254). In practice, VMware divides this address range and allocates specific addresses and address ranges for specific uses. These divisions differ between NAT and HostOnly virtual networks and are outlined in the following tables:
HostOnly Virtual Network IP Addresses
IP Range |
Description |
---|---|
subnet.1 |
The IP address of the host machine. Provides a way for the virtual machines to communicate with the host. Example: 192.168.33.1. |
subnet.2 - subnet.127 | Reserved for use as static addresses for virtual machines which are not configured to obtain an IP address from the VMware DHCP server. Example: 192.168.33.2 - 192.168.33.127 |
subnet.128 - subnet.253 |
The pool of IP addresses available for dynamic allocation to virtual machines by the VMware DHCP server. Example: 192.168.33.128 - 192.168.33.254 |
subnet.254 | Used as the IP address of the VMware DHCP server. |
subnet.255 |
The HostOnly virtual network broadcast address. |
NAT Virtual Network IP Addresses
IP Range |
Description |
---|---|
subnet.1 |
The IP address of the host machine. Provides a way for the virtual machines to communicate with the host. Example: 192.168.33.1. |
subnet.2 | The IP address to the VMware Server NAT device. |
subnet.3 - subnet.127 | Reserved for use as static addresses for virtual machines which are not configured to obtain an IP address from the VMware DHCP server. Example: 192.168.33.3 - 192.168.33.127 |
subnet.128 - subnet.253 |
The pool of IP addresses available for dynamic allocation to virtual machines by the VMware DHCP server. Example: 192.168.33.128 - 192.168.33.253 |
subnet.254 | Used as the IP address of the VMware DHCP server. |
subnet.255 |
The NAT virtual network broadcast address. |
Configuring the VMware Server DHCP Server on Windows Hosts
The built-in VMware DHCP server is configured on Windows host systems using the Virtual Network Editor tool, launched via the Start -> All Programs -> VMware -> VMware Server -> Manage Virtual Networks menu option. Once loaded, the DHCP settings are accessed by clicking on the DHCP tab as illustrated in the following figure:
The screen displays a list of currently configured virtual networks for which the built-in DHCP server is available. In the above example this includes the vmnet1 (host only) and vmnet8 (NAT) virtual networks. Beneath the virtual network list is the DHCP service panel which lists the current status of the server and provides options to stop, start and restart the service.
To adjust the DHCP settings for a specific virtual network, simply select the network from the list and click the Properties button to display the DHCP settings dialog:
The range of the IP address pool (essentially the range of addresses from which the DHCP server can allocate addresses to clients) may be altered by changing Start IP address and End IP address fields.
Also available for configuration are the lease values. A lease time is the duration for which an IP address is assigned to the same network client before it is returned to the pool for future use by another client. The lease time may be anything from a few minutes up to thousands of days. The optimal lease value depends on the network. If the virtual network environment is one in which virtual machines are frequently created and destroyed it is better to have a shorter lease time to prevent the pool of available IP addresses being exhausted. The reason for this being that the DHCP server will reserve IP addresses long beyond the life expectancy of the virtual machines to which they are assigned, thereby limiting the pool of available addresses for new virtual machines. For more virtual networks with a low turnover of virtual machines, longer lease times are often preferred, allowing each virtual machine to retain the same IP address for as long as possible.
The Default lease time is the lease time that will be used by the DHCP server if the network client does not specify a lease time when requesting an IP address from the DHCP server. The Max lease time is the maximum lease length permitted by the DHCP server, regardless of the lease requested by the client.
Once the necessary modifications have been made on the DHCP Settings dialog, click the OK button to return to the DHCP page of the Virtual Network Editor and click on Apply followed by OK to commit the changes.
Configuring the VMware Server DHCP Server on Linux Hosts
The built-in DHCP server is configured on Linux host systems by manually editing the DHCP configuration files. There is one DHCP configuration file for each HostOnly or NAT virtual network. These files can be found in:
/etc/vmware/vmnetn/dhcpd/dhcpd.conf
where n represents the number of the virtual network, for example /etc/vmware/vmnet1/dhcpd/dhcpd.conf. A typical dhcp.conf file will read as follows when viewed in a suitable text editor:
allow unknown-clients; default-lease-time 1800; # 30 minutes max-lease-time 7200; # 2 hours subnet 192.168.103.0 netmask 255.255.255.0 { range 192.168.103.128 192.168.103.254; option broadcast-address 192.168.103.255; option domain-name-servers ns1.techotopia.com, ns2.techotopia.com; option domain-name "techotopia.com"; }
The file conforms to the standard dhcpd.conf file, and extensive details can be obtain via the Linux dhcpd.conf man page. The default settings are as follows:
- allow unkown-clients - Controls whether the DHCP server is permitted to assign IP addresses to clients which do not have a host declaration.
- default-lease-time - The length of lease (in seconds) associated with an IP address when the requesting client does not specify a required lease time.
- max-lease-time - The maximum permitted lease time, in seconds, allowed for an IP address by the DHCP server. A request for a greater lease length by a client will be fulfilled at using the max-lease-time value.
- subnet / netmask - The Class C subnet and netmask for the HostOnly or NAT virtual network to which the DHCP server is assigned.
- range - The range of addresses which constitute the pool from which IP addresses may be dynamically allocated to clients by the DHCP server.
- option broadcast-address - The TCP/IP broadcast address of the VMware virtual network.
- option domain-name-servers - The optional IP addresses or fully qualified domain name (FQDN) of name servers on the network. For example, ns1.virtuatopia.com. Multiple servers must be comma separated.
- option domain-name - The optional name of the network domain. For example, techotopia.com.
Purchase and download the full PDF and ePub editions of this VMware eBook for only $8.99 |