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;
}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=""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" )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:0x2000Code: Select all
localhost ~ # /etc/init.d/dhcpd restart
* Starting dhcpd ... [ ok ]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.

