User Tools

Site Tools


informatica:linux:red:configuracion_interfaz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
informatica:linux:red:configuracion_interfaz [2009/12/11 11:01] 192.168.1.30informatica:linux:red:configuracion_interfaz [2015/04/13 20:19] (current) – external edit 127.0.0.1
Line 14: Line 14:
 | Desconfigurar la interfaz | ifdown eth0 | - | | Desconfigurar la interfaz | ifdown eth0 | - |
 | Volverla a configurar, con arrego a /etc/interfaces | ifup eth0 | - | | Volverla a configurar, con arrego a /etc/interfaces | ifup eth0 | - |
 +
  
  
Line 28: Line 29:
 netmask 255.255.255.0 netmask 255.255.255.0
 gateway 192.168.1.1 gateway 192.168.1.1
 +dns-nameservers 192.168.1.1
 auto eth0 auto eth0
 </code> </code>
  
-NOTA: tras realizar los cambios, reiniciar todas las interfaces:+NOTA: la entrada "dns-nameservers" es necesaria por ejemplo en Ubuntu Server, porque los cambios en el archivo "/etc/resolv.conf" son sobre-escritos tras cada reinicio.
  
-/etc/init.d/networking restart+Tras realizar los cambios, reiniciar todas las interfaces: 
 + 
 +  /etc/init.d/networking restart
  
 **IP DINÁMICA**\\ **IP DINÁMICA**\\
Line 44: Line 48:
 **Servidor DNS**\\ **Servidor DNS**\\
 /etc/resolv.conf /etc/resolv.conf
 +
 +
  
 ===== Comandos útiles ===== ===== Comandos útiles =====
Line 58: Line 64:
  
   route add default gw 192.168.1.1 eth0   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://packages.debian.org/squeeze/wpasupplicant
 +Instrucciones: http://wiki.debian.org/WiFi/HowToUse#Command_Line
 +
 +===== Asignar varias IPs en una NIC =====
 +
 +Tenemos una NIC (eth0) y queremos asignarle una segunda IP:
 +
 +  sudo ifconfig eth0.2 10.0.0.99/24 up
 +====== 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: "local" y "dmz"
 +  * Queremos acceder desde la DMZ
 +  * Queremos que el enrutador por defecto siga siendo "local"
 +
 +
 +
 +
informatica/linux/red/configuracion_interfaz.1260529308.txt.gz · Last modified: 2015/04/13 20:19 (external edit)