Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Duncan on April 28, 2002, 06:21:30 PM
-
I have been playing around with this for about a day and cant get it to work.
The details.
eth0 local network
eth1 internet
eth2 local network
dhcpd.conf
##eth0
subnet 10.0.0.0 netmask 255.255.255.224
{
option broadcast-address 10.0.0.31;
deny bootp;
option domain-name "goldtec.com.au";
option domain-name-servers 10.0.0.3;
default-lease-time 86400;
max-lease-time 604800;
option netbios-dd-server 10.0.0.3;
option netbios-name-servers 10.0.0.3;
option netbios-node-type 8;
option subnet-mask 255.255.255.224;
range 10.0.0.10 10.0.0.15;
option routers 10.0.0.3;
}
##eth2
subnet 10.0.1.0 netmask 255.255.255.224
{
option broadcast-address 10.0.1.31;
deny bootp;
option domain-name "goldtec.com.au";
option domain-name-servers 10.0.1.3;
default-lease-time 86400;
max-lease-time 604800;
option netbios-dd-server 10.0.1.3;
option netbios-name-servers 10.0.1.3;
option netbios-node-type 8;
option subnet-mask 255.255.255.224;
range 10.0.1.10 10.0.1.15;
option routers 10.0.1.3;
}
/etc/rc.d/initd.d/dhcpd
route add -host 255.255.255.255 dev eth0
route add -host 255.255.255.255 dev eth2
daemon /usr/sbin/dhcpd eth0 eth2
route command
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
255.255.255.255 * 255.255.255.255 UH 0 0 0 eth2
255.255.255.255 * 255.255.255.255 UH 0 0 0 eth0
10.0.0.0 * 255.255.255.224 U 0 0 0 eth0
10.0.2.0 * 255.255.255.224 U 0 0 0 eth1
10.0.1.0 * 255.255.255.224 U 0 0 0 eth2
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default ipcop 0.0.0.0 UG 0 0 0 eth1
startup logs
Apr 28 16:38:05 mitel dhcpd: Listening on Socket/eth2/10.0.1.0
Apr 28 16:38:05 mitel dhcpd: Sending on Socket/eth2/10.0.1.0
Apr 28 16:38:05 mitel dhcpd: Listening on Socket/eth0/10.0.0.0
Apr 28 16:38:05 mitel dhcpd: Sending on Socket/eth0/10.0.0.0
Apr 28 16:38:06 mitel dhcpd: Listening on Socket/eth2/10.0.1.0
Apr 28 16:38:06 mitel dhcpd: Sending on Socket/eth2/10.0.1.0
Apr 28 16:38:06 mitel dhcpd: Listening on Socket/eth0/10.0.0.0
Apr 28 16:38:06 mitel dhcpd: Sending on Socket/eth0/10.0.0.0
Apr 28 16:38:06 mitel dhcpd: dhcpd startup succeeded
The problem.
Dhcp works fine on eth 0 but will not work on eth2.
If i swap the networks around (ie the cables) the swapped computers will recieve dynamic addresses - so i know it is not a problem with the computers.
If i swap the aliases around in the modules.conf ie eth0 => eth2 and vice verca the new card that is eth0 starts to work - so i know its not a problem with the e-smith nics.
Using iptraf i can see the machines on eth2 making client requests but they dont get an answer.
Setting the machines on eth2 with static addresses works fine. Can browse the internet and can cross subnet browse using WINS and ping.
I held off as long as i could on this one (pretty determined to get it working by myself) but i dont know what else to try. Anyone else managed to get this type of setup up and running ?
Regards Duncan
-
Just realised that this should really have been posted in the experienced user forum.
Regards Duncan
-
Try dhcrelay (man dhcrelay)
-
Thanks for the reply Grub.
I think that dhcrelay deals with forwarding dhcp requests to another dhcp server. In my case the dhcp server is directly on the two network cards.
Regards Duncan
-
So you will need dhcrelay (dhcp relay -agent).
Your problem is when a client sends a dhcpdiscover package, it will not be answerd cause of the broadcast. Dhcrelay will send the dhcpdiscover package from the client to your dhcp server. The interfaces must be set in your dhcpd.conf what you already did.
-
Oeps error from me... didn't read what you said. No you right... you don't need dhcrelay, cause we are talking about one machine here.
The problem is in masq look for /sbin/ipchains --append input -p udp -s 0/0 67:68
You will have to accept it for both internals
-
And as simple as that it works.
I had briefly considered masq but assumed the local network thing would take care of it.
A Huge thankyou. ( I probably would have got real pissed with it and thrown it to one side - for a while anyway)
Regards Duncan
-
I think this might fix my problem too but 6 has iptables. Any idea what to change there to make them work.