In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Construction of DHCP Relay Service in GNS3+CentOS 7
Here we need to run three virtual machines on the computer at the same time. One CentOS 7 as server and two windows 10 as clients. Layer 3 router and layer 2 switch are built on GNS3 to realize DHCP function and automatic allocation of IP address.
Experimental Topology Diagram of Relay Service
Install the dhcp package
Open the terminal on the CentOS 7 virtual machine and install the dhcp package
Open the connection after building the topology diagram on GNS 3.
Enter sw1 configuration
Create 3 vlan, namely vlan10, vlan20 and vlan100
Enter port f1max 1, assign it to vlan10, and set vlan mode to access
Enter port f1max 2, assign it to vlan20, and set vlan mode to access
Enter port f1max 3, assign it to vlan100, and set vlan mode to access
Enter interface f1max 0, set the vlan mode to Trunk, and specify the encapsulation protocol as 802.1q
Turn off the routing function
Enter sw2 configuration
Enter interface f1max 0, set the vlan mode to Trunk, and specify the encapsulation protocol as 802.1q
Create 3 vlan, namely vlan10, vlan20 and vlan100
Enter vlan10, configure IP address, and subnet mask, and turn it on
Enter vlan20, configure IP address, and subnet mask, and turn it on
Enter vlan100, configure IP address, and subnet mask, and turn it on
After the above configuration is complete, go back to the virtual machine, set VMnet8 to host-only mode, and turn off the dhcp service function
Set all the NICs of the three virtual machines to custom mode, and assign VMnet1 to the first win10, VMnet2 to the second win10, and VMnet8 to the CentOS 7 virtual server.
Enter terminal mode on CentOS7 and give CentOS7 this static network address
Change the automatic acquisition to a static manual configuration and enter the IP address. Subnet mask, gateway
Restart the network service and view the network card information
Copy the dhcp configuration file from the original path to / etc/dhcp/dhcpd.confxia
Modify subnet, add 3 vlan segments, assigned IP address range, and gateway
Restart the dhcp service and view
Return to GNS3 to continue configuring sw2
Enter vlan10,vlan20 and vlan100 and specify the port address of the DHCP server
Above, we have completed the configuration of the DHCP relay server
Next, we switch to the client side and view our information.
Use ipconfig to view Nic information on the first win10
Use ipconfig to view the Nic information on the second win10
If your network card is not available, it is recommended that you use "ipconfig / release" to close it, and then use "ipconfig / renew" to get it again.
Below we set up a client to be assigned a fixed IP address
First, we use "ipconfig / all" on the second client to get the local physical address.
Back to the CentOS 7 server
Enter the DHCP configuration file and modify the information under host fantasia
Restart the DHCP service
Return to the client to check the IP address
The above is the configuration of our DHCP midrange service.
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.