Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Reserving IP when DHCP is used

Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2004, 06:33 AM
Default Reserving IP when DHCP is used



Dear Group,

I have the following set up.

DSL with dynamic IP

Linksys BEFSR41 Router configured with starting dynamic ip address
192.168.1.100

I have couple of windows machine connected to the network and all of
them are configured to obtain ip address from the DHCP server (ie,
linksys router)

Now, I installed a linux machine (currently on vmware) and want this
machine to always obtain a fixed ip address (say, 192.168.1.80 or
192.168.1.120 etc).

Though, most of the time I get the same address, it is not gauranteed
as I introduce my work laptop in the network and so on.

What is the simple and efficient way to make my linux machine always
get the same ip address (using MAC or ifconfig or whatever methods)?

Thank You,
Prince.


Prince Kumar
Reply With Quote
  #2  
Old 07-04-2004, 10:32 AM
Ed
Guest
 
Posts: n/a
Default Re: Reserving IP when DHCP is used

On Sat, 03 Jul 2004 22:33:30 -0700, Prince Kumar wrote:

> Dear Group,
>
> I have the following set up.
>
> DSL with dynamic IP
>
> Linksys BEFSR41 Router configured with starting dynamic ip address
> 192.168.1.100
>
> I have couple of windows machine connected to the network and all of
> them are configured to obtain ip address from the DHCP server (ie,
> linksys router)
>
> Now, I installed a linux machine (currently on vmware) and want this
> machine to always obtain a fixed ip address (say, 192.168.1.80 or
> 192.168.1.120 etc).
>
> Though, most of the time I get the same address, it is not gauranteed
> as I introduce my work laptop in the network and so on.
>
> What is the simple and efficient way to make my linux machine always
> get the same ip address (using MAC or ifconfig or whatever methods)?
>
> Thank You,
> Prince.


Hi,
I'm not too sure what parameters you can change in a Linksys 'cause I
don't have one. Can you extend the lease time? That might do it. Or
just have a DHCP server running on a linux box, that's what I got. Why
don't you have fixed ip's? For a small LAN it might be easier...
Ed.
Reply With Quote
  #3  
Old 07-04-2004, 01:05 PM
James Knott
Guest
 
Posts: n/a
Default Re: Reserving IP when DHCP is used

Prince Kumar wrote:

> What is the simple and efficient way to make my linux machine always
> get the same ip address (using MAC or ifconfig or whatever methods)?
>


Why not just configure it with a static address? Just make sure you use an
address within your subnet, that's not included in the range assigned by
dhcp.

--

(This space intentionally left blank)
Reply With Quote
  #4  
Old 07-04-2004, 01:56 PM
Raqueeb Hassan
Guest
 
Posts: n/a
Default Re: Reserving IP when DHCP is used

You might provide that linux machine a fixed ip and start linksys
dhcpd from some ip's after that ip.

like, should you assign ip like 192.168.10.10 to that linux machine,
start your linksys from 11 and up.

if you are running linux pc as dhcpd server, use this in dhcpd.conf
....

host prince {
hardware ethernet 00:00:00:00:00:00;
fixed-address 192.168.10.10;
}

replace everything with your settings.

raqueeb hassan
bangladesh
Reply With Quote
  #5  
Old 07-05-2004, 07:04 AM
Juhan Leemet
Guest
 
Posts: n/a
Default Re: Reserving IP when DHCP is used

On Sun, 04 Jul 2004 12:05:33 +0000, James Knott wrote:
> Prince Kumar wrote:
>> What is the simple and efficient way to make my linux machine always
>> get the same ip address (using MAC or ifconfig or whatever methods)?

>
> Why not just configure it with a static address? Just make sure you use an
> address within your subnet, that's not included in the range assigned by
> dhcp.


Yes, that is what I would do. Leave the Linksys alone, serving up IP
addresses from 100 on up via DHCP. Define a static IP address for your
linux machine outside the range the Linksys is using (i.e. below 100), for
example 192.168.1.80, as you yourself had suggested. No problems.

You can use either a GUI configuration tool on Linux, or just edit the
configuration text file. In my SuSE 8.2 this is the line (from grep):

/etc/sysconfig/network/ifcfg-eth0:IPADDR='192.168.0.51'

BTW, your network interface might be something other than eth0.
I also have my hostname and IP address defined in /etc/hosts.

--
Juhan Leemet
Logicognosis, Inc.

Reply With Quote
Reply

Tags
dhcp, reserving

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 03:17 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.