资源描述
2016~2017 学年 第 1 学期
实 验 报 告 书
课程名称 计算机网络实验
系(部) 信息工程系
专业班级 计算机科学与技术
学生姓名
学生学号
成绩_______________
评语:
指导教师________________
目录
目录 I
项目1 网络设备基本操作(Cisco模拟器Packet Tracer) 1
任务一:通过Telnet登录 1
任务二:虚拟局域网VLAN的配置 4
任务三:静态路由协议的配置 6
任务四:动态路由协议的配置 11
项目2 网络设备的基本操作(真机,华三设备) 16
任务一:通过Console登录 16
任务二:使用系统操作及文件操作的基本命令 18
任务三:通过Telnet登录 21
任务四:使用FTP 上传下载系统文件 24
I
任务四:使用FTP上传下载系统文件
项目1 网络设备基本操作(Cisco模拟器Packet Tracer)
任务一:通过Telnet登录
步骤1:配置路由器以太网接口IP地址
Router>enable //进入特权模式
Router#config t //进入全局配置模式
Router(config)#hostname R1 //配置路由器名称为“R1”
R1(config)#interface f0/0 //进入路由器接口配置模式
R1(config-if)#ip address 192.168.0.138 255.255.255.0
//配置路由器管理接口IP 地址和网络掩码
R1(config-if)#no shutdown //开启路由器接口
R1(config-if)#end //退出到特权模式
R1#show ip interface brief //验证路由器管理接口 IP 地址已经配置和开启
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.0.138 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
R1#write //保存路由器上所做的配置
Building configuration...
[OK]
步骤2:配置路由器密码
R1#config t //进入全局配置模式
R1(config)#line vty 0 4 //进入路由器的vty虚拟终端,0-4共5个虚拟终端
R1(config-line)#password 123
R1(config-line)#login
//以上是配置vty的密码,即Telnet密码
R1(config-line)#exit
R1(config)#enable password 123456
//以上是配置进入到路由器特权模式的密码
R1(config)#end
步骤3:检查以太网接口是否正常
R1#show int f0/0
FastEthernet0/0 is up, line protocol is up (connected)
Hardware is Lance, address is 0001.9631.d101 (bia 0001.9631.d101)
Internet address is 192.168.0.138/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
//应该显示两个“up”
步骤4:通过Telnet访问路由器
PC>ping 192.168.0.138
Pinging 192.168.0.138 with 32 bytes of data:
Reply from 192.168.0.138: bytes=32 time=44ms TTL=255
Reply from 192.168.0.138: bytes=32 time=0ms TTL=255
Reply from 192.168.0.138: bytes=32 time=0ms TTL=255
Reply from 192.168.0.138: bytes=32 time=0ms TTL=255
Ping statistics for 192.168.0.138:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 44ms, Average = 11ms
//以上是表明计算机能ping通路由器
PC>telnet 192.168.0.138
//Telnet路由器以太网卡上的IP地址
Trying 192.168.0.138 ...Open
User Access Verification
Password:
R1>en
Password:
R1#
//输入vty的密码123、输入enable的密码123456,能正常进入路由器的特权模式
任务二:虚拟局域网VLAN的配置
步骤1:进入全局配置模式
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
步骤2:创建VLAN10和VLAN20
Switch(config)#vlan 10 //创建VLAN10
Switch(config-vlan)#name jikeyiban //给VLAN10命名“计科1班”
Switch(config-vlan)#exit
Switch(config)#vlan 20 //创建VLAN20
Switch(config-vlan)#name jikeerban //给VLAN10命名“计科2班”
Switch(config-vlan)#exit
Switch(config)#
步骤3:交换机1~5端口划分给VLAN10,6~10端口划分给VLAN20
Switch(config)#interface range f0/1-5 //进入接口模式
Switch(config-if-range)#switchport access vlan 10 //将1~5接口划分给VLAN10
Switch(config-if-range)#exit
Switch(config)#interface range f0/6-10
Switch(config-if-range)#switchport access vlan 20 //将6~10接口划分给VLAN20
Switch(config-if-range)#exit
Switch(config)#
步骤4:查看VLAN配置
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24
10 jikeyiban active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5
20 jikeerban active Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch#
步骤5:为PC1、PC2、PC3、PC4配置IP地址。
设备
IP地址
子网掩码
PC1
192.168.1.5
255.255.255.0
PC2
192.168.1.6
255.255.255.0
PC3
192.168.2.5
255.255.255.0
PC4
192.168.2.6
255.255.255.0
PC1>ipconfig 192.168.1.5 255.255.255.0
PC2>ipconfig 192.168.1.6 255.255.255.0
PC3>ipconfig 192.168.2.5 255.255.255.0
PC4>ipconfig 192.168.2.6 255.255.255.0
步骤6:实验测试
1) PC1与PC2属于同一VLAN,用PC1 ping PC2的IP地址192.168.1.6。
PC>ping 192.168.1.6
Pinging 192.168.1.6 with 32 bytes of data:
Reply from 192.168.1.6: bytes=32 time=1ms TTL=128
Reply from 192.168.1.6: bytes=32 time=0ms TTL=128
Reply from 192.168.1.6: bytes=32 time=0ms TTL=128
Reply from 192.168.1.6: bytes=32 time=0ms TTL=128
Ping statistics for 192.168.1.6:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC>
2) PC1与PC3属于不同VLAN,用PC1 ping PC3的IP地址192.168.2.5。
PC>ping 192.168.2.5
Pinging 192.168.2.5 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.2.5:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
任务三:静态路由协议的配置
步骤1:在路由器R1上配置接口的IP地址
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#int s0/0/0
R1(config-if)#clock rate 64000
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int s0/0/1
R1(config-if)#clock rate 64000
R1(config-if)#ip address 172.16.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#end
R1#show ip route //查看路由表
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R1#write //保存配置
Building configuration...
[OK]
步骤2:在路由器R2上配置接口的IP地址
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int f0/0
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int s0/0/1
R2(config-if)#ip address 172.16.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#end
R2#show ip route //查看路由表
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
R2#write //保存配置
Building configuration...
[OK]
步骤3:在路由器R3上配置接口的IP地址
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#int f0/0
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#int s0/0/1
R3(config-if)#ip address 172.16.2.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#end
R3#show ip route //查看路由表
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R3#write //保存配置
Building configuration...
[OK]
步骤4:在路由器R1上配置静态路由
R1>en
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.2
R1(config)#ip route 192.168.3.0 255.255.255.0 172.16.2.2
R1(config)#end
步骤5:在路由器R2上配置静态路由
R2>en
R2#config t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.1
R2(config)#end
步骤6:在路由器R3上配置静态路由
R3>en
R3#config t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.1
R3(config)#end
步骤7:查看路由表
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.2.0/24 [1/0] via 172.16.1.2
S 192.168.3.0/24 [1/0] via 172.16.2.2
步骤8:查看接口IP地址和配置文件
R1#show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 172.16.1.1 YES manual up up
Serial0/0/1 172.16.2.1 YES manual up up
Vlan1 unassigned YES unset administratively down down
步骤9:配置PC1、PC2、PC3的IP地址和网关
设备
IP地址
子网掩码
网关
PC1
192.168.1.5
255.255.255.0
192.168.1.1
PC2
192.168.2.5
255.255.255.0
192.168.2.1
PC3
192.168.3.5
255.255.255.0
192.168.3.1
步骤10:测试在PC1上分别ping PC2、PC3,是否正常通信
1) PC1 ping PC2
PC>ping 192.168.2.5
Pinging 192.168.2.5 with 32 bytes of data:
Reply from 192.168.2.5: bytes=32 time=14ms TTL=126
Reply from 192.168.2.5: bytes=32 time=1ms TTL=126
Reply from 192.168.2.5: bytes=32 time=1ms TTL=126
Reply from 192.168.2.5: bytes=32 time=1ms TTL=126
Ping statistics for 192.168.2.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 14ms, Average = 4ms
2) PC1 ping PC3
PC>ping 192.168.3.5
Pinging 192.168.3.5 with 32 bytes of data:
Reply from 192.168.3.5: bytes=32 time=2ms TTL=126
Reply from 192.168.3.5: bytes=32 time=3ms TTL=126
Reply from 192.168.3.5: bytes=32 time=9ms TTL=126
Reply from 192.168.3.5: bytes=32 time=3ms TTL=126
Ping statistics for 192.168.3.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 9ms, Average = 4ms
任务四:动态路由协议的配置
步骤1:在路由器R1上配置接口的IP地址
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int s0/0/1
R1(config-if)#clock rate 64000
R1(config-if)#ip address 172.16.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int s0/0/0
R1(config-if)#clock rate 64000
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#end
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R1#write
Building configuration...
[OK]
步骤2:在路由器R2上配置接口的IP地址
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int f0/0
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int s0/0/1
R2(config-if)#ip address 172.16.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int s0/0/0
R2(config-if)#ip address 172.16.3.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#end
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
R2#write
Building configuration...
[OK]
步骤3:在路由器R3上配置接口的IP地址
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#int f0/0
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#int s0/0/1
R3(config-if)#clock rate 64000
R3(config-if)#ip address 172.16.3.2 255.255.255.0
R3(config-if)#no
展开阅读全文