In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
An experimental environment
GNS3,VMware (with one Linux system and two Windows10 systems)
II functional Overview of dhcp introduction to 1dhcp
DHCP (Dynamic Host Configuration Protocol, dynamic host configuration protocol) is usually used in large-scale local area network environment, and its main function is to centrally manage and assign 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 of addresses.
DHCP protocol adopts client / server model, and the task of dynamic allocation of host addresses is driven by network hosts. When the DHCP server receives the address information from the network host, it will send the relevant address configuration and other information to the network host in order to realize the dynamic configuration of the network host address information.
The 2 dhcp function ensures that any IP address can only be used by one DHCP client at a time. DHCP should be able to assign users a permanently fixed IP address. DHCP should be able to coexist with hosts that obtain IP addresses by other methods (such as hosts that manually configure IP addresses). DHCP servers should provide services to existing BOOTP clients. 3 dhcp allocation method
1 automatic allocation (Automatic Allocation), the DHCP server assigns a permanent IP address to the host, which can be permanently used once the DHCP client successfully leases the IP address from the DHCP server for the first time.
2 dynamic allocation mode (Dynamic Allocation), the DHCP server assigns an IP address with a time limit to the host. When the time expires or the host explicitly indicates to give up the address, the address can be used by other hosts.
(3) manual allocation (Manual Allocation), the IP address of the client is specified by the network administrator, and the DHCP server only tells the client host the specified IP address.
Of the three address allocation methods, only dynamic allocation can reuse addresses that clients no longer need.
4 advantages of dhcp
1 reduces the time to configure and deploy devices.
2 reduces the possibility of configuration errors.
3 IP address allocation of devices can be managed centrally
Construction of dhcp relay service
Build the topology shown in the following figure in GNS3. Host3 is a Linux system and acts as a dhcp server. Because to create a vlan, the switch and layer 3 switch need to set up virtual memory
Install dhcp service in Linux system
After the installation is completed, change the host3 network card to VMnet1, and the other two windowns10 network cards to VMnet2 and VMnet8, both of which are off the network and only in host mode. Among them, VMnet8 needs to be reconfigured to host-only mode, and after the network card is set, configure the address of the host3 network card.
After the host3 configuration is completed, restart the Nic service to see if the configuration is successful.
Configure vlan in R1Magic R2 in GNS3
(1) R1
Create vlan
Make the link of the f1ap0 interface into trunk
Configure a gateway to the vlan10,20,30 virtual interface
Complete the configuration to check whether it takes effect.
Configure dhcp relay at the gateway
(2) R2
Turn off routing and create a vlan
Assign vlan to the interface
Check whether the configuration is successful
Configure dhcp service in Linux system
Enter / etc/dhcp/dhcpd.conf to configure dhcp
Configuration complete, save, restart the service, view
Verify the configuration result
The test results show that two Windowns10 machines automatically obtain the IP address and communicate with the host3 which is not in the same network segment.
Assign a fixed ip address
Restart the service to view the results
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.