Assign ip pool out of subnet network range on dhcp server

Issues related to configuring your network
Post Reply
dotd88
Posts: 2
Joined: 2019/05/25 22:26:23

Assign ip pool out of subnet network range on dhcp server

Post by dotd88 » 2019/05/28 04:54:27

Q1. Is there way That Assign ip pool outside of one's subnet?
(ex:
subnet 172.18.16.0 netmask 255.255.252.0 {
range 172.18.16.21 172.18.16.254; => 172.18.20.21 172.18.20.254
option routers 172.18..20.1;
}
)
recent My plan is
ip eht1 : 172.18.23.253/30

Code: Select all

  /etc/dhcp/dhcpd.conf
  subnet 172.18.16.0  netmask 255.255.248.0 {
        range 172.18.20.21 172.18.20.255;  }
But I Want like below
*ip eht1 : 201.0.0.2/30*

Code: Select all

  /etc/dhcp/dhcpd.conf
  subnet 172.18.16.0  netmask 255.255.248.0 {
        range 172.18.20.21 172.18.20.255;  }   
  or
  ip eht1 : 172.18.16.10/30
  subnet 172.18.16.0  netmask 255.255.252.0 {
        *range 172.16.16.21 172.16.16.255;*  }  
Q2. use class or other method, Can I do like this?

Code: Select all

/etc/dhcp/dhcpd.conf
class "Network_DMZ" { if packet src is 172.18.16.1 }
class "Network_LAN2" {  if packet src is 192.168.0.1 }
subnet 172.18.16.0 netmask 255.255.255.0 { }
subnet 192.168.0.1 netmask 255.255.255.0 { }
 pool {
    if class name of  "DMZ";
    range 172.18.16.10 172.18.16.100;  }
  pool {
    if class name of  "LAN2";
    range 192.168.0.10 192.168.0.255  }
(edit/moderator: moved from User Comments)

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Assign ip pool out of subnet network range on dhcp server

Post by TrevorH » 2019/05/28 09:17:13

Q1. Is there way That Assign ip pool outside of one's subnet?
No.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dotd88
Posts: 2
Joined: 2019/05/25 22:26:23

Re: Assign ip pool out of subnet network range on dhcp server

Post by dotd88 » 2019/05/30 12:48:50

T :D thank you so much!

Post Reply