DHCP-server not workin'|Nätverk / Internet|Forum|Nordichardware

Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
The forums are currently locked and only available for read only access
sp_Feed sp_TopicIcon
DHCP-server not workin'
Avatar
fackamato
Member
Medlem
Forum Posts: 5913
Member Since:
March 5, 2002
sp_UserOfflineSmall Offline
1
August 6, 2003 - 12:51 pm
sp_Permalink sp_Print

Error:

/etc/dhcpd.conf line 11: subnet 192.168.0.128: bad subnet number/mask combination.
subnet 192.168.0.128 netmask 255.255.255.0

Config file:

# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 6000;
max-lease-time 72000;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 10.0.0.1, 10.0.0.2;
option domain-name "weed";
ddns-update-style ad-hoc;
subnet 192.168.0.128 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.50;
}
#subnet 81.225.170.145 netmask 255.255.255.0 {
#not authoritative;
#}

Vad har jag gjort fel?` 8)

69link
Kommer du hit ofta?
Medlem
Forum Posts: 1398
Member Since:
July 2, 2001
sp_UserOfflineSmall Offline
385663
August 6, 2003 - 1:13 pm
sp_Permalink sp_Print

subnet 192.168.0.128 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.50;
}

är fel. Borde vara


subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.50;
}

Du talade om att subnätet är 192.168.0.0/24 när det ska vara 192.168.1.0/24

Sedan sätter man range inom det subnätet på hur många datorer man vill tilldela DHCP. 10st? Då skriver du:


range 192.168.1.100 192.168.1.109
Avatar
fackamato
Member
Medlem
Forum Posts: 5913
Member Since:
March 5, 2002
sp_UserOfflineSmall Offline
385669
August 6, 2003 - 1:19 pm
sp_Permalink sp_Print

69link wrote:


subnet 192.168.0.128 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.50;
}

är fel. Borde vara


subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.50;
}

Du talade om att subnätet är 192.168.0.0/24 när det ska vara 192.168.1.0/24

Sedan sätter man range inom det subnätet på hur många datorer man vill tilldela DHCP. 10st? Då skriver du:


range 192.168.1.100 192.168.1.109

tackar vänligast, men får detta fel:

No subnet declaration for eth0 (192.168.0.128).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **

:bgrin:

69link
Kommer du hit ofta?
Medlem
Forum Posts: 1398
Member Since:
July 2, 2001
sp_UserOfflineSmall Offline
385679
August 6, 2003 - 1:42 pm
sp_Permalink sp_Print

Varför sätter du .128 ?

Om du vill subnetta så så måste du skriva


subnet 192.168.0.128 netmask 255.255.255.128 {
range 192.168.0.129 192.168.0.254
}

All enligt:


Address: 192.168.0.128 11000000.10101000.00000000.1 0000000
Netmask: 255.255.255.128 = 25 11111111.11111111.11111111.1 0000000
Wildcard: 0.0.0.127 00000000.00000000.00000000.0 1111111=>
Network: 192.168.0.128/25 11000000.10101000.00000000.1 0000000 (Class C)
Broadcast: 192.168.0.255 11000000.10101000.00000000.1 1111111
HostMin: 192.168.0.129 11000000.10101000.00000000.1 0000001
HostMax: 192.168.0.254 11000000.10101000.00000000.1 1111110
Hosts/Net: 126 (Private Internet)
Avatar
fackamato
Member
Medlem
Forum Posts: 5913
Member Since:
March 5, 2002
sp_UserOfflineSmall Offline
385705
August 6, 2003 - 2:13 pm
sp_Permalink sp_Print

i've fixed it
thanks for the fast response 🙂

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1030
Currently Online:
Guest(s) 295
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Andreas Galistel: 16287
Jonas Klar: 15897
ilg@dd: 10810
Nyhet: 10607
Mind: 10550
Ctrl: 10355
Gueno: 9881
Guest: 9344
Snorch: 8881
Callister: 8468
Newest Members:
PetrbonFU PetrbonFU
Karine Bembry
Dolores Mcdaniels
Anibal McLeish
Francisca Alt
Alfie Everhart
Lester Huitt
Orlando Jorgensen
Mikki Lundgren
Dakota Kozlowski
Forum Stats:
Groups: 11
Forums: 59
Topics: 146630
Posts: 1300967

 

Member Stats:
Guest Posters: 2
Members: 79425
Moderators: 0
Admins: 11
Administrators: nordicadmin, Henrik Berntsson, Anton Karmehed, Carl Holmberg, Joel Oscarsson, Mikael Linnér, Mikael Schwartz, Andreas Paulsson, Nickebjrk, Mattias Pettersson, EmxL