LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcp on other network (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-on-other-network-774574/)

icegood 12-09-2009 05:37 PM

dhcp on other network
 
There are two eth cards on server : eth0 and eth1.

internet ---.....--- local
........... |....|
...........eth0..eth1
eth1 comps are hidden from eth0 on the switch level (switch is unreachable).
Besides there is an dhcp server (dhcpd3) for eth1. Config file is like this:

ignore unknown-clients;
# BIG network - no service for it. Just declaring for better undersatanding of network
subnet xxx.xxx.0.0 netmask 255.255.0.0 {
not authoritative;
}
# All options for now are connected with SMALL subnet
subnet yyy.yyy.yyy.0 netmask 255.255.255.0 {

default-lease-time 3000;
max-lease-time 3000;
option subnet-mask 255.255.255.0;
option domain-name-servers xxx.xxx.4.13,xxx.xxx.50.250;
option domain-name "big_domain";
ddns-update-style none;
server-name drbl;



class "DRBL-Client" {
match if
(substring(option vendor-class-identifier, 0, 9) = "PXEClient") or
(substring(option vendor-class-identifier, 0, 9) = "Etherboot") or
(substring(option vendor-class-identifier, 0, 10) = "DRBLClient") ;
}

}
group {
option subnet-mask 255.255.255.0;
option routers yyy.yyy.yyy.1;
next-server yyy.yyy.yyy.1;
filename = "pxelinux.0";

host node001 {
hardware ethernet 00:0e:a6:51:8d:75;
fixed-address yyy.yyy.yyy.2;
# option host-name "node001";
}
host node002 {
hardware ethernet 00:0e:a6:5a:e1:67;
fixed-address yyy.yyy.yyy.3;
# option host-name "node002";
}
...
}


Now the next task is to allow more clients DHCPDISCOVERY from which is expected on eth0 interface.
After just allowing eth0 for dhcpd3 to be listened system still not work with syslog message:
DHCPDISCOVER from xx:xx:xx:xx:xx:xx via eth0: network xxx.xxx/16: no free leases.
On the eth1 everything is OK. If i just change internet socket (on the wall) for eth1 to be eth1 reachable from eth0 then for new eth0 is OK but eth1 i don't see (as expected). How to solve task without switching socket and:
1) Do not disturbe main unreachable dhcp on eth0 (i. e. not allow unknown clients )
2) communicate well from new client with unreachable eth1 of server?

P.S. Distro is Debian lenny

nimnull22 12-10-2009 09:59 AM

Quote:

Originally Posted by icegood (Post 3785972)
There are two eth cards on server : eth0 and eth1.

internet ---.....--- local
........... |....|
...........eth0..eth1
eth1 comps are hidden from eth0 on the switch level (switch is unreachable).

If computers on network #1 hidden from computers on network #2 - what are expecting?

icegood 12-10-2009 10:13 AM

Yes, you are right. But maybe it's possible to do just organize router on this computer to show hidden network. It's not a DHCP issue at all. But on DHCP stage it's not matter wheather network is hidden or not. DHCP DO listen both interfaces. And it's even receives DHCPDISCOVERY message from new client. It cannot just proceed this message - and it's look like internal DHCP error, not network issue.

nimnull22 12-10-2009 10:32 AM

Quote:

Originally Posted by icegood (Post 3786804)
Yes, you are right. But maybe it's possible to do just organize router on this computer to show hidden network. It's not a DHCP issue at all. But on DHCP stage it's not matter wheather network is hidden or not. DHCP DO listen both interfaces. And it's even receives DHCPDISCOVERY message from new client. It cannot just proceed this message - and it's look like internal DHCP error, not network issue.

Ok, I understand now.

nimnull22 12-10-2009 10:48 AM

Looks like your dhcp server gives only fixed IPs in accordance to MAC

host node001 {
hardware ethernet 00:0e:a6:51:8d:75;
fixed-address yyy.yyy.yyy.2;
# option host-name "node001";
}
host node002 {
hardware ethernet 00:0e:a6:5a:e1:67;
fixed-address yyy.yyy.yyy.3;
# option host-name "node002";
}
...
}

icegood 12-10-2009 01:06 PM

Quite right. Only static ip's. For new client that one is written down too.
As i said before - if i just swithch eth1 socket to other one (there many on such in the wall but only one is special for local network) - everything works for new client (so it's mac in config is correct too). There is no range, pool etc coz there many alien dhcp requestes via eth0 that i should reject.

nimnull22 12-10-2009 01:20 PM

Have you changed anything here?

ignore unknown-clients;
# BIG network - no service for it. Just declaring for better undersatanding of network
subnet xxx.xxx.0.0 netmask 255.255.0.0 {
not authoritative;
}
# All options for now are connected with SMALL subnet
subnet yyy.yyy.yyy.0 netmask 255.255.255.0 {

icegood 12-10-2009 01:59 PM

I don't know how to answer :) Config file is almost mine (i reconfigured it after drbl installation). With comments. I've tried many options in it...

nimnull22 12-10-2009 02:30 PM

Quote:

Originally Posted by icegood (Post 3786973)
I don't know how to answer :) Config file is almost mine (i reconfigured it after drbl installation). With comments. I've tried many options in it...

Ok.

Tell IP + netmask for network #1 and #2, please

No, forget it.

Lets say
network #1 - 192.168.2.xxx 255.255.255.0
network #2 - 192.168.3.xxx 255.255.255.0

Where is that in your configuration file?

icegood 12-10-2009 02:48 PM

I've just changed real numbers with x's for eth0 and y's for eth1 respectivetly.
As you can see all hosts should receive eth1-like ip's. But physically some of them are connected via eth0...

nimnull22 12-10-2009 02:57 PM

Quote:

Originally Posted by icegood (Post 3787000)
I've just changed real numbers with x's for eth0 and y's for eth1 respectivetly.
As you can see all hosts should receive eth1-like ip's. But physically some of them are connected via eth0...

Clients from network#1 sends requests from their IP, clients of network#2 from different IP.

icegood 12-10-2009 03:05 PM

Idon't understand ast all what means "from ip". At least on DHCPDISCOVERY stage. Clients, being w/o any ip's, just broadcast DHCPDISCOVERY request to every network whenever it's possible (accordingly also to "relay agents" on routers).Yeah, also, full message of error is:

DHCPDISCOVER from 00:03:ff:89:d1:ed via eth0: network xxx.xxx/16: no free leases

for both mine and them

nimnull22 12-10-2009 03:11 PM

Quote:

Originally Posted by icegood (Post 3787016)
Idon't understand ast all what means "from ip". At least on DHCPDISCOVERY stage. Clients, being w/o any ip's, just broadcast DHCPDISCOVERY request to every network whenever it's possible (accordingly also to "relay agents" on routers)

Yes, but networks are different - network#1 and network#2

In your configuration file, how many networks did you describe?

gnore unknown-clients;
# BIG network - no service for it. Just declaring for better undersatanding of network
subnet xxx.xxx.0.0 netmask 255.255.0.0 {not authoritative;}
# All options for now are connected with SMALL subnet
subnet yyy.yyy.yyy.0 netmask 255.255.255.0 {...


Or may be I do not understand something this configuration?

icegood 12-10-2009 03:30 PM

Let's do it again :) Both old and new clients receive new ip's from group section in the config file. And this section is independed of networks. And output ip from this section is ALWAYS yyy.yyy.yyy.<last> i.e. eth1-like. So, both old and new must receive ip's nevertheless from wheather interface dhcp server receive DHCPDISCOVER request. Right?
Options from subnet sections do not even touched on this stage. At least shouldn't be... Or not?

nimnull22 12-10-2009 03:34 PM

Quote:

Originally Posted by icegood (Post 3787028)
Let's do it again :) Both old and new clients receive new ip's from group section in the config file. And this section is independed of networks. And output ip from this section is ALWAYS yyy.yyy.yyy.<last> i.e. eth1-like. So, both old and new must receive ip's nevertheless from wheather interface dhcp server receive DHCPDISCOVER request. Right?
Options from subnet sections do not even touched on this stage. At least shouldn't be... Or not?

No, that is not right.

You have ETH0 = yyy.yyy.yyy.<last>
You have ETH1 = xxx.xxx.xxx.<last>

Check your self, what IP address has ETH0 and what has eth1?
ifconfig -a from root console.


All times are GMT -5. The time now is 03:18 PM.