DHCP relay Configuration

Source: Internet
Author: User

DHCP relay Configuration
1: Use the experiment environment configured on the above DHCP server to build a DHCP relay.
2: Enable another linux machine for dhcp relay proxy
3: Install the dhcp-3.0.5-18.el5 package for the new linux machine
4: After installation, run the rpm-qc dhcp command to view the configuration documents.
5: Find/etc/sysconfig/dhcrelay and vim/etc/sysconfig/dhcrelay
INTERFACES = "eth0 eth1 eth2" (name of the three NICS)
DHCPSERVERS = "192.168.10.60" (dhcp server address)
6: Three NICs need to be configured for the liuux Machine
7: Configure IP addresses on the three NICs respectively. One Network Adapter connects to the dhcp server IP address 192.168.10.254, the other connects to the 192.168.60.0 network segment IP address 192.168.60.254, And the last connects to the 192.168.70.0 network segment IP address 192.168.70.254,
Note: When configuring the IP address, use setup to cancel the function of Automatically Obtaining the IP address for each network card. After saving and exiting the configuration, restart the NIC service network restart.
8: Enable the NIC's automatic data packet forwarding function vim/etc/sysctl. conf
Change net. ipv4.ip _ forward = 0 in line 1 to net. ipv4.ip _ forward = 1;
9: Try to enable dhcrelay service dhcrelay start
10: Check whether the dhcrelay port is enabled
Chkconfig -- list | grep dhcrelay
Dhcrelay 0: off 1: off 2: off 3: off 4: off 5: off 6: off
Then execute
Chkconfig dhcrelay on
The result is
Dhcrelay 0: off 1: off 2: on 3: on 4: on 5: on 6: off
11: Use netstat-tupln | grep dhcrelay to view port numbers used by the dhcprelay Service
12: configure the default gateway of the above dhcp server
Use setup to configure and then restart the network service.
Use route-n
Check whether the configuration takes effect. The result is
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.10.254 0.0.0.0 UG 0 0 0 eth0
If no route for 0.0.0.0 is effective
13: Check whether the test results of two other computers are correct and whether the correct IP address can be obtained.
Author: "Fools note"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.