LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-23-2008, 02:36 PM   #16
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30

Your DHCP server can have the 192.168.0.10 address and work just fine across multiple VLANs/subnets.

You have to remember that every L3 switch that's between your DHCP server and a subnet has to have the bootp relay enabled on it. An L3 switch is a switching router, for lack of better terms. Unless you tell it to pass UDP broadcasts across it, it will not.

For example, on Cisco gear, you use "ip helper (dhcpserveraddress)" on every VLAN configuration, and you're good to go. The L3 switch will send the DHCP requests where they need to go.
 
Old 02-08-2008, 02:05 AM   #17
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL 4
Posts: 360

Original Poster
Rep: Reputation: 29
Thanks for all the responses

Still I don't get my network working, just want to give a summry what I did till now.

I made virtual address on eth0:1 192.168.3.10
I have my eth0 ip address= 192.168.0.10

I have enabled bootprelay on my layer 3 swithces. and now when I start my dhcp server it gives a error and the errors is


Interface eth0 matches multiple shared networks.

can some body tell me what it is.


thanks
 
Old 02-08-2008, 03:11 AM   #18
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
it means you've not configured dhcpd.conf correctly and interface eth0 matches multiple shared networks.
 
Old 02-09-2008, 12:04 AM   #19
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL 4
Posts: 360

Original Poster
Rep: Reputation: 29
Dear Sir,

I have got the dhcpd.conf sample from the link provided by you. dear sir, can you just write me a dhcpd.conf file for two subnets then I can go on.

thanks
 
Old 02-09-2008, 03:33 AM   #20
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
show us what you have now.

i am not a knight of the realm. please don't call me sir.
 
Old 02-09-2008, 05:39 AM   #21
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL 4
Posts: 360

Original Poster
Rep: Reputation: 29
okay the one who can't be called sir, he can be called brother.
okay brother this is my dhcpd.conf file

ddns-update-style interim;
dynamic-bootp-lease-length 86400;
max-lease-time 604800;
default-lease-time 604800;

subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.10;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
#option nis-domain "xyz.com";
#option domain-name "xyz.com";
option domain-name-servers 192.168.0.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.0.20 192.168.0.150; }
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.10;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
#option nis-domain "abc.net";
#option domain-name "abc.net";
option domain-name-servers 192.168.0.1;
option time-offset -18000;
authoritative;
#option ntp-servers ;
#option netbios-name-servers 10.0.2.1;
#option netbios-node-type 2;
range 192.168.1.50 192.168.1.254; }

I have eth0 on 192.168.0.10
and eth0:0 on 192.168.1.10

Last edited by shahz; 02-09-2008 at 05:41 AM.
 
Old 02-09-2008, 06:48 AM   #22
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
right, that's not a legitimate way to use an ethernet card. you can't just put two addresses on one nic. how do you expect the dhcp server to differentiate if a client requesting an address is after a 192.168.1.0 address or a 192.168.0.0 address? the two requests will be exactly identical when a new client appears. dhcpd is many things but it's not psychic. the correct way to do what you want there is to use 802.1q tagged vlans, which in turn requires a suitably capable switch on the other end of the cable and a lot more understanding and configuration.
 
Old 03-18-2010, 02:17 AM   #23
hafeezisbad
LQ Newbie
 
Registered: Nov 2007
Posts: 10

Rep: Reputation: 0
A working configuration example

Server ip : 172.27.0.10
Swtich ip / gateway ip of server : 172.27.0.100
Option domain –name servers : 172.27.0.6

Please note default vlan 172.27.0.x in this case

Switch and server need to be in default lan for communication / or else we need to trunk in case other vlan connected , we need to configure vconfig on server to communicate


For biggner I would recommend to go for the default vlan connectivity


Example :

ddns-update-style interim;
ignore client-updates;
default-lease-time 43200;
max-lease-time 43200;
authoritative;


#-----subnet mask-- broadcast-- gateway-#

option subnet-mask 255.255.255.0;
#option broadcast-address 192.168.1.1;
option routers 172.27.0.100;
option domain-name-servers 172.27.0.6;


# ----------- Server Scope and vlan1 with switches and server--------------#
subnet 172.27.0.0 netmask 255.255.255.0 {
#range 172.27.0.0 172.27.0.50;
option routers 172.27.0.1;
#option subnet-mask 255.255.255.0;
option broadcast-address 172.27.0.255;
#option domain-name-servers 172.27.0.5;
}


# ----------- clients1 Scope-vlan2-------------#
subnet 172.27.1.0 netmask 255.255.255.0 {
range 172.27.1.3 172.27.1.200;
option routers 172.27.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 172.27.1.255;
#option domain-name-servers 192.168.1.1 #
}


Save the file

Chkconfig –list dhcpd on
{ For enabling the service on all run levels }
Service dhcpd start
In case , dhcp server faild to start , check with log messages

/var/log/messages

Check for the ip helper address in layer 3 swtich , which act as dhcp-relay
Which has to be configured as 172.27.0.10


Troubleshooting Dhcp server start up error :

1) Run the Dhcp service in debug mode
2) Check the ip configuration
3) Check for syntax errors in dhcpd.conf file
4) Check for the right location of the dhcpd file
5) Ping test between the switch and server
6) Possible conflict of other dhcp server may be the issue

dhcpd in the foreground in debug mode with /usr/sbin/dhcpd -d –f

Hopefully, a DHCP server like the one we’ll be configuring will respond. Running tcpdump shows a dhcp request looks like:
17:26:02.003956 00:00:00:00:00:00 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0×0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request, length 300
You should notice DHCP running in the process (ps) list. Any problems, check syslog

Congratulations you have finally configured In easy steps
 
  


Reply

Tags
perfect, world


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting up linux dhcp server with multiple scopes guy_ripper Linux - Server 7 07-09-2007 03:53 PM
Multiple networks/cards on a server jantman Linux - Networking 4 07-27-2006 03:20 PM
DHCP with Multiple Networks srikanthrao_d Linux - Networking 8 12-16-2005 03:23 AM
dhcp server with multiple networks adamantium Linux - Networking 0 03-02-2004 09:16 AM
DHCP server with multiple nics and subnets hawkpaul Linux - Networking 6 12-20-2001 07:32 AM


All times are GMT -5. The time now is 09:56 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration