Linux Centos7 DHCP service and relay links, detailed configuration

Linux Centos7 DHCP service and relay links, detailed configuration

A. First look at the ip address There are several types, which can only address network in the area.

A:. 1 ~ 126 / 192.168.100.100. 8
B: 128 ~ 191/16
C: 192 ~ 223/24
D: 224 ~ 239 correspond multicast
E: 240 ~ 254 Scientific
look first to know what types of address

Private address
A: 10.0.0.0 ~ 10.255.255.255

B:172.16.0.0~172.31.255.255

C:192.168.0.0~192.168.255.255

127.0.0.0 ~ 127.255.255.255
test tcp / ip protocol entered into force address, loopback address

169.254.0.0 ~ 169.254.255.255 (unallocated address dhcp)
card is automatically obtain IP address format, but no LAN
dhcp server address, this time will get a 169.254.0.0 ~ 169.254.255.255
paragraph address

II. As linux dhcp server to do the relay gateway with three switches GNS3

1. First installed dhcp service among our centos7

Linux Centos7 DHCP service and relay links, detailed configuration

2. configure the switcher in gns3 among the three switches, dhcp server line and even better, with a good virtual VLAN and virtual network segment

Linux Centos7 DHCP service and relay links, detailed configuration

3. In order to test the success we have had two clients and a DHCP server settings only host mode in the same area network

3.1 dhcp server is the first of our Centos7 binding VMNET1 set to host-only mode

Linux Centos7 DHCP service and relay links, detailed configuration

3.2 The first win10 client binding vmnet2 set to host-only mode

Linux Centos7 DHCP service and relay links, detailed configuration

3.3 a second binding vmnet8 win10 client host mode provided only

Linux Centos7 DHCP service and relay links, detailed configurationLinux Centos7 DHCP service and relay links, detailed configuration

4. Go to our switcher SW2 and configure VLAN interfaces

Linux Centos7 DHCP service and relay links, detailed configuration

5. Is there with a good view

Linux Centos7 DHCP service and relay links, detailed configuration

6. The f1 / 0 interface is configured to trunk link

Linux Centos7 DHCP service and relay links, detailed configuration

7. into our three-tier exchange vlan configuration SW3

Linux Centos7 DHCP service and relay links, detailed configuration

8. VLAN there with a good view

Linux Centos7 DHCP service and relay links, detailed configuration

9. The VLAN configuration to the network side to the three

Linux Centos7 DHCP service and relay links, detailed configuration

10. Review the network has not been configured correctly

Linux Centos7 DHCP service and relay links, detailed configuration

11. The f1 / 0 configured as a trunk

Linux Centos7 DHCP service and relay links, detailed configuration

12. Review the type is not trunk link

Linux Centos7 DHCP service and relay links, detailed configuration

13. Go Centos7 the start configuring the network card

Linux Centos7 DHCP service and relay links, detailed configuration

14. Restart View IP network services

Linux Centos7 DHCP service and relay links, detailed configuration

15. Copy the template dhcpd configuration

Linux Centos7 DHCP service and relay links, detailed configuration

16. Configure network segment, subnet mask, address pool, default gateway

Linux Centos7 DHCP service and relay links, detailed configuration

17. Start service, see the DHCP service status

Linux Centos7 DHCP service and relay links, detailed configuration

18. The three switches back to power on a relay link

Linux Centos7 DHCP service and relay links, detailed configuration

19. back to the client we can not automatically try to get to the DHCP address

Linux Centos7 DHCP service and relay links, detailed configuration

Guess you like

Origin blog.51cto.com/14449524/2434532