CentOS DHCP 7 of the relay service

A simulated environment deployment:

We learned this in the GNS3 and CRT usage, CentOS7 and Windows 10 are installed VMware, we recommend that small partners to go to learn about it.
. 1, GNS3-1.3.10-All-in-One,
2, the CRT 8.0
. 3, VMware14. 7 of the CentOS
. 4, the Windows 10 VMware14

Second, the relay service topology:

1, click on the left side of the router in GNS3 icon, drag two routers to get the work area, then click on the Computer icon and select HOST take three drag the PC into the work area.
2, the first router icon into the switch and changed its name to "sw2", adding Layer 2 services board, and set the disk space 128Mib; icon and then the other three switches and routers into renamed " sw2 ", added the same Layer 2 service board and set the disk space 128Mib.
3, a PC will be renamed DHCP, and its icon into the server.
4, the other two are a PC and renamed win10-1 win10-2.
. 5, each device connected to the manner and dividing FIG vlan and gateways, sw2 and sw2 of f1 / 0 connected; sw2 of f1 / 3 and the DHCP VM8 connected; SW2 of f1 / 1 is connected to the win10-1 VM1; sw2 of f1 / 3 win0-2 connected to the VM2.
CentOS DHCP 7 of the relay service

Third, the simulation process:

1, the implementation of "yum install dhcp -y" command to download and install the DHCP service in CentOS 7.
CentOS DHCP 7 of the relay service
2, until been installed on the virtual machine network editor CentOS VM8 win cards and two network connections 7 are set to 10, only the host mode, and turn off the DHCP function.
CentOS DHCP 7 of the relay service
3, back to the start GNS3 configuration, double-click the first point to open the configuration page sw1 input "conf t" into the global mode, then enter the "vlan 10,20,100" to create a vlan, final implementation "do show vlan-sw b" command View vlan information.
CentOS DHCP 7 of the relay service
4, the f1 / 1 Interface classified into the vlan10, f1 / 2 interfaces included in the vlan20, f1 / 3 interfaces to vlan100 classified, and finally the f1 / 0 classified to the trunk link and protocol encapsulation dot1q, then Close routing.
CentOS DHCP 7 of the relay service
6, and then double-click to open the configuration page sw2, also enter into the global mode, f1 / 0 interfaces included trunk link and create vlan10,20,100.
CentOS DHCP 7 of the relay service
7, configuration vlan 10,20,100 gateway IP address and subnet mask.
CentOS DHCP 7 of the relay service
8, back CentOS 7 implementation of "vim / etc / sysconfig / network -scripts / ifcfg-ens33" command to enter the network card is configured to set a static route.
CentOS DHCP 7 of the relay service
9, the implementation of "systemctl restart network.service" command to restart the network services.
CentOS DHCP 7 of the relay service
10, perform the "cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf" command to copy the files in the destination DHCP etc directory, then execute "vim / etc / dhcp /dhcpd.conf "into the configuration file.
CentOS DHCP 7 of the relay service
11, and then back in GNS3 begin configuring DHCP relay service.
CentOS DHCP 7 of the relay service
sw2 # conf t Enter the global mode
sw2 (config) #int vlan 10 vlan 10 DHCP server address specified
SW2 (config-IF) #ip Helper-address 192.168.100.100
SW2 (config-IF) #no Shut
SW2 (config-IF) #ex
SW2 (config) # 20 specifies vlan int vlan 20 DHCP server address
SW2 (config-IF) #ip Helper-address 192.168.100.100
SW2 (config-IF) #no Shut
SW2 (config-IF) #ex
SW2 (config) #int the vlan vlan 100 100 DHCP server address
SW2 (config-IF) #ip Helper-address 192.168.100.100
SW2 (config-IF) #no Shut
12, in win10-1 open cmd enter "ipconfig" command to view automatically obtain the IP address.
CentOS DHCP 7 of the relay service
13, enter cmd to open the "ipconfig" command to view win10-2 to automatically obtain an IP address.
CentOS DHCP 7 of the relay service
Interested friends can try to bind the client MAC address to specify the IP address distribution oh. Simply going to add to the profile, and the client MAC address in the IP can be fixed at paragraphs fix.

Guess you like

Origin blog.51cto.com/14449521/2434541