Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Polskie forum (Polish) Instalacja i sprzęt
  • Search

[SOLVED] dhcpd (nie przydziela ip)

Pytania i problemy związane z instalacją Gentoo oraz sprzętem

Moderator: SlashBeast

Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Author
Message
Karmazyn
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 133
Joined: Sun Oct 30, 2005 2:00 pm
Location: Dąbrowa Górnicza [pl_PL.UTF-8]

[SOLVED] dhcpd (nie przydziela ip)

  • Quote

Post by Karmazyn » Wed Dec 01, 2010 8:05 pm

Nie wiem czemu nie przydziela adresu... tak, tak, kabel podłączony :lol:

Szkic pełnej sieci: http://img14.imageshack.us/img14/3680/painu.jpg

/etc/dhcp/dhcpd.conf

Code: Select all

# option domain-name "google.com";
# option domain-name-servers 1.1.1.1, 2.2.2.2;

default-lease-time 600;
max-lease-time 7200;

ddns-update-style none;

authoritative;

log-facility local7;

subnet 172.16.0.0 netmask 255.255.255.0 {
  range 172.16.0.2 172.16.0.4;
  # option domain-name-servers 172.16.0.1;
  # option domain-name "google.com";
  option routers 172.16.0.1;
  option broadcast-address 172.16.0.255;
  default-lease-time 600;
  max-lease-time 7200;
}
/etc/conf.d/dhcpd:

Code: Select all

# If you wish to run dhcpd in a chroot, uncomment the following line
# DHCPD_CHROOT="/chroot/dhcp"

# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"

DHCPD_IFACE="eth1"

# Insert any other dhcpd options - see the man page for a full list.
# DHCPD_OPTS=""
/etc/conf.d/net

Code: Select all

config_eth0=( "10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255" )
routes_eth0=( "default via 10.0.0.1" )

config_eth1=( "172.16.0.1 netmask 255.255.255.0 broadcast 172.16.0.255" )
routes_eth1=( "default via 172.16.0.1" )
ifconfig:

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:27:0e:04:3f:8c
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::227:eff:fe04:3f8c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24388 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24453 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:18798844 (17.9 MiB)  TX bytes:4439299 (4.2 MiB)
          Interrupt:44 Base address:0x6000

eth1      Link encap:Ethernet  HWaddr 00:e0:45:92:02:89
          inet addr:172.16.0.1  Bcast:172.16.0.255  Mask:255.255.255.0
          UP 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:21 Base address:0x2000
/etc/init.d/dhcpd restart:

Code: Select all

localhost ~ # /etc/init.d/dhcpd restart
 * Starting dhcpd ...                                                     [ ok ]
/var/log/messages:

Code: Select all

Dec  1 19:58:17 localhost dhcpd: Internet Systems Consortium DHCP Server V3.1.2p1-Gentoo
Dec  1 19:58:17 localhost dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Dec  1 19:58:17 localhost dhcpd: All rights reserved.
Dec  1 19:58:17 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Dec  1 19:58:17 localhost dhcpd: Internet Systems Consortium DHCP Server V3.1.2p1-Gentoo
Dec  1 19:58:17 localhost dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Dec  1 19:58:17 localhost dhcpd: All rights reserved.
Dec  1 19:58:17 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Dec  1 19:58:17 localhost dhcpd: Internet Systems Consortium DHCP Server V3.1.2p1-Gentoo
Dec  1 19:58:17 localhost dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Dec  1 19:58:17 localhost dhcpd: All rights reserved.
Dec  1 19:58:17 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Dec  1 19:58:17 localhost dhcpd: Internet Systems Consortium DHCP Server V3.1.2p1-Gentoo
Dec  1 19:58:17 localhost dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Dec  1 19:58:17 localhost dhcpd: All rights reserved.
Dec  1 19:58:17 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Dec  1 19:58:17 localhost dhcpd: Internet Systems Consortium DHCP Server V3.1.2p1-Gentoo
Dec  1 19:58:17 localhost dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Dec  1 19:58:17 localhost dhcpd: All rights reserved.
Dec  1 19:58:17 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Dec  1 19:58:17 localhost dhcpd: Wrote 0 leases to leases file.
Last edited by Karmazyn on Fri Dec 03, 2010 9:58 pm, edited 1 time in total.
Top
Bialy
Guru
Guru
User avatar
Posts: 486
Joined: Mon Mar 20, 2006 4:51 pm

Re: dhcpd (nie przydziela ip)

  • Quote

Post by Bialy » Thu Dec 02, 2010 9:02 am

Karmazyn wrote:Nie wiem czemu nie przydziela adresu... tak, tak, kabel podłączony :lol:

Szkic pełnej sieci: http://img14.imageshack.us/img14/3680/painu.jpg

/etc/dhcp/dhcpd.conf

Code: Select all

# option domain-name "google.com";
# option domain-name-servers 1.1.1.1, 2.2.2.2;

default-lease-time 600;
max-lease-time 7200;

ddns-update-style none;

authoritative;

log-facility local7;

subnet 172.16.0.0 netmask 255.255.255.0 {
  range 172.16.0.2 172.16.0.4;
  # option domain-name-servers 172.16.0.1;
  # option domain-name "google.com";
  option routers 172.16.0.1;
  option broadcast-address 172.16.0.255;
  default-lease-time 600;
  max-lease-time 7200;
}
Brakuje co najmniej

Code: Select all

option subnet-mask 255.255.255.0;
Karmazyn wrote: /etc/conf.d/dhcpd:

Code: Select all

# If you wish to run dhcpd in a chroot, uncomment the following line
# DHCPD_CHROOT="/chroot/dhcp"

# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"

DHCPD_IFACE="eth1"

# Insert any other dhcpd options - see the man page for a full list.
# DHCPD_OPTS=""
Praktycznie niepotrzebne. Demon DHCP zacznie działać na interfejsie, który odpowiada adresom IP z /etc/dhcp/dhcpd.conf.
PS. Opcja przydatna (wymagana) dla IPv6.
Top
matidz
n00b
n00b
Posts: 29
Joined: Thu Jun 17, 2010 2:05 pm
Location: Poland, Torun

  • Quote

Post by matidz » Fri Dec 03, 2010 4:05 am

uruchom recznie server

Code: Select all

dhcpd -f eth1 
o ile dobrze pamietam
i do tego

Code: Select all

 tcpdump -i eth1
i warto:

Code: Select all

 /etc/init.d/iptables stop
rozumiem ze pomiedzy eth1 a kompami ktorym przydzielasz IP jest tylko zwykly switch
Top
Karmazyn
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 133
Joined: Sun Oct 30, 2005 2:00 pm
Location: Dąbrowa Górnicza [pl_PL.UTF-8]

  • Quote

Post by Karmazyn » Fri Dec 03, 2010 9:57 pm

matidz wrote:rozumiem ze pomiedzy eth1 a kompami ktorym przydzielasz IP jest tylko zwykly switch
raczej router przerobiony na switch,
Bialy wrote:Brakuje conajmniej:

Code: Select all

option subnet-mask 255.255.255.0;
teraz działa,
Top
Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Instalacja i sprzęt”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic