[Megoldva]dhcp3-server config beállítása

Sziasztok,

Nem indul el a dhcp3-server, konfigurácios hiba miatt. Segítségeteket szeretném kérni.
OS: Debian-lenny
Két hálókártya: eth0 WAN fele, ath1 vezetéknélküli hálókártya LAN, AP-nak beállítva. Driver madwifi.

eth0 ADSL routerről kap IP-címet (192.168.1.100), ath1-nek statikus címe van: 192.168.2.1
IP-masquerading van beállítva.

Hibaüzenet:
Jan 18 17:54:44 freeroute dhcpd:
Jan 18 17:54:44 freeroute dhcpd: No subnet declaration for ath1 (0.0.0.0).
Jan 18 17:54:44 freeroute dhcpd: ** Ignoring requests on ath1. If this is not what
Jan 18 17:54:44 freeroute dhcpd: you want, please write a subnet declaration
Jan 18 17:54:44 freeroute dhcpd: in your dhcpd.conf file for the network segment
Jan 18 17:54:44 freeroute dhcpd: to which interface ath1 is attached. **
Jan 18 17:54:44 freeroute dhcpd:
Jan 18 17:54:44 freeroute dhcpd:
Jan 18 17:54:44 freeroute dhcpd: Not configured to listen on any interfaces!
Config file-ok:

/etc/network/interfaces:
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
up ethtool -s eth0 wol g

#Ap interface setup
auto ath1

iface ath1 inet static
address 192.168.2.1
netmask 255.255.255.0
broadcast 192.168.2.255
pre-up /etc/init.d/ath1_preup
post-up /etc/init.d/ath1_postdown

less /etc/dhcp3/dhcpd.conf:
# option definitions common to all supported networks...
option domain-name "intra";
option domain-name-servers 208.67.222.222, 208.67.220.220;

default-lease-time 600;
max-lease-time 7200;
# A slightly different configuration for an internal subnet.
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.10 192.168.2.100;
option domain-name-servers 192.168.2.1;
option domain-name "internal.no-ip.org";
option routers 192.168.2.1;
option broadcast-address 192.168.2.255;
default-lease-time 600;
max-lease-time 7200;
}

freeroute:/home/freeroute# ifconfig
ath1 Link encap:Ethernet HWaddr 06:20:a6:57:81:64
inet6 addr: fe80::420:a6ff:fe57:8164/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:2290 Metric:1
RX packets:1594 errors:0 dropped:0 overruns:0 frame:0
TX packets:382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:62564 (61.0 KiB) TX bytes:40042 (39.1 KiB)

eth0 Link encap:Ethernet HWaddr 00:0a:cd:02:4b:df
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20a:cdff:fe02:4bdf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23271 errors:0 dropped:0 overruns:0 frame:0
TX packets:19574 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4205504 (4.0 MiB) TX bytes:5204133 (4.9 MiB)
Interrupt:11 Base address:0xd000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4892 errors:0 dropped:0 overruns:0 frame:0
TX packets:4892 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:627582 (612.8 KiB) TX bytes:627582 (612.8 KiB)

wifi1 Link encap:UNSPEC HWaddr 00-20-A6-57-81-64-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6495 errors:0 dropped:0 overruns:0 frame:631
TX packets:2503 errors:677 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:280
RX bytes:381331 (372.3 KiB) TX bytes:355931 (347.5 KiB)
Interrupt:11

Hozzászólások

Az ath1 nem kap statikus címet, a hibaüzenetben is benne van, hogy az ipv4-címe 0.0.0.0. Ott keresd a hibát.
"no video codec le a win32vel", de "Gentoohoz lehet meg tul fiatal vagy"

less /etc/init.d/ath1_preup tartalma:
#!/bin/bash
# /etc/init.d/ath1_preup
#
# Destroy the virtual ath1 interface
wlanconfig ath1 destroy > /dev/null 2>&1
wlanconfig ath0 destroy > /dev/null 2>&1

# Re-create the virtual interface and force it in accesspoint mode
wlanconfig ath1 create wlandev wifi1 wlanmode ap

# Bring the interface up. The actual network parameters are set
# later when execution of /etc/network/interfaces continues
ifconfig ath1 up

# Set basic wireless parameters to our liking
#
# You could set essid here, but it is overwritten by the one
# in hostapd.conf
iwconfig ath1 essid Trinity

# Switch the interface to Master-mode so that it will
# receive requests from outside, instead of doing requests
# itself
iwconfig ath1 mode Master

# Autoselect the rate at which the interface operates instead of
# using defined rate (e.g. 11M, 54M)
iwconfig ath1 rate auto

# Select a channel to use: make sure it's not too saturated
# with other wifi traffic. See above for more information.
iwconfig ath1 channel 2

# We could set the WEP key here, or disable the key if we want,
# but the settings defined in hostapd.conf override this anyway
#iwconfig ath0 key my-secret-key

# Set the transmit power. With my card 18 is the largest possible
# transmit power available. Issue "iwlist ath0 txpower" to see your
# card's limits.
iwconfig ath1 txpower 18

# Disable power management which _might_ cause some trouble. When
# everything is working smoothly, you can switch it on.
iwconfig ath0 power off

less /etc/init.d/ath1_postdown:

#!/bin/bash
# /etc/init.d/ath1_postdown
#
# Destroy the virtual ath1 interface
wlanconfig ath1 destroy > /dev/null 2>&1
wlanconfig ath0 destroy > /dev/null 2>&1

Javítottam. kösz. De semmi hibaüzenet a 2 script futtatásakor.
Újraindítottam a gépet, de semmi változás. Ugyanaz:
freeroute:/home/freeroute# ifconfig
ath1 Link encap:Ethernet HWaddr 06:20:a6:57:81:64
inet6 addr: fe80::420:a6ff:fe57:8164/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:2290 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)

Nem kapja meg a statikus IP címet?

Érdekes...
freeroute:/home/freeroute# ifconfig ath1 192.168.2.1
freeroute:/home/freeroute# ifconfig ath1
ath1 Link encap:Ethernet HWaddr 06:20:a6:57:81:64
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::420:a6ff:fe57:8164/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:2290 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)

freeroute:/home/freeroute# /etc/init.d/dhcp3-server start
Starting DHCP server: dhcpd3.
freeroute:/home/freeroute#

Így elindult.
Most már csak azt lenne jó tudnom, miért nem kapja meg induláskor a statikus IP címet.

Az /etc/init.d/ath1_preup sriptbe beírtam az
ifconfig ath1 up után
ifconfig ath1 192.168.2.1 sort.

Így boot után van IP címe az ath1 interface-nek és a dhcp3-server is elindult. Csak holnap tudom kipróbálni, hogy minden mukodik-e. Eddig ssh-n keresztul dolgoztam.

Koszonom mindenkinek a segítséget.

Megvan a hiba miért nem volt boot után ath1 interface.

/etc/network/interfaces file tartalma, utolsó sor
face ath1 inet static
address 192.168.2.1
netmask 255.255.255.0
broadcast 192.168.2.255
pre-up /etc/init.d/ath1_preup
post-up /etc/init.d/ath1_postdown

post-up rossz. post-down-t kellett beírni, mint a file neve is mutatja.

Mivel ath1 törlve lett rögtön pre-up után, így a dhcpd sem indult el.

subscribe

/mazursky

Love your job but never love your company!
Because you never know when your company stops loving you!