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.