When using Dynamips, you must create Net file.
This file has strict grammer. so you should note it.
★ Composing Net file.
[localhost:7200]
port = 7200
udp = 19000
ghostios = true
sparsemem = true
workingdir = ..\temp\ ← Path to repository of temporary files.
[[3660]]
image = ..\images\C3660-JK.BIN ← Path to IOS images and folder.
mmap = true
confreg = 0x2102
exec_area = 32
idlepc = 0x60648040 ← Idlepc value.
idlemax = 100
[[router R1]]
console = 2001 ← Port value
model = 3660
ram = 128 ← Virtual router memory
slot1 = NM-4T ← Module for 4 Serial port
s1/1 = R2 s1/2 ← To be connected port of neighbor router
s1/2 = R2 s1/1
autostart = false ←Deny to start virtual router before start commanded.
[[router R2]]
console = 2002
model = 3660
ram = 128
slot1 = NM-4T
← Opposite port doesn't need any configuration.
autostart = false
[localhost:7201] ← Dynamips couldn't support above 1GB memory.
If you need more router, add new session like this.
port = 7201
udp = 11000
ghostios = true
sparsemem = true
workingdir = ..\temp\
[[3745]]
image = ..\images\c3745-advipservicesk9-mz.124-15.T12.bin
mmap = true
confreg = 0x2102
exec_area = 32
idlepc = 0x61473a58
idlemax = 100
autostart = false
[[router SW1]]
console = 3001
ram = 128
model=3745
slot1 = NM-16ESW ← Module for 16 Ethernet port
f1/0 = NIO_gen_eth:\Device\NPF_{D7756D70-9A52-4CCC-A7B6-F34D09EB0358}
← Match to host NIC interface and Dynamips's
f1/1 = R1 f0/0
f1/2 = R2 f0/0
f1/13 = SW2 f1/13
f1/14 = SW2 f1/14
autostart = false
[[router SW2]]
console = 3002
ram = 128
model=3745
slot1 = NM-16ESW
f1/0 = NIO_gen_eth:\Device\NPF_{F1B81704-32AD-4FDD-AB8D-8565A1D48EC9}
f1/1 = R1 f0/1
f1/2 = R2 f0/1
f1/15 = NIO_gen_eth:\Device\NPF_{89B4C203-A164-4E04-9E40-1DFA97CD159E}
autostart = false
★ Composing batch file.
1. R3660.cmd file compose (make anyway)
@echo off
cd temp ← Path to repository of temporary files.
"..\dynagen.exe" ..\R3660.net ← Path to Net file.
2. dynamips-start.cmd file compose
@echo off
rem Launch a local copy of dynamips
set dynamips=%CD%\dynamips.exe
cd temp
start /belownormal /B "Dynamips" "%dynamips%" -H 7200
start /belownormal /B "Dynamips" "%dynamips%" -H 7201 ← Second session, if you need
pause
Check for temporary folder, and should erase all of them before start virtual router.
No comments:
Post a Comment