当前位置: 首页 > 范文大全 > 自查报告 >

计算机网络配置_IP网络综合实验报告

时间:2021-11-04 14:49:26 来源:网友投稿

 . .

  . . .

 IP网络综合实验报告

 

 一、实验目的运用所学的知识配置cisco路由器,组建一个局域网,并在此局域网的基础上做一些应用。

 二、实验要求

 1.各子网之间的路由配置(鼓励使用各种路由协议);

 2.网计算机和校园网之间的NAT应用;

 3.标准和扩展访问列表应用;

 4.VoIP综合应用。

 三、实验设备

 1.路由器:Cisco2621,Cisco2620,Cisco3640(路由器之间通过serial接口固定连接);

 2.计算机主机2台(与实验室LAN连接);

 3.机2部,外线1根(临时用);

 4.两条与实验室LAN连接的网线,1条与校园网连接的网线。

 四、实验容

 1. 方案设计

 根据本次实验的要求,我们设计并利用Cisco Configmaker绘制了如图4.1的网络拓扑结构:

 注意:拓扑结构图中的EthernetLAN、EthernetLAN_1、EthernetLAN_2 和EthernetLAN_3其实是同一个局域网,这里为了使图看起来清楚就分开画了,特此说明一下。

 图4.1 网络拓扑结构

 路由器的基本配置

 A)管理配置路由器的方式

 Console口接终端或运行终端仿真软件的微机(9600,8,1,n);

 AUX口接MODEM,通过线与远方的终端或运行终端仿真软件的微机相连;

 通过Ethernet上的TFTP服务器;

 通过Ethernet上的TELNET程序;

 通过Ethernet上的SNMP网管工作站。

 B) 路由器的工作模式及其之间的关系

 用户模式;特权模式;全局配置模式;其他配置模式;Setup模式;RXBOOT模式。

 C) 路由器的基本配置

 更改路由器名称:

 对于Cisco 2620:hostname r2620;

 对于Cisco 2621:hostname r2621;

 对于Cisco 3640:hostname r3640;

 设置进入特权模式的密码:enable password bjtu;

 设置通过telnet进入路由器的密码:

 line vty 0 4

 password bjtu

 D) 路由器的常用命令

 显示运行配置——show running-config;

 登录远程主机—— telnet hostname|IP address;

 网络侦测 —— ping hostname|IP address;

 将运行配置备份到tftp——copy running-config tftp.

 路由器的路由配置

 在实验中,我们使用了三种类型的路由协议:静态路由和动态路由中的RIP和OSPF协议。

 在配置路由协议之前首先应配置各路由器的子网以及路由器之间连接的端口,具体配置如下:

 对2620的子网以及接口的配置:

 //首先配置以太网的IP

 interface fastethernet 0/0

 ip address

 no shutdown

 exit

 //配置与3640路由器相连串口0/0的IP和时钟频率(和对端相同)

 interface serial 0/0

 ip address 52

 clock rate 64000

 no shutdown

 exit

 对3640的子网以及接口的配置:

 //首先配置以太网的IP

 interface fastethernet 0/0

 ip address

 no shutdown

 exit

 //配置与2620路由器相连串口0/1的IP和时钟频率(和对端相同)

 interface serial 0/1

 ip address 52

 clock rate 64000

 no shutdown

 exit

 //配置与2621路由器相连串口0/0的IP和时钟频率(和对端相同)

 interface serial 0/0

 ip address

 clock rate 64000

 no shutdown

 exit

 对2621的子网以及接口的配置:

 //首先配置以太网的IP

 interface fastethernet 0/0

 ip address

 no shutdown

 exit

 //配置与3640路由器相连串口0/0的IP和时钟频率(和对端相同)

 interface serial 0/0

 ip address

 clock rate 64000

 no shutdown

 exit

 采用RIP协议时,2620的配置:

 //配置RIP协议,采用2版本。

 router rip

 version 2

 network

 network

 exit

 采用RIP协议时,3640的配置:

 //配置RIP协议,采用2版本。

 router rip

 version 2

 network

 network 10.10.1

 network

 exit

 采用RIP协议时,2621的配置:

 //配置RIP协议,采用2版本。

 router rip

 version 2

 network

 network 10.10.1

 exit

 采用OSPF协议时,2620的配置:

 //配置OSPF协议,并设置为0域。

 router ospf 1

 network 55 area 0

 network 55 area 0

 exit

 采用OSPF协议时,3640的配置:

 //配置OSPF协议,并设置为0域。

 router ospf 1

 network 55 area 0

 network 0.

 network 55 area 0

 exit

 采用OSPF协议时,2621的配置:

 //配置OSPF协议,并设置为0域。

 router ospf 1

 network 55 area 0

 network

 exit

 路由协议配置的测试:

 输入命令show ip route 显示的IP地址前有个C则表示为直接连接,显示的IP地址前为R,为通过路由协议相连,不显示IP地址的择为不能连接。

 网和校园网之间的NAT应用

 由于实验中我们只有一个合法的外部网络地址,所以只能进行端口地址转换(PAT)。我们通过路由器3640来(2620和2621不能实现该功能)进行转换的。

 对3640的NAT配置:

 //设置FastEthernet0/0口为部端口

 interface FastEthernet0/0

 ip nat inside

 no shutdown

 exit

 //设置FastEthernet0/1口的IP地址为02并设为外部端口,

 interface FastEthernet0/1

 ip address 02 28

 ip nat outside

 no shutdown

 exit

 //将部主机与外部网络地址进行映射

 ip nat inside source static 02

 标准和扩展访问列表应用

 访问列表分为标准访问列表和扩展访问列表,两者的区别见表4.1:

 表4.1 标准与扩展访问列表的区别

 标准

 扩展

 基于源地址

 基于源地址和目标地址

 允许和拒绝完整的TCP/IP协议

 指定TCP/IP的特定协议和端口号

 编号围 1 到 99

 编号围 100 到 199

 A) 标准访问列表

 假设要求IP地址为的主机禁止访问局域网所有主机,则通过配置2621即可完成:

 access-list 10 deny 55

 access-list 10 permit any

 interface ethernet 0/0

 ip access-group 10 out

 no shutdown

 这时通过主机ping其他主机,就会出现:U.U.U,而一般不能ping通的标识是:……。

 B) 扩展访问列表

 假设要求其他主机禁止通过Telnet到路由器2621,则对于2621有如下配置:

 access-list 110 deny tcp 55 any eq 23

 access-list 110 permit ip any any

 interface ethernet 0/0

 ip access-group 110 out

 no shutdown

 假设要求拒绝 ping ,则对于2621有如下配置:

 access-list 111 deny icmp host host

 access-list 111 permit ip any any

 interface ethernet 0/0

 ip access-group 111 out

 no shutdown

 VoIP综合应用

 A)同一路由器两个端口之间的通话

 对于同一个路由器部的间通话,就我们的设计方案就是路由器2620的两个Phone与Phone_1间的通话。假设Phone的设为1110,与2620的FXS 1/1/0端口相连,Phone_1的设为1111,与2620的FXS 1/

 //设置端口1/1/0的为1110

 dial-peer voice 1 pots

 port 1/1/0

 destination-pattern 1110

 exit

 //设置端口1/1/1的为1111

 dial-peer voice 2 pots

 port 1/1/1

 destination-pattern 1111

 exit

 这时Phone与Phone_1就可以相互通话。用Phone拔号1111,Phone_1就会振铃。

 B)连接在不同路由器上的通话

 如果要实现路由器之间的通话,如2620中的Phone与3640中的Phone_2间通话,Phone_2与FXS 3/0/0相连,设为2220。则有

 对于2620有:

 //设置以2开关的4位的目的地址IP为

 dial-peer voice 11 voip

 destination-pattern 2...

 codec g711ulaw

 session target ipv4:

 exit

 对于3640有:

 //设置端口3/0/0的为1111

 dial-peer voice 1 pots

 port 3/0/0

 destination-pattern 2220

 exit

 //设置以1开关的4位的目的地址IP为

 dial-peer voice 11 voip

 destination-pattern 1...

 codec g711ulaw

 session target ipv4:

 exit

 完成以上配置,Phone_2与Phone_1和Phone之间就可以进行通话。

 C)局域网与外网之间的通话

 如果要实现本局域网与外部进行通话,如通过2620的FXO 1/0/0端口与外部PSTN网络相连,则对于2620有以下配置:

 //局域网部拔打以0开关的时,自动通过1/0/0端口出去。

 dial-peer voice 3 pots

 port 1/0/0

 destination-pattern 0

 exit

 完成以上配置后,本局域网就可以与外部进行通话。这里外网拨打网的方式是先拨打实验室,稍等后(如果做得考究一点这里应该有拨打分机的提示音)再拨打分机号。

 D) NetMeeting的使用

 NetMeeting的使用:运行C:\Program Files\NetMeeting目录下的conf.exe程序,通过工具->选项->常规->高级呼叫,配置网关设置(如)后,就可以通过NetMeeting拔打局域网外的。如果要通过拔打NetMeeting,则还要对路由器(2620)进行以下配置:

 //配置IP地址为主机上的NetMeeting为4440。

 dial-peer voice 12 voip

 destination-pattern 4440

 codec g711ulaw

 session target ipv4:

 exit

 完成以上配置后,拔打4440就可以与NetMeeting进行通话了。

 五、实验中遇到的问题及解决方案

 1. 在使用RIP路由协议对路由器进行配置后,路由器之间相互之间仍Ping不通。

 解决:没有配置路由器相互通信的时钟频率,在路由器相连的serial接口上配置clock rate(如配置clock rate 64000),然后重启serial接口即可解决该问题。

 2. 将上次能够正常工作的运行配置通过tftp拷贝,下次再通过tftp恢复后,各路由器这间不通。

 解决:通过查看路由器的运行配置,发现serial端口为关闭状态。因此将其端口打开即可(no shutdown),这也可以在备份后的配置文件中,在串口配置后加上命令no shutdown,下次再进行恢复时就不会出现类似的问题。

 3. 正确配置完成到NetMeeting的通话过程后,与NetMeeting之间仍不能正常通话。

 解决:由于实验室里运行NetMeeting软件的电脑没有安装声卡驱动,而VoIP又涉及到OSI模型中的会话层等高层,所以虽然相互之间能拔通,但由于检测到没有声卡时,NetMeeting也会自动切断通话。所以他们之间其实是已经相互拔通了的,只是不能进行通话。

 4. 开启路由器时,超级终端显示>rommer,不能正常启动。

 解决:这是因为路由器启动时找不到操作系统的IOS镜像,可能是IOS文件丢失。有以下两种方式可以恢复IOS:1,通过tftp拷贝;2,运用带有X-modem功能的终端软件(我们用的是超级终端)通过串口拷贝。第一方法要快,不过有些路由器不能使用。

 六、实验总结

 通我所在的实验小组对这门课程给我们提供的上机动手的机会十分珍惜,总共做了7次实验,收获颇丰,主要收获了以下几点:

 1.对Cisco路由器的基本组成与构造有了一定的了解

 2.学会了并能使用路由器的基本配置命令

 3.学会了利用console口和telnet两种方法配置路由器

 4.学会了利用tftp服务器保存IOS配置文件

 5.学会了静态路由协议、RIP协议、OSPF协议3种路由协议的配置方法

 6.学会了NAT网络地址转换的配置

 7.学会了标准和扩展访问列表的配置以实现禁止/允许某些子网或端口的访问

 8.学会了线和外线以及与NetMeeting 的VoIP综合应用

 9.学会了恢复被损坏的IOS(tftp拷贝方法和X-modem方法)

 10.学会了利用Cisco Configmaker画网络拓扑结构图

 11.学会了利用Boson Netsim软件在没有硬件条件的情况下对设计的网络进行模拟,使我们在上机前就对可能遇到的问题有了准备

 12.对以前的计算机网络,路由器原理中的理论性的知识做了一个复习,同时又了更为形象的认识

 在学习到以上这些知识的同时我们还培养了许多能力:

 1. 动手能力

 对于中国学生来说,动手能力可能是最为缺乏的,所以我十分珍惜这次动手搭建网络的机会,总共在实验室做了7次实验,这对我们培养实际动手能力十分有利。

 2. 团队合作能力

 这次的实验是小组实验,4人一组,组员通力合作共同完成任务。

 3. 分析解决问题的能力

 虽然这次实验室有老师和助教指导的,但我们不到万不得已人希望依靠自己的力量解决问题,这就需要我们自己查阅书籍、资料、网络资源,并运用到实践当中。

 在实际配置路由器过程中也遇到了很多依靠自己的能力难以解决的问题。例如上节提及的一些问题,但通过向老师或助教的请教,最终所遇的问题都得到了很好的解决。所以值此报告完成之际,我要向实验指导老师卢燕飞老师和助教王振学长表示衷心的感。如果没有你们的耐心帮助,我们不可能如此顺利的完成实验。

 通过实验我们学到的很多实用性的知识,尤其是路由器的操作和配置,一定会对将来研究生期间的研究打下良好的基础,同时也会对将来考各种认证考试和找工作有很大的益处。

 附录(基于RIP的路由器的配置文件)

 Cisco 2620:

 !

 version 12.2

 service timestamps debug uptime

 service timestamps log uptime

 no service password-encryption

 !

 hostname 2620//路由器名

 !

 enable secret 5 $1$4gbg$h.5cZUyqTO6x4mpdHQSvw.

 enable password bjtu// enable密码

 !

 ip subnet-zero

 !

 !

 !

 !

 !

 !

 !

 !

 !

 !

 !

 fax interface-type fax-mail

 mta receive maximum-recipients 0

 !

 !

 !

 !

 interface FastEthernet0/0 //f0/0的IP地址

  ip address

 ip access-group 1 out

  duplex auto

  speed auto

 !

 interface BRI0/0

  no ip address

  shutdown

 !

 interface Serial0/0 //s0/0的IP地址,时钟速率

  ip address 52

  clockrate 64000

 !

 interface Serial0/1

  no ip address

  shutdown

 !

 router rip//RIP路由协议

  version 2

  network

  network

  network

 !

 ip classless

 no ip http server

 ip pim bidir-enable

 !

 !

 access-list 1 deny any//标准访问列表ACL

 access-list 1 deny 55

 !

 route-map ip permit 10

 !

 snmp-server community public RO

 call rsvp-sync

 !

 voice-port 1/0/0

 !

 voice-port 1/0/1

 !

 voice-port 1/1/0

 !

 voice-port 1/1/1

 !

 !

 mgcp profile default

 !

 dial-peer cor custom

 !

 !

 !

 dial-peer voice 1 pots//设FXS1/0的为1110

  destination-pattern 1110

  port 1/1/0

 !

 dial-peer voice 2 pots//设FXS1/1的为1111

  destination-pattern 1111

  port 1/1/1

 !

 dial-peer voice 3 pots//设出局为0

  destination-pattern 0

  port 1/0/0

 !

 dial-peer voice 11 voip//设始位为2的4位的目的IP为

  destination-pattern 2...

  session target ipv4:

  codec g711ulaw

 !

 dial-peer voice 12 voip//设主机的NetMeeting的为4440

  destination-pattern 4440

  session target ipv4:

  codec g711ulaw

 !

 !

 !

 line con 0

 line aux 0

 line vty 0 4//设置telnet的 密码为bjtu

  exec-timeout 20 0

  password bjtu

  login

 !

 !

 end

 Cisco 3640:

 !

 version 12.2

 no parser cache

 no service single-slot-reload-enable

 service timestamps debug uptime

 service timestamps log uptime

 no service password-encryption

 !

 hostname 3640//路由器名

 !

 logging rate-limit console 10 except errors

 enable password bjtu// enable密码

 !

 !

 !

 ip subnet-zero

 !

 !

 !

 ip ssh time-out 120

 ip ssh authentication-retries 3

 no ip dhcp-client network-discovery

 !

 call rsvp-sync

 !

 !

 !

 !

 !

 !

 !

 controller E1 2/0

 !

 !

 !

 interface FastEthernet0/0//f0/0的IP地址

  ip address

  ip nat inside//将f0/0设置状态为inside

  duplex auto

  speed auto

 !

 interface Serial0/0//s0/0的IP地址

  ip address 52

  ip broadcast-address

 !

 interface FastEthernet0/1//f0/1的IP地址

  ip address 02 28

  ip nat outside//将f0/1设置状态为outside

  duplex auto

  speed auto

 !

 interface Serial0/1//s0/1的IP地址

  ip address 52

  ip broadcast-address

 !

 router rip//RIP路由协议

  version 2

  network

  network

 !

 ip nat inside source static 02

 ip classless

 ip http server

 !

 !

 voice-port 3/0/0

 !

 voice-port 3/0/1

 !

 voice-port 3/1/0

 !

 voice-port 3/1/1

 !

 dial-peer cor custom

 !

 !

 !

 dial-peer voice 1 pots//设FXS0/0的为2220

  destination-pattern 2220

  port 3/0/0

 !

 dial-peer voice 11 voip//设始位为1的4位的目的IP为

  destination-pattern 1...

  session target ipv4:

  codec g711ulaw

 !

 dial-peer voice 12 voip//设主机的NetMeeting的为3330

  destination-pattern 3330

  session target ipv4:

  codec g711ulaw

 !

 !

 !

 line con 0

 line 33 40

 line aux 0

 line vty 0 4//设置telnet的密码为bjtu

  password bjtu

  login

 !

 !

 end

 Cisco 2621:

 !

 version 12.2

 service timestamps debug uptime

 service timestamps log uptime

 no service password-encryption

 !

 hostname 2621//路由器名

 !

 enable password bjtu// enable密码

 !

 ip subnet-zero

 !

 !

 !

 !

 !

 !

 !

 !

 !

 fax interface-type fax-mail

 mta receive maximum-recipients 0

 !

 !

 !

 !

 interface FastEthernet0/0//f0/0的IP地址

  ip address

 ip access-group 111 in

  ip access-group 111 out

  duplex auto

  speed auto

 !

 interface BRI0/0

  no ip address

  shutdown

 !

 interface Serial0/0// Serial0/0的IP地址

  ip address 52

  clockrate 64000

 !

 interface Serial0/1

  no ip address

  shutdown

 !

 router rip//RIP路由协议

  version 2

  network

  network

 !

 ip classless

 no ip http server

 ip pim bidir-enable

 !//扩展访问列表ACL

 access-list 111 deny tcp 55 55 eq ftp

 access-list 111 deny tcp 55 55 eq ftp-data

 access-list 111 permit ip any any

 !

 call rsvp-sync

 !

 voice-port 1/0/0

 !

 voice-port 1/0/1

 !

 voice-port 1/1/0

 !

 voice-port 1/1/1

 !

 !

 mgcp profile default

 !

 dial-peer cor custom

 !

 !

 !

 line con 0

 line aux 0

 line vty 0 4//设置telnet的 密码为bjtu

  exec-timeout 20 0

  password bjtu

  login

 !

 !

 end

相关热词搜索: 实验 报告 综合 网络 IP