Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everyone, I am setting up a dhcp server with 2 nics and having 2 dhcp scopes for 2 vlans i have got. My question is when setting this up ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Location
    uk
    Posts
    22

    Question about dhcp


    Hi everyone,


    I am setting up a dhcp server with 2 nics and having 2 dhcp scopes for 2 vlans i have got. My question is when setting this up with the following code:

    Code:
    subnet 192.168.1.0 netmask 255.255.255.0
    {
    range;
    option subnet-mask ;
    option broadcast-address ;
    option domain-name ;
    option domain-name-servers ;
    option routers ;
    
    #Binding IP to individual hosts so that they get fixed IP 
    host test01
    {
    option host-name ;
    hardware ethernet ;
    fixed-address ;
    }
    
    host test02
    {
    hardware ethernet ;
    fixed-address ;
    }
    }
    
    subnet 10.10.1.0 netmask 255.0.0.0
    {
    range 10.10.1.10 10.10.1.20;
    
    option subnet-mask;
    option broadcast-address ;
    option domain-name ;
    option domain-name-servers ;
    option routers ;
    
    }
    how does the dhcp server know what nic to use for each subnet above, as there is no mention about what nic eg. eth0 eth1 each scope will use. Just a guess is it because each nic will be assigned with a static ip etc so the dhcp server sees the ip per nic eg. eth0 is 192.168.1.2 and the subnet dhcp scope is say 192.168.1.0 so the dhcp server know the static ip on eth0 is on the 192.168.1.x subnet so thats the nic it uses. Is this correct!!!!!



    Many thanks for any info about this

  2. #2
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    Quote Originally Posted by linuxfan27 View Post
    ... Just a guess is it because each nic will be assigned with a static ip etc so the dhcp server sees the ip per nic eg. eth0 is 192.168.1.2 and the subnet dhcp scope is say 192.168.1.0 so the dhcp server know the static ip on eth0 is on the 192.168.1.x subnet so thats the nic it uses. Is this correct!!!!!
    That is how I understand it to work. The first static IP address that is assigned to the NIC is used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •