Primárně pouze zapojení do sítě pomocí DHCP.
jj, to vím, ale potřeboval bych nějak zařídit, aby když k notebooku připojím jiný počítač, aby dostal od DHCP na notebooku IP adresu. Zkrátka, aby se to nemuselo nastavovat ručně.
/etc/dhcp3/dhcpd.conf
ddns-update-style none;authoritative;log-facility local7;subnet 10.0.0.0 netmask 255.255.255.0 {range 10.0.0.2 10.0.0.200; ### Rozsah přidělovaných IP adresoption domain-name-servers 10.0.0.1;option domain-name "sit";option routers 10.0.0.1; ### Zde má být IP tvojí síťovky která rozdává IP adresyoption broadcast-address 10.0.0.255;default-lease-time 600;max-lease-time 7200;}
/etc/default/dhcp3-server
# Defaults for dhcp initscript# sourced by /etc/init.d/dhcp# installed at /etc/default/dhcp3-server 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"
/etc/network/interfaces
auto loiface lo inet loopbackiface eth1 inet static address 10.0.0.1 network 10.0.0.0 netmask 255.255.255.0 broadcast 10.0.0.255
bohous@ubuntu:~$ sudo /etc/init.d/dhcp3-server start * Starting DHCP server dhcpd3 * check syslog for diagnostics. [fail]
Jan 24 15:04:59 ubuntu dhcpd: Internet Systems Consortium DHCP Server V3.1.2Jan 24 15:04:59 ubuntu dhcpd: Copyright 2004-2008 Internet Systems Consortium.Jan 24 15:04:59 ubuntu dhcpd: All rights reserved.Jan 24 15:04:59 ubuntu dhcpd: For info, please visit http://www.isc.org/sw/dhcp/Jan 24 15:04:59 ubuntu dhcpd: Internet Systems Consortium DHCP Server V3.1.2Jan 24 15:04:59 ubuntu dhcpd: Copyright 2004-2008 Internet Systems Consortium.Jan 24 15:04:59 ubuntu dhcpd: All rights reserved.Jan 24 15:04:59 ubuntu dhcpd: For info, please visit http://www.isc.org/sw/dhcp/Jan 24 15:04:59 ubuntu dhcpd: Wrote 0 leases to leases file.Jan 24 15:04:59 ubuntu dhcpd: Jan 24 15:04:59 ubuntu dhcpd: No subnet declaration for eth1 (0.0.0.0).Jan 24 15:04:59 ubuntu dhcpd: ** Ignoring requests on eth1. If this is not whatJan 24 15:04:59 ubuntu dhcpd: you want, please write a subnet declarationJan 24 15:04:59 ubuntu dhcpd: in your dhcpd.conf file for the network segmentJan 24 15:04:59 ubuntu dhcpd: to which interface eth1 is attached. **Jan 24 15:04:59 ubuntu dhcpd: Jan 24 15:04:59 ubuntu dhcpd: Jan 24 15:04:59 ubuntu dhcpd: Not configured to listen on any interfaces!
No subnet declaration for eth1 (0.0.0.0).
/etc/init.d/networking restart
/etc/init.d/dhcp3-server force-reload
ip a