+ Responder ao Tópico



  1. #1

    Cool Script para gerar IPs no IP Address

    Olá Amigos to Criando um Servidor mais tenho problemas

    To criando um /30 para cada cliente mais putz criar 150 IPS /30 manualmente e foda né

    EX: 172.16.100.1/30
    EX: 172.16.100.5/30
    EX: 172.16.100.9/30
    Por ai vai


    Teria como criar um Script para criar isto ???
    Última edição por Jonatanmcc; 08-06-2009 às 00:06.

  2. #2

    Padrão

    Faço isto aqui para criar, altere de acordo com suas necessidades:
    Código :
    /ip dhcp-server network 
    :for i from=1 to=254 do{ add address=("10.10." . $i . ".0/30") gateway=("10.10." . $i . ".1") dns-server=("10.10." . $i . ".1")}

  3. #3

    Padrão

    Citação Postado originalmente por Jonatanmcc Ver Post
    Olá Amigos to Criando um Servidor mais tenho problemas

    To criando um /30 para cada cliente mais putz criar 150 IPS /30 manualmente e foda né

    EX: 172.16.100.1/30
    EX: 172.16.100.5/30
    EX: 172.16.100.9/30
    Por ai vai


    Teria como criar um Script para criar isto ???
    Por que para criar um por um he cruel

    Jonata, usa o PPPoE.

  4. #4

    Padrão

    Citação Postado originalmente por Raniel Ver Post
    Faço isto aqui para criar, altere de acordo com suas necessidades:
    Código :
    /ip dhcp-server network 
    :for i from=1 to=254 do{ add address=("10.10." . $i . ".0/30") gateway=("10.10." . $i . ".1") dns-server=("10.10." . $i . ".1")}
    Raniel vc e o Cara
    Show de Bola

  5. #5

    Padrão o que ah de errado com o metodo que eu uso

    eu crio um /24 na adress e depois bloqueio tudos os ips na queue.... e vou liberando deacodo com a demanda...
    isso ta errado ? devo criar um por um com /30 ?

  6. #6

    Padrão

    no MK tem uma formula muito simples que um amigo meu me passou e vc cria uma range de cada vez inteira olha o exemplo abaixo pra criar apenas 5:

    add address=172.18.0.1/30 interface=ether2-Clientes
    add address=172.18.0.5/30 interface=ether2-Clientes
    add address=172.18.0.9/30 interface=ether2-Clientes
    add address=172.18.0.13/30 interface=ether2-Clientes
    add address=172.18.0.17/30 interface=ether2-Clientes

    Dica: cria isso num arquivinho TXT e monta todos eles e pra agilizar cada range pede pra substituir apenas o "0" por "1" ou "2" etc... e vai criando por grupos de ips.

    Espero ter ajudado.

  7. #7

    Padrão

    Mas desta forma vai dá no mesmo. Ele terá que cadastrar os ips 1 a 1.

  8. #8

    Padrão

    vai nao amigo... so copiar e colar....
    add address=172.18.0.1/30 interface=ether2-Clientes
    add address=172.18.0.5/30 interface=ether2-Clientes
    add address=172.18.0.9/30 interface=ether2-Clientes
    add address=172.18.0.13/30 interface=ether2-Clientes
    add address=172.18.0.17/30 interface=ether2-Clientes
    add address=172.18.0.21/30 interface=ether2-Clientes
    add address=172.18.0.25/30 interface=ether2-Clientes
    add address=172.18.0.29/30 interface=ether2-Clientes
    add address=172.18.0.33/30 interface=ether2-Clientes
    add address=172.18.0.37/30 interface=ether2-Clientes
    add address=172.18.0.41/30 interface=ether2-Clientes
    add address=172.18.0.45/30 interface=ether2-Clientes
    add address=172.18.0.49/30 interface=ether2-Clientes
    add address=172.18.0.53/30 interface=ether2-Clientes
    add address=172.18.0.57/30 interface=ether2-Clientes
    add address=172.18.0.61/30 interface=ether2-Clientes
    add address=172.18.0.65/30 interface=ether2-Clientes
    add address=172.18.0.69/30 interface=ether2-Clientes
    add address=172.18.0.73/30 interface=ether2-Clientes
    add address=172.18.0.77/30 interface=ether2-Clientes
    add address=172.18.0.81/30 interface=ether2-Clientes
    add address=172.18.0.85/30 interface=ether2-Clientes
    add address=172.18.0.89/30 interface=ether2-Clientes
    add address=172.18.0.93/30 interface=ether2-Clientes
    add address=172.18.0.97/30 interface=ether2-Clientes
    add address=172.18.0.101/30 interface=ether2-Clientes
    add address=172.18.0.105/30 interface=ether2-Clientes
    add address=172.18.0.109/30 interface=ether2-Clientes
    add address=172.18.0.113/30 interface=ether2-Clientes
    add address=172.18.0.117/30 interface=ether2-Clientes
    add address=172.18.0.121/30 interface=ether2-Clientes
    add address=172.18.0.125/30 interface=ether2-Clientes
    add address=172.18.0.129/30 interface=ether2-Clientes
    add address=172.18.0.133/30 interface=ether2-Clientes
    add address=172.18.0.137/30 interface=ether2-Clientes
    add address=172.18.0.141/30 interface=ether2-Clientes
    add address=172.18.0.145/30 interface=ether2-Clientes
    add address=172.18.0.149/30 interface=ether2-Clientes
    add address=172.18.0.153/30 interface=ether2-Clientes
    add address=172.18.0.157/30 interface=ether2-Clientes
    add address=172.18.0.161/30 interface=ether2-Clientes
    add address=172.18.0.165/30 interface=ether2-Clientes
    add address=172.18.0.169/30 interface=ether2-Clientes
    add address=172.18.0.173/30 interface=ether2-Clientes
    add address=172.18.0.177/30 interface=ether2-Clientes
    add address=172.18.0.181/30 interface=ether2-Clientes
    add address=172.18.0.185/30 interface=ether2-Clientes
    add address=172.18.0.189/30 interface=ether2-Clientes
    add address=172.18.0.193/30 interface=ether2-Clientes
    add address=172.18.0.197/30 interface=ether2-Clientes
    add address=172.18.0.201/30 interface=ether2-Clientes
    add address=172.18.0.205/30 interface=ether2-Clientes
    add address=172.18.0.209/30 interface=ether2-Clientes
    add address=172.18.0.213/30 interface=ether2-Clientes
    add address=172.18.0.217/30 interface=ether2-Clientes
    add address=172.18.0.221/30 interface=ether2-Clientes
    add address=172.18.0.225/30 interface=ether2-Clientes
    add address=172.18.0.229/30 interface=ether2-Clientes
    add address=172.18.0.233/30 interface=ether2-Clientes
    add address=172.18.0.237/30 interface=ether2-Clientes
    add address=172.18.0.241/30 interface=ether2-Clientes
    add address=172.18.0.245/30 interface=ether2-Clientes
    add address=172.18.0.249/30 interface=ether2-Clientes
    add address=172.18.0.253/30 interface=ether2-Clientes
    add address=172.18.1.1/30 interface=ether2-Clientes
    add address=172.18.1.5/30 interface=ether2-Clientes
    add address=172.18.1.9/30 interface=ether2-Clientes
    add address=172.18.1.13/30 interface=ether2-Clientes
    add address=172.18.1.17/30 interface=ether2-Clientes
    add address=172.18.1.21/30 interface=ether2-Clientes
    add address=172.18.1.25/30 interface=ether2-Clientes
    add address=172.18.1.29/30 interface=ether2-Clientes
    add address=172.18.1.33/30 interface=ether2-Clientes
    add address=172.18.1.37/30 interface=ether2-Clientes
    add address=172.18.1.41/30 interface=ether2-Clientes
    add address=172.18.1.45/30 interface=ether2-Clientes
    add address=172.18.1.49/30 interface=ether2-Clientes
    add address=172.18.1.53/30 interface=ether2-Clientes
    add address=172.18.1.57/30 interface=ether2-Clientes
    add address=172.18.1.61/30 interface=ether2-Clientes
    add address=172.18.1.65/30 interface=ether2-Clientes
    add address=172.18.1.69/30 interface=ether2-Clientes
    add address=172.18.1.73/30 interface=ether2-Clientes
    add address=172.18.1.77/30 interface=ether2-Clientes
    add address=172.18.1.81/30 interface=ether2-Clientes
    add address=172.18.1.85/30 interface=ether2-Clientes
    add address=172.18.1.89/30 interface=ether2-Clientes
    add address=172.18.1.93/30 interface=ether2-Clientes
    add address=172.18.1.97/30 interface=ether2-Clientes
    add address=172.18.1.101/30 interface=ether2-Clientes
    add address=172.18.1.105/30 interface=ether2-Clientes
    add address=172.18.1.109/30 interface=ether2-Clientes
    add address=172.18.1.113/30 interface=ether2-Clientes
    add address=172.18.1.117/30 interface=ether2-Clientes
    add address=172.18.1.121/30 interface=ether2-Clientes
    add address=172.18.1.125/30 interface=ether2-Clientes
    add address=172.18.1.129/30 interface=ether2-Clientes
    add address=172.18.1.133/30 interface=ether2-Clientes
    add address=172.18.1.137/30 interface=ether2-Clientes
    add address=172.18.1.141/30 interface=ether2-Clientes
    add address=172.18.1.145/30 interface=ether2-Clientes
    add address=172.18.1.149/30 interface=ether2-Clientes
    add address=172.18.1.153/30 interface=ether2-Clientes
    add address=172.18.1.157/30 interface=ether2-Clientes
    add address=172.18.1.161/30 interface=ether2-Clientes
    add address=172.18.1.165/30 interface=ether2-Clientes
    add address=172.18.1.169/30 interface=ether2-Clientes
    add address=172.18.1.173/30 interface=ether2-Clientes
    add address=172.18.1.177/30 interface=ether2-Clientes
    add address=172.18.1.181/30 interface=ether2-Clientes
    add address=172.18.1.185/30 interface=ether2-Clientes
    add address=172.18.1.189/30 interface=ether2-Clientes
    add address=172.18.1.193/30 interface=ether2-Clientes
    add address=172.18.1.197/30 interface=ether2-Clientes
    add address=172.18.1.201/30 interface=ether2-Clientes
    add address=172.18.1.205/30 interface=ether2-Clientes
    add address=172.18.1.209/30 interface=ether2-Clientes
    add address=172.18.1.213/30 interface=ether2-Clientes
    add address=172.18.1.217/30 interface=ether2-Clientes
    add address=172.18.1.221/30 interface=ether2-Clientes
    add address=172.18.1.225/30 interface=ether2-Clientes
    add address=172.18.1.229/30 interface=ether2-Clientes
    add address=172.18.1.233/30 interface=ether2-Clientes
    add address=172.18.1.237/30 interface=ether2-Clientes
    add address=172.18.1.241/30 interface=ether2-Clientes
    add address=172.18.1.245/30 interface=ether2-Clientes
    add address=172.18.1.249/30 interface=ether2-Clientes
    add address=172.18.1.253/30 interface=ether2-Clientes

  9. #9

    Padrão

    add address=172.18.2.1/30 interface=ether2-Clientes
    add address=172.18.2.5/30 interface=ether2-Clientes
    add address=172.18.2.9/30 interface=ether2-Clientes
    add address=172.18.2.13/30 interface=ether2-Clientes
    add address=172.18.2.17/30 interface=ether2-Clientes
    add address=172.18.2.21/30 interface=ether2-Clientes
    add address=172.18.2.25/30 interface=ether2-Clientes
    add address=172.18.2.29/30 interface=ether2-Clientes
    add address=172.18.2.33/30 interface=ether2-Clientes
    add address=172.18.2.37/30 interface=ether2-Clientes
    add address=172.18.2.41/30 interface=ether2-Clientes
    add address=172.18.2.45/30 interface=ether2-Clientes
    add address=172.18.2.49/30 interface=ether2-Clientes
    add address=172.18.2.53/30 interface=ether2-Clientes
    add address=172.18.2.57/30 interface=ether2-Clientes
    add address=172.18.2.61/30 interface=ether2-Clientes
    add address=172.18.2.65/30 interface=ether2-Clientes
    add address=172.18.2.69/30 interface=ether2-Clientes
    add address=172.18.2.73/30 interface=ether2-Clientes
    add address=172.18.2.77/30 interface=ether2-Clientes
    add address=172.18.2.81/30 interface=ether2-Clientes
    add address=172.18.2.85/30 interface=ether2-Clientes
    add address=172.18.2.89/30 interface=ether2-Clientes
    add address=172.18.2.93/30 interface=ether2-Clientes
    add address=172.18.2.97/30 interface=ether2-Clientes
    add address=172.18.2.101/30 interface=ether2-Clientes
    add address=172.18.2.105/30 interface=ether2-Clientes
    add address=172.18.2.109/30 interface=ether2-Clientes
    add address=172.18.2.113/30 interface=ether2-Clientes
    add address=172.18.2.117/30 interface=ether2-Clientes
    add address=172.18.2.121/30 interface=ether2-Clientes
    add address=172.18.2.125/30 interface=ether2-Clientes
    add address=172.18.2.129/30 interface=ether2-Clientes
    add address=172.18.2.133/30 interface=ether2-Clientes
    add address=172.18.2.137/30 interface=ether2-Clientes
    add address=172.18.2.141/30 interface=ether2-Clientes
    add address=172.18.2.145/30 interface=ether2-Clientes
    add address=172.18.2.149/30 interface=ether2-Clientes
    add address=172.18.2.153/30 interface=ether2-Clientes
    add address=172.18.2.157/30 interface=ether2-Clientes
    add address=172.18.2.161/30 interface=ether2-Clientes
    add address=172.18.2.165/30 interface=ether2-Clientes
    add address=172.18.2.169/30 interface=ether2-Clientes
    add address=172.18.2.173/30 interface=ether2-Clientes
    add address=172.18.2.177/30 interface=ether2-Clientes
    add address=172.18.2.181/30 interface=ether2-Clientes
    add address=172.18.2.185/30 interface=ether2-Clientes
    add address=172.18.2.189/30 interface=ether2-Clientes
    add address=172.18.2.193/30 interface=ether2-Clientes
    add address=172.18.2.197/30 interface=ether2-Clientes
    add address=172.18.2.201/30 interface=ether2-Clientes
    add address=172.18.2.205/30 interface=ether2-Clientes
    add address=172.18.2.209/30 interface=ether2-Clientes
    add address=172.18.2.213/30 interface=ether2-Clientes
    add address=172.18.2.217/30 interface=ether2-Clientes
    add address=172.18.2.221/30 interface=ether2-Clientes
    add address=172.18.2.225/30 interface=ether2-Clientes
    add address=172.18.2.229/30 interface=ether2-Clientes
    add address=172.18.2.233/30 interface=ether2-Clientes
    add address=172.18.2.237/30 interface=ether2-Clientes
    add address=172.18.2.241/30 interface=ether2-Clientes
    add address=172.18.2.245/30 interface=ether2-Clientes
    add address=172.18.2.249/30 interface=ether2-Clientes
    add address=172.18.2.253/30 interface=ether2-Clientes

    se quiser mais so me falar....
    vai em "New Terminal" e cola isso todos de uma so vez

  10. #10

    Padrão

    Desta Forma ai que o amigo mando não rola
    Tem que ser um Script

  11. #11

    Padrão

    amigo...Jonatanmcc, fiz assim no meu e ta tudo 100%, nao deu trabalho nenhum pra fazer isso. podem aproveitar quem achar q serve...

  12. #12

    Padrão

    Citação Postado originalmente por Raniel Ver Post
    Faço isto aqui para criar, altere de acordo com suas necessidades:
    Código :
    /ip dhcp-server network 
    :for i from=1 to=254 do{ add address=("10.10." . $i . ".0/30") gateway=("10.10." . $i . ".1") dns-server=("10.10." . $i . ".1")}
    Raniel só edita e joga no new terminal?!?!?


    puts vc é o cara mesmo!!! hehe vlw

  13. #13

    Padrão

    Este aí cria as redes no dhcp-server. Para você criar os ips ficaria de tal forma:
    Código :
    /ip address 
    :for i from=1 to=254 do{ add address=("10.10." . $i . ".0/30") interface=("lan")}
    Isto é feito pelo terminal(telnet, ssh...).

  14. #14

    Padrão

    Citação Postado originalmente por Raniel Ver Post
    Este aí cria as redes no dhcp-server. Para você criar os ips ficaria de tal forma:
    Código :
    /ip address 
    :for i from=1 to=254 do{ add address=("10.10." . $i . ".0/30") interface=("lan")}
    Isto é feito pelo terminal(telnet, ssh...).
    Opaa trinco!!!!....vlw Raniel.

    abração