Blog en espanol destinado a diferentes temas tecnicos principalmente en IT y Networking. Se desea cubrir Linux, DNS, DNSSEC, RPKI, BGP, Cisco, Programacion (Bash, Python, etc), Protocolos de Enrutamiento, Seguridad en Redes, VoIP.
sábado, 5 de abril de 2014
Solucion a tres errores cuando queremos arrancar ISC DHCP 4.3
Error 1:
Can't open lease database /var/lib/dhcp/dhcpd6.leases: No such file or directory --
check for failed database rewrite attempt!
Ejemplo:
root@IPv6-RTR:/etc# /usr/sbin/dhcpd -6 -f -cf /etc/dhcp/dhcpd.conf eth5
Internet Systems Consortium DHCP Server 4.3.0a1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Can't open lease database /var/lib/dhcp/dhcpd6.leases: No such file or directory --
check for failed database rewrite attempt!
Please read the dhcpd.leases manual page if you
don't know what to do about this.
root@IPv6-RTR:/etc# touch /var/lib/dhcp/dhcpd6.leases
Solucion a error 1:
#touch /var/lib/dhcp/dhcpd6.leases
Adicionalmente verificar si el usuario con el que se esta ejecutando dhcpd posee escritura en /var/lib/dhcp
Quizas tambien hay que:
#cd /var/lib/
#chown -R root.root dhcp
--------------------------
Error 2:
No subnet6 declaration for eth5 (fe80::a00:27ff:fee7:b7c)
Ejemplo del error:
root@IPv6-RTR:/etc/dhcp# /usr/sbin/dhcpd -6 -f -cf /etc/dhcp/dhcpd.conf eth5
Internet Systems Consortium DHCP Server 4.3.0a1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 NA, 0 TA, 0 PD leases to lease file.
No subnet6 declaration for eth5 (fe80::a00:27ff:fee7:b7c).
** Ignoring requests on eth5. If this is not what
you want, please write a subnet6 declaration
in your dhcpd.conf file for the network segment
to which interface eth5 is attached. **
Not configured to listen on any interfaces!
Solucion a error 2:
Quitar la declaracion de subnet6 en dhcpd6.conf y copiarla a dhcpd.conf
-------------------------
Error 3:
Can't set SO_REUSEPORT option on dhcp socket: Protocol not available
Ejemplo del error:
root@IPv6-RTR:/etc/dhcp# /usr/sbin/dhcpd -6 -f -cf /etc/dhcp/dhcpd.conf eth5
Internet Systems Consortium DHCP Server 4.3.0a1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 NA, 0 TA, 0 PD leases to lease file.
Can't set SO_REUSEPORT option on dhcp socket: Protocol not available
Solucion a error 3:
Actualizar el kernel a una version >= 3.9
SO_REUSEPORT es requerido por ISC DHCP 4.3 por ello es necesario tener un kernel > 3.9
miércoles, 2 de abril de 2014
Instalar ISC DHCP 4.3 en Linux (Ubuntu 13.04) (IPv6)
Situacion:
Deseo instalar DHCP ISC 4.3 en Linux para mejorar el soporte de DHCP para IPv6.
Procedimiento:
1) Agregar la siguiente linea al final de /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian experimental main
2) Eliminar cualquier dhcp de ISC que tuviesemos antes:
#apt-get purge isc-dhcp-server (notese que podemos usar purge o remove, lo dejo a tu criterio)
3) Actualizar la DB de repositorios:
#apt-get update
4) Instalar el isc-dhcp-server indicando que use el repositorio experimental:
#apt-get -t experimental install isc-dhcp-server
Importante:
La configuracion del DHCP(d) debe estar funcionando, sino, el DHCPD no levantara y dara un error (logico, no?)
Más información:
http://blog.acostasite.com/2014/04/solucion-tres-errores-cuando-queremos.html
Deseo instalar DHCP ISC 4.3 en Linux para mejorar el soporte de DHCP para IPv6.
Procedimiento:
1) Agregar la siguiente linea al final de /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian experimental main
2) Eliminar cualquier dhcp de ISC que tuviesemos antes:
#apt-get purge isc-dhcp-server (notese que podemos usar purge o remove, lo dejo a tu criterio)
3) Actualizar la DB de repositorios:
#apt-get update
4) Instalar el isc-dhcp-server indicando que use el repositorio experimental:
#apt-get -t experimental install isc-dhcp-server
Importante:
La configuracion del DHCP(d) debe estar funcionando, sino, el DHCPD no levantara y dara un error (logico, no?)
Más información:
http://blog.acostasite.com/2014/04/solucion-tres-errores-cuando-queremos.html
lunes, 10 de febrero de 2014
Configurando Quagga para manipular prefijos (Local Preference) utilizando RPKI
Objetivo:
En el siguiente mini laboratorio configuraremos Quagga para manipular prefijos BGP y asignar Local Preference segun el estado RPKI (valid, invalid, Not Found).
Escenario:
- R1 publica un prefijo con un AS que no le corresponde (segun ROA)
- R2 publica el mismo prefijo que R1 pero desde un AS que si es valido
- R2 publica un prefijo sin ROA.
- En este escenario el validador y el router Quagga estan en el mismo equipo
Diagrama del laboratorio:
Requisitos:
- Quagga con soporte para RPKI
- RPKI Validator de RIPE NCC
- Un prefijo que sepamos que se tiene ROA valido. En nuestro caso utilizamos el prefijo 200.85.64.0 que sabiamos que tiene un ROA que indica que debe ser publicado por el AS 7908
- Ejecutar el validador de RIPE NCC antes de ejecutar Quagga
Configuraciones de todos los equipos
Salida final en Quagga:
(Notese los flags N, I, V) (Notese los local preference)
RPKI-RTR# sh ip bgp
BGP table version is 0, local router ID is 10.0.0.10
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
N*> 192.168.0.0 10.0.0.3 0 20 0 65003 i
I* 200.85.64.0 10.0.0.1 0 10 0 65001 i
V*> 10.0.0.2 0 30 0 7908 i
Total number of prefixes 2
En el siguiente mini laboratorio configuraremos Quagga para manipular prefijos BGP y asignar Local Preference segun el estado RPKI (valid, invalid, Not Found).
Escenario:
- R1 publica un prefijo con un AS que no le corresponde (segun ROA)
- R2 publica el mismo prefijo que R1 pero desde un AS que si es valido
- R2 publica un prefijo sin ROA.
- En este escenario el validador y el router Quagga estan en el mismo equipo
Diagrama del laboratorio:
Requisitos:
- Quagga con soporte para RPKI
- RPKI Validator de RIPE NCC
- Un prefijo que sepamos que se tiene ROA valido. En nuestro caso utilizamos el prefijo 200.85.64.0 que sabiamos que tiene un ROA que indica que debe ser publicado por el AS 7908
- Ejecutar el validador de RIPE NCC antes de ejecutar Quagga
Configuraciones de todos los equipos
hostname RPKI-RTR password test ! router bgp 65000 bgp router-id 10.0.0.10 bgp bestpath prefix-validate allow-invalid neighbor 10.0.0.1 remote-as 65001 neighbor 10.0.0.1 route-map rpki in neighbor 10.0.0.2 remote-as 7908 neighbor 10.0.0.2 route-map rpki in neighbor 10.0.0.3 remote-as 65003 neighbor 10.0.0.3 route-map rpki in ! route-map rpki permit 10 match rpki invalid set local-preference 10 ! route-map rpki permit 20 match rpki valid set local-preference 30 ! route-map rpki permit 30 match rpki notfound set local-preference 20 ! line vty ! enable-rpki rpki polling_period 1000 rpki timeout -1216757171 ! rpki group 1 rpki cache 127.0.0.1 8282 !
! ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! enable password test ! memory-size iomem 15 mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 no aaa new-model ip subnet-zero no ip icmp rate-limit unreachable ! ! no ip domain lookup ! ip cef ip audit po max-events 100 ! ! ! ! ip tcp synwait-time 5 ! ! ! ! interface Ethernet0 ip address 10.0.0.1 255.255.255.0 half-duplex ! interface FastEthernet0 no ip address shutdown speed auto ! router bgp 65001 no synchronization bgp log-neighbor-changes network 200.85.64.0 neighbor 10.0.0.10 remote-as 65000 no auto-summary ! ip classless ip route 200.85.64.0 255.255.255.0 Null0 no ip http server no ip http secure-server ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 password test login ! end
! ! ! ! hostname R2 ! no ip domain lookup no ip icmp rate-limit unreachable ip tcp synwait 5 ! ! interface Ethernet0 ip address 10.0.0.2 255.255.255.0 half-duplex ! ! router bgp 7908 no synchronization bgp log-neighbor-changes network 200.85.64.0 neighbor 10.0.0.10 remote-as 65000 no auto-summary ! ip classless ip route 200.85.64.0 255.255.255.0 Null0 no ip http server ! line con 0 exec-timeout 0 0 logging synchronous privilege level 15 no login line aux 0 exec-timeout 0 0 logging synchronous privilege level 15 no login ! ! end
! ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! memory-size iomem 15 mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 no aaa new-model ip subnet-zero no ip icmp rate-limit unreachable ! ! no ip domain lookup ! ip cef ip audit po max-events 100 ! ! ! ! ip tcp synwait-time 5 ! ! ! ! interface Ethernet0 ip address 10.0.0.3 255.255.255.0 half-duplex ! interface FastEthernet0 no ip address shutdown speed auto ! router bgp 65003 no synchronization bgp log-neighbor-changes network 192.168.0.0 neighbor 10.0.0.10 remote-as 65000 no auto-summary ! ip classless ip route 192.168.0.0 255.255.255.0 Null0 no ip http server no ip http secure-server ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! end
Salida final en Quagga:
(Notese los flags N, I, V) (Notese los local preference)
RPKI-RTR# sh ip bgp
BGP table version is 0, local router ID is 10.0.0.10
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
N*> 192.168.0.0 10.0.0.3 0 20 0 65003 i
I* 200.85.64.0 10.0.0.1 0 10 0 65001 i
V*> 10.0.0.2 0 30 0 7908 i
Total number of prefixes 2
domingo, 9 de febrero de 2014
Paso a paso. Instalando Quagga con soporte RPKI
(realizado en Ubuntu 13.04)
1) Instalar varios aplicativos & librerias necesarias:
#apt-get install autoconf
#apt-get install libtool (es necesario el libtoolize)
#apt-get install gawk (con solo awk no funciona)
#apt-get install libssh-dev (libssh es necesario para RPKI)
#apt-get install libreadline-dev (es necesario para vtysh de quagga)
#apt-get install texti2html
#apt-get install texinfo
#apt-get install cmake
#apt-get install doxygen
#apt-get install build-essential
#apt-get install git
2) Es necesario instalar RTRLIB para tener RPKI en Quagga:
#cd /usr/src
#wget https://github.com/rtrlib/rtrlib/archive/v0.2.3.tar.gz
#tar -zxvf v0.2.3.tar.gz
#cd rtrlib-0.2.3/
#cmake -D CMAKE_BUILD_TYPE=Release -D LIBSSH_LIBRARY=/usr/lib/i386-linux-gnu/libssh.so -D LIBSSH_INCLUDE=/usr/lib/i386-linux-gnu .
#make
#make install
3) Instalar Quagga con soporte RPKI:
#adduser quagga (quagga correra con este usuario)
#cd /usr/src
#git clone git://github.com/rtrlib/quagga-rtrlib.git
#cd quagga-rtrlib/
#./bootstrap.sh (this will create the configure file)
#./configure --enable-vtysh --enable-rpki --disable-zebra --localstatedir=/usr/local/etc
#make
#make install
Hay que decirle al sistema operativo como conseguir RTRlib
#echo "/usr/local/lib/i386-linux-gnu" >> /etc/ld.so.conf
(la linea de arriba depende de la arquitectura)
#ldconfig
Los permisos para el directorio de quagga
#cd /usr/local
#chown -R quagga.quagga etc/
4) Una micro configuracin de BGP para probar que todo levante:
#echo "password test" > /usr/local/etc/bgpd.conf
5) Probar si todo funciona (al menos BGP)
#cd/usr/local/sbin
#./bgpd &
#ps -ef | grep bgpd
#telnet localhost bgpd (deberias obtener un prompt, password test)
1) Instalar varios aplicativos & librerias necesarias:
#apt-get install autoconf
#apt-get install libtool (es necesario el libtoolize)
#apt-get install gawk (con solo awk no funciona)
#apt-get install libssh-dev (libssh es necesario para RPKI)
#apt-get install libreadline-dev (es necesario para vtysh de quagga)
#apt-get install texti2html
#apt-get install texinfo
#apt-get install cmake
#apt-get install doxygen
#apt-get install build-essential
#apt-get install git
2) Es necesario instalar RTRLIB para tener RPKI en Quagga:
#cd /usr/src
#wget https://github.com/rtrlib/rtrlib/archive/v0.2.3.tar.gz
#tar -zxvf v0.2.3.tar.gz
#cd rtrlib-0.2.3/
#cmake -D CMAKE_BUILD_TYPE=Release -D LIBSSH_LIBRARY=/usr/lib/i386-linux-gnu/libssh.so -D LIBSSH_INCLUDE=/usr/lib/i386-linux-gnu .
#make
#make install
3) Instalar Quagga con soporte RPKI:
#adduser quagga (quagga correra con este usuario)
#cd /usr/src
#git clone git://github.com/rtrlib/quagga-rtrlib.git
#cd quagga-rtrlib/
#./bootstrap.sh (this will create the configure file)
#./configure --enable-vtysh --enable-rpki --disable-zebra --localstatedir=/usr/local/etc
#make
#make install
Hay que decirle al sistema operativo como conseguir RTRlib
#echo "/usr/local/lib/i386-linux-gnu" >> /etc/ld.so.conf
(la linea de arriba depende de la arquitectura)
#ldconfig
Los permisos para el directorio de quagga
#cd /usr/local
#chown -R quagga.quagga etc/
4) Una micro configuracin de BGP para probar que todo levante:
#echo "password test" > /usr/local/etc/bgpd.conf
5) Probar si todo funciona (al menos BGP)
#cd/usr/local/sbin
#./bgpd &
#ps -ef | grep bgpd
#telnet localhost bgpd (deberias obtener un prompt, password test)
Suscribirse a:
Entradas (Atom)
Solución a: Error: eth0 interface name is not allowed for R2 node when network mode is not set to none
Problema: Containerlab devuelve un error similar: Error: eth0 interface name is not allowed for R2 node when network mode is not set to no...
-
Debido al crecimiento moderado que ha tenido el presente blog se me ocurrió añadir/integrar las estadisticas de google analytics a mi blog. ...
-
Introduccion: En algunas ocasiones es necesario "bajar" o deshabilitar iptables en nuestro Linux, el procedimiento depende de...
-
Saludos, Lo primero que debemos de hacer para quitar el stacking entre los switches es desconectar los cables Stack que los unen.... Es buen...