Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpd + MASQUERADE problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
iwaldi
n00b
n00b


Joined: 08 Oct 2003
Posts: 11

PostPosted: Wed Oct 08, 2003 4:14 pm    Post subject: dhcpd + MASQUERADE problem Reply with quote

I have installed gentoo box as a gateway for my second PC ( which runs gentoo too). Just after startup everything looks fine but after a while dhcpcd looses a connection. Restart of dhcpd(on server) and/or dhcpcd(on client) doesn't help. However if I reboot both machines it works again ... for a while (untill next lease?).

Code:

default-lease-time            600;
max-lease-time                7200;
ddns-update-style             ad-hoc;
option subnet-mask            255.255.255.0;
option broadcast-address      192.168.0.255;
option routers                192.168.0.1;
option domain-name-servers    62.2.17.60, 62.2.24.162, 62.2.17.61, 62.2.24.158;
option domain-name            "myisp.com";

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.2 192.168.0.255;
}


runing dhcpd -f -d eth1
I have:
Code:

$ dhcpd -d -f eth1
Internet Software Consortium DHCP Server V3.0pl2
Copyright 1995-2003 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 1 leases to leases file.
Listening on LPF/eth1/00:02:DD:67:8B:97/192.168.0.0/24
Sending on   LPF/eth1/00:02:DD:67:8B:97/192.168.0.0/24
Sending on   Socket/fallback/fallback-net
DHCPREQUEST for 192.168.0.254 from 00:dc:db:1d:bc:68 via eth1: lease 192.168.0.254 unavailable.
DHCPNAK on 192.168.0.254 to 00:dc:db:1d:bc:68 via eth1
DHCPREQUEST for 192.168.0.254 from 00:dc:db:1d:bc:68 via eth1: lease 192.168.0.254 unavailable.
DHCPNAK on 192.168.0.254 to 00:dc:db:1d:bc:68 via eth1
DHCPDISCOVER from 00:dc:db:1d:bc:68 via eth1
DHCPOFFER on 192.168.0.2 to 00:dc:db:1d:bc:68 via eth1
DHCPDISCOVER from 00:dc:db:1d:bc:68 via eth1
DHCPOFFER on 192.168.0.2 to 00:dc:db:1d:bc:68 via eth1
DHCPDISCOVER from 00:dc:db:1d:bc:68 via eth1
DHCPOFFER on 192.168.0.2 to 00:dc:db:1d:bc:68 via eth1
DHCPDISCOVER from 00:dc:db:1d:bc:68 via eth1
DHCPOFFER on 192.168.0.2 to 00:dc:db:1d:bc:68 via eth1


Any Idea?
Back to top
View user's profile Send private message
mglauche
Retired Dev
Retired Dev


Joined: 25 Apr 2002
Posts: 564
Location: Germany

PostPosted: Fri Oct 10, 2003 8:56 am    Post subject: Reply with quote

what is happening is that the dhpc daemon runs out of leases (its using .254 allready !) the question is why ... you set the default lease time *very* low, is that intentional ?

I usually use:
ddns-update-style ad-hoc;
default-lease-time 21600;
max-lease-time 21600;

shared-network WORKSTATIONS {
subnet 10.1.4.0 netmask 255.255.255.0 {
authoritative;
range 10.1.4.140 10.1.4.200;
}
}
Back to top
View user's profile Send private message
iwaldi
n00b
n00b


Joined: 08 Oct 2003
Posts: 11

PostPosted: Mon Oct 13, 2003 6:58 am    Post subject: Reply with quote

It uses .254 even at the first lease time and the rest is still free. Short lease time ... I just left default. More important is that I found some trick to get it working.
If I set gateway in /etc/conf.d/net on the client side then it works great, but .. I cannot use it at work then.
Back to top
View user's profile Send private message
andysamuel
n00b
n00b


Joined: 22 Jul 2003
Posts: 41

PostPosted: Mon Oct 13, 2003 11:52 am    Post subject: Why you put 255 in the range ? Reply with quote

I'm not so sure about these :
1. Default lease time is too short ? 3600 may be good enough.
2. Why do you put 192.168.0.255 in the range ? Should be from 192.168.0.2 through 192.168.0.254.

Good luck
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum