1、3方案设计与实施(1).子网划分和IP地址分配 首先设置默认网关为192.168.1.0,再分为三个子网分别为192.168.2.0,192.168.3.0,192.168.4.0,IP地址在子网的基础上进行划分,利用服务器的DHCP动态分配。子网IP地址子网掩码服务器192.168.1.0192.168.1.11255.255.255.01号楼192.168.20.0192.168.2.1-192.168.2.502号楼192.168.30.0192.168.3.2-192.168.0.2003号楼192.168.40.0192.168.4.3-192.168.0.50路由器192.168.
2、10.0192.168.1.20交换机1192.168.2.2交换机2192.168.3.3交换机3192.168.4.4(3)综合布线与拓扑结构(2)方案实施1)路由协议的选择仅仅使用默认路由协议2)路由器配置R1:RouterenRouter#conf tRouter(config)#hostname R1配置特权口令:R1(config)#enable s 123配置控制台口令:R1(config)#line con 0R1(config-line)#pass 123456R1(config-line)#login配置SSH安全外壳:R1(config)#ip domain-name y
3、aoR1(config)#crypto key generate rsa How many bits in the modulus 512: 1024R1(config)#username huang secret 123456R1(config)#line vty 0 4R1(config-line)#no transport inputR1(config-line)#transport input sshR1(config-line)#login localR1(config-line)#exitR1(config)#ip ssh time-out 15R1(config)#ip ssh
4、authentication-retries 2配置接口:R1(config)#int f0/0.10R1(config-subif)#encapsulation dot1Q 10R1(config-subif)#ip add 192.168.1.30 255.255.255.224R1(config-subif)#int f0/0.20R1(config-subif)#encapsulation dot1Q 20R1(config-subif)#ip add 192.168.0.254 255.255.255.0R1(config-subif)#int f0/0.30 R1(config-s
5、ubif)#encapsulation dot1Q 30R1(config-subif#ip add 192.168.1.78 255.255.255.240R1(config-subif)#int f0/0.40R1(config-subif)#encapsulation dot1Q 40R1(config-subif)#ip add 192.168.1.62 255.255.255.224R1(config-subif)#int f0/0.99R1(config-subif)#encapsulation dot1Q 99 nativeR1(config-subif)#ip add 192.
6、168.99.254 255.255.255.0R1(config-subif)#int f0/0R1(config-subif)#no shR1(config-subif)#int f0/1R1(config-subif)#ip add 192.168.3.2 255.255.255.252R1(config-subif)#int s1/0R1(config-subif)#ip add 10.0.0.2 255.255.255.252R1(config-subif)#clock rate 64000NAT地址转换:R1(config)#ip access-list R1ACL permit
7、R1(config-std-nacl)#permint 192.168.1.0 0.0.0.255R1(config-std-nacl)#exitR1(config)#ip nat inside source list ACL int s1/0 overloadR1(config)#int f0/0R1(config-if)#ip nat insideR1(config-if)#int f0/1R1(config-if)#int s1/0R1(config-if)#ip nat outside配置访问控制列表ACL:R1(config)#access-list 101 deny ip 192.
8、168.1.0 0.0.0.31 10.0.0.0 0.0.0.255R1(config)#access-list 101 permit ip any anyR1(config)#access-list 102 deny ip 192.168.0.0 0.0.0.1 10.0.0.0 0.0.0.255R1(config)#access-list 102 permit ip any anyR1(config)#access-list 104 deny ip 192.168.1.32 0.0.0.31 10.0.0.0 0.0.0.255R1(config)#access-list 104 pe
9、rmit ip any any R1(config-subif)#ip access-group 101 inR1(config-subif)#ip access-gourp 102 inR1(config-subif)#ip access-group 104 in配置默认路由:R1(config)#ip rou 0.0.0.0 0.0.0.0 s1/0DHCP服务:R1(config)#ip dhcp ex 192.168.1.30R1(config)#ip dhcp ex 192.168.0.254R1(config)#ip dhcp ex 192.168.1.78R1(config)#i
10、p dhcp ex 192.168.1.62R1(config)#ip dhcp ex 192.168.99.254R1(config)#ip dhcp pool LAN_AdministrationR1(config)#network 192.168.1.0 255.255.255.224 R1(config)#default-router 192.168.1.30R1(config)#ip dhcp pool LAN_R&DR1(config)#network 192.168.0.0 255.255.255.0R1(config)#default-router 192.168.0.254R
11、1(config)#ip dhcp pool LAN_SupplyR1(config)#network 192.168.1.64 255.255.255.240R1(config)#default-router 192.168.1.78R1(config)#ip dhcp pool LAN_WorkshopR1(config)#network 192.168.1.32 255.255.255.224R1(config)#default-router 192.168.1.623)交换机的配置交换机配置:配置远程登录密码,控制台密码以及特权模式密码:S1(config)#enable s 123S
12、1(config)#line con 0 S1(config-line)#pass 123S1(config-line)#loginS1(config-line)#line vty 0 15S2(config)#enable s 123S2(config)#line con 0 S2(config-line)#pass 123S2(config-line)#loginS2(config-line)#line vty 0 15S3(config)#enable s 123S3(config)#line con 0 S3(config-line)#pass 123S3(config-line)#l
13、oginS3(config-line)#line vty 0 15S4(config)#enable s 123S4(config)#line con 0 S4(config-line)#pass 123S4(config-line)#loginS4(config-line)#line vty 0 15S5(config)#enable s 123S5(config)#line con 0 S5(config-line)#pass 123S5(config-line)#loginS5(config-line)#line vty 0 15S6(config)#enable s 123S6(con
14、fig)#line con 0 S6(config-line)#pass 123S6(config-line)#loginS6(config-line)#line vty 0 15S7(config)#enable s 123S7(config)#line con 0 S7(config-line)#pass 123S7(config-line)#loginS7(config-line)#line vty 0 15S8(config)#enable s 123S8(config)#line con 0 S8(config-line)#pass 123S8(config-line)#loginS
15、8(config-line)#line vty 0 15S9(config)#enable s 123S9(config)#line con 0 S9(config-line)#pass 123S9(config-line)#loginS9(config-line)#line vty 0 15S10(config)#enable s 123S10(config)#line con 0 S10(config-line)#pass 123S10(config-line)#loginS10(config-line)#line vty 0 15将交换机S7配置成Server:S7(config)#vt
16、p mode serverS7(config)#vtp domain yaoS7(config)#vtp pass 123然后将其它交换机配置成Clint:S1(config)#vtp mode clintS1(config)#vtp domain yaoS1(config)#vtp pass 123S2(config)#vtp mode clintS2(config)#vtp domain yaoS2(config)#vtp pass 123S3(config)#vtp mode clintS3(config)#vtp domain yaoS3(config)#vtp pass 123S4(
17、config)#vtp mode clintS4(config)#vtp domain yaoS4(config)#vtp pass 123S5(config)#vtp mode clintS5(config)#vtp domain yaoS5(config)#vtp pass 123S6(config)#vtp mode clintS6(config)#vtp domain yaoS6(config)#vtp pass 123S7(config)#vtp mode clint将所有交换机互连的端口配置成为trunk链路:S1(config)#int r f0/2 - 3S1(config-i
18、f-range)#sw mo trS1(config-if-range)#sw trunk native vlan 99S2(config)#int r f0/2 - 7S2(config-if-range)#sw mo trS2(config-if-range)#sw trunk native vlan 99S3(config)#int r f0/2 - 3S3(config-if-range)#sw mo trS3(config-if-range)#sw trunk native vlan 99S4(config)#int r f0/2 - 3S4(config-if-range)#sw
19、mo trS4(config-if-range)#sw trunk native vlan 99S5(config)#int r f0/1 - 6 S5(config-if-range)#sw mo trS5(config-if-range)#sw trunk native vlan 99S6(config)#int r f0/1 - 6 S6(config-if-range)#sw mo trS6(config-if-range)#sw trunk native vlan 99S7(config)#int r f0/1 - 2S7(config-if-range)#sw mo trS7(co
20、nfig-if-range)#sw trunk native vlan 99S8(config)#int r f0/1 - 4S8(config-if-range)#sw mo trS8(config-if-range)#sw trunk native vlan 99S9(config)#int r f0/1 - 4S9(config-if-range)#sw mo trS9(config-if-range)#sw trunk native vlan 99S10(config)#int f0/1S10(config-if)#sw mo trS10(config-if)#sw trunk nat
21、ive vlan 99在Server交换机上创建vlan:S7(config)#vlan 10S7(config-vlan)#vlan 20S7(config-vlan)#vlan 30S7(config-vlan)#vlan 40S7(config-vlan)#vlan 99在Client交换机上划分vlan:S1(config)#int f0/1 (由于命令在模拟器上实现,简化用一个端口代表多个端口)S1(config-if)#sw mode accessS1(config-if)#sw access vlan 10S10(config-if)#sw mode accessS10(conf
22、ig-if)#sw access vlan 20S3(config)#int f0/1S3(config-if)#sw mode accessS3(config-if)#sw access vlan 30S4(config)#int f0/1S4(config-if)#sw mode accessS4(config-if)#sw access vlan 40配置交换机的边缘端口:S1(config)#spanning-tree portfast default S10(config)#spanning-tree portfast default S3(config)#spanning-tree
23、 portfast default S4(config)#spanning-tree portfast default 配置交换机的端口安全:S1(config)#int f0/1S1(config-if)#sw port-securityS1(config-if)#sw port-security mac-address stickyS10(config)#int f0/2S10(config-if)#sw port-securityS10(config-if)#sw port-security mac-address stickyS3(config-if)#sw port-security
24、S3(config-if)#sw port-security mac-address stickyS4(config-if)#sw port-securityS4(config-if)#sw port-security mac-address sticky在交换机上开启STP防护:S1(config-if)#spanning-tree bpduguard enableS10(config-if)#spanning-tree bpduguard enableS3(config-if)#spanning-tree bpduguard enableS4(config-if)#spanning-tree bpduguard enable(3)实验心得 在这次实验中,我得到了叶彦龙丶段程程同学的帮助,才得以完全完成本次实验,比如如何配置DHCP.ACL.NAT还有单臂路由的配置,通过此次实验,我发现我在实践能力上有所欠缺,所以我会加倍努力,学习好思科,望老师能多多指导指导我!
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1