LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-27-2004, 11:23 PM   #1
plexus
LQ Newbie
 
Registered: Feb 2004
Location: Singapore
Distribution: Windows XP, RedHat 9
Posts: 16

Rep: Reputation: 0
Reserve IP in DHCP


Hi all

My machine has 2 network interface (eth0 & eth1). I would like to know how is it possible to reserve IP address for these 2 interface? It seems like dhcpd don't allow similar hostname. How can I resolve this when I have only a hostname for this machine?

My hostname is: computer1.domain.com

Below is an extract of my dhcpd.conf file

Code:
host computer1 {
    hardware ethernet 00:80:48:XX:XX:XX;
    fixed-address 192.168.1.20;
}

host computer1 {
    hardware ethernet 00:0B:CD:XX:XX:XX;
    fixed-address 192.168.1.30;
}
Also, can I know if it is possible to obtain dynamic IP address from my own dhcp server on the 2 interface? (EG: the machine acts as a dhcp server and the interface obtain the IP from the dhcp as well)

Thanks
 
Old 02-28-2004, 10:20 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
It should take it. Mine does
Code:
 subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers                         192.168.0.1;
        option subnet-mask                 255.255.255.0;
        option nis-domain                   "dcphillips.net";
        option domain-name                "dcphillips.net";
        option domain-name-servers     192.168.0.1, 68.63.0.5, 68.63.0.6;
        option time-offset                      0;
        option ntp-servers                    time.nist.gov;
        option netbios-name-servers     192.168.0.1;
        option netbios-node-type          2;
        option smtp-server                   192.168.0.1;
 
        range dynamic-bootp               192.168.0.101 192.168.0.200;
        default-lease-time                    21600;
        max-lease-time                        43200;
 
 
host firedragon {
hardware ethernet 00:04:.........;
fixed-address 192.168.0.2;
option host-name "firedragon";
}
 
host firedragon {
hardware ethernet 00:50:.........;
fixed-address 192.168.0.7;
option host-name "firedragon";
}
}
 
Old 02-29-2004, 12:41 AM   #3
plexus
LQ Newbie
 
Registered: Feb 2004
Location: Singapore
Distribution: Windows XP, RedHat 9
Posts: 16

Original Poster
Rep: Reputation: 0
Hmm. What if it's for 2 subnet?

I forget to mention that important point
 
Old 02-29-2004, 10:06 AM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
What's the error your getting and how does your file look?
Code:
subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers                         192.168.0.1;
        option subnet-mask                 255.255.255.0;
        option nis-domain                   "dcphillips.net";
        option domain-name                "dcphillips.net";
        option domain-name-servers     192.168.0.1, 68.63.0.5, 68.63.0.6;
        option time-offset                      0;
        option ntp-servers                    time.nist.gov;
        option netbios-name-servers     192.168.0.1;
        option netbios-node-type          2;
        option smtp-server                   192.168.0.1;
 
        range dynamic-bootp               192.168.0.101 192.168.0.200;
        default-lease-time                    21600;
        max-lease-time                        43200;
 
 
host firedragon {
hardware ethernet 00:04:.........;
fixed-address 192.168.0.2;
option host-name "firedragon";
}
 
host firedragon {
hardware ethernet 00:50:.........;
fixed-address 192.168.0.7;
option host-name "firedragon";
}
}

subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;
        option nis-domain               "dcphillips.net";
        option domain-name              "dcphillips.net";
        option domain-name-servers      192.168.1.1, 68.63.0.5, 68.63.0.6;
        option time-offset              0;
        option ntp-servers              time.nist.gov;
        option netbios-name-servers     192.168.1.1;
        option netbios-node-type 2;
        option smtp-server              192.168.1.1;
        range dynamic-bootp 192.168.1.101 192.168.1.200;
        default-lease-time 21600;
        max-lease-time 43200;
                                                                                                                                                                        
host firedragon {
hardware ethernet 00:04:.........;
fixed-address 192.168.1.2;
option host-name "firedragon";
}
 
host firedragon {
hardware ethernet 00:50:.........;
fixed-address 192.168.1.7;
option host-name "firedragon";
}
}

Last edited by DavidPhillips; 02-29-2004 at 10:07 AM.
 
Old 03-02-2004, 06:31 AM   #5
plexus
LQ Newbie
 
Registered: Feb 2004
Location: Singapore
Distribution: Windows XP, RedHat 9
Posts: 16

Original Poster
Rep: Reputation: 0
yeah, my config is about the same as yours..

Code:
subnet 192.168.10.0 netmask 255.255.255.0 {

        option routers                              192.168.10.1;
        option subnet-mask                     255.255.255.0;

        option domain-name                    "mydomain.com";
        option domain-name-servers       192.168.10.1,192.168.20.2;

        range dynamic-bootp 192.168.10.3 192.168.10.254;
        default-lease-time 21600;
        max-lease-time 43200;                                                                               
        host PC1 {
              hardware ethernet 00:80:48:XX:XX:XX;
              fixed-address 192.168.10.2;
        }
}

subnet 192.168.20.0 netmask 255.255.255.0 {

        option routers                              192.168.20.2;
        option subnet-mask                     255.255.255.0;

        option domain-name                    "mydomain.com";
        option domain-name-servers       192.168.10.1,192.168.20.2;

        range dynamic-bootp 192.168.20.10 192.168.20.254;
        default-lease-time 21600;
        max-lease-time 43200;                                                                               
        host PC1 {
              hardware ethernet 00:0B:CD:XX:XX:XX;
              fixed-address 192.168.20.3;
        }
}
 
Old 03-06-2004, 02:25 AM   #6
plexus
LQ Newbie
 
Registered: Feb 2004
Location: Singapore
Distribution: Windows XP, RedHat 9
Posts: 16

Original Poster
Rep: Reputation: 0
Alright, I got it to work.

Just place the following in the global section of the config file:

Code:
host PC1 {
    hardware ethernet XX:XX:XX:XX:XX:XX;
    fixed-address 10.1.1.1,20.1.1.1,30.1.1.1;
}
Anyway, thanks DavidPhillips
 
Old 03-08-2004, 01:20 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
cool, I never had to do that one before.

Good job!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reserve CPU Resource syseeker Programming 2 09-09-2005 10:46 AM
apache2 reserve proxy hoffmanyew Linux - Software 2 05-13-2005 01:48 AM
Unable to reserve mem region Ephracis Linux - Software 2 03-26-2005 01:21 PM
Reserve local ip only for Router and for nobody else. RINO2004 Linux - Networking 4 07-08-2004 03:56 PM
How do I reserve an IRQ to ISA? peso Linux - Hardware 9 02-07-2004 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration