首先先下载
http://www.ipflow.utc.fr/dynamips/dynamips-0.2.5-x86.bin
http://nchc.dl.sourceforge.net/sourceforge/dyna-gen/dynagen-0.6.0.tar.gz
http://www.tcpdump.org/release/libpcap-0.9.5.tar.gz 这3个文件到/root下
1.安装libpcap
tar -zxvf libpcap-0.9.5.tar.gz
。/configure
make
make install
2.复制/root/dynamips-0.2.5-x86.bin到/usr/local/bin/下
cp dynamips-0.2.5-x86.bin /usr/local/bin
ln -s dynamips-0.2.5-x86.bin dynamips
3.解压dynagen-0.6.0.tar.gz
tar -zxvf dynagen-0.6.0.tar.gz
cd /usr/local/bin/
ln -s /root/dynagen-0.6.0/dynagen dynagen
[来源www.iocblog.net]
好了,这样就可以找个net文件来启动dynamips了,建议建个dynamips的文件夹,把dynamips,ios,net文件都放进去
启动dynamips:
nice dynamips -h 7200
启动控制台:
dynagen /root/dynamips/xxx.net
进入控制台,跟windos下就一模一样了。
获得idle_pc
dynamips -p 3600 -t 3620 /root/dynamips/xxx.bin(这里是3620的ios文件)。
等到进入到route>命令行后,按"ctrl+]"松开后按i,就可以获得很多idle_pc号,复制count最大的那个到net文件里就ok了。
至于网卡参数,把net文件中的nio_gen_eth:xxx改成nio_linux_eth:eth0就行了。
在控制台下启动路由器后,新开启一个终端,然后telnet 127.0.0.1 3001(这里是r1的端口号)就可以进入路由器。
[来源www.iocblog.net]
autostart = false
[localhost]
port = 7200
udp = 10000
[[router r1]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3001
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 1
f0/1 = sw1 2
f0/2 = sw1 3
f0/3 = sw1 4
s1/1 = r2 s1/0
s1/2 = fr1 1
[[router r2]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3002
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 5
f0/1 = sw1 6
f0/2 = sw1 7
f0/3 = sw1 8
s1/1 = r3 s1/0
s1/2 = fr1 2
[[router r3]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3003
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 9
f0/1 = sw1 10
f0/2 = sw1 11
f0/3 = sw1 12
s1/1 = r4 s1/0
s1/2 = fr1 3
[[router r4]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3004
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 13
f0/1 = sw1 14
f0/2 = sw1 15
f0/3 = sw1 16
s1/1 = r5 s1/0
s1/2 = fr1 4
[[router r5]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3005
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 17
f0/1 = sw1 18
f0/2 = sw1 19
f0/3 = sw1 20
s1/1 = r6 s1/0
s1/2 = fr1 5
[[router r6]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3006
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 21
f0/1 = sw1 22
f0/2 = sw1 23
f0/3 = sw1 24
s1/1 = r7 s1/0
s1/2 = fr1 6
[[router r7]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3007
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 25
s1/1 = r8 s1/0
s1/2 = fr1 7
[[router r8]]
image = /root/dynamips/unzip-c3620-i-mz.122-37.bin
model = 3620
console = 3008
ram = 32
confreg = 0x2142
idlepc = 0xffffffff804235c0
exec_area = 32
mmap = true
slot0=nm-4e
slot1 = pa-4t
f0/0 = sw1 26
s1/2 = fr1 8
[[ethsw sw1]]
1 = dot1q 1
2 = dot1q 1
3 = dot1q 1
4 = dot1q 1
5 = dot1q 1
6 = dot1q 1
7 = dot1q 1
8 = dot1q 1
9 = dot1q 1
10 = dot1q 1
11 = dot1q 1
12 = dot1q 1
13 = dot1q 1
14 = dot1q 1
15 = dot1q 1
16 = dot1q 1
17 = dot1q 1
18 = dot1q 1
19 = dot1q 1
20 = dot1q 1
21 = dot1q 1
22 = dot1q 1
23 = dot1q 1
24 = dot1q 1
25 = dot1q 1
26 = dot1q 1
27 = access 1 nio_linux_eth:eth0
[[frsw fr1]]
1:102 = 2:201
1:103 = 3:301
1:104 = 4:401
1:105 = 5:501
1:106 = 6:601
1:107 = 7:701
1:108 = 8:801
2:203 = 3:302
2:204 = 4:402
2:205 = 5:502
2:206 = 6:602
2:207 = 7:702
2:208 = 8:802
3:304 = 4:403
3:305 = 5:503
3:306 = 6:603
3:307 = 7:703
3:308 = 8:803
4:405 = 5:504
4:406 = 6:604
4:407 = 7:704
4:408 = 8:804
5:506 = 6:605
5:507 = 7:705
5:508 = 8:805
6:607 = 7:706
6:608 = 8:806
7:708 = 8:807
|
Tag:
Dynamips
文章整理:iocblog
版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。