Configure DHCP relay proxy in Linux

Source: Internet
Author: User
Article Title: Configure DHCP relay proxy in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Assume that a computer performs a soft route with three NICs connected to three different CIDR blocks, 192.168.1.1/24,192.168 .2.1/24,192.168 .3.1/24. The CIDR Block 192.168.1.1/24 has a DHCP server, so how can I assign IP addresses to the two network segments 192.168.2.1/24 and 192.168.3.1/24?

First, add the super scope to the dhcp. conf file:

Ddns-update-style interim; specifies that DNS supported by DHCP is dynamically updated to interim
Ignore client-updates; specifies that the client is not allowed to update DNS records.
Shared-network xxxdhcp {; Super scope name: xxxdhcp
Option subnet-mask limit 255.0;
Option domain-name-servers 192.168.1.2, 192.168.1.10, 192.168.4.1;
Option broadcast-address 192.168.1.255;
Default-lease-time 86400;
Max-lease-time 172800;
}

Subnet 192.168.1.0 netmask 255.255.255.0 {
Range 192.168.1.21 192.168.1.49;
Option routers 192.168.1.1;
Host pc1 {
Hardware ethernet MAC;
Fixed-address 192.168.1.20;
}
}

Subnet 192.168.2.0 netmask 255.255.255.0 {
Range 192.168.2.21 192.168.2.49;
Option routers 192.168.2.1;
Host pc1 {
Hardware ethernet MAC;
Fixed-address 192.168.2.20;
}
}

Subnet 192.168.3.0 netmask 255.255.255.0 {
Range 192.168.3.21 192.168.3.49;
Option routers 192.168.3.1;
Host pc1 {
Hardware ethernet MAC;
Fixed-address 192.168.3.20;
}
}

Linux DHCP Client:/etc/sysconfig/network-scripts/ifcfg-eth0 to change BOOTPROTO = "none" to BOOTPROTO = "dhcp"

If you need to automatically boot the network when the system starts, networking = yes under/etc/sysconfig/networking.

Related Article

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.