GNS3 with VMware to build a Linux DHCP relay service

        

        https://blog.51cto.com/14451009/2434021, this blog specifically describes how to use Linux to build a DHCP server. Then this blog will do a GNS3 with VMware virtual implementation of a DHCP service for Linux.

        Experimental environment: server Linux (centos7)

                        Client 2, respectively, Windows 10, Windows 7.

        First, the system should bind each separate fixing a card. NIC teaming after completion of the three systems is equivalent to a stand-alone computer. Windows 10 system is bound to the first NIC, Windows 7 is a second block bound to the NIC, and the third block is LinuxDHCP server NIC binding.

image.png

image.png

image.png


        Next, constructed in a simple network topology, following FIG. Explain the following figure, in the middle of a Layer 2 switching with a three-tier exchange for the right of a Linux DHCP server, and the following two is for the two Windows clients, one is a Windows 10 Taiwan is Windows 7.

image.png

        Now double-click to open the two machines enter the setup mode, first we Layer 2 switches to set.

image.png


        First, using the global conf t command to enter the setting mode, then no ip routing command to disable routing function.

image.png

        Then add vlan 10, respectively, as well as with vlan 20 vlan 30

image.png

        

        Next, using the vlan mode exit command, then the int f1 / 1 command to enter the port 1 of the set, using the command set sw mo acc port access mode. Then add 1 to the port which vlan10 use sw acc vlan 10 command.

image.png


        Then exit to exit port setting mode 1 in the same manner as port 3 is provided with a port 2

image.png

image.png


        Finally set 1/0 as trunk port, layer-2 switching is provided here is completed. Next is the set of three switches.

image.png



             First use conf t command to enter global settings mode, then use to create three vlan vlan 10,20,30 command.

image.png


        

        And then were added to the three vlan on gateway.

image.png

image.png

image.png


            And finally into 1/0 port is provided, and the setting mode as trunk encapsulation protocol. Here initially set up three-tier exchange is complete.

image.png


        Enter the setup DHCP server, first use the rpm -a dhcp command to check the dhcp package system is not installed, I have been here for the installation is complete, if not installed, then you can use yum -y install dhcp command to install click.

image.png


        Then a copy of the template profile directly overwriting the original empty profile.

image.png


        Then use vim /etc/dhco/dhcpd.conf command to open just copy the configuration file, set it up.

image.png

image.png


        Then add a 10 ip address pool segment, which is vlan10 of ip network segment.

image.png


        Then use 4yy command to copy the configuration just finished four rows back in the next two copy using the p command.

image.png


        Then copy out two modified to a good start topology developed two other segments, and finally enter "wq" to save and exit.

image.png


        Then open the configuration file of the network card IP address changes to a static IP address. Modify the server's IP address input after 192.168.30.50 "wq" to save and exit.

image.png

image.png


        Then restart the network services, and open the dhcp service.

image.png

        Then check this machine dhcp service has been turned on.

image.png


        Then they were entering the vlan 10,20,30 server all point to 192.168.30.50 will LinuxDHCP server.

image.png


        Then open the client Windows 10, before the ipconfig / release command to relieve the original IP address.

image.png


        Then use the ipconfig / renew command, has been looking to get a new address. Then we look at Windows 7.

image.png


        Like Windows 10 system, first use the ipconfig / release command to release the original IP address.

image.png


        Then use the ipconfig / renew command, you already get to see the address of the segment 20.

image.png


    

        


Guess you like

Origin blog.51cto.com/14451009/2434545