计算机与信息技术学院设计性实验报告
一、实验目的
通过对网络设备的连通和对拓扑的分析,加深对常见典型局域网拓扑的理解;通过路由建立起网络之间的连接,熟悉交换机、路由器的基本操作命令,了解网络路由的设计与配置。
二、实验仪器或设备
二层交换机五台、三层交换机一台, 路由器两台,学生实验主机五台及一台服务器
三、总体设计(设计原理、设计方案及流程等)
1、三层交换机上划分VLAN2 VLAN3 VLAN4 VLAN5 VLAN6并且配置DHCP。
2、物理学院、化学院最多分计算机有250台,生物政管学院最多有120台计算机和服务器,需要对生物和政管学院划分子网。
3、三层交换机和出口路由器Ri相连。
4、局域网内部三层交换机和路由器Ri间利用RIPv2实现全网互通。
5、pc0 pc1 pc2 pc3 的ip地址动态获得,对pc4配置ip 50.255.55.2
最后的连接图如下,实现了全网互通。
四、实验步骤(包括主要步骤、代码分析等)
1、 在三层交换机上划分出vlan2、vlan3、vlan4、vlan5、vlan6分别对应着物理、化学、生物、政管和校外,并配置相应的接口IP以及DHCP。
Switch>en
Switch#config ter
S0# vlan 2
S0(config-vlan)#exit
S0#vlan 3
S0(config-vlan)#exit
S0#vlan 4
S0(config-vlan)#exit
S0#vlan 5
S0(config-vlan)#exit
S0#vlan 6
S0(config-vlan)#exit
S0(config)#int f0/2
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 2
S0(config-if)#exit
S0(config)#int vlan 3
S0(config-if)#ip add 210.42.243.1 255.255.255.0
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/3
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 3
S0(config-if)#exit
S0(config)#int vlan 4
S0(config-if)#ip add 210.42.244.1 255.255.255.128
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/4
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 4
S0(config-if)#exit
S0(config)#int vlan 5
S0(config-if)#ip add 210.42.244.129 255.255.255.128
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/5
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 5
S0(config-if)#exit
S0(config)#int vlan 6
S0(config-if)#ip add 192.168.1.1 255.255.255.0
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/1
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 6
给三层交换机配置DHCP
S0(config)#ip dhcp pool wuli
S0(dhcp-config)#net 210.42.242.0 255.255.255.0 S0(dhcp-config)#default-router 210.42.242.1
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
S0(config)#ip dhcp pool huaxue
S0(dhcp-config)#net 210.42.243.0 255.255.255.0 S0(dhcp-config)#default-router 210.42.243.1
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
S0(config)#ip dhcp pool shengwu
S0(dhcp-config)#net 210.42.244.0 255.255.255.128 S0(dhcp-config)#default-router 210.42.244.1
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
S0(config)#ip dhcp pool zhengguan
S0(dhcp-config)#net 210.42.244.128 255.255.255.128
S0(dhcp-config)#default-router 210.42.244.129
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
在三层交换机上配置RIP-2
S0(config)#route rip
S0(config-router)#net 192.168.1.0
S0(config-router)#net 210.42.242.0
S0(config-router)#net 210.42.243.0
S0(config-router)#net 210.42.244.0
S0(config-router)#net 210.42.244.129
S0(config-router)#exit
S0(config)#router rip
S0(config-router)#version 2
S0(config-router)#no auto-summary
S0(config-router)#exit
三层交换机路由表
Switch#sh 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
50.0.0.0/24 is subnetted, 1 subnets
R 50.255.55.0 [120/2] via 192.168.1.2, 00:00:05, Vlan6
C 192.168.1.0/24 is directly connected, Vlan6
R 210.42.240.0/24 [120/1] via 192.168.1.2, 00:00:05, Vlan6 R 210.42.241.0/24 [120/1] via 192.168.1.2, 00:00:05, Vlan6
C 210.42.242.0/24 is directly connected, Vlan2
C 210.42.243.0/24 is directly connected, Vlan3
210.42.244.0/25 is subnetted, 2 subnets
C 210.42.244.0 is directly connected, Vlan4
C 210.42.244.128 is directly connected, Vlan5
2、 对Ri进行配置
Ri(config)#int f0/0
Ri(config-if)#ip add 210.42.241.1 255.255.255.0
Ri(config-if)#no sh
Ri(config-if)#exit
Ri(config)#int f0/1
Ri(config-if)#ip add 192.168.1.2 255.255.255.0
Ri(config-if)#no sh
Ri(config)#int s1/0
Ri(config-if)#ip add 210.42.240.1 255.255.255.0
Ri(config-if)#no sh
Ri(config-if)#clock rate 64000
Ri(config-if)#exit
在Ri交换机上配置RIP-2
Ri(config)#router rip
Ri(config-router)#net 192.168.1.0
Ri(config-router)#net 210.42.241.0
Rir(config-router)#net 210.42.240.0
Ri(config-router)#router rip
Ri(config-router)#version 2
Ri(config-router)#no auto-summary
Ri(config-router)#exit
Ri的路由表
Router#sh 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
50.0.0.0/24 is subnetted, 1 subnets
R 50.255.55.0 [120/1] via 210.42.240.2, 00:00:13, Serial1/0
C 192.168.1.0/24 is directly connected, FastEthernet0/1
C 210.42.240.0/24 is directly connected, Serial1/0
C 210.42.241.0/24 is directly connected, FastEthernet0/0
R 210.42.242.0/24 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
R 210.42.243.0/24 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
210.42.244.0/25 is subnetted, 2 subnets
R 210.42.244.0 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
R 210.42.244.128 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
3、 对Rj进行配置
Rj>enable
Rj#config
Rj(config)#int f0/0
Rj(config-if)#ip add 50.255.55.1 255.0.0.0
Rj(config-if)#no sh
Rj(config-if)#exit
Rj(config)#int s1/0
Rj(config-if)#ip add 210.42.240.2 255.255.255.0
Rj(config-if)#no sh
在Rj交换机上配置RIP-2
Rj(config)#router rip
Rj(config-router)#net 50.255.55.0
Rj(config-router)#net 210.42.240.0
Rj(config-router)#router rip
Rj(config-router)#version 2
Rj(config-router)#no auto-summary
Rj(config-router)#exit
Rj的路由表
Router#sh 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
50.0.0.0/24 is subnetted, 1 subnets
C 50.255.55.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 210.42.240.1, 00:00:23, Serial1/0
C 210.42.240.0/24 is directly connected, Serial1/0
R 210.42.241.0/24 [120/1] via 210.42.240.1, 00:00:23, Serial1/0 R 210.42.242.0/24 [120/2] via 210.42.240.1, 00:00:23, Serial1/0 R 210.42.243.0/24 [120/2] via 210.42.240.1, 00:00:23, Serial1/0 210.42.244.0/25 is subnetted, 2 subnets
R 210.42.244.0 [120/2] via 210.42.240.1, 00:00:23, Serial1/0 R 210.42.244.128 [120/2] via 210.42.240.1, 00:00:23, Serial1/0
4、 配置电脑IP地址
Pc0,pc1,pc2,pc3是通过dhcp来自动获取地址。
Pc4用dhcp获取ip地址失败了,所以我改为了静态的ip地址
Ip:50.255.55.2
Subnet mask:255.0.0.0
Default gateway:50.255.55.1
DNS server:50.255.50.1
五、结果分析与总结
PC0获取的IP地址:
PC1的IP的地址:
PC2的IP地址:
PC3的IP地址:
通过PC0与校内的电脑PC1进行ping:
用PC1与校外网PC4进行
ping:
用校外PC4与校内PC2进行ping:
PC0,PC1,PC2,PC3,PC4两两之间都实现了互通,这里就不再一一展示赘述。 总结:
1.做实验的过程的讲过的实验报告可以作为参考
2.由于每个vlan有接入计算机数目的限制,所以计算机在分配ip地址时,要注意子网掩码的设置,已保证达到相应的目标。
2.实验比较复杂,细节比较多,做实验的时候有耐心;
3.在对pc4进行dhcp设置时,对Rj输入了相应的代码:
Rj(config)#ip dhcp pool xioawai
Rj (dhcp-config)#net 50.255.55.0 255.0.0.0 Rj(dhcp-config)#default-router 50.255.55.1
Rj(dhcp-config)#dns 50.255.50.1
Rj(dhcp-config)#exit
但是获取dhcp失败了,所以进行了静态ip地址配置,在课下还应该对查找资料,争取弄明白。
4.做的过程中应该认真仔细,一个符号的错误就可能导致运行不出来,养成细心的习惯;
教师签名:
2014年 月 日
计算机与信息技术学院设计性实验报告
一、实验目的
通过对网络设备的连通和对拓扑的分析,加深对常见典型局域网拓扑的理解;通过路由建立起网络之间的连接,熟悉交换机、路由器的基本操作命令,了解网络路由的设计与配置。
二、实验仪器或设备
二层交换机五台、三层交换机一台, 路由器两台,学生实验主机五台及一台服务器
三、总体设计(设计原理、设计方案及流程等)
1、三层交换机上划分VLAN2 VLAN3 VLAN4 VLAN5 VLAN6并且配置DHCP。
2、物理学院、化学院最多分计算机有250台,生物政管学院最多有120台计算机和服务器,需要对生物和政管学院划分子网。
3、三层交换机和出口路由器Ri相连。
4、局域网内部三层交换机和路由器Ri间利用RIPv2实现全网互通。
5、pc0 pc1 pc2 pc3 的ip地址动态获得,对pc4配置ip 50.255.55.2
最后的连接图如下,实现了全网互通。
四、实验步骤(包括主要步骤、代码分析等)
1、 在三层交换机上划分出vlan2、vlan3、vlan4、vlan5、vlan6分别对应着物理、化学、生物、政管和校外,并配置相应的接口IP以及DHCP。
Switch>en
Switch#config ter
S0# vlan 2
S0(config-vlan)#exit
S0#vlan 3
S0(config-vlan)#exit
S0#vlan 4
S0(config-vlan)#exit
S0#vlan 5
S0(config-vlan)#exit
S0#vlan 6
S0(config-vlan)#exit
S0(config)#int f0/2
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 2
S0(config-if)#exit
S0(config)#int vlan 3
S0(config-if)#ip add 210.42.243.1 255.255.255.0
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/3
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 3
S0(config-if)#exit
S0(config)#int vlan 4
S0(config-if)#ip add 210.42.244.1 255.255.255.128
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/4
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 4
S0(config-if)#exit
S0(config)#int vlan 5
S0(config-if)#ip add 210.42.244.129 255.255.255.128
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/5
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 5
S0(config-if)#exit
S0(config)#int vlan 6
S0(config-if)#ip add 192.168.1.1 255.255.255.0
S0(config-if)#no sh
S0(config-if)#exit
S0(config)#int f0/1
S0(config-if)#sw mod acc
S0(config-if)#sw acc vlan 6
给三层交换机配置DHCP
S0(config)#ip dhcp pool wuli
S0(dhcp-config)#net 210.42.242.0 255.255.255.0 S0(dhcp-config)#default-router 210.42.242.1
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
S0(config)#ip dhcp pool huaxue
S0(dhcp-config)#net 210.42.243.0 255.255.255.0 S0(dhcp-config)#default-router 210.42.243.1
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
S0(config)#ip dhcp pool shengwu
S0(dhcp-config)#net 210.42.244.0 255.255.255.128 S0(dhcp-config)#default-router 210.42.244.1
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
S0(config)#ip dhcp pool zhengguan
S0(dhcp-config)#net 210.42.244.128 255.255.255.128
S0(dhcp-config)#default-router 210.42.244.129
S0(dhcp-config)#dns 192.168.3.1
S0(dhcp-config)#exit
在三层交换机上配置RIP-2
S0(config)#route rip
S0(config-router)#net 192.168.1.0
S0(config-router)#net 210.42.242.0
S0(config-router)#net 210.42.243.0
S0(config-router)#net 210.42.244.0
S0(config-router)#net 210.42.244.129
S0(config-router)#exit
S0(config)#router rip
S0(config-router)#version 2
S0(config-router)#no auto-summary
S0(config-router)#exit
三层交换机路由表
Switch#sh 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
50.0.0.0/24 is subnetted, 1 subnets
R 50.255.55.0 [120/2] via 192.168.1.2, 00:00:05, Vlan6
C 192.168.1.0/24 is directly connected, Vlan6
R 210.42.240.0/24 [120/1] via 192.168.1.2, 00:00:05, Vlan6 R 210.42.241.0/24 [120/1] via 192.168.1.2, 00:00:05, Vlan6
C 210.42.242.0/24 is directly connected, Vlan2
C 210.42.243.0/24 is directly connected, Vlan3
210.42.244.0/25 is subnetted, 2 subnets
C 210.42.244.0 is directly connected, Vlan4
C 210.42.244.128 is directly connected, Vlan5
2、 对Ri进行配置
Ri(config)#int f0/0
Ri(config-if)#ip add 210.42.241.1 255.255.255.0
Ri(config-if)#no sh
Ri(config-if)#exit
Ri(config)#int f0/1
Ri(config-if)#ip add 192.168.1.2 255.255.255.0
Ri(config-if)#no sh
Ri(config)#int s1/0
Ri(config-if)#ip add 210.42.240.1 255.255.255.0
Ri(config-if)#no sh
Ri(config-if)#clock rate 64000
Ri(config-if)#exit
在Ri交换机上配置RIP-2
Ri(config)#router rip
Ri(config-router)#net 192.168.1.0
Ri(config-router)#net 210.42.241.0
Rir(config-router)#net 210.42.240.0
Ri(config-router)#router rip
Ri(config-router)#version 2
Ri(config-router)#no auto-summary
Ri(config-router)#exit
Ri的路由表
Router#sh 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
50.0.0.0/24 is subnetted, 1 subnets
R 50.255.55.0 [120/1] via 210.42.240.2, 00:00:13, Serial1/0
C 192.168.1.0/24 is directly connected, FastEthernet0/1
C 210.42.240.0/24 is directly connected, Serial1/0
C 210.42.241.0/24 is directly connected, FastEthernet0/0
R 210.42.242.0/24 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
R 210.42.243.0/24 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
210.42.244.0/25 is subnetted, 2 subnets
R 210.42.244.0 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
R 210.42.244.128 [120/1] via 192.168.1.1, 00:00:03, FastEthernet0/1
3、 对Rj进行配置
Rj>enable
Rj#config
Rj(config)#int f0/0
Rj(config-if)#ip add 50.255.55.1 255.0.0.0
Rj(config-if)#no sh
Rj(config-if)#exit
Rj(config)#int s1/0
Rj(config-if)#ip add 210.42.240.2 255.255.255.0
Rj(config-if)#no sh
在Rj交换机上配置RIP-2
Rj(config)#router rip
Rj(config-router)#net 50.255.55.0
Rj(config-router)#net 210.42.240.0
Rj(config-router)#router rip
Rj(config-router)#version 2
Rj(config-router)#no auto-summary
Rj(config-router)#exit
Rj的路由表
Router#sh 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
50.0.0.0/24 is subnetted, 1 subnets
C 50.255.55.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 210.42.240.1, 00:00:23, Serial1/0
C 210.42.240.0/24 is directly connected, Serial1/0
R 210.42.241.0/24 [120/1] via 210.42.240.1, 00:00:23, Serial1/0 R 210.42.242.0/24 [120/2] via 210.42.240.1, 00:00:23, Serial1/0 R 210.42.243.0/24 [120/2] via 210.42.240.1, 00:00:23, Serial1/0 210.42.244.0/25 is subnetted, 2 subnets
R 210.42.244.0 [120/2] via 210.42.240.1, 00:00:23, Serial1/0 R 210.42.244.128 [120/2] via 210.42.240.1, 00:00:23, Serial1/0
4、 配置电脑IP地址
Pc0,pc1,pc2,pc3是通过dhcp来自动获取地址。
Pc4用dhcp获取ip地址失败了,所以我改为了静态的ip地址
Ip:50.255.55.2
Subnet mask:255.0.0.0
Default gateway:50.255.55.1
DNS server:50.255.50.1
五、结果分析与总结
PC0获取的IP地址:
PC1的IP的地址:
PC2的IP地址:
PC3的IP地址:
通过PC0与校内的电脑PC1进行ping:
用PC1与校外网PC4进行
ping:
用校外PC4与校内PC2进行ping:
PC0,PC1,PC2,PC3,PC4两两之间都实现了互通,这里就不再一一展示赘述。 总结:
1.做实验的过程的讲过的实验报告可以作为参考
2.由于每个vlan有接入计算机数目的限制,所以计算机在分配ip地址时,要注意子网掩码的设置,已保证达到相应的目标。
2.实验比较复杂,细节比较多,做实验的时候有耐心;
3.在对pc4进行dhcp设置时,对Rj输入了相应的代码:
Rj(config)#ip dhcp pool xioawai
Rj (dhcp-config)#net 50.255.55.0 255.0.0.0 Rj(dhcp-config)#default-router 50.255.55.1
Rj(dhcp-config)#dns 50.255.50.1
Rj(dhcp-config)#exit
但是获取dhcp失败了,所以进行了静态ip地址配置,在课下还应该对查找资料,争取弄明白。
4.做的过程中应该认真仔细,一个符号的错误就可能导致运行不出来,养成细心的习惯;
教师签名:
2014年 月 日