Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1536250
  • 博文数量: 416
  • 博客积分: 10061
  • 博客等级: 上将
  • 技术积分: 3287
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-05 11:12
个人简介

技术在于专研

文章分类

全部博文(416)

文章存档

2021年(3)

2015年(34)

2013年(2)

2012年(1)

2011年(2)

2010年(5)

2007年(344)

2006年(25)

分类: 系统运维

2007-03-23 10:32:09

发布LINUX as 4下安装dynamips的方法..!

建议仔细先看下作者的博客(http://www.ipflow.utc.fr/blog),里面有很多东西的,还可以得到最新的dynamips的消息.

好了,开始安装吧,我的系统环境是FC4,而我准备安装3620的模拟器做路由实验,至于交换的,应该也差不多,以后有问题可以再交流.

首先先下载





   这3个文件到/root下
mkdir dynamips  建立dynamips文件夹
cd dynamips   进入dynamips文件夹

1.安装libpcap

tar -zxvf libpcap-0.9.5.tar.gz

cd libpcap-0.9.5

./configure

make

make install

2.复制/root/dynamips-0.2.7-RC1-x86.bin到/usr/local/bin/下

cp dynamips-0.2.7-RC1-x86.bin /usr/local/bin

cd /usr/local/bin

ln -s dynamips-0.2.7-RC1-x86.bin dynamips

cd /root/dynamips/

3.解压dynagen-0.9.0.tar.gz

tar -zxvf dynagen-0.9.0.tar.gz

cd /usr/local/bin/

ln -s /root/dynamips/dynagen-0.9.0/dynagen dynagen



好了,这样就可以找个net文件来启动dynamips了,建议建个dynamips的文件夹,把dynamips,IOS,net文件都放进去

启动dynamips:

chmod 777 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的端口号)就可以进入路由器,开始做实验了..
拓扑图



下面是我的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
  
IOS下载:

linux as 4 下的截图 为了方便你可以在桌面上建两个启动器
阅读(2913) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~