Page 1 of 1

Assign ip pool out of subnet network range on dhcp server

Posted: 2019/05/28 04:54:27
by dotd88
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)

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

Posted: 2019/05/28 09:17:13
by TrevorH
Q1. Is there way That Assign ip pool outside of one's subnet?
No.

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

Posted: 2019/05/30 12:48:50
by dotd88
T :D thank you so much!