informatica:certificaciones:lpic:lpic-2:205_network_configuration:205.3
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| informatica:certificaciones:lpic:lpic-2:205_network_configuration:205.3 [2021/04/08 12:14] – [hostname] tempwin | informatica:certificaciones:lpic:lpic-2:205_network_configuration:205.3 [2021/06/22 13:42] (actual) – tempwin | ||
|---|---|---|---|
| Línea 53: | Línea 53: | ||
| </ | </ | ||
| + | ===== Configuración de interfaces ===== | ||
| + | |||
| + | ==== Red Hat ==== | ||
| + | |||
| + | Los ficheros de configuración de las interfaces están presentes en el directorio ''/ | ||
| + | |||
| + | Dichos ficheros son llamados '' | ||
| + | |||
| + | Ejemplo de ''/ | ||
| + | |||
| + | < | ||
| + | DEVICE=" | ||
| + | BOOTPROTO=" | ||
| + | IPV6INIT=" | ||
| + | NM_CONTROLLED=" | ||
| + | ONBOOT=" | ||
| + | TYPE=" | ||
| + | </ | ||
| + | |||
| + | En una configuración estática: | ||
| < | < | ||
| - | 205.3 Solución de Problemas de Red (4) | + | DEVICE="eth0" |
| - | CONFIGURACIÓN INTERFACES (REDHAT) | + | ONBOOT="yes" |
| - | Los ficheros de configuración de las interfaces están | + | BOOTPROTO="static" |
| - | presentes en / | + | IPADDR=10.0.2.152 |
| - | Dichos ficheros son llamados ifcfg-xxx, donde xxx es el | + | |
| - | nombre de la interfaz de red. | + | |
| - | / | + | |
| - | DEVICE=eth0 | + | |
| - | ONBOOT=yes | + | |
| - | BOOTPROTO=static | + | |
| - | IPADDR=192.168.3.2 | + | |
| NETMASK=255.255.255.0 | NETMASK=255.255.255.0 | ||
| - | GATEWAY=192.168.3.1 | + | GATEWAY=10.0.2.1 |
| - | 205.3 Solución de Problemas de Red (4) | + | </ |
| - | CONFIGURACIÓN INTERFACES (DEBIAN) | + | |
| - | En debian la configuración de las interfaces se agrupan | + | ==== Debian ==== |
| - | en un único fichero / | + | |
| + | En debian la configuración de las interfaces se agrupan en un único fichero | ||
| + | |||
| + | < | ||
| + | # Interfaces que se activarán al arranque | ||
| auto lo eth0 eth1 | auto lo eth0 eth1 | ||
| + | |||
| iface lo inet loopback | iface lo inet loopback | ||
| + | |||
| + | # Configuración estática | ||
| iface eth0 inet static | iface eth0 inet static | ||
| - | address 192.168.3.2 | + | |
| - | netmask 255.255.255.0 | + | netmask 255.255.255.0 |
| - | gateway 192.168.3.1 | + | gateway 192.168.3.1 |
| + | |||
| + | # Configuración por DHCP | ||
| iface eth1 inet dhcp | iface eth1 inet dhcp | ||
| - | 205.3 Solución | + | </ |
| - | DEPURACIÓN DE ERRORES | + | |
| - | dmesg: un comando | + | ===== Depuración |
| - | núcleo desde el arranque. Entre ellos los posibles | + | |
| - | errores de una tarjeta de red. | + | ==== dmesg ==== |
| - | Los eventos asociados a la red son registrado en los | + | |
| - | siguientes ficheros de logs: | + | Comando |
| - | DEBIAN | + | |
| - | RED HAT / | + | Los eventos asociados a la red son registrado en los siguientes ficheros de logs: |
| - | 205.3 Solución | + | |
| - | RESOLUCIÓN DE NOMBRES | + | * Debian: '' |
| - | / | + | * Red Hat: '' |
| - | servidores de nombres y que dominios hay que | + | |
| + | < | ||
| + | $ dmesg | ||
| + | (...) | ||
| + | [11097.907564] device eth0 entered promiscuous mode | ||
| + | [11101.758363] device eth0 left promiscuous mode | ||
| + | [11108.651928] device eth0 entered promiscuous mode | ||
| + | [11120.785132] device eth0 left promiscuous mode | ||
| + | </ | ||
| + | |||
| + | ===== Resolución | ||
| + | |||
| + | Cuando hacemos pruebas con un ping a un nombre | ||
| + | |||
| + | ==== / | ||
| + | |||
| + | El fichero '' | ||
| consultar para resolver las peticiones DNS. | consultar para resolver las peticiones DNS. | ||
| - | domain | + | |
| - | search | + | Ejemplo de ''/ |
| - | nameserver | + | |
| - | nameserver 192.168.3.6 | + | < |
| - | 205.3 Solución de Problemas de Red (4) | + | domain |
| - | RESOLUCIÓN DE NOMBRES | + | search |
| - | /etc/hosts: permite establecer una correspondencia | + | nameserver |
| - | entre las direcciones IP y los nombre de las máquinas. | + | </ |
| - | #IP HOSTNAME | + | |
| - | 192.168.3.24 www | + | Según ese fichero, las búsquedas se realizarán primero en el dominio '' |
| - | 192.168.3.45 dns-server | + | |
| - | 205.3 Solución de Problemas de Red (4) | + | ==== / |
| - | RESOLUCIÓN DE NOMBRES | + | |
| - | host: herramienta | + | El fichero ''/ |
| - | servidor DNS de la red | + | |
| - | host factorhumanoformacion.com | + | Ejemplo: |
| - | dig: herramienta | + | |
| - | servidor DNS de la red , obteniendo información | + | < |
| - | más detallada | + | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 |
| - | dig factorhumanoformacion.com | + | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 |
| - | 205.3 Solución de Problemas de Red (4) | + | 192.168.2.10 |
| - | TCP WRAPPERS | + | 192.168.2.5 sercentos7.curso.esp |
| - | • Permite el bloqueo de determinados servicios a través | + | 192.168.2.152 |
| - | de la red | + | </ |
| - | • Utiliza la librería libwrap. | + | |
| - | • Los ficheros de configuración son: | + | De tal manera que podríamos hacer ping a debian10 en lugar de a la IP 192.168.2.10. |
| - | / | + | ==== host ==== |
| - | / | + | |
| - | •Durante la comprobación de reglas primero se verifica el | + | Herramienta |
| - | /etc/hosts.allowy | + | |
| - | • tcpd: demonio que lee los ficheros de configuración. | + | <code bash> |
| - | 205.3 Solución de Problemas | + | host google.es |
| - | TCP WRAPPERS | + | </ |
| - | Formato: servicio: clientes | + | |
| - | servicio: servicio a comprobar (ALL para todos) | + | < |
| - | clientes: clientes autorizados o prohibidos. | + | google.es has address 216.58.211.227 |
| - | ALL: Todos los hosts. | + | google.es has IPv6 address 2a00: |
| - | LOCAL: Todos los host de la red local. | + | google.es mail is handled by 10 aspmx.l.google.com. |
| - | UNKNOWN: Host con nombre sin resolver. | + | google.es mail is handled by 50 alt4.aspmx.l.google.com. |
| - | KNOWN: Host con nombre conocido. | + | google.es mail is handled by 20 alt1.aspmx.l.google.com. |
| - | EXCEPT: Permite la exclusion de hosts. | + | google.es mail is handled by 30 alt2.aspmx.l.google.com. |
| - | 205.3 Solución de Problemas de Red (4) | + | google.es mail is handled by 40 alt3.aspmx.l.google.com. |
| - | TCP WRAPPERS | + | </ |
| - | / | + | |
| + | ==== dig ==== | ||
| + | |||
| + | Herramienta | ||
| + | |||
| + | <WRAP center round info 60%> | ||
| + | El programa '' | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | dig google.es | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | ; <<>> | ||
| + | ;; global options: +cmd | ||
| + | ;; Got answer: | ||
| + | ;; ->> | ||
| + | ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 | ||
| + | ;; WARNING: recursion requested but not available | ||
| + | |||
| + | ;; OPT PSEUDOSECTION: | ||
| + | ; EDNS: version: 0, flags:; udp: 4096 | ||
| + | ; COOKIE: b1a8a025bbd00c57 (echoed) | ||
| + | ;; QUESTION SECTION: | ||
| + | ; | ||
| + | |||
| + | ;; Query time: 15 msec | ||
| + | ;; SERVER: 10.0.2.3#53(10.0.2.3) | ||
| + | ;; WHEN: Thu Apr 08 12:35:01 CEST 2021 | ||
| + | ;; MSG SIZE rcvd: 50 | ||
| + | </ | ||
| + | |||
| + | Podemos hacer consultas al servidor DNS pidiendo ciertos tipos de entradas. Por ejemplo, servidores de correo: | ||
| + | |||
| + | <code bash> | ||
| + | dig MX google.es | ||
| + | </ | ||
| + | |||
| + | Si queremos que nos dé la información principal: | ||
| + | |||
| + | <code bash> | ||
| + | dig ANY google.es | ||
| + | </ | ||
| + | |||
| + | ===== TCP wrappers ===== | ||
| + | |||
| + | Permite el bloqueo de determinados servicios a través de la red. | ||
| + | |||
| + | Utiliza la librería | ||
| + | |||
| + | Los ficheros de configuración son: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Durante la comprobación de reglas | ||
| + | |||
| + | '' | ||
| + | |||
| + | Si en una máquina añadimos hosts al fichero ''/ | ||
| + | |||
| + | Formato | ||
| + | |||
| + | < | ||
| + | servicio: clientes | ||
| + | </ | ||
| + | |||
| + | * **servicio**: servicio a comprobar (ALL para todos) | ||
| + | * **clientes**: clientes autorizados o prohibidos | ||
| + | |||
| + | Ejemplo '' | ||
| + | |||
| + | < | ||
| vsftpd: 192.168.2.5 | vsftpd: 192.168.2.5 | ||
| telnet: ALL | telnet: ALL | ||
| - | / | + | </ |
| + | |||
| + | Quiere decir que al servicio '' | ||
| + | |||
| + | Ejemplo '' | ||
| + | |||
| + | < | ||
| ALL: .baddomain.org EXCEPT trusted.baddomain.org | ALL: .baddomain.org EXCEPT trusted.baddomain.org | ||
| - | 205.3 Solución | + | </ |
| - | PREGUNTA DE EXAMEN: | + | |
| - | A DNS server has the IP address 192.168.0.1. Which TWO of the | + | Quiere decir que los hosts que pertenzcan a '' |
| - | following need to be done on a client machine to use this DNS | + | |
| - | server? | + | * '' |
| - | A. Add nameserver 192.168.0.1 to / | + | * '' |
| - | B. Run route add nameserver 192.168.0.1 | + | * '' |
| - | C. Run ifconfig eth0 nameserver 192.168.0.1 | + | * '' |
| - | D. Ensure that the dns service is listed in the hosts entry | + | * '' |
| - | in the / | + | ===== Tests ===== |
| - | E. Run bind add nameserver 192.168.0.1 | + | |
| - | 205.3 Solución de Problemas de Red (4) | + | **A DNS server has the IP address 192.168.0.1. Which TWO of the following need to be done on a client machine to use this DNS server?** |
| - | PREGUNTA DE EXAMEN: | + | |
| - | Considering the following kernel IP routing table now, which of the following | + | * Add '' |
| - | commands must be remove the route to the network 10.10.1.0/ | + | |
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | En el fichero ''/ | ||
| + | |||
| + | **Considering the following kernel IP routing table now, which of the following commands must be remove the route to the network 10.10.1.0/ | ||
| + | < | ||
| Kernel IP routing table | Kernel IP routing table | ||
| - | Destination Gateway Genmask Flags Metric Ref Use Iface | + | Destination |
| - | 200.207.199.162 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 | + | 200.207.199.162 |
| - | 172.16.87.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 | + | 172.16.87.0 |
| - | 192.168.246.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 | + | 192.168.246.0 |
| - | 10.10.1.0 192.168.246.11 255.255.255.0 UG 0 0 0 eth1 | + | 10.10.1.0 |
| - | 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo | + | 127.0.0.0 |
| - | 0.0.0.0 200.207.199.162 0.0.0.0 UG 0 0 0 ppp0 | + | 0.0.0.0 |
| - | A.route del 10.10.1.0 | + | |
| - | B.route del 10.10.1.0/ | + | |
| - | C.route del -net 10.10.1.0/ | + | |
| - | D.route del 10.10.1.0/ | + | |
| - | E.route del -net 10.10.1.0 | + | |
| </ | </ | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | |||
informatica/certificaciones/lpic/lpic-2/205_network_configuration/205.3.1617876845.txt.gz · Última modificación: por tempwin
