LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-12-2005, 11:59 PM   #1
srikanthrao_d
Member
 
Registered: Oct 2005
Posts: 32

Rep: Reputation: 15
DHCP with Multiple Networks


Hi All,

I have one DHCP Server and four networks. The four networks are 10.191.41.X/24
10.191.42. X/24, 10.191.43.X/24 and 10.191.44.X/24. My DHCP server is on 10.191.41.X network that need to supply IPs for all networks. How I need to configure the DHCP server? What is the IP I need to keep for my DHCP server? Those networks are I divided on my switch in one interface with Virtual IP. All the networks connected in a single interface in my switch. Please help me out this problem?

Thanks,
Srikanth
 
Old 12-13-2005, 12:44 AM   #2
abakali
Member
 
Registered: Dec 2005
Location: karachi
Distribution: RedHat
Posts: 75

Rep: Reputation: 15
you have multiple interface on the server ? and bind each subnet on each interface ?
 
Old 12-13-2005, 05:04 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
You need to configure 4 scopes on the server, one for each subnet. You then need to configure the L3switch or router you are using to get between the subnets to forward DHCP/BOOTP packets to the server.
On a Cisco switch you go into the Vlan interface where the ip address is and enable bootp helper with the address of the server. Do this for each subnet. It doesn't matter what IP you keep for your server as long as it isn't in the scope for the local subnet.
 
Old 12-13-2005, 06:10 AM   #4
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
Presuming that port 67/68 are not blocked by the router
it doesnt matter that wether you have 4 nic cards or all of them on 1 with virtual addresses
by virtual i mean..
eth0;1
eth0;2 ..

as long as u scope it correctly it will work,
 
Old 12-13-2005, 06:21 AM   #5
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Correct although ime it would be unusual for port 67/68 to be blocked unless they have been deliberately filtered. You don't need to join the DHCP server to all of the subnets, either with 4 nics or 4 virtual addresses. Using the DHCP helper, which most routers have, its unnecessary; all DHCP broadcasts will get unicast to the DHCP server. This makes everything clean and simple.

Last edited by baldy3105; 12-13-2005 at 06:24 AM.
 
Old 12-13-2005, 11:58 PM   #6
srikanthrao_d
Member
 
Registered: Oct 2005
Posts: 32

Original Poster
Rep: Reputation: 15
My problem is in My switch, i have only one gigabit interface where i add secondary as other network address something like virtual IPS for single interface. i added subnets in ther DHCP server. I have one NIC card. when the client requests the DHCP Server it is alocating 41.X network IP. so is there any chance to do that ?

thanks,
Srikanth
 
Old 12-14-2005, 04:17 AM   #7
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
If you want to allocate addresses in 4 different subnets then you need a router to route between them. I assumed you had one. If you have no router then the DHCP will need to be a member of all 4 networks, either by 4 physical NIC connections or 4 IP's on one nic. Your DHCP server will probably assign the address pools sequentialy starting with the first IP on the nic as it has no way of differentiating which hosts you want in which subnets. You really need to either use a router or split the subnets into vlans and 802.1q trunk to the server. At least then the Bootp requests will come into the server on a VLAN specific subinterface on the nic and the DHCP server will know which pool to hand out an address from.

Otherwise the only way to ensure that your hosts get the addresses you want them to have is to enter static reservations for all of your mac addresses, which is a right pain in the bum.

You need to understand that the hosts in different subnets won't be able to talk to each other unless something is routing. Is the DHCP server also going to be serving as a router?

Last edited by baldy3105; 12-14-2005 at 04:19 AM.
 
Old 12-16-2005, 02:49 AM   #8
srikanthrao_d
Member
 
Registered: Oct 2005
Posts: 32

Original Poster
Rep: Reputation: 15
Hi All,

I changed the senario here. i put the dhcp server in 10.191.40.2/16 network.i configure the subnet also in 10.191.0.0/16. i given differnet scopes here the things are working. but but differnet gateways for differnet networks. how i can mention the differnet gatway in DHCP server. and another thing can we have fixed Gatway using MAC address ?

Thanks,
srikanth
 
Old 12-16-2005, 03:23 AM   #9
abakali
Member
 
Registered: Dec 2005
Location: karachi
Distribution: RedHat
Posts: 75

Rep: Reputation: 15
ddns-update-style interim;
dynamic-bootp-lease-length 86400;
max-lease-time 604800;
default-lease-time 604800;

subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option nis-domain "xyz.com";
option domain-name "xyz.com";
option domain-name-servers 192.168.2.1;
option time-offset -18000;
authoritative;
option ntp-servers 192.168.2.1;
option netbios-name-servers 192.168.2.1;
option netbios-node-type 2;
range 192.168.2.20 192.168.2.150; }
authoritative;

subnet 10.0.2.0 netmask 255.255.255.0 {
option routers 10.0.2.1;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.2.255;
option nis-domain "abc.net";
option domain-name "abc.net";
option domain-name-servers 10.0.0.1;
option time-offset -18000;
authoritative;
option ntp-servers 10.0.2.1;
option netbios-name-servers 10.0.2.1;
option netbios-node-type 2;
range 10.0.2.50 10.0.2.250; }


when you put ip address on vitural lan the dhcpd scope auto sence which interface bind with this subnet i am already using this senario but we have 4 NIC on machine and each work with define subnet have't try with Vlan
 
  


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
multiple wireless networks rcrummett Linux - Wireless Networking 4 09-06-2005 12:50 AM
Multiple networks bonebrain Linux - Wireless Networking 3 11-17-2004 09:38 PM
Multiple Wireless Networks - Help! simmond Linux - Wireless Networking 8 08-26-2004 03:15 AM
dhcp server with multiple networks adamantium Linux - Networking 0 03-02-2004 09:16 AM
connecting multiple networks kierl Linux - General 2 03-14-2003 03:59 PM

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

All times are GMT -5. The time now is 09:17 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