计算机网络实验指导书(详细版) 下载本文

内容发布更新时间 : 2024/6/13 14:55:28星期一 下面是文章的全部内容请认真阅读。

计算机网络实验指导书

Router1(config)# interface fastethernet 1/0

Router1(config-if)# ip address 192.168.2.1 255.255.255.0 Route1(config-if)#no shutdown Router1(config)interface serial 1/2

Router1(config-if)# ip address 192.168.3.1 255.255.255.0 Router1(config-if)cloce rate 64000 Router1(config)#no shutdown 验证路由器接口的配置。 Router1#show ip interface brief

Router1#show interface serial 1/2

2、 在路由器Router1上配置静态路由。

Router1(config-if)# ip route 192.168.4.0 255.255.255.0 192.168.3.2

验证测试 验证Router1上配置静态路由配置。 Router1#show ip route

第 26 页 共 64 页

计算机网络实验指导书

3、 在路由器Router2上配置接口的IP地址和串口上的时钟频率。

Router2(config)# interface fastethernet 1/0

Router2(config-if)# ip address 192.168.3.2 255.255.255.0 Route2(config-if)#no shutdown Router2(config)interface serial 1/2

Router2(config-if)# ip address 192.168.4.1 255.255.255.0 Router2(config-if)cloce rate 64000 Router2(config)#no shutdown 验证路由器接口的配置。 Router2#show ip interface brief

Router2#show interface serial 1/2

4、在路由器Router2上配置静态路由。 Router21(config-if)# ip route

验证测试 验证Router2上配置静态路由配置。 Router2#show ip route 5、测试网络的互连互通性。

从PC1 ping PC

第 27 页 共 64 页

计算机网络实验指导书

【注意事项】

如果两台路由器通过串口直接互连,则必须在其中一端设置时钟频率(DCE)。 【参考配置】

Router1#show running-config ! 显示路由器Router1的全部配置

Building configuration...

Current configuration : 517 bytes !

version 8.32(building 53) hostname Router1 interface serial 1/2

ip address 172.16.2.1 255.255.255.0 clock rate 64000 interface serial 1/3 clock rate 64000 !

interface FastEthernet 1/0

ip address 172.16.1.1 255.255.255.0 duplex auto speed auto !

interface FastEthernet 1/1 duplex auto speed auto shutdown !

interface Null 0 !

ip route 172.16.3.0 255.255.255.0 172.16.2.2

第 28 页 共 64 页

计算机网络实验指导书

!

line con 0 line aux 0 line vty 0 4 login ! end

Router2#show running-config ! 显示路由器Router2的全部配置

Building configuration...

Current configuration : 498 bytes !

version 8.32(building 53) hostname Router2 interface serial 1/2

ip address 172.16.2.2 255.255.255.0 interface serial 1/3 clock rate 64000 !

interface FastEthernet 1/0

ip address 172.16.3.2 255.255.255.0 duplex auto speed auto

interface FastEthernet 1/1 duplex auto speed auto shutdown !

interface Null 0 !

ip route 172.16.1.0 255.255.255.0 172.16.2.1 !

line con 0 line aux 0 line vty 0 4 login ! end

第 29 页 共 64 页

计算机网络实验指导书

实验八 基于TCP协议的

聊天程序的开发

实验目的

1、掌握TCP/IP协议的工作原理。

2、理解TCP提供的可靠服务实现原语的工作过程。 3、掌握TCP状态转换的原理。 4、编程实现TCP/IP协议的通信。

实验内容

1、理解TCP/IP协议通信方服务器的工作过程。 2、理解TCP/IP协议通信方终端机的工作过程。 3、编程实现TCP/IP协议的通信。

实验步骤

1、设置服务器的工作流程图,并写出程序。 2、设置终端机的工作流程图,并写出程序。 3、调试服务器和终端机的程序,并上网测试。 4、写出测试结果。

参考文献

1、Andrew S.Tanenbaum。Computer Networks, Fourth Edition(计算机网络第4版)。Vrije Universiteit, Amsterdam,The herlands,清华大学出版社。

2、Scott Ballew | 夏昊 洪峰。Managing IP Networks with Cisco Routers(Cisco路由器管理 )。中国电力出版社。

3、(美)Jeanna Matthews著。计算机网络实验教程, Computer Networks: Internet Protocols in Action。John Wiley & Sons出版社。

4、黄明,梁旭编著。计算机网络管理习题详解。机械工业出版社。

5、黄明 梁旭 吴镝编著。计算机网络与通信习题详解。机械工业出版社。 6、雷振甲。网络工程师教程。清华大学出版社。 7、张国鸣。网络管理员教程。清华大学出版社。

8、罗云彬。Windows环境下32位汇编语言程序设计。电子工业出版社。 9、Dpouglas E. Comer。用TCP/IP进行网际互联(1-3卷)。电子工业出版社。 10、W.Richard Stevens。TCP/IP详解(1-3卷)。机械工业出版社2002年3月。

第 30 页 共 64 页