(4) Play with me Linux Network Services: DHCP service configuration-based relay proxy, linuxdhcp

Source: Internet
Author: User

(4) Play with me Linux Network Services: DHCP service configuration-based relay proxy, linuxdhcp

Following the successful configuration of the DHCP server in Part 3, let's configure a relay proxy server.

Our Virtual Machine Structure

 

For details, refer:

(1) Play with me the Linux Network Service: DNS service -- BIND (/etc/named. conf,/var/named) setting implementation and Explanation

According to the third part, we deployed a DHCP server on vm1, And we configured the relay service on vm2. The details are as follows:

 

1. Configure one more subnet in the file with the same DHCP configuration under vm1.

 1 ddns-update-style interim; 2 ignore client-updates; 3  4 subnet 10.10.10.0 netmask 255.255.255.0 { 5         option routers                  10.10.10.10; 6         option subnet-mask              255.255.255.0; 7         option domain-name              "ns.gr.org"; 8         option domain-name-servers      10.10.10.10; 9         option time-offset              28800;10         range dynamic-bootp 10.10.10.100 10.10.10.200;11         default-lease-time 21600;12         max-lease-time 43200;13 }14 subnet 192.168.128.0 netmask 255.255.255.0 {15         option routers                  192.168.128.8;16         option subnet-mask              255.255.255.0;17         option domain-name              "ns.gr.org";18         option domain-name-servers      10.10.10.10;19         option time-offset              28800;20         range dynamic-bootp 192.168.128.100 192.168.128.200;21         default-lease-time 21600;22         max-lease-time 43200;23 }

Comparison (3) Sharing Linux network services with me: for the master server configuration of DHCP service configuration, we delete all useless items and keep the necessary parts.

2. Install On vm2

For more information, see (3) share a Linux Network Service with me: master server configuration of DHCP service configuration

 

3. Open the gate Vm and set relevant content. For details, refer

(1) Play with me the Linux Network Service: DNS service -- BIND (/etc/named. conf,/var/named) setting implementation and Explanation

 

4. After the preparation is complete, we will start to set the IP address of the DHCP server of vm2, that is, the interface for sending the request.

# Vi/etc/sysconfig/dhcrelay
1 # Command line options here2 3 INTERFACES="eth0"4 5 DHCPSERVERS="10.10.10.10"

 

5. Start the DHCP relay agent dhcrelay

# Service dhcrelay start
Start dhcrelay: [OK] Note: you can run it with simple settings here, that is, to add vm1 and vm2 to the route vm1: # route add-net 192.168.128.0/24 gw 10.10.10.8vm2: # route add-net 10.10.10.0/24 gw 192.168.128.8 enable the gate forwarding function: [root @ localhost root] # vi/etc/sysctl.conf..net. ipv4.ip _ forward = 1... 6. Check whether the test is successful.Refer to (3) how to play Linux Network Service with me: Steps 5 and 6 of the master server configuration for DHCP service configuration

 

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.