In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces CentOS as DHCP allocation IP address and DHCP relay link is how, the content is very detailed, interested friends can refer to, I hope to help you.
CentOS assigns IP addresses as DHCP-DHCP relay link DHCP (Dynamic Host Configuration Protocol)
It is usually used in large-scale local area network environments, mainly for centralized management and allocation of IP addresses, so that hosts in the network environment can dynamically obtain IP addresses, Gateway addresses, DNS server addresses and other information, and can improve the utilization rate of addresses.
DHCP protocol adopts client/server model, and the task of dynamic allocation of host address is driven by network host. When the DHCP server receives the address application information from the network host, it will send relevant address configuration information to the network host, so as to realize dynamic configuration of the address information of the network host.
DHCP allocation method:
1. Automatic allocation: permanent use after allocation to an IP address
2. Manual allocation: IP address is specified by DHCP server administrator.
Dynamic allocation: release the IP after use for use by other clients
-
The address information allocated by DHCP mainly includes:
1. Use IP address and subnet mask of network card
2. Corresponding network address and broadcast address
3. Default gateway address
DNS server address
-
DHCP Service Process
1. The client requests IP to send a broadcast request address
2. The server responds to the server reply address, the source IP address is the server address, the address that the client can use
3. The client selects the IP client to request this address for a period of time.
4. Server determines lease
All of the above steps are broadcast, and the client has no address in the process
-
Experimental environment:
1. Three hosts:
Change one to DHCP server and change icon to server
Two other hosts, one Windos10 and one Windows 7
2. Add two routers:
RI icon replaced with switch, Layer 2 service board added, and disk space granted to 128Mb
The R2 icon is replaced with a Layer 3 switch, a Layer 2 service board is added, and disk space is given to 128Mb.
network card configuration
DCHP------>Vmnet1
Window10----->Vmnet2
Wini7------>Vmnet8
-----------
The operation in switch R1 is as follows:
1. Enter global mode, turn off routing, and create vlan10,20,100
2. Divide f1/1, f1/2, f1/3 into vlan10,20,100 respectively
3. Enter port f1/0 and configure trunk link, which can form trunk link with f1/0 of layer 3 switch.
-
The operation of Layer 3 switch R2 is as follows:
Enter port f1/0 and create vlan 1/0,20,100 respectively.
Enter vlan10, 20, 100 to configure IP address
Enter vlan10,20,100 and configure DHCP pointing service, so as to realize DHCP broadcast across Vlan.
CentOS7:
Install DHCP service package using yum repository in networked state
[root@localhost ~]# yum install dhcp -y
After installation, configure the ENS33 network card, save and restart the network card after completion.
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
-
# cp /usr/share/doc/dhcp-4.2.5/dhcp.conf.example /etc/dhcp/dhcp.conf #Copy template
[root@localhost ~]# vim /etc/dhcp/dhcp.conf #Use the template to modify the configuration to find the subnet to modify (we have a total of three vlan, need to modify three)#The first line subnet 192.168.10.0 netmask 255.255.255.0range 192.168.10.128 192.168.10.200; #address pool option routers 192.168.10.1;#second line subnet 192.168.20.0 netmask 255.255.255.0range 192.168.20.128 192.168.20.200; #address pool option routers 192.168.20.1#third line subnet 192.168.100.0 netmask 255.255.255.0range 192.168.100.128 192.168.100.200; #Address pool option routes 192.168.100.1 All symbols in the configuration file cannot be less, otherwise the service will not start
wq save exit after modification [root@localhost ~]# systemctl start dhcpd #Start this service [root@localhost ~]# systemctl status dhcpd #Check DHCP service status ative(active status, indicating successful service startup
----------------------------------------------------------
Enter Win10-1, enter command character interface
C:\Users\a>ipconfig /release Release IP address C:\Users\a>ipconfig /renew Get a new IP address C:\Users\a>ipconfig view an address
Enter Win10-2, enter command character interface
C:\Users\OK>ipconfig /release Release IP address C:\Users\OK>ipconfig /renew Get a new IP address C:\Users\a>ipconfig view an address
About CentOS as DHCP allocation IP address and DHCP relay link is how to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.