歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux服務器

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 © Linux教程網 All Rights Reserved