How to enable dhcp relay to assign IP

  
to different subnets

Be a DHCP server a few days ago, you need to enable relay to assign IP to unused subnets. After searching the relevant information, I found some problems. Now I will organize my own test process. The environment is fedora 6, installed dhcp-3.0.5-5.fc6.i386.rpm.IP The distribution is like this: machine A with two network cards, eth0: 192.168.10.1 eth1: 192.168.20.1, for DHCP Relay uses a network card machine B, eth0: 192.168.20.254, gw: 192.168.20.1 as a DHCP server. Both machines are installed with dhcp-3.0.5, and on the machine A, DHCP RELAYdhcrelay -i eth0 -i eth1 192.168.20.254 The specific dhcrelay usage can be viewed using man dhcrelay. Note that many materials on the Internet have some problems here, less -i eth1, less this parameter A will not receive the response. B sent as a DHCP SERVER only need to configure eth0 IP: 192.168.20.254 and dhcp. The conf. connection is of course A eth1---B eth0, A eth0---the dhcpd.conf for the client to do the client configuration is as follows:

1. ddns-update-style interim; 2. ignore client -updates; 3. 4. #shared-network mynet { 5. option subnet-mask 255.255.255.0; 6. option domain-name "vvv"; 7. option domain-name-servers 192.168.123.247 8. option broadcast- Address 192.168.20.255; 9. default-lease-time 86400; 10. max-lease-time 172800; 11. 12. subnet 192.168.20.0 netmask 255.255.255.0 { 13. range 192.168.20.11 192.168.20.100; 14. option routers 192.168.20.1; 15. } 16. 17. subnet 192.168.10.0 netmask 255.255.255.0 { 18. range 192.168.10.10 192.168.10.100; 19. option routers 192.168.10.1; 20. } 21. 22. subnet 192.168.182.0 netmask 255.255.255.0 { 23. range 192.168.182.10 192.168.182.100; 24. option routers 192.168.1 82.1; 25. } 26. #} Such a configuration notebook should get 192.168.10.*, if you change A's eth0 to 192.168.182.1, the notebook should get 192.168.182.* experiment, you can connect multiple subnets Add the corresponding IP segment to dhcpd.conf.

A bit of doubt, what is the meaning of shared-network in dhcpd.conf? I have checked a lot of information and have not found it. I only know that if I add this, I will capture 192.168.20 on the capture package on B. The address of .*, dhcrelay could not receive this response, and eventually the DHCP request failed.

Copyright © Windows knowledge All Rights Reserved