• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Can a linux dhcp server be set up to only respond to dhcp forwarding requests and not supply dhcp to anyone on its own network?

Can a linux dhcp server be set up to only respond to dhcp forwarding requests and not supply dhcp to anyone on its own network? How?
Ian
:)
0
Rebelnorth
Asked:
Rebelnorth
  • 5
  • 3
  • 2
  • +2
1 Solution
 
jar3817Commented:
Yeah, just don't setup a subnet declaration for the subnet it is located on. The server will only respond to requests that come from a subnet that is declared in /etc/dhcpd.conf
0
 
giltjrCommented:
Rebelnorth, can you define "network"?  Do you mean the same physical Ethernet segment or VLAN, or do you mean IP subnet?

jar3817, I'm not a DHCP expert, but if I don't have an IP address how does the DHCP server know I am, or am not, on the same subnet?
0
 
Cyclops3590Commented:
giltjr, because of where the dhcp server accepted the request from.  if it got the request directly via broadcast, then the host must be on the same segment as the dhcp server's interface is.  however, if it receives the request via a dhcp relay, then the relay will tell it which segment the request is coming from.

jar, please correct me if i'm wrong, but that's the way I've always understood it.
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
jar3817Commented:
Because when the relay hears you and forwards the request to the dhcp server it include the subnet the request was heard on...that's how you are able to specify particular options for particular subnets on the same dhcp server. Think about the router option, if it has no idea what subnet you are coming from, how is it going to give you the correct default gateway?
0
 
jar3817Commented:
you beat me to it cyclops...
0
 
jar3817Commented:
basically I think the hot setup would be to include a subnet delcaration for "the current subnet", the one you don't want to server addresses, but don't put anything in it. Like:

subnet 10.152.74.0 netmask 255.255.255.0 {
}

I think I remember ISC's dhcpd complaining if you didn't include a subnet declaration for the network the server is actually located on.
0
 
Cyclops3590Commented:
Just quick on the draw :)

I'm going to have to lookup that ISC thing though, I've never heard that before.
0
 
jar3817Commented:
0
 
Cyclops3590Commented:
thx jar3817

BTW, Rebelnorth, is this helping you since I believe we're at a consensus that jar3817 has supplied the correct answer; or is there some part of your question that we are missing?
0
 
ravenplCommented:
If You want forward queries only to another dhcp server, don't run dhcp server at all. The dhcp package has also dhcrelay daemon. Configure and run it instead.
0
 
RebelnorthAuthor Commented:
Im in the process of implementing it.  Ill come back after...
Ian
:)
0
 
RebelnorthAuthor Commented:
Ok done...
Basically jar3817 is correct I needed to include the subnet that the machine was directly attached too in order to get the dhcp server to work.  Example of the dhcp conf without the identifying data:

shared-network example {

 subnet ???.???.???.??? netmask ???.???.???.??? {} # subnet machine is directly attatched too...

  subnet ???.???.???.??? netmask ???.???.???.??? { #subnet that is being forwarded in this case by cisco router
        range ???.???.???.0 ???.???.???.254
        option ????????????????????????
        option ????????????????????????

        host host1 {
                hardware ethernet ??:??:??:??:??:??;
                fixed-address ????.???.???.???;
                option host-name "host1";
        }
   }
}
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now