Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2007-03-23 00:16:54

  ls-l - Użytkownik

ls-l
Użytkownik
Zarejestrowany: 2007-03-18

dhcp: No subnet declaration for eth0

zainstalowalem serwer dhcp
apt-get install dhcp

mój plik /etc/dhcpd.conf to

Kod:

option subnet-mask 255.255.255.224;
default-lease-time 600;
max-lease-time 7200;

subnet 204.254.239.0
netmask 255.255.255.224
{
  option broadcast-address 204.254.239.31;
  option routers 204.254.239.1;
}


  host user2 {hardware ethernet 00:C0:9F:B5:DF:D1; fixed-address 204.254.239.2;}

niestety po
/etc/init.d/dhcp restart

dostaje blad

Kod:

NAZWA:/# /etc/init.d/dhcp restart
Stopping DHCP server: dhcp.
Starting DHCP server: dhcpd failed to start - check syslog for diagnostics.

a w syslog ostatnie wpisy to

Kod:

Mar 23 00:36:10 localhost dhcpd: No subnet declaration for eth0 (192.168.1.226).
Mar 23 00:36:10 localhost dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Mar 23 00:36:10 localhost dhcpd: network segment to which interface eth0 is attached.
Mar 23 00:36:10 localhost dhcpd: exiting.

to IP 192.168.1.226 to jest IP z nadsieci gdzie stawiam router/serwer
nie wiem co dopisac do httpd.conf w kazdym badz razie nie uwzgledniono chyba tego w
http://debian.one.pl/index.php?url=3

z gory dzieki za pomoc :)

Offline

 

#2  2007-03-23 09:27:46

  BiExi - matka przelozona

BiExi
matka przelozona
Skąd: Gorlice
Zarejestrowany: 2004-04-16
Serwis

Re: dhcp: No subnet declaration for eth0

Kod:

subnet  204.254.239.0 netmask 255.255.255.224 {
  default-lease-time 3600 ;
  option domain-name-servers 194.204.159.1 , 212.85.112.32 , 213.173.209.70 ;
  option routers 204.254.239.1;
  option subnet-mask 255.255.255.224;

host h-1
 {
     hardware ethernet  00:18:C0:15:9B:28;
     fixed-address 204.254.239.3;
 }

host h-2 
  {
     hardware ethernet 00:C0:9F:B5:DF:D1; 
     fixed-address 204.254.239.2;
  }
}

i znajdz roznice :P


[url=http://dug.net.pl][b]DUG[/b][/url]

Offline

 

#3  2007-03-23 13:01:27

  Libo - Użytkownik

Libo
Użytkownik
Skąd: Żory
Zarejestrowany: 2004-10-25

Re: dhcp: No subnet declaration for eth0

najproscie to ogranicz sobie serwer dhcp do "sluchania" tylko na wybranym interfejsie czyli w /etc/default/dhcp wpisz sobie INTERFACES="eth1" ( lub inny, odpowiedni dla ciebie interfejs, bez eth0 ) co uwolini cie od deklarowania podsieci dla kazdego z nich


Nie ma nie idzie... jest nie umiem.

Offline

 

#4  2007-03-23 14:09:17

  ls-l - Użytkownik

ls-l
Użytkownik
Zarejestrowany: 2007-03-18

Re: dhcp: No subnet declaration for eth0

poszedłem za Waszymi sugestiami
faktycznie BiExi pogubilem sie z tym klamrami, obecnie moj /etc/httpd.conf wyglada tak jak ten co wkleiles


został tylko błąd zw  z podsiecia tego interfacu

powinienem powiedziec jak wyglada sytuacja z kartami sieciowymi.. Ten serwer/router ma dwie eth0 (do ktorej podpiety będzie Internet oraz eth1 do ktorej podpiety bedzie switch a do niego 3 kompy dla ktorych robie dhcp).

Probowalem z tym co pisal Libo, i wnioskuje ze biorac pod uwage powyzsze moje ustawienie w
/etc/default/dhcp
powinno wygladac tak:

INTERFACES="eth1"[/quote]

błąd po restarcie serwera dla linii INTERFACES ="eth1" to:


Mar 23 14:58:55 localhost dhcpd: No subnet declaration for eth1 (0.0.0.0).
Mar 23 14:58:55 localhost dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Mar 23 14:58:55 localhost dhcpd: network segment to which interface eth1 is attached.
Mar 23 14:58:55 localhost dhcpd: exiting.[/quote]

a jak wpisze INTERFACES = "eth0"

to


Mar 23 15:08:30 localhost dhcpd: No subnet declaration for eth0 (192.168.1.226).
Mar 23 15:08:30 localhost dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Mar 23 15:08:30 localhost dhcpd: network segment to which interface eth0 is attached.
Mar 23 15:08:30 localhost dhcpd: exiting.
[/quote]

Offline

 

#5  2007-03-23 14:14:47

  Libo - Użytkownik

Libo
Użytkownik
Skąd: Żory
Zarejestrowany: 2004-10-25

Re: dhcp: No subnet declaration for eth0

a jak masz skonfigurowany interfejs eth1 ??


Nie ma nie idzie... jest nie umiem.

Offline

 

#6  2007-03-23 15:37:19

  ls-l - Użytkownik

ls-l
Użytkownik
Zarejestrowany: 2007-03-18

Re: dhcp: No subnet declaration for eth0

a jak masz skonfigurowany interfejs eth1 ??[/quote]chodzi o wpis w dhcpd.conf ?

jezeli tak to wklejam moj /etc/dhcpd.conf (zakomentowany)

subnet  204.254.239.0 netmask 255.255.255.224 {
  default-lease-time 3600 ;
  option domain-name-servers 194.204.159.1 , 212.85.112.32 , 213.173.209.70 ;
  option routers 204.254.239.1;
  option subnet-mask 255.255.255.224;

// to nizej to eth0
host h-1
{
     hardware ethernet  00:0E:2E:9E:32:55;
     fixed-address 204.254.239.2;
}

// to nizej to eth1
host h-2
{
        hardware ethernet 00:0E:2E:9E:32:07;
        fixed-address 204.254.239.3;
}

// a to komp przykladowy
host h-3
  {
     hardware ethernet 00:C0:9F:B5:DF:D1;
     fixed-address 204.254.239.4;
  }
[/quote]

błąd w /var/log/syslog


Mar 23 16:34:21 localhost dhcpd: No subnet declaration for eth0 (192.168.1.226).
Mar 23 16:34:21 localhost dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Mar 23 16:34:21 localhost dhcpd: network segment to which interface eth0 is attached.
Mar 23 16:34:21 localhost dhcpd: exiting.
[/quote]

precyzujac to IP co wystepuje w błędzie 192.168.1.226
to jest IP jakie ma serwer (podlaczone do eth0) mojej domowej podsieci w calej sieci na terenie budynku. Z komunikatu wynika ze chyba powinienem uwzglednic jakos to IP we fragmencie:


host h-1
{
     hardware ethernet  00:0E:2E:9E:32:55;
     fixed-address 204.254.239.2;
}[/quote]
albo gdzies wyzej

Offline

 

#7  2007-03-25 18:40:23

  ls-l - Użytkownik

ls-l
Użytkownik
Zarejestrowany: 2007-03-18

Re: dhcp: No subnet declaration for eth0

do usuniecia

Offline

 

#8  2007-03-25 19:56:18

  BiExi - matka przelozona

BiExi
matka przelozona
Skąd: Gorlice
Zarejestrowany: 2004-04-16
Serwis

Re: dhcp: No subnet declaration for eth0

jesli na eth1 nasz zaniar postawic dhcepa to dodatkow muisz wskazac na to by on nasluchiwal wlasnie na tym interfejsie:
w [b]/etc/default/dhcp3-server[/b]
ustawiasz

Kod:

INTERFACES="eth1"

dodatkowo na eth1 powinien miec ip klasy [b]204.254.239.x[/b]

nie jestem pewna ale chyba komentarze w pliku dhcepa powinny zaczynac sie od [b]#[/b] ale tych // kreseczek nie sprawdzalam to nie wiem


[url=http://dug.net.pl][b]DUG[/b][/url]

Offline

 

#9  2007-03-25 21:28:38

  ls-l - Użytkownik

ls-l
Użytkownik
Zarejestrowany: 2007-03-18

Re: dhcp: No subnet declaration for eth0

nie mam dhcp3 tylko standardowe dhcp , czy 3 jest koniczne?

zmienilem eth0 na eth1 tak jak napisalas ale bezskutecznie, ten sam błąd opisany nizej

moj /etc/default/dhcp
to

Kod:

# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp by the maintainer scripts

#
# This is a POSIX shell fragment
#

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"

moj /etc/dhcpd.conf

Kod:

subnet  204.254.239.0 netmask 255.255.255.224 {
  default-lease-time 3600 ;
  option domain-name-servers 194.204.159.1 , 212.85.112.32 , 213.173.209.70 ;
  option routers 204.254.239.1;
  option subnet-mask 255.255.255.224;

host h-1
 {
     hardware ethernet  00:0E:2E:9E:32:55;
     fixed-address 204.254.239.2;
 }

host h-2
 {
        hardware ethernet 00:0E:2E:9E:32:07;
        fixed-address 204.254.239.3;
 }

host h-3
  {
     hardware ethernet 00:C0:9F:B5:DF:D1;
     fixed-address 204.254.239.4;
  }

po poleceniu ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:0E:2E:9E:32:55
          inet addr:192.168.1.226  Bcast:192.168.255.255  Mask:255.255.0.0
          inet6 addr: fe80::20e:2eff:fe9e:3255/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:37482 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2594517 (2.4 MiB)  TX bytes:182123 (177.8 KiB)
          Interrupt:10 Base address:0xc400

eth1      Link encap:Ethernet  HWaddr 00:0E:2E:9E:32:07
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:5 Base address:0xc800

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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[/quote]


czy przy takich ustawieniach i celu:

serwer/router ma dwie eth0 (do ktorej podpiety będzie Internet) oraz eth1 do ktorej podpiety bedzie switch a do niego 3 kompy dla ktorych robie dhcp).

Jeżeli macie jakiekolwiek pomysły dlaczego ciągle dostaje bład i nie moge uruchomic dhcpd.conf to prosze napiszcie.
Treść błędu:


Mar 25 22:20:59 localhost dhcpd: No subnet declaration for eth1 (0.0.0.0).
Mar 25 22:20:59 localhost dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Mar 25 22:20:59 localhost dhcpd: network segment to which interface eth1 is attached.
Mar 25 22:20:59 localhost dhcpd: exiting.[/quote]

rozumiem ze eth1 ma IP 0.0.0.0 czyli go wogole nie ma bo jest niepodpieta jeszcze. Ale co ja mam jeszcze dopisac do /etc/httpd.conf to nie wiem naprawde.........

Offline

 

#10  2007-03-25 21:56:57

  BiExi - matka przelozona

BiExi
matka przelozona
Skąd: Gorlice
Zarejestrowany: 2004-04-16
Serwis

Re: dhcp: No subnet declaration for eth0

na eth1

Kod:

eth1 Link encap:Ethernet HWaddr 00:0E:2E:9E:32:07
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0xc800

nie masz zadnego IP ustawionego


[url=http://dug.net.pl][b]DUG[/b][/url]

Offline

 

#11  2007-03-25 23:00:57

  ls-l - Użytkownik

ls-l
Użytkownik
Zarejestrowany: 2007-03-18

Re: dhcp: No subnet declaration for eth0

cos czulem ze jest nie tak......
czyli jak poprosze admina o przydzielenie IP do MAC eth1 to juz wszystko byloby OK?
i kompy podlaczone do eth1 by mialy w Internecie IP eth1 ??

prosze o wyrozumialosc bo pierwszy raz w zyciu konfiguruje dhcp

Offline

 

#12  2009-11-24 17:49:28

  pnti - Nowy użytkownik

pnti
Nowy użytkownik
Zarejestrowany: 2009-11-24

Re: dhcp: No subnet declaration for eth0

Musisz mieć skonfigurowany i podniesiony interfejs.

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)

[ Generated in 0.010 seconds, 9 queries executed ]

Informacje debugowania

Time (s) Query
0.00012 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00073 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.135.199.27' WHERE u.id=1
0.00152 UPDATE punbb_online SET logged=1716201859 WHERE ident='3.135.199.27'
0.00036 SELECT * FROM punbb_online WHERE logged<1716201559
0.00120 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=7324 AND t.moved_to IS NULL
0.00007 SELECT search_for, replace_with FROM punbb_censoring
0.00275 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=7324 ORDER BY p.id LIMIT 0,25
0.00091 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=7324
Total query time: 0.0077 s