Red local

Receta para configurar la red local

Ponemos por ejemplo una tarjeta NE2000 compatible con io=0x300 e irq=3

 keep
 # alias net-pf-1 off     # Unix Se comentan los que hay que tener activos
 # alias net-pf-2 off     # IPv4
 alias eth0 ne
 options ne io=0x300 irq=3
          modprobe ne io=0x300 irq=3
          ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
           auto lo eth0   # inicia la red automáticamente
           iface lo inet loopback
           iface eth0 inet static
        address 192.168.1.1
                netmask 255.255.255.0

Opcionalemente, podemos completarlo un poco más:

               broadcast 192.168.0.255
               network 192.168.0.0
          /etc/init.d/networking stop
          /etc/init.d/networking start
          /etc/init.d/networking restart

Si tenemos varias IPs y una sola tarjeta ...

        ifconfig eth0:0 192.168.0.1
        route add -host 192.168.0.1 dev eth0:0
        ifconfig eth0:1 192.168.0.2
        route add -host 192.168.0.2 dev eth0:1