LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-02-2005, 12:38 AM   #1
dshafi
LQ Newbie
 
Registered: May 2003
Location: chennai
Distribution: redhat
Posts: 27

Rep: Reputation: 15
dhcp server issue


on my lan i have two gateways for accessing the internet my lan ip is starting from 192.168.1.4 to 100 my gateways are 192.168.1.1 and 192.168.1.2

i want to give 192.168.1.4 to 192.168.1.60 to use gateway 192.168.1.1
and from 192.168.1.60 to 192.168.1.100 gateway as 192.168.1.2

how can i do using dhcp to accomplish this can anyone help me out

i know that option router syntax is there but how can i use for particular 192.168.1.... to some thing to use on gateway
 
Old 09-02-2005, 03:58 AM   #2
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
I'm not sure this is very easy. You can only specify a single gateway with "option routers" and if this is done globally then all clients will be assigned the same gateway address.

The only way to differ these is to use either a subnet or a pool declaration whereby each subnet or pool is assigned its own gateway.

I suspect that you don't want to subnet your clients so that only leaves pools.

In order to use a pool you have to have some way of distinguishing between the client machines. Typically this would be by the hardware address. Let's suppose that we wanted to pool those clients with hardware addresses beginning with 00:FF and all others into a separate pool:

class "setone" {
match if substring (hardware, 1, 2) = 00:FF;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;

pool {
deny members of "setone";
range 192.168.1.4 192.168.1.59;
option routers 192.168.1.1;
}

pool {
allow members of "setone";
range 192.168.1.60 192.168.1.100;
option routers 192.168.1.2;
}

}

OK, that should work if we were to include all the other required parameters either globally or by group. Trouble is you probably don't want to distinguish between client hardware in this manner and I can't think how else you could differentiate the pools.

What you could try, AND DON'T BLAME ME IF IT DOESN'T WORK ( I've never tried it!!!):

Assuming you have 90 clients say, create the first pool with 45 addresses in its range and the second pool with the rest. Forget the "allow / deny" bits here!

What I suspect MAY happen is that once the first pool runs out of addresses, the second pool comes into play. Either that or the clients pick up an address from the first pool and then are reassigned a lease from the second, so it's the second one which runs out first. As I say, I don't know. I've never tried it, never likely to.

Good Luck

Carl.
 
Old 09-02-2005, 11:37 PM   #3
dshafi
LQ Newbie
 
Registered: May 2003
Location: chennai
Distribution: redhat
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for your response My heartfull thanks to u
 
  


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
DHCP Handout Issue KevinGuy Linux - Networking 1 06-17-2005 03:17 PM
dhcp client not getting IP from dhcp server jkmartha Linux - Networking 2 06-17-2005 08:12 AM
how can a DHCP client get the DHCP server IP? AshesOfTime Linux - Networking 3 11-24-2004 06:50 AM
Dhcp Issue real_shock Linux - Networking 3 07-16-2004 10:59 PM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:22 AM.

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