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/03 Report--
Https://blog.51cto.com/14451009/2434021, this blog specifically describes how to use Linux to build a DHCP server. So this blog is going to do a GNS3 with VMware virtual implementation of Linux DHCP service.
Lab environment: server Linux (centos7)
There are 2 clients, which are Windows 1010 and Windows 7 respectively.
The first step is to bind each system to a separate fixed network card. After the network card is bound, the three systems are equivalent to separate computers. Windows 10 system binds the first network card, Windows 7 is the second network card bound, and LinuxDHCP server is the third network card bound.
Next, build a simple network topology diagram, as shown below. Explain the following figure, the middle is a layer 2 switching and a layer 3 switching, the right is a Linux DHCP server, and the following two are Windows clients, one is Windows 10 and the other is Windows 7.
Now turn on the two machines and double-click to enter the setup mode. First of all, let's set up the layer 2 switch.
First use the conf t command to enter global setup mode, and then use the no ip routing command to turn off the routing function.
Then add vlan 10 and vlan 20 and vlan 30 respectively
Next, exit the vlan mode with the exit command, enter the setting for port 1 with the int F1 stop 1 command, and use the sw mo acc command to set the port to access mode. Then use the sw acc vlan10 command to add port 1 to the vlan10.
Then use exit to exit the setting mode for port 1 and set port 2 and port 3 in the same way
Finally, you need to set port 1Compact 0 to trunk mode, and this is where the layer 2 switching is set. Then there is the setting of the layer 3 switch.
First enter global setting mode using the conf t command, and then create three vlan using the vlan 10 and 20 vlan 30 commands.
Then add online gates to the three vlan respectively.
Finally, enter the setting of port 1amp 0, set the mode to trunk mode and encapsulate the protocol. At this point, the preliminary setup of the three-layer switching is complete.
To enter the settings of the DHCP server, first use the rpm-a dhcp command to check whether the dhcp package is installed on the system. I have already installed it here. If not, you can use the yum-y install dhcp command to install it.
Then copy a template of the configuration file and directly overwrite the original empty configuration file.
Then use the vim / etc/dhco/dhcpd.conf command to open the configuration file you just copied and set it up.
Then add a pool of 10-segment ip addresses, that is, the ip segment of vlan10.
Then use the 4yy command to copy the four lines you just configured, and then use the p command to copy twice.
Then modify the copied two segments into the other two network segments drawn up by the topology diagram at first, and finally type "wq" to save and exit.
Then open the configuration file of the network card and change the IP address to a static IP address. Change the IP address of the server to 192.168.30.50 and enter "wq" to save and exit.
Then restart the network service and start the dhcp service.
Then check that the native dhcp service is already turned on.
Then go to vlan 10 and 20 respectively and point their servers to 192.168.30.50 that is the LinuxDHCP server.
Then open the client Windows 10 and release the original IP address using the ipconfig / release command.
Then use the ipconfig / renew command to see that you have obtained the new address. Then we went to see Windows 7.
As with the Windows 10 system, release the original IP address first using the ipconfig / release command.
Then use the ipconfig / renew command, and you can see that you have already obtained the address of 20 network segments.
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.