Problema com DHCP [RESOLVIDO]

1. Problema com DHCP [RESOLVIDO]

marcelo miguel
marcelolaiz

(usa Debian)

Enviado em 09/11/2016 - 16:39h

Boa tarde!

Preciso de um servidor DHCP com roteamento para usar na escola, tenho um link de 25 megas da Net
Preciso de ajuda pois o DHCP do modem da Net não suporta muitos usuários e trava a cada 4 horas.

Fiz uma instalação do Debian GNU/Linux 8 (jessie) 32-bit Gnome 3.14.1 em um computador Dell vostro com duas placas de rede.
Instalei o dhcp e fiz as configurações ok.
No ifconfig só sobe uma placa (da internet) e a outra eu tenho que subir manual.

Mas o DHCP dá erro.
root@debian:/home/ti# /etc/init.d/isc-dhcp-server restart
[....] Restarting isc-dhcp-server (via systemctl): isc-dhcp-server.serviceJob for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details.
failed!



Arquivo: /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# the primary network interface
auto eth1
iface eth1 inet dhcp

auto eth0
iface eth0 inet static
adress 172.16.2.2
netmask 255.255.255.0
broadcast 172.255.255.255
network 172.16.2.0
route 172.16.2.1



root@debian:/home/ti# ifconfig
eth0 Link encap:Ethernet Endereço de HW 00:e0:4c:68:07:3a
UP BROADCASTMULTICAST MTU:1500 Métrica:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet Endereço de HW a4:ba:db:06:1e:ee
inet end.: 172.16.2.78 Bcast:172.16.3.255 Masc:255.255.254.0
endereço inet6: fe80::a6ba:dbff:fe06:1eee/64 Escopo:Link
endereço inet6: 2804:14d:78d0:88c4:a6ba:dbff:fe06:1eee/64 Escopo:Global
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:86 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:14007 (13.6 KiB) TX bytes:11408 (11.1 KiB)
IRQ:18

lo Link encap:Loopback Local
inet end.: 127.0.0.1 Masc:255.0.0.0
endereço inet6: ::1/128 Escopo:Máquina
UP LOOPBACKRUNNING MTU:65536 Métrica:1
RX packets:203 errors:0 dropped:0 overruns:0 frame:0
TX packets:203 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:0
RX bytes:25685 (25.0 KiB) TX bytes:25685 (25.0 KiB)


Arquivo: /etc/dhcp/dhcpd.conf

# This is a very basic subnet declaration.

ddns-update-style none;
default-lease-time 3600;
max-lease-time 7200;
authoritative;

subnet 172.16.2.0 netmask 255.255.255.0 {
range 172.16.2.5 172.16.2.253;
option subnet-mask 255.255.255.0;
option domain-name-servers 8.8.8.8,8.8.4.4;
option routers 172.16.2.10;
option broadcast-address 172.16.2.255;
}



root@debian:/# grep -i dhcp /var/log/syslog | tail -500
Nov 9 07:53:12 debian dhclient: DHCPREQUEST on eth0 to 172.16.2.1 port 67
Nov 9 07:53:13 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 08:19:36 debian dhclient: DHCPREQUEST on eth0 to 172.16.2.1 port 67
Nov 9 08:19:37 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 08:26:36 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:26:36 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:26:36 debian networking[259]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:26:36 debian networking[259]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:26:36 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 4
Nov 9 08:26:36 debian networking[259]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 4
Nov 9 08:26:36 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:26:36 debian networking[259]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:26:36 debian dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 08:26:36 debian dhclient: DHCPOFFER from 172.16.2.1
Nov 9 08:26:36 debian networking[259]: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 08:26:36 debian networking[259]: DHCPOFFER from 172.16.2.1
Nov 9 08:26:36 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 08:26:36 debian networking[259]: DHCPACK from 172.16.2.1
Nov 9 08:26:36 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 08:26:36 debian dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 08:26:36 debian dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 08:26:36 debian dhcpd: All rights reserved.
Nov 9 08:26:36 debian dhcpd: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:26:36 debian dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 08:26:36 debian dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 08:26:36 debian dhcpd: All rights reserved.
Nov 9 08:26:36 debian dhcpd: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:26:36 debian dhcpd: Wrote 0 leases to leases file.
Nov 9 08:26:36 debian dhcpd:
Nov 9 08:26:36 debian dhcpd: No subnet declaration for eth1 (172.16.2.78).
Nov 9 08:26:36 debian dhcpd: ** Ignoring requests on eth1. If this is not what
Nov 9 08:26:36 debian dhcpd: you want, please write a subnet declaration
Nov 9 08:26:36 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 9 08:26:36 debian dhcpd: to which interface eth1 is attached. **
Nov 9 08:26:36 debian dhcpd:
Nov 9 08:26:36 debian dhcpd:
Nov 9 08:26:36 debian dhcpd: Not configured to listen on any interfaces!
Nov 9 08:26:36 debian dhcpd:
Nov 9 08:26:36 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 08:26:36 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 08:26:36 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 08:26:36 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 08:26:36 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 08:26:36 debian dhcpd:
Nov 9 08:26:36 debian dhcpd: exiting.
Nov 9 08:26:36 debian isc-dhcp-server[655]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 9 08:26:36 debian isc-dhcp-server[655]: failed!
Nov 9 08:26:36 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 08:26:36 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 08:26:36 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 08:38:00 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:38:00 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:38:00 debian networking[1824]: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:38:00 debian networking[1824]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:38:01 debian dhclient: DHCPRELEASE on eth1 to 172.16.2.1 port 67
Nov 9 08:38:01 debian networking[1824]: DHCPRELEASE on eth1 to 172.16.2.1 port 67
Nov 9 08:38:01 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:38:01 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:38:01 debian networking[1876]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:38:01 debian networking[1876]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:38:01 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:38:01 debian networking[1876]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:38:09 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 20
Nov 9 08:38:09 debian networking[1876]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 20
Nov 9 08:38:09 debian dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 08:38:09 debian dhclient: DHCPOFFER from 172.16.2.1
Nov 9 08:38:09 debian networking[1876]: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 08:38:09 debian networking[1876]: DHCPOFFER from 172.16.2.1
Nov 9 08:38:10 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 08:38:10 debian networking[1876]: DHCPACK from 172.16.2.1
Nov 9 08:51:16 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:51:16 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:51:16 debian networking[255]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Nov 9 08:51:16 debian networking[255]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:51:16 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
Nov 9 08:51:16 debian networking[255]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
Nov 9 08:51:16 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:51:16 debian networking[255]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:51:16 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:51:16 debian networking[255]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Nov 9 08:51:16 debian dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 08:51:16 debian dhclient: DHCPOFFER from 172.16.2.1
Nov 9 08:51:16 debian networking[255]: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 08:51:16 debian networking[255]: DHCPOFFER from 172.16.2.1
Nov 9 08:51:16 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 08:51:16 debian networking[255]: DHCPACK from 172.16.2.1
Nov 9 08:51:16 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 08:51:16 debian dhcpd: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 08:51:16 debian dhcpd: option
Nov 9 08:51:16 debian dhcpd: ^
Nov 9 08:51:16 debian dhcpd: Configuration file errors encountered -- exiting
Nov 9 08:51:16 debian dhcpd:
Nov 9 08:51:16 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 08:51:16 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 08:51:16 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 08:51:16 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 08:51:16 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 08:51:16 debian dhcpd:
Nov 9 08:51:16 debian dhcpd: exiting.
Nov 9 08:51:16 debian isc-dhcp-server[656]: dhcpd self-test failed. Please fix /etc/dhcp/dhcpd.conf.
Nov 9 08:51:16 debian isc-dhcp-server[656]: The error was:
Nov 9 08:51:16 debian dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 08:51:16 debian dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 08:51:16 debian dhcpd: All rights reserved.
Nov 9 08:51:16 debian dhcpd: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:51:16 debian dhcpd: Config file: /etc/dhcp/dhcpd.conf
Nov 9 08:51:16 debian dhcpd: Database file: /var/lib/dhcp/dhcpd.leases
Nov 9 08:51:16 debian dhcpd: PID file: /var/run/dhcpd.pid
Nov 9 08:51:16 debian isc-dhcp-server[656]: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 08:51:16 debian isc-dhcp-server[656]: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 08:51:16 debian isc-dhcp-server[656]: All rights reserved.
Nov 9 08:51:16 debian isc-dhcp-server[656]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 08:51:16 debian isc-dhcp-server[656]: Config file: /etc/dhcp/dhcpd.conf
Nov 9 08:51:16 debian isc-dhcp-server[656]: Database file: /var/lib/dhcp/dhcpd.leases
Nov 9 08:51:16 debian isc-dhcp-server[656]: PID file: /var/run/dhcpd.pid
Nov 9 08:51:16 debian dhcpd: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 08:51:16 debian dhcpd: option
Nov 9 08:51:16 debian dhcpd: ^
Nov 9 08:51:16 debian dhcpd: Configuration file errors encountered -- exiting
Nov 9 08:51:16 debian dhcpd:
Nov 9 08:51:16 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 08:51:16 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 08:51:16 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 08:51:16 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 08:51:16 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 08:51:16 debian dhcpd:
Nov 9 08:51:16 debian dhcpd: exiting.
Nov 9 08:51:16 debian isc-dhcp-server[656]: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 08:51:16 debian isc-dhcp-server[656]: option
Nov 9 08:51:16 debian isc-dhcp-server[656]: ^
Nov 9 08:51:16 debian isc-dhcp-server[656]: Configuration file errors encountered -- exiting
Nov 9 08:51:16 debian isc-dhcp-server[656]: If you think you have received this message due to a bug rather
Nov 9 08:51:16 debian isc-dhcp-server[656]: than a configuration issue please read the section on submitting
Nov 9 08:51:16 debian isc-dhcp-server[656]: bugs on either our web page at www.isc.org or in the README file
Nov 9 08:51:16 debian isc-dhcp-server[656]: before submitting a bug. These pages explain the proper
Nov 9 08:51:16 debian isc-dhcp-server[656]: process and the information we find helpful for debugging..
Nov 9 08:51:16 debian isc-dhcp-server[656]: exiting.
Nov 9 08:51:16 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 08:51:16 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 08:51:16 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 09:18:06 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 09:18:07 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 09:40:44 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 09:40:45 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 09:46:09 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 09:46:09 debian dhcpd: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 09:46:09 debian dhcpd: option
Nov 9 09:46:09 debian dhcpd: ^
Nov 9 09:46:09 debian dhcpd: Configuration file errors encountered -- exiting
Nov 9 09:46:09 debian dhcpd:
Nov 9 09:46:09 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 09:46:09 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 09:46:09 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 09:46:09 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 09:46:09 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 09:46:09 debian dhcpd:
Nov 9 09:46:09 debian dhcpd: exiting.
Nov 9 09:46:09 debian isc-dhcp-server[2411]: dhcpd self-test failed. Please fix /etc/dhcp/dhcpd.conf.
Nov 9 09:46:09 debian isc-dhcp-server[2411]: The error was:
Nov 9 09:46:09 debian dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 09:46:09 debian dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 09:46:09 debian dhcpd: All rights reserved.
Nov 9 09:46:09 debian dhcpd: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 09:46:09 debian dhcpd: Config file: /etc/dhcp/dhcpd.conf
Nov 9 09:46:09 debian dhcpd: Database file: /var/lib/dhcp/dhcpd.leases
Nov 9 09:46:09 debian dhcpd: PID file: /var/run/dhcpd.pid
Nov 9 09:46:09 debian isc-dhcp-server[2411]: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 09:46:09 debian isc-dhcp-server[2411]: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 09:46:09 debian isc-dhcp-server[2411]: All rights reserved.
Nov 9 09:46:09 debian isc-dhcp-server[2411]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 09:46:09 debian isc-dhcp-server[2411]: Config file: /etc/dhcp/dhcpd.conf
Nov 9 09:46:09 debian isc-dhcp-server[2411]: Database file: /var/lib/dhcp/dhcpd.leases
Nov 9 09:46:09 debian isc-dhcp-server[2411]: PID file: /var/run/dhcpd.pid
Nov 9 09:46:09 debian dhcpd: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 09:46:09 debian dhcpd: option
Nov 9 09:46:09 debian dhcpd: ^
Nov 9 09:46:09 debian dhcpd: Configuration file errors encountered -- exiting
Nov 9 09:46:09 debian dhcpd:
Nov 9 09:46:09 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 09:46:09 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 09:46:09 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 09:46:09 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 09:46:09 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 09:46:09 debian dhcpd:
Nov 9 09:46:09 debian dhcpd: exiting.
Nov 9 09:46:09 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 09:46:09 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 09:46:09 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 09:46:09 debian isc-dhcp-server[2411]: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 09:46:09 debian isc-dhcp-server[2411]: option
Nov 9 09:46:09 debian isc-dhcp-server[2411]: ^
Nov 9 09:46:09 debian isc-dhcp-server[2411]: Configuration file errors encountered -- exiting
Nov 9 09:46:09 debian isc-dhcp-server[2411]: If you think you have received this message due to a bug rather
Nov 9 09:46:09 debian isc-dhcp-server[2411]: than a configuration issue please read the section on submitting
Nov 9 09:46:09 debian isc-dhcp-server[2411]: bugs on either our web page at www.isc.org or in the README file
Nov 9 09:46:09 debian isc-dhcp-server[2411]: before submitting a bug. These pages explain the proper
Nov 9 09:46:09 debian isc-dhcp-server[2411]: process and the information we find helpful for debugging..
Nov 9 09:46:09 debian isc-dhcp-server[2411]: exiting.
Nov 9 09:46:21 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 09:46:21 debian dhcpd: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 09:46:21 debian dhcpd: option
Nov 9 09:46:21 debian dhcpd: ^
Nov 9 09:46:21 debian dhcpd: Configuration file errors encountered -- exiting
Nov 9 09:46:21 debian dhcpd:
Nov 9 09:46:21 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 09:46:21 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 09:46:21 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 09:46:21 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 09:46:21 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 09:46:21 debian dhcpd:
Nov 9 09:46:21 debian dhcpd: exiting.
Nov 9 09:46:21 debian isc-dhcp-server[2447]: dhcpd self-test failed. Please fix /etc/dhcp/dhcpd.conf.
Nov 9 09:46:21 debian isc-dhcp-server[2447]: The error was:
Nov 9 09:46:21 debian dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 09:46:21 debian isc-dhcp-server[2447]: Internet Systems Consortium DHCP Server 4.3.1
Nov 9 09:46:21 debian dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 09:46:21 debian isc-dhcp-server[2447]: Copyright 2004-2014 Internet Systems Consortium.
Nov 9 09:46:21 debian dhcpd: All rights reserved.
Nov 9 09:46:21 debian dhcpd: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 09:46:21 debian dhcpd: Config file: /etc/dhcp/dhcpd.conf
Nov 9 09:46:21 debian dhcpd: Database file: /var/lib/dhcp/dhcpd.leases
Nov 9 09:46:21 debian dhcpd: PID file: /var/run/dhcpd.pid
Nov 9 09:46:21 debian isc-dhcp-server[2447]: All rights reserved.
Nov 9 09:46:21 debian isc-dhcp-server[2447]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 09:46:21 debian isc-dhcp-server[2447]: Config file: /etc/dhcp/dhcpd.conf
Nov 9 09:46:21 debian isc-dhcp-server[2447]: Database file: /var/lib/dhcp/dhcpd.leases
Nov 9 09:46:21 debian isc-dhcp-server[2447]: PID file: /var/run/dhcpd.pid
Nov 9 09:46:21 debian dhcpd: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 09:46:21 debian dhcpd: option
Nov 9 09:46:21 debian dhcpd: ^
Nov 9 09:46:21 debian isc-dhcp-server[2447]: /etc/dhcp/dhcpd.conf line 50: semicolon expected.
Nov 9 09:46:21 debian isc-dhcp-server[2447]: option
Nov 9 09:46:21 debian isc-dhcp-server[2447]: ^
Nov 9 09:46:21 debian dhcpd: Configuration file errors encountered -- exiting
Nov 9 09:46:21 debian isc-dhcp-server[2447]: Configuration file errors encountered -- exiting
Nov 9 09:46:21 debian dhcpd:
Nov 9 09:46:21 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 09:46:21 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 09:46:21 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 09:46:21 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 09:46:21 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 09:46:21 debian dhcpd:
Nov 9 09:46:21 debian dhcpd: exiting.
Nov 9 09:46:21 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 09:46:21 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 09:46:21 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 09:46:21 debian isc-dhcp-server[2447]: If you think you have received this message due to a bug rather
Nov 9 09:46:21 debian isc-dhcp-server[2447]: than a configuration issue please read the section on submitting
Nov 9 09:46:21 debian isc-dhcp-server[2447]: bugs on either our web page at www.isc.org or in the README file
Nov 9 09:46:21 debian isc-dhcp-server[2447]: before submitting a bug. These pages explain the proper
Nov 9 09:46:21 debian isc-dhcp-server[2447]: process and the information we find helpful for debugging..
Nov 9 09:46:21 debian isc-dhcp-server[2447]: exiting.
Nov 9 10:09:44 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 10:09:44 debian dhcpd: Wrote 0 leases to leases file.
Nov 9 10:09:44 debian dhcpd:
Nov 9 10:09:44 debian dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Nov 9 10:09:44 debian dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 9 10:09:44 debian dhcpd: you want, please write a subnet declaration
Nov 9 10:09:44 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 9 10:09:44 debian dhcpd: to which interface eth0 is attached. **
Nov 9 10:09:44 debian dhcpd:
Nov 9 10:09:44 debian dhcpd:
Nov 9 10:09:44 debian dhcpd: Not configured to listen on any interfaces!
Nov 9 10:09:44 debian dhcpd:
Nov 9 10:09:44 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 10:09:44 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 10:09:44 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 10:09:44 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 10:09:44 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 10:09:44 debian dhcpd:
Nov 9 10:09:44 debian dhcpd: exiting.
Nov 9 10:09:46 debian isc-dhcp-server[2746]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 9 10:09:46 debian isc-dhcp-server[2746]: failed!
Nov 9 10:09:46 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 10:09:46 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 10:09:46 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 10:10:00 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 10:10:01 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 10:11:46 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 10:11:46 debian dhcpd: Wrote 0 leases to leases file.
Nov 9 10:11:46 debian dhcpd:
Nov 9 10:11:46 debian dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Nov 9 10:11:46 debian dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 9 10:11:46 debian dhcpd: you want, please write a subnet declaration
Nov 9 10:11:46 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 9 10:11:46 debian dhcpd: to which interface eth0 is attached. **
Nov 9 10:11:46 debian dhcpd:
Nov 9 10:11:46 debian dhcpd:
Nov 9 10:11:46 debian dhcpd: Not configured to listen on any interfaces!
Nov 9 10:11:46 debian dhcpd:
Nov 9 10:11:46 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 10:11:46 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 10:11:46 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 10:11:46 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 10:11:46 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 10:11:46 debian dhcpd:
Nov 9 10:11:46 debian dhcpd: exiting.
Nov 9 10:11:48 debian isc-dhcp-server[2826]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 9 10:11:48 debian isc-dhcp-server[2826]: failed!
Nov 9 10:11:48 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 10:11:48 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 10:11:48 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 10:12:06 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 10:12:06 debian dhcpd: Wrote 0 leases to leases file.
Nov 9 10:12:06 debian dhcpd:
Nov 9 10:12:06 debian dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Nov 9 10:12:06 debian dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 9 10:12:06 debian dhcpd: you want, please write a subnet declaration
Nov 9 10:12:06 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 9 10:12:06 debian dhcpd: to which interface eth0 is attached. **
Nov 9 10:12:06 debian dhcpd:
Nov 9 10:12:06 debian dhcpd:
Nov 9 10:12:06 debian dhcpd: Not configured to listen on any interfaces!
Nov 9 10:12:06 debian dhcpd:
Nov 9 10:12:06 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 10:12:06 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 10:12:06 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 10:12:06 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 10:12:06 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 10:12:06 debian dhcpd:
Nov 9 10:12:06 debian dhcpd: exiting.
Nov 9 10:12:08 debian isc-dhcp-server[2884]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 9 10:12:08 debian isc-dhcp-server[2884]: failed!
Nov 9 10:12:08 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 10:12:08 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 10:12:08 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 10:38:06 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 10:38:07 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 11:01:07 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 11:01:07 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 11:28:25 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 11:28:26 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 11:53:33 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 11:53:34 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 12:19:05 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 12:19:06 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 12:44:50 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 12:44:51 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 13:09:05 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 13:09:06 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 13:29:59 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:29:59 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:29:59 debian networking[5064]: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:29:59 debian networking[5064]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:29:59 debian dhclient: DHCPRELEASE on eth1 to 172.16.2.1 port 67
Nov 9 13:29:59 debian networking[5064]: DHCPRELEASE on eth1 to 172.16.2.1 port 67
Nov 9 13:29:59 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:29:59 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:29:59 debian networking[5117]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:29:59 debian networking[5117]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:29:59 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
Nov 9 13:29:59 debian networking[5117]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
Nov 9 13:30:05 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 13
Nov 9 13:30:05 debian networking[5117]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 13
Nov 9 13:30:05 debian dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 13:30:05 debian dhclient: DHCPOFFER from 172.16.2.1
Nov 9 13:30:05 debian networking[5117]: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 13:30:05 debian networking[5117]: DHCPOFFER from 172.16.2.1
Nov 9 13:30:06 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 13:30:06 debian networking[5117]: DHCPACK from 172.16.2.1
Nov 9 13:34:56 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:34:56 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:34:56 debian networking[5315]: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:34:56 debian networking[5315]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:34:56 debian dhclient: DHCPRELEASE on eth1 to 172.16.2.1 port 67
Nov 9 13:34:56 debian networking[5315]: DHCPRELEASE on eth1 to 172.16.2.1 port 67
Nov 9 13:34:56 debian dhclient: Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:34:56 debian dhclient: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:34:56 debian networking[5368]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Nov 9 13:34:56 debian networking[5368]: For info, please visit www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/
Nov 9 13:34:56 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
Nov 9 13:34:56 debian networking[5368]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
Nov 9 13:35:02 debian dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 17
Nov 9 13:35:02 debian networking[5368]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 17
Nov 9 13:35:02 debian dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 13:35:02 debian dhclient: DHCPOFFER from 172.16.2.1
Nov 9 13:35:02 debian networking[5368]: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Nov 9 13:35:02 debian networking[5368]: DHCPOFFER from 172.16.2.1
Nov 9 13:35:04 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 13:35:04 debian networking[5368]: DHCPACK from 172.16.2.1
Nov 9 13:38:30 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 13:38:30 debian dhcpd: Wrote 0 leases to leases file.
Nov 9 13:38:30 debian dhcpd:
Nov 9 13:38:30 debian dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Nov 9 13:38:30 debian dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 9 13:38:30 debian dhcpd: you want, please write a subnet declaration
Nov 9 13:38:30 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 9 13:38:30 debian dhcpd: to which interface eth0 is attached. **
Nov 9 13:38:30 debian dhcpd:
Nov 9 13:38:30 debian dhcpd:
Nov 9 13:38:30 debian dhcpd: Not configured to listen on any interfaces!
Nov 9 13:38:30 debian dhcpd:
Nov 9 13:38:30 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 13:38:30 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 13:38:30 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 13:38:30 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 13:38:30 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 13:38:30 debian dhcpd:
Nov 9 13:38:30 debian dhcpd: exiting.
Nov 9 13:38:32 debian isc-dhcp-server[5570]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 9 13:38:32 debian isc-dhcp-server[5570]: failed!
Nov 9 13:38:32 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 13:38:32 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 13:38:32 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 13:39:34 debian systemd[1]: Starting LSB: DHCP server...
Nov 9 13:39:34 debian dhcpd: Wrote 0 leases to leases file.
Nov 9 13:39:34 debian dhcpd:
Nov 9 13:39:34 debian dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Nov 9 13:39:34 debian dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 9 13:39:34 debian dhcpd: you want, please write a subnet declaration
Nov 9 13:39:34 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 9 13:39:34 debian dhcpd: to which interface eth0 is attached. **
Nov 9 13:39:34 debian dhcpd:
Nov 9 13:39:34 debian dhcpd:
Nov 9 13:39:34 debian dhcpd: Not configured to listen on any interfaces!
Nov 9 13:39:34 debian dhcpd:
Nov 9 13:39:34 debian dhcpd: If you think you have received this message due to a bug rather
Nov 9 13:39:34 debian dhcpd: than a configuration issue please read the section on submitting
Nov 9 13:39:34 debian dhcpd: bugs on either our web page at www.isc.org or in the README file
Nov 9 13:39:34 debian dhcpd: before submitting a bug. These pages explain the proper
Nov 9 13:39:34 debian dhcpd: process and the information we find helpful for debugging..
Nov 9 13:39:34 debian dhcpd:
Nov 9 13:39:34 debian dhcpd: exiting.
Nov 9 13:39:36 debian isc-dhcp-server[6114]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 9 13:39:36 debian isc-dhcp-server[6114]: failed!
Nov 9 13:39:36 debian systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Nov 9 13:39:36 debian systemd[1]: Failed to start LSB: DHCP server.
Nov 9 13:39:36 debian systemd[1]: Unit isc-dhcp-server.service entered failed state.
Nov 9 14:04:18 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 14:04:19 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 14:33:32 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 14:33:33 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 14:58:30 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 14:58:31 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 15:22:23 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 15:22:24 debian dhclient: DHCPACK from 172.16.2.1
Nov 9 15:49:29 debian dhclient: DHCPREQUEST on eth1 to 172.16.2.1 port 67
Nov 9 15:49:30 debian dhclient: DHCPACK from 172.16.2.1

Obrigado.




  


2. Re: Problema com DHCP [RESOLVIDO]

Carlos Alberto de Souza Barbosa
souzacarlos

(usa Outra)

Enviado em 09/11/2016 - 16:51h

Bom deixa ver se entendi
Uma dessas placas deve estar ligadas ao modem da net certo? Se sim vai ficar um pouco complicado dela concorrer com 2 servidores DHCP ( foi oq entendi, posso estar errado)

Dica1: Migre esse servidor para um versão server, preferencialmente sem interface gráfica, acredite é melhor
Dica2: Deixe as duas placas desse servidor com IP manual, tanto a placa que está no range da Operadora NET como a placa que irá atender teus clientes com DHCP local

EX : INT LAN 192.168.0.1/24 - Escopo DHCP 192.168.0.50-192.168.0.254
Ex : INT WAN (Operadora NET) Ip na faixa do range da Operadora

Network Analyst
contact skype: carlossouzainfo


3. Re: Problema com DHCP [RESOLVIDO]

Carlos Alberto de Souza Barbosa
souzacarlos

(usa Outra)

Enviado em 25/11/2016 - 18:55h

Bom tarde

Dica, quando resolver um problema informe a solução, lembre-se que assim como vc outros podem ter a mesma dúvida. E lembre-se também que existem pessoas que se disponhem a ajudar utilizando seu tempo para resolver/responder tais questões.

Abs
Network Analyst
contact skype: carlossouzainfo


4. Resolvido

marcelo miguel
marce-lost

(usa Debian)

Enviado em 28/11/2016 - 09:52h

Ok fiz a reinstalação do Debian sem a parte gráfica e faltava o roteamento.

nano /usr/local/bin/nat

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


Obrigado.


5. Re: Problema com DHCP [RESOLVIDO]

marcelo miguel
marce-lost

(usa Debian)

Enviado em 28/11/2016 - 10:00h

marce-lost escreveu:

Ok fiz a reinstalação do Debian sem a parte gráfica e faltava o roteamento.

nano /usr/local/bin/nat

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


Obrigado.



Fiz um passo a passo abaixo.

Linux DHCP passo a passo

eth0 cabo modem internet
eth1 cabo rede switch

ifconfig para ver as placas

instalar o serviço de DHCP

apt-get install isc-dhcp-server

editar o arquivo

nano /etc/network/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

allow-hotplug eth1
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.1.255

Salvar e sair

depois subir a placa

ifup eth1

agora editar o arquivo

nano /etc/dhcp/dhcpd.conf

#
# Sample configuration file for ISC dhcpd for Debian
#
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "laboratorio";
option domain-name-servers 200.189.80.136, 8.8.8.8;

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

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.10 192.168.10.254;
option subnet-mask 255.255.255.0;
option routers 192.168.10.1;
option broadcast-address 192.168.10.255;
}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

salvar e sair

testar e verificar se tem algum erro

dhcpd -t



agora editar o arquivo e colocar no final a placa eth1

nano /etc/default/isc-dhcp-server


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

#
# This is a POSIX shell fragment
#

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPD_CONF=/etc/dhcp/dhcpd.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPD_PID=/var/run/dhcpd.pid

# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

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

Salvar e sair.

comando para testar o serviço de dhcp

service isc-dhcp-server start ou restart ou stop ou status

arp -n verifica os ips que estão conectados

agora precisa configurar o roteamento de pacotes e criar um arquivo chamado nat

nano /usr/local/bin/nat

colocar abaixo os comandos

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


ok salvar e sair

agora tem que dar permissão de acesso

chmod +x /usr/local/bin/nat

agora tem que colocar o arquivo para iniciar junto com o sistema

nano /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/local/bin/nat
exit 0


salvar sair e reiniciar o sistema













Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts