信息工程系
综合实训报告二
项目名称: 网络设备管理
系 部: 信息工程系
班 级: 09网络
姓 名:
学 号:
**** * *
2010年 12 月 31 日
项目二
实验背景:
本网络模拟一个实际的校园网络,包括教学网、行政网、网络中心等几个部分。其中,虚线框内部分不需要进行配置。RTA 的Fa0/0使用子接口,其中有一 个子接口和 ISP 在一个 VLAN,另外一个和 RTB 在一个 VLAN。校内的主机全部使用私有地址,通过在出口路由器上使用地址转换技术访问公网。请根据以上要求在网络设备上进行实际操作,完成网络搭建、IP 地址规划,路由协议、网络安全与冗余等配置任务。
任务要求
1、 网络搭建
在上述网络拓扑图中:RTA的 Fa0/0连接到交换机SW1的接口 Fa0/1;RTB 的Fa0/0连接交换机SW1的 Fa0/2; RTC的 Fa0/1连接交换机SW1的 Fa0/3; SW1 和SW2之间使用各自的 Fa0/24连接。根据图 1的网络拓扑及上述要求,完成网络搭建工作。
另外,每一组提供两台计算机,为后面的数据配置和网络测试提供终端,可以根据实际需要,与相应的网络设备连接。
2、 IP地址规划
校园网内用户使用172.16.0.0/22地址段,其中各个子网内主机数如下:
教学网:360台
行政网:150台
网络中心:100台
在满足整个网络需求的情况下,使用VLSM进行地址划分,行政网两个冗余网关分别使用该网段的第一个和第二个可用 IP 地址,其余子网网关均使用该网段第一个可用IP地址,并要求对所有网络设备可以进行远程管理。
网区 | 反码 | 子网掩码 | 可用地址范围 |
网络中心 | 0.0.0.127 | 255.255.255.128 | 172.16.3.1-172.16.3.126 |
教学网 | 0.0.1.255 | 255.255.254.0 | 172.16.0.1-172.16.1.253 |
行政网 | 0.0.0.255 | 255.255.255.0 | 172.16.2.1-172.16.2.254 |
3、VLAN 配置
根据下表完成VLAN配置和端口分配。
VLAN编号 | 名称 | 说明 | 端口映射 |
VLAN10 | nic | 网络中心 | SW2,Fa0/1~Fa0/8 |
VLAN20 | edu | 教学网 | SW2,Fa0/9~Fa0/168 |
VLAN1 | mgmt | 管理VLAN |
4、 路由配置
在路由器上配置实现学校内部 VLAN 间路由,要求路由器的子接口号与 VLAN编号一致。路由器RTC作为除行政网之外其它子网的网关,并与RTB一 起作为行政网的网关。路由器之间使用单区域OSPF协议。要求 RTB在行政网中被选举为DR。
请利用相关的命令在RTA和 RTB上显示邻居关系,并将结果拷屏保存到测试结果文件中的相应位置。
请在网络中心主机上测试到达路由器 RTA 的 Fa0/1 的连通性,并将结果拷 屏保存到测试结果文件中的相应位置。
RTA为连接到的出口路由器,与ISP之间运行RIP;采用路由重分布的 方式将路由导入到内网OSPF中。
请在网络中心主机上测试到达路由器ISP Loopback0的连通性,并将结果拷屏保存到测试结果文件中的相应位置。
5、 设备安全访问设置
按照下表为网络设备配置相应密码。
设备名称(主机名) | 对系统配置权限的密码 | VTY密码 |
RTA | network | 12345 |
RTB | network | 12345 |
RTC | network | 12345 |
SW1 | network | 12345 |
SW2 | network | 12345 |
在适当的路由器上设置 ACL,完成访问控制。在满足下述要求的前提下, 允许所有网络之间的其他通信。
1、禁止所有从网络中心到教学网的主动TCP 连接。
2、允许内部网络的主机主动发起到外部网络的访问连接;禁止外部网络主 动发起到内部网络的访问连接,但允许外部网络访问内部的 WWW、FTP服务。
请在网络中心主机上测试到达教学网主机的连通性, 并将结果拷屏保存到测 试结果文件中的相应位置。
7、 网络可靠性实现
在适当的路由器上配置VRRP,实现行政网内主机的网关冗余。在正常情况 下,行政网内主机的数据流经由 RTC 转发;当 RTC 或 RTC 的上行链路发生故障时,行政网主机的数据流需经由 RTB 转发,并且故障恢复后,主机的数据流 又由RTC转发。
请模拟当特定接口出故障时,VRRP协议能按预期工作,并将结果拷屏保存 到测试结果文件中的相应位置。
请模拟当故障恢复时,VRRP协议仍能按预期工作,并将结果拷屏保存到测 试结果文件中的相应位置。
8、 网络地址转换规划与配置
根据下表给定的公网地址在适当的路由器上配置 NAT,要求内网除 WWW 和 FTP 服务器外所有地址均 NAT 转换到 RTA 的 Fa0/0 连接 ISP 的子接口上。 WWW和 FTP服务器使用静态NAT实现。
名称 | 地址 |
RTAFa0/0连接ISP的子接口 | 202.207.X.1/24 |
ISPFa0/0 | 202.207.X.254/2410 |
WWW服务器 | 202.207.X.41/24 |
FTP服务器 | 202.207.X.81/24 |
拓扑图:
基本配置:
1.SW1的配置
Switch>ena
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host SW1
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
SW1(config-vlan)#exit
SW1(config)#int range f0/1-3
SW1(config-if-range)#sw mode trunk
SW1(config-if-range)#exit
SW1(config)#int f0/24
SW1(config-if)#sw mode trunk
SW1(config)#int vlan 1
SW1(config-if)#ip add 172.16.0.10 255.255.254.0
SW1(config-if)#no shut
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SW1(config-if)#exit
SW1(config)#enable password 123
SW1(config)#line vty 0 4
SW1(config-line)#password 123
SW1(config-line)#login
SW1(config-line)#end
2.SW2的配置
Switch>
Switch>ena
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host SW2
SW2(config)#vlan 10
SW2(config-vlan)#vlan 30
SW2(config-vlan)#exit
SW2(config)#int vlan 1
SW2(config-if)#ip add 172.16.3.10 255.255.255.128
SW2(config-if)#no shut
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
SW2(config-if)#exit
SW2(config)#int f0/24
SW2(config-if)#sw mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
SW2(config-if)#exit
SW2(config)#enable password 123
SW2(config)#line vty 0 4
SW2(config-line)#password 123
SW2(config-line)#login
SW1(config)#int range f0/1-2
SW1(config-if-range)#sw acc vlan 10
SW1(config-if-range)#exit
SW1(config)#int range f0/3-4
SW1(config-if-range)#sw acc vlan 20
SW1(config-if-range)#end
SW2(config-line)#end
3.RTA的配置
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host RTA
RTA(config)#int s1/0
RTA(config-if)#ip add 202.99.1.2 255.255.255.252
RTA(config-if)#no shut
RTA(config-if)#exit
RTA(config)#int s1/1
RTA(config-if)#ip add 202.99.2.2 255.255.255.252
RTA(config-if)#no shut
RTA(config)#enable password 123
RTA(config)#line vty 0 4
RTA(config-line)#password 123
RTA(config-line)#login
RTA(config)#int f0/1
RTA(config-if)#ip add 192.168.5.200 255.255.255.0
RTA(config-if)#no shut
RTA(config-if)#end
4.RTB的配置
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host RTB
RTB(config)#enable password 123
RTB(config)#line vty 0 4
RTB(config-line)#password 123
RTB(config-line)#login
RTB(config-line)#exit
RTB(config)#int f0/0
RTB(config-if)#ip add 172.16.2.2 255.255.255.0
RTB(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
RTB(config-if)# exit
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
RTB(config)#int s1/1
RTB(config-if)#ip add 202.99.2.1 255.255.255.252
RTB(config-if)#no shut
5.RTC的配置
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host RTC
RTC (config)#int f0/0
RTC (config-if)#ip add 172.16.2.1 255.255.255.0
RTC (config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
RTC (config-if)#exit
RTC (config)#int s1/0
RTC (config-if)#ip add 202.99.1.1 255.255.255.252
RTC (config-if)#no shut
%LINK-5-CHANGED: Interface Serial1/0, changed state to down
RTC (config-if)#exit
RTC(config)#enable password 123
RTC(config)#line vty 0 4
RTC(config-line)#password 123
RTC(config-line)#login
RTC(config-line)#end
6.单臂路由的配置
RTA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTA(config)#int f0/0
RTA(config-if)#no shut
RTA(config-if)#exit
RTA(config)#int f0/0.1
RTA(config-subif)#description vlan 10
RTA(config-subif)#encapsulation dot1Q 10
RTA(config-subif)#ip add 172.16.3.1 255.255.255.128
RTA(config-subif)#no shut
RTA(config-subif)#exit
RTA(config)#int f0/0.2
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
RTA(config-subif)#description vlan 20
RTA(config-subif)#encapsulation dot1Q 20
RTA(config-subif)#ip add 172.16.0.1 255.255.254.0
RTA(config-subif)#no shut
RTA(config-subif)#end
单臂路由检测
7.内网ospf的配置
RTA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTA(config)#route ospf 1
RTA(config-router)#net 202.99.2.0 0.0.0.3 area 0
RTA(config-router)#net 202.99.1.0 0.0.0.3 area 0
RTA(config-router)#net 172.16.0.0 0.0.1.255 area 0
RTA(config-router)#net 172.16.3.0 0.0.0.127 area 0
RTA(config-router)#net 192.168.5.0 0.0.0.255 area 0
RTA(config-router)#end
RTB#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTB(config)#route ospf 1
RTB(config-router)#net 172.168.2.0 0.0.0.255 area 0
RTB(config-router)#net 202.99.2.0 0.0.0.3 area 0
RTB(config-router)#end
RTC#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTC(config)#route ospf 1
RTC(config-router)#net 172.16.2.0 0.0.0.255 area 0
RTC(config-router)#net 202.99.1.0 0.0.0.3 area 0
RTC(config-router)#end
缺省路由的配置
RTA#config
Configuring from terminal, memory, or network [terminal]?
RTA(config)#ip route 0.0.0.0 0.0.0.0 f0/1
RTA(config)#ip route 0.0.0.0 0.0.0.0 s1/1
RTA(config)#ip route 0.0.0.0 0.0.0.0 s1/0
RTA(config)#end
RTB#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTB(config)#ip route 0.0.0.0 0.0.0.0 s1/1
RTB(config)#end
RTC#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTC(config)#ip route 0.0.0.0 0.0.0.0 s1/0
RTC(config)#end
查看路由表
RTA
RTB
RTC
8.ACL配置
1、禁止所有从网络中心到教学网的主动TCP 连接。
2、允许内部网络的主机主动发起到外部网络的访问连接;禁止外部网络主动发起到内部网络的访问连接,但允许外部网络访问内部的 WWW、FTP服务。
RTA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTA(config)#access-list 101 deny tcp 172.16.3.0 0.0.0.255 host 172.16.0.3 eq www
RTA(config)#int f0/0.2
RTA(config-subif)#ip access-group 101 out
RTA(config-subif)#int f0/0.1
RTA(config-subif)#ip access-group 1 in
RTA(config-subif)#end
RTA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTA(config)#access-list 5 deny 192.168.5.0 0.0.0.255
RTA(config)#access-list 103 permit tcp any host 172.16.0.3 eq 80
RTA(config)#access-list 103 permit tcp any host 172.16.0.3 eq 21
RTA(config-subif)#int f0/1
RTA(config-subif)#ip access-group 103 in
RTA(config-subif)#int f0/0.1
RTA(config-subif)#ip access-group 5 out
RTA(config-subif)#int f0/0.2
RTA(config-subif)#ip access-group 5 out
RTA(config-subif)#int s2/0
RTA(config-subif)#ip access-group 5 out
RTA(config-subif)#int s3/0
RTA(config-subif)#ip access-group 5 out
RTA(config-subif)#end
9.NATP配置
RTA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTA(config)#int f0/1
RTA(config-if)#ip nat outside
RTA(config-if)#exit
RTA(config)#int f0/0.1
RTA(config-subif)#ip nat inside
RTA(config-subif)#exit
RTA(config)#int f0/0.2
RTA(config-subif)#ip nat inside
RTA(config-subif)#int s2/0
RTA(config-if)#ip nat in
RTA(config-if)#int s3/0
RTA(config-if)#ip nat in
RTA(config-if)#exit
RTA(config)#ip nat pool wyq 192.168.5.200 192.168.5.220 netmask 255.255.255.0
RTA(config)#access-list 1 permit any
RTA(config)#ip nat inside source list 1 pool wyq overload
RTA(config)#end
NATP检测
10.配置VRRP
RTC#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTC(config)#int f0/0
RTC(config-if)#vrrp 32 ip 172.16.2.254
RTC(config-if)#end
RTB#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTB(config)#int f0/0
RTB(config-if)#vrrp 32 ip 172.16.2.254
RTB(config-if)#vrrp 32 priority 120
RTB(config-if)#vrrp 32 track s3/0 30
RTB(config-if)#end
VRRP的检测
当所有链路都是好的情况下
当断开链路S3/0后
11.个人体会及收获
短暂的实训课就结束了,从中我学到了许多东西,从书本上的知
识运用到实际动手操作上来,收获颇多在进行实训的过程中,我真正
学到了计算机教科书上所没有或者真正用到了课本上的知识,这样,既巩固了旧知识,又掌握了新知识。不仅提高了自己的动手能力,更体会到了团体合作的精神。更加深入的了解了计算机网络技术的实际应用。为我们将来的实践打下了良好的基础。
12.老师评语及成绩
老师评语:___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
成绩:________