18.221.157.203@hermano.com.br:~$ ls ./tutoriais/dynamips
.. tutorial-dynamips.txt
18.221.157.203@hermano.com.br:~$ cat ./tutoriais/dynamips/tutorial-dynamips.txt
;#########################################################
; Tutorial
; Dynagem + Dynamips = Routers no Debian
; Hermano Pereira - 02/02/2007
;#########################################################
; Tutorial completo:
; http://dynagen.org/tutorial.htm
;#########################################################
; Criar pastas para armazenar os dados:
# mkdir /opt/dynagen
# mkdir /opt/images
; Descompactar IOS
# unzip -p c7200-advipservicesk9-mz.124-9.T.bin > c7200.bin
; Verificar
# file c7200.bin
; Mover
# mv c7200.bin /opt/images
; baixar dynamips
# wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.7-RC3-x86.bin
# mv dynamips-0.2.7-RC3-x86.bin /opt/dynagen/dynamips
# chmod 755 /opt/dynagen/dynamips
# ln -sf /opt/dynagen/dynamips /usr/bin/dynamips
; baixar dynagen
# wget http://ufpr.dl.sourceforge.net/sourceforge/dyna-gen/dynagen-0.9.2.tar.gz
# tar -xvzf dynagen-0.9.2.tar.gz
# mv dynagen-0.9.2/* /opt/dynagen/
# chmod 755 /opt/dynagen/dynagen
# ln -sf /opt/dynagen/dynagen /usr/bin/dynagen
; instalar libpcap para captura de pacotes
# apt-get install libpcap0.8
; Criar um arquivo de configuracao:
# vi simple1.net
#Simple lab
[localhost]
[[7200]]
image = /opt/images/c7200.bin
npe = npe-400
ram = 160
[[ROUTER R1]]
s1/0 = R2 s1/0
[[Router R2]]
; Iniciar servidor Dynamips em background:
# dynamips -H 7200 &
; Iniciar dynagen
# dynagen -d simple1.net
; Vai iniciar o dynagen
=> list
; Acessar roteadores via telnet:
# telnet localhost 2000
# telnet localhost 2001
; ou, dentro do dynagen:
> telnet R1
> telnet R2
...
e assim por diante ...
;#########################################################
; Identificar idle-pc
;#########################################################
; Criar um arquivo de configuração para instanciar apenas 1 router:
# vi idle.net
# Detectar idle
[localhost]
[[7200]]
image = /opt/images/c7200.bin
npe = npe-400
ram = 160
[[ROUTER R1]]
; Parar servidor dynamips caso esteja rodando,
; e iniciar outro:
# dynamips -H 7200 &
; Iniciar dynagen
# dynagen -d idle.net
; Vai iniciar o dynagen
=> list
; Acessar por telnet um router,
; até o prompt de usuario:
# telnet localhost 2000
Router>
; Voltar ao dynagen e verificar idle-pc
> idlepc get R1
;#########################################################
; Dynamips em maquinas separadas
;#########################################################
; Instalar dynagem e baixar IOS em cada Maquina
; Exemplo de arquivo de configuração:
# vi 3routers.net
[10.101.5.15:7200]
[[7200]]
image = /opt/images/c7200.bin
ram = 160
idlepc = 0x624a11f8
[[ROUTER R1]]
s1/0 = R2 s1/0
[10.101.5.16:7200]
[[7200]]
image = /opt/images/c7200.bin
ram = 160
idlepc = 0x624a11f8
[[ROUTER R2]]
s1/1 = R3 s1/0
[10.101.5.17:7200]
[[7200]]
image = /opt/images/c7200.bin
ram = 160
idlepc = 0x624a11f8
[[ROUTER R3]]
# dynagen -d 3routers.net
:)
#########################################################
18.221.157.203@hermano.com.br:~$ clear_