DHCP lab report -- Yang Dong lab environment server: RedHatEnterpriseLinux5.3 (ip: 192.168.0.20) server: RedHatEnterpriseLinux5.3 (ip: 192.168.0.10, 192.168.1.10) client: windowsxp01. install the software package...
DHCP lab report-- Yang Dong
- Lab environment
Server: Red Hat Enterprise Linux 5.3 (ip: 192.168.0.20)
Server: Red Hat Enterprise Linux 5.3 (ip: 192.168.0.10, 192.168.1.10)
Client: windows xp
01. install the software package
[Root @ yang ~] # Rpm-ihv/media/Server/dhcp-3.0.5-18.el5.i386.rpm
- Tutorial 1: configure one serverDHCPServers are allocated to LAN usersIpAddress.
01. modify the configuration file.
[Root @ yang ~] # Cp-rf/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample/etc/dhcpd. conf
Cp: overwrite "/etc/dhcpd. conf "? Y
[Root @ yang ~] # Vim/etc/dhcpd. conf
Ddns-update-style interim;
Ignore client-updates;
Subnet 192.168.0.0 netmask 255.255.255.0 {
Option routers 192.168.0.1;
Option subnet-mask limit 255.0;
Option nis-domain "yangdong.com ";
Option domain-name "yangdong.com ";
Option domain-name-servers 61.147.37.1;
Option time-offset-18000; # Eastern Standard Time
Range dynamic-bootp 192.168.0.128 192.168.0.254;
Default-lease-time 21600;
Max-lease-time 43200;
Host ns {
Next-server marvin.redhat.com;
Hardware ethernet 12: 34: 56: 78: AB: CD;
Fixed-address 207.175.42.254;
}
}
02. restart the server.
[Root @ yang ~] # Service dhcpd restart
Disable dhcpd: [OK]
Start dhcpd: [OK]
03. Client Test
Test successful
- Tutorial 2: Configuration ImplementationDHCPRelay proxy service.
01. Experiment environment:
Master server installation: [root @ yang ~] # Rpm-ihv/media/Server/dhcp-3.0.5-18.el5.i386.rpm
Install the relay server: [root @ yang ~] # Rpm-ihv/media/Server/dhcp-3.0.5-18.el5.i386.rpm
02. master server configuration:
①. [Root @ yang ~] # Vim/etc/dhcpd. conf
Ddns-update-style interim;
Ignore client-updates;
Subnet 192.168.0.0 netmask 255.255.255.0 {
Option routers 192.168.0.1;
Option subnet-mask limit 255.0;
Option nis-domain "yangdong.com ";
Option domain-name "yangdong.com ";
Option domain-name-servers 61.147.37.1;
Option time-offset-18000; # Eastern Standard Time
Range dynamic-bootp 192.168.0.128 192.168.0.254;
Default-lease-time 21600;
Max-lease-time 43200;
}
Subnet 192.168.1.0 netmask 255.255.255.0 {
Option routers 192.168.1.1;
Option subnet-mask limit 255.0;
Option nis-domain "yangdong.com ";
Option domain-name "yangdong.com ";
Option domain-name-servers 61.147.37.1;
Option time-offset-18000; # Eastern Standard Time
Range dynamic-bootp 192.168.1.128 192.168.1.254;
Default-lease-time 21600;
Max-lease-time 43200;
}
②. Restart the server.
[Root @ yang ~] # Service dhcpd restart
Disable dhcpd: [OK]
Start dhcpd: [OK]
03. relay server configuration
①. [Root @ hello ~] # Rpm-ihv/media/Server/dhcp-3.0.5-18.el5.i386.rpm
Warning:/media/Server/dhcp-3.0.5-18.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: dhcp ####################################### #### [100%]
[Root @ hello ~] # Service dhcpd start
Start dhcpd: [failed]
②. [Root @ hello ~] # Vim/etc/sysctl. con
Modify: net. ipv4.ip _ forward = 1 // enable the routing function
[Root @ hello ~] # Sysctl-p
Net. ipv4.ip _ forward = 1
Net. ipv4.conf. default. rp_filter = 1
Net. ipv4.conf. default. accept_source_route = 0
Kernel. sysrq = 0
Kernel. core_uses_pid = 1
Net. ipv4.tcp _ syncookies = 1
Kernel. msgmnb = 65536
Kernel. msgmax = 65536
Kernel. shmmax = 4294967295
Kernel. shmall = 268435456
③. [Root @ hello ~] # Vim/etc/sysconfig/dhcrelay
# Command line options here
INTERFACES = "eth0 eth1"
DHCPSERVERS = "192.168.0.20"
[Root @ hello ~] # Service dhcrelay start
Start dhcrelay:
[OK]
④ Client test
Test successful
- Preparations before the experiment
This article is from "Yang Dong's blog"