We implement it in a virtual machine environment. Generally, when a virtual machine is opened, it will slow down. We only use one 2003 Server for customer service machine verification, during verification, you only need to set the 2003 Nic channel. In this experiment, the Red Hat Enterprise Edition 4 is used. The following describes how to implement the dhcp test in linux.
Dhcp test lab platform in Linux:
Two LINUX servers, one DHCP server, one dhcprelay proxy server, and one PC2003.
In Linux, the dhcp test is implemented with three network segments:
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
The three NICs of the DHCP relay Proxy Server are:
Eth0; eth1; eth2
Eth0: 192.168.1.1
Eth1: 192.168.2.1
Eth2: 192.168.3.1
The NIC of the DHCP server is:
Eth0
Eth0: 192.168.1.2
The eth0 of the dhcp server and the eth0 of dhcprelay are both set to vmnet2dhcprelay and eth1 to vmnet3. When Customer Service 2003 is set to vnnet3, The eth2 of the hcprelay IP Address 192.168.2.0/24 should be set vmnet4 when Customer Service 2003 is set to vnnet4, the IP address of 192.168.3.0/24 should be obtained, configure the IP address of each network adapter. Be sure not to configure the IP address correctly. After the environment is set up, you can start.
In Linux, the first step in dhcp testing is to configure DHCP.
Open the dhcpd. conf file and write it to the file.
- ddns-update-style interim;
- ignore client-updates;
- option time-offset -18000; # Eastern Standard Time
- default-lease-time 259200;
- max-lease-time 777600;
# Configure three scopes below
- subnet 192.168.1.0 netmask 255.255.255.0 {
- option routers 192.168.1.1;
- range dynamic-bootp 192.168.1.5 192.168.1.254;
- }
- subnet 192.168.2.0 netmask 255.255.255.0 {
- option routers 192.168.2.1;
- range dynamic-bootp 192.168.2.5 192.168.2.254;
- }
- subnet 192.168.3.0 netmask 255.255.255.0 {
- option routers 192.168.3.1;
- range dynamic-bootp 192.168.3.5 192.168.7.254;
- }
Save and exit.
Then start the DHCP service dhcpd start.
Refresh firewall iptables-F note that F is capitalized.
DHCP is configured here. You can configure OPTION as needed.
Next, configure DHCPRELAYL.
Echo 1>/proc/sys/net/ipv4/ip_forward # start routing.
Dhcprelay 192.168.1.2 # dhcp relay for 192.168.1.2.
Iptables-F
Service dhcpd restart
You can.
Then, put 2003 in different Wmnet to get the IP address.