Linux系统下安装配置Dynamips的方法


首先先下载
 
  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
 
  好了,这样就可以找个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的端口号)就可以进入路由器。
 
    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

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3