实训要求:
1.按照题目要求进行网络拓扑图设计;
2.对题目中的拓扑图正确连线,并使所有连线up; 3.能够对交换机或路由器添加或删除模块; 4.对各主机能够进行IP设置。
图示:
如图完成任务要求
一 对Switch0进行配置: Switch>en Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 10
Switch(config-vlan)#exi
Switch(config)#interface fa 0/2
Switch(config-if)#switchport access vlan 10 Switch(config-if)#exi
Switch(config)#interface fa 0/1
Switch(config-if)#switchport mode trunk Switch(config-if)#exi
Switch(config)#interface fa 0/3
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if)#exi Switch(config)#end
%SYS-5-CONFIG_I: Configured from console by console Switch#wr
Building configuration... [OK]
二 对Switch1进行配置:
Switch>en Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 10 Switch(config-vlan)#exi Switch(config)#vlan 20 Switch(config-vlan)#exi
Switch(config)#interface fa 0/2
Switch(config-if)#switchport access vlan 10 Switch(config-if)#exi
Switch(config)#interface fa 0/3
Switch(config-if)#switchport access vlan 20 Switch(config-if)#exi
Switch(config)#interface fa 0/1
Switch(config-if)#switchport mode trunk Switch(config-if)#exi Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#wr
Building configuration... [OK]
三 对Router0进行配置:
Continue with configuration dialog? [yes/no]: no Press RETURN to get started! Router>en Router#conf t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface fa 0/1
Router(config-if)#ip add 192.168.12.1 255.255.255.0 Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exi
Router(config)#interface fa 0/0 Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exi
Router(config)#interface fa 0/0.1
%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip add 192.168.1.1 255.255.255.0 Router(config-subif)#no shutdown Router(config-subif)#exi
Router(config)#interface fa 0/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
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip add 192.168.2.1 255.255.255.0 Router(config-subif)#no shutdown Router(config-subif)#exi Router(config)#router rip
Router(config-router)#network 192.168.12.0 Router(config-router)#network 192.168.1.0 Router(config-router)#network 192.168.2.0 Router(config-router)#end Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#wr
Building configuration... [OK]
四 对Multilayer Switch0进行配置:
Switch>en Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 30 Switch(config-vlan)#exi Switch(config)#vlan 40 Switch(config-vlan)#exi
Switch(config)#interface fa 0/1
Switch(config-if)#switchport access vlan 30 Switch(config-if)#exi
Switch(config)#interface fa 0/2
Switch(config-if)#switchport access vlan 40 Switch(config-if)#exi
Switch(config)#interface vlan 30
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up Switch(config-if)#ip add 192.168.12.2 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#exi
Switch(config)#interface vlan 40
%LINK-5-CHANGED: Interface Vlan40, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up Switch(config-if)#ip add 192.168.4.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#exi Switch(config)#router rip
Switch(config-router)#network 192.168.12.0 Switch(config-router)#network 192.168.4.0 Switch(config-router)#end Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#wr
Building configuration... [OK]
Ping 192.168.1.10
Ping 192.168.2.10
综合训练二
一、实验目的和实验环境
1、学习交换机配置世纪网络建设中的使用; 2、学习以交换机为主的局域网规划和设计; 3、学习配置VTP、划分VLAN等交换机配置; 4、学习配置单臂路由。
实验环境为网络实验室或PT5.3模拟系统。 二、案例说明
某学校需要建设一个网络,具体要求如下: 1、有A、B两个楼要建设网络;
2、A楼有办公和教务,1楼只有办公; 3、B楼有学生和办公;
4、要求学生不能访问办公。
(暂不考虑每个功能区域的计算机数量) 三、网络设计 1、拓扑结构设计
(为简化实验,这里只设置了具有代表性的PC)
2、VLAN规划
VLAN 10 20 30 NAME BANGONG JIAOWU XUESHENG 地址 192.168.1.0 192.168.2.0 192.168.3.0 MASK 255.255.255.0 255.255.255.0 255.255.255.0 GATEWAY 192.168.1.1 192.168.2.1 192.168.3.1 3、 交换机和路由器端口规划
(1)交换机SW0
PORT F0/1 F0/2 F0/3-23 F0/24 (2)、交换机SW-A-2
PORT F0/1 F0/2 F0/3 F0/4 F0/5 F0/6-24 (3)、交换机SW-A-1
PORT F0/1 F0/2 F0/3 F0/4-24 (4)、交换机SW-B
目标 SW-A-2-F0/1 SW-B 禁用 R0-F0/0 目标 SW0-F0/1 SW-A-1-F0/1 禁用 PC-BG2 PC-JW1 禁用 目标 SW-A-2-F0/2 禁用 PC-BG1 禁用 所属VLAN TRUNK TRUNK TRUNK 所属VLAN TRUNK TRUNK VLAN 10 VLAN 20 所属VLAN TRUNK VLAN 10 PORT F0/1 F0/2 F0/3 F0/4 F0/5-24 (5)路由器R0
PORT F0/0 目标 SW0-F0/2 禁用 PC-BG3 PC-XS1 禁用 目标 SW0-F0/24 所属VLAN TRUNK VLAN 10 VLAN 30 4、IP地址分配
设备或端口 PC-BG1 IP地址 192.168.1.10 子网掩码 255.255.255.0 网关 192.168.1.1 PC-BG2 PC-BG3 PC-JW1 PC-XS1 R0-F0/0.10 R0-F0/0.20 R0-F0/0.30 192.168.1.11 192.168.1.12 192.168.2.10 192.168.3.10 192.168.1.1 192.168.2.1 192.168.3.1 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 192.168.1.1 192.168.1.1 192.168.2.1 192.168.3.1 四、实验步骤 1、连接网络
按照设计的拓扑结构图连接网络。 2、修改设备名称、设置访问密码
(1)将每个设备名称修改为规划的名称,以便后面的设备配置。 Switch(config)#hostname SW-A-1 SW-A-1(config)#
(2)设置设备的访问密码(为了实验方便,密码统一设置为lit)。 3、配置计算机的IP地址
按照规划配置每台PC的IP地址,并使用ping命令测试相互之间的连通情况,记录结果。
PC及目标 BG1-BG2 BG1-BG3 BG2-BG3 连通情况 PC及目标 JW1-BG1 JW1-BG2 JW1-BG3 连通情况 PC及目标 XS1-BG1 XS1-BG2 XS1-BG3 XS1-JW1 连通情况 4、配置交换机的TRUNK端口 按照规划,将所有需要设置为TRUNK的端口配置为TRUNK模式。 SW0(config)#int f0/1
SW0(config-if)#switchport mode trunk 5、配置交换机的VTP模式
(1)在每个交换机上查看当前VTP状态; SW-A-1#show vtp status
(2)配置交换机的VTP模式,将SW0和SW-A-2设置为VTP server、SWB和SW-A-1设置为VTP client。
SW0(config)#vtp mode server
Setting device to VTP SERVER mode.
SW0(config)#vtp domain VTP1 VTP域名设置只在SW0上进行就可
以了,其它交换机不用设置。
Domain name already set to VTP1. SW-A-1(config)#vtp mode client
Setting device to VTP CLIENT mode.
(3)再次在每个交换机上查看当前VTP状态,找出变化并记录。 6、创建VLAN
(1)查看每台交换机的VLAN情况; SW0#show vlan bri
(2)在SW0或SW-A-2上创建VLAN; SW0(config)#vlan 10
SW0(config-vlan)#name BANGONG SW0(config-vlan)#exit SW0(config)#vlan 20
SW0(config-vlan)#name JIAOWU SW0(config-vlan)#exit SW0(config)#vlan 30
SW0(config-vlan)#name XUESHENG SW0(config-vlan)#end
(3)查看每台交换机的VLAN情况,并记录。 7、将交换机端口划分到VLAN并禁用不用的端口 (1)将交换机端口划分到VLAN
SW-A-2(config)#int f0/4
SW-A-2(config-if)#switchport mode access SW-A-2(config-if)#switchport access vlan 10 SW-A-2(config-if)#exit
SW-A-2(config)#int f0/4
SW-A-2(config-if)#switchport mode access SW-A-2(config-if)#switchport access vlan 10 SW-A-2(config-if)#exit (2)禁用不用的端口
SW-A-2(config)#int f0/3
SW-A-2(config-if)#shutdown SW-A-2(config-if)#exit
SW-A-2(config)#int range f0/6-24 SW-A-2(config-if-range)#shutdown SW-A-2(config-if-range)#end SW-A-2(config)#
(3)查看VLAN配置情况和端口状态,记录结果 SW-A-2#show vlan bri SW-A-2#show ip int bri
8、配置VTP修剪(因为PT不支持修剪功能,本部分只能在网络实验室完成) 9、配置单臂路由
(1)配置子端口的VLAN和IP地址
R0(config)#int f0/0.10
R0(config-subif)#encapsulation dot1Q 10
R0(config-subif)#ip address 192.168.1.1 255.255.255.0 R0(config-subif)#no shutdown
R0(config)#int f0/0.20
R0(config-subif)#encapsulation dot1Q 20
R0(config-subif)#ip address 192.168.2.1 255.255.255.0 R0(config-subif)#no shutdown
R0(config)#int f0/0.30
R0(config-subif)#encapsulation dot1Q 30
R0(config-subif)#ip address 192.168.3.1 255.255.255.0 R0(config-subif)#no shutdown (2)打开端口
R0(config)#int f0/0
R0(config-if)#no shutdown (3)查看路由表 R0#show ip route (4)测试连通情况
使用ping命令测试各个PC之间的连通情况,记录结果。 PC及目标 连通情况 BG1-BG2 BG1-BG3 BG2-BG3 (5)设置访问控制 PC及目标 JW1-BG1 JW1-BG2 JW1-BG3 连通情况 PC及目标 XS1-BG1 XS1-BG2 XS1-BG3 XS1-JW1 连通情况 这里要求学生(VLAN 30)不能访问办公((VLAN 10),因此在子端口10做访问控制列表。
R0(config-if)#int f0/0.10
R0(config-subif)#ip access-group 101 in (101是访问控制列表编
号,范围为1-199)
R0(config-subif)#exit
R0(config)#access-list 101 deny ip any 192.168.3.0 0.0.0.255
R0(config)#access-list 101 permit ip any any (注意,这两句的顺序一定要正确,否则可能造成访问错误) (6)测试连通情况
使用ping命令测试各个PC之间的连通情况,看是否学生机不能访问办公机,其它访问正常。记录结果。 PC及目标 连通情况 BG1-BG2 BG1-BG3 BG2-BG3 五、实验总结 PC及目标 JW1-BG1 JW1-BG2 JW1-BG3 连通情况 PC及目标 XS1-BG1 XS1-BG2 XS1-BG3 XS1-JW1 连通情况 对实验结果进行分析, 对实验中进行的工作进行总结。 六、实验报告提交
将实验报告打印后提交(实验报告格式按照学校统一格式),同时通过电子邮件提交PT文件,PT文件名为:学号-姓名-交换机综合练习。
综合训练三
综合实训 四
综合实训 五
综合实训 六
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- huatuo3.cn 版权所有 湘ICP备2023017654号-3
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务