informatica:linux:red:configuracion_interfaz
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:red:configuracion_interfaz [2007/11/19 14:34] – 87.218.223.120 | informatica:linux:red:configuracion_interfaz [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | **IP FIJA**\\ | + | ====== Configurar |
| - | Fichero / | + | |
| - | iface eth0 inet static \\ | + | |
| - | address 192.168.1.2 \\ | + | |
| - | netmask 255.255.255.0 \\ | + | |
| - | gateway 192.168.1.1 | + | |
| - | NOTA: tras realizar los cambios, reiniciar todas las interfaces: | + | ifconfig dhclient3 ifup ifdown iwconfig |
| - | / | + | En esta sección se detalla información acerca de distintas formas de configurar redes en entornos debian |
| + | |||
| + | ===== Equivalencia comandos ===== | ||
| + | |||
| + | En estos ejemplos asumimos que queremos configurar la interfaz ' | ||
| + | |||
| + | ^ Operación ^ Linux ^ Windows ^ | ||
| + | | Solicitar ip a un servidor DHCP | dhclient3 eth0 | ipconfig /renew | | ||
| + | | Liberar la ip | dhclient3 -r eth0 | ipconfig /release | | ||
| + | | Desconfigurar la interfaz | ifdown eth0 | - | | ||
| + | | Volverla a configurar, con arrego a / | ||
| + | |||
| + | |||
| + | |||
| + | ===== Ip estática para interfaz ethernet ===== | ||
| + | |||
| + | **IP FIJA** | ||
| + | |||
| + | < | ||
| + | auto lo | ||
| + | iface lo inet loopback | ||
| + | allow-hotplug eth0 | ||
| + | iface eth0 inet static | ||
| + | address 192.168.1.2 | ||
| + | netmask 255.255.255.0 | ||
| + | gateway 192.168.1.1 | ||
| + | dns-nameservers 192.168.1.1 | ||
| + | auto eth0 | ||
| + | </ | ||
| + | |||
| + | NOTA: la entrada " | ||
| + | |||
| + | Tras realizar los cambios, reiniciar todas las interfaces: | ||
| + | |||
| + | | ||
| **IP DINÁMICA**\\ | **IP DINÁMICA**\\ | ||
| Line 19: | Line 48: | ||
| **Servidor DNS**\\ | **Servidor DNS**\\ | ||
| / | / | ||
| + | |||
| + | |||
| + | |||
| + | ===== Comandos útiles ===== | ||
| + | |||
| + | Deshabilitar una interfaz (de paso libera la ip): | ||
| + | |||
| + | ifdown eth0 | ||
| + | |||
| + | Levantar una interfaz (si así estuviera configurada, | ||
| + | |||
| + | ifup eth0 | ||
| + | |||
| + | Asignar una puerta de enlace a una interfaz: | ||
| + | |||
| + | route add default gw 192.168.1.1 eth0 | ||
| + | |||
| + | Configurar manualmente una interfaz: | ||
| + | |||
| + | ifconfig eth0 192.168.1.100 netmask 255.255.255.0 | ||
| + | |||
| + | |||
| + | ===== WPA-PSK and WPA2-PSK - DHCP ===== | ||
| + | |||
| + | Requisito: wpasupplicant -> http:// | ||
| + | Instrucciones: | ||
| + | |||
| + | ===== Asignar varias IPs en una NIC ===== | ||
| + | |||
| + | Tenemos una NIC (eth0) y queremos asignarle una segunda IP: | ||
| + | |||
| + | sudo ifconfig eth0.2 10.0.0.99/ | ||
| + | ====== Rutas ====== | ||
| + | auto eth0 | ||
| + | iface eth0 inet static | ||
| + | address 10.139.66.209 | ||
| + | netmask 255.255.255.192 | ||
| + | up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.139.66.193 | ||
| + | |||
| + | |||
| + | auto eth1 | ||
| + | iface eth1 inet static | ||
| + | address 172.16.33.9 | ||
| + | netmask 255.255.255.0 | ||
| + | gateway 172.16.33.1 | ||
| + | |||
| + | |||
| + | ===== 2 gateways ===== | ||
| + | |||
| + | Escenario: | ||
| + | |||
| + | * Servidor con dos interfaces de red, subredes y enrutadores distintos: " | ||
| + | * Queremos acceder desde la DMZ | ||
| + | * Queremos que el enrutador por defecto siga siendo " | ||
| + | |||
| + | |||
| + | |||
| + | |||
informatica/linux/red/configuracion_interfaz.1195482885.txt.gz · Last modified: (external edit)
