IT评测·应用市场-qidao123.com技术社区

标题: 小型园区网实验作业 [打印本页]

作者: 宝塔山    时间: 2025-4-7 03:28
标题: 小型园区网实验作业

 
拓扑搭建:


 
实验需求:

1、按照图示的VLAN及IP地点需求,完成相关配置
2、要求SW1为VLAN 2/3的主根及网关
       SW2 为VLAN 20/30 的主根及主网关
    SW1和SW2互为备份
3、可以使用super vlan
4、上层通过静态路由协议完成数据通信过程
5、AR1为企业出口路由器
6、要求全网可达
 
需求分析:

1.生成树与网关设置:让 SW1 成为 VLAN 2/3 的主根及主网关,意味着在生成树协议(STP)中,SW1 在 VLAN 2/3 内优先级最高,且作为这两个 VLAN 内主机的默认网关 。使 SW2 成为 VLAN 20/30 的主根及主网关,原理同 SW1 在 VLAN 2/3 的设置 。SW1 和 SW2 互为备份,即当主根交换机出现故障时,备份交换机能迅速接替工作,需通过配置 STP 的备份机制(如设置符合的优先级、根路径开销等)来实现 。
2.路由配置:接纳静态路由协议,在路由器 AR1 及相关设备上配置路由条目,确保不同网段(包罗企业内部 VLAN 网段、与 ISP 连接网段)间数据可以或许准确转发 。
3.企业出口设置:将 AR1 配置为企业出口路由器,需设置 NAT(网络地点转换)功能,使企业内部私有 IP 地点可以或许转换为合法公网 IP 地点,实现与 ISP 网络及外部网络的通信。
 
配置命令:

  1. AR1:
  2. int g 0/0/1
  3. ip address  10.0.11.2 30
  4. int g 0/0/2
  5. ip address 10.0.12.2 30
  6. q
  7. ping 10.0.11.1
  8. ping 10.0.12.1
  9. ospf 1
  10. a 0
  11. network 10.0.11.2 0.0.0.0
  12. network 10.0.12.2 0.0.0.0
  13. q
  14. ip route-static 0.0.0.0 0 202.1.1.2
  15. ospf 1
  16. default-route-advertise
  17. q
  18. acl 2000
  19. rule permit source 10.0.0.0 0.0.255.255
  20. interface g 0/0/0
  21. nat outbound 2000
  22. ISP:
  23. sys
  24. interface g 0/0/0
  25. ip address  202.1.1.2 30
  26. q
  27. interface LoopBack 0
  28. ip address 100.100.100 32
  29. q
  30. LSW1:
  31. vlan batch 2 3 20 30
  32. interface Eth-Trunk 0
  33. trunkport g 0/0/1 to 0/0/2
  34. port link-type trunk
  35. port trunk allow-pass vlan 2 3 20 30
  36. q
  37. int g 0/0/3
  38. port link-type trunk
  39. port trunk allow-pass vlan 2 3 20 30
  40. int g 0/0/4
  41. port link-type trunk
  42. port trunk allow-pass vlan 2 3 20 30
  43. q
  44. display vlan
  45. stp enable
  46. stp mode mstp
  47. stp region-configuration
  48. region-name aa
  49. revision-level 100
  50. instance 1 vlan 2 3
  51. instance 2 vlan 20 30
  52. active region-configuration
  53. dispaly stp brief
  54. stp instance 1 root primary
  55. stp instance 2 root secondary
  56. dispaly stp brief
  57. interface Eth-Trunk 0
  58. q
  59. int g 0/0/3
  60. stp root-protection
  61. q
  62. interface Vlanif 2
  63. ip address 10.0.2.1 24
  64. vrrp vrid 1virtual-ip 10.0.2.254
  65. vrrp vrid 1 priority 120
  66. vrrp vrid 1 preempt-mode timer delay 20
  67. vrrp vrid 1 track interface g 0/0/5 reduced 30
  68. q
  69. interface Vlanif 2
  70. display this
  71. q
  72. interface Vlanif 3
  73. ip address 10.0.3.1 24
  74. vrrp vrid 1 virtual-ip 10.0.3.254
  75. vrrp vrid 1 priority 120
  76. vrrp vrid 1 preempt-mode timer delay 20
  77. vrrp vrid 1 track interface g 0/0/5 reduced 30
  78. display this
  79. interface Vlanif 20
  80. ip address 10.0.20.1 24
  81. vrrp vrid 1 virtual-ip 10.0.20.254
  82. int v 30
  83. ip address 10.0.30.1 24
  84. vrrp vrid 1 virtual-ip 10.0.30.254
  85. q
  86. display vrrp brief
  87. dhcp enable
  88. ip pool vlan 2
  89. network 10.0.2.0 mask 24
  90. gateway-list 10.0.2.254
  91. dns-list 8.8.8.8
  92. undo network
  93. network 10.0.2.0 mask 25
  94. undo gateway-list 10.0.2.254
  95. network 10.0.2.0 mask 25
  96. gateway-list 10.0.2.100
  97. interface vlanif 2
  98. vrrp vrid 1 virtual-ip 10.0.2.100
  99. q
  100. interface Vlanif 2
  101. dhcp select global
  102. q
  103. vlan 11
  104. q
  105. interface g 0/0/5
  106. port link-type access
  107. port default vlan 11
  108. q
  109. interface Vlanif 11
  110. ip address 10.0.11.1 30
  111. q
  112. ospf 1
  113. area 0
  114. network 10.0.2.1 0.0.0.0
  115. network 10.0.3.1 0.0.0.0
  116. network 10.0.11.1 0.0.0.0
  117. network 10.0.20.1 0.0.0.0
  118. network 10.0.30.1 0.0.0.0
  119. q
  120. silent-interface Vlanif 2
  121. silent-interface Vlanif 3
  122. silent-interface Vlanif 20
  123. silent-interface Vlanif 30
  124. vlan 13
  125. q
  126. interface Eth-Trunk 0
  127. port trunk allow-pass vlan 13
  128. dis this
  129. interface Vlanif 13
  130. ip address 10.0.13.1 30
  131. ospf 1
  132. network 10.0.13.1 0.0.0.0
  133. q
  134. LSW2:
  135. vlan batch 2 3 20 30
  136. interface Eth-Trunk 0
  137. trunkport g 0/0/1 to 0/0/2
  138. port link-type trunk
  139. port trunk allow-pass vlan 2 3 20 30
  140. q
  141. int g 0/0/3
  142. port link-type trunk
  143. port trunk allow-pass vlan 2 3 20 30
  144. int g 0/0/4
  145. port link-type trunk
  146. port trunk allow-pass vlan 2 3 20 30
  147. q
  148. stp enable
  149. stp mode mstp
  150. stp region-configuration
  151. region-name aa
  152. revision-level 100
  153. instance 1 vlan 2 3
  154. instance 2 vlan 20 30
  155. active region-configuration
  156. stp instance 1 root secondary
  157. stp instance 2 root primary
  158. interface Vlanif 2
  159. ip address 10.0.2.2 24
  160. vrrp vrid 1 virtual-ip 10.0.2.254
  161. q
  162. interface Vlanif 3
  163. ip address 10.0.3.2 24
  164. vrrp vrid 1 virtual-ip 10.0.3.254
  165. interface Vlanif 20
  166. ip address 10.0.20.2 24
  167. vrrp vrid 1 virtual-ip 10.0.20.254
  168. vrrp vrid 1 priority 120
  169. vrrp vrid 1 preempt-mode timer delay 20
  170. vrrp vrid 1 track interface g 0/0/5 reduced 30
  171. int v 30
  172. ip address 10.0.30.1 24
  173. vrrp vrid 1 virtual-ip 10.0.30.254
  174. display vrrp brief
  175. undo network
  176. network 10.0.2.128 mask 25
  177. vlan 12
  178. q
  179. int g 0/0/5
  180. po li a
  181. po de v 12
  182. q
  183. interface Vlanif 12
  184. ip address 10.0.12.1 30
  185. ospf 1
  186. area 0
  187. network 10.0.2.2 0.0.0.0
  188. network 10.0.3.2 0.0.0.0
  189. network 10.0.30.2 0.0.0.0
  190. network 10.0.12.1 0.0.0.0
  191. q
  192. silent-interface Vlanif 2
  193. silent-interface Vlanif 3
  194. silent-interface Vlanif 20
  195. silent-interface Vlanif 30
  196. vlan 13
  197. q
  198. interface Eth-Trunk 0
  199. po t alk
  200. po t al v 13
  201. q
  202. interface Vlanif 13
  203. ip address 10.0.13.2 30
  204. q
  205. ospf 1
  206. network 10.0.13.2 0.0.0.0
  207. q
  208. stp instance 0 root secondary
  209. ping 10.0.13.1
  210. LSW3:
  211. vlan batch 2 3 20 30
  212. interface g 0/0/1
  213. port link-type access
  214. port default vlan 2
  215. int g 0/0/2
  216. port link-type access
  217. port default vlan 3
  218. q
  219. int g 0/0/3
  220. port link-type trunk
  221. port trunk allow-pass vlan 2 3 20 30
  222. int g 0/0/4
  223. port link-type trunk
  224. port trunk all v 2 3 20 30
  225. q
  226. stp enable
  227. stp mode mstp
  228. stp region-configuration
  229. region-name aa
  230. revision-level 100
  231. instance 1 vlan 2 3
  232. instance 2 vlan 20 30
  233. active region-configuration
  234. display this
  235. int g 0/0/1
  236. stp edged-port enable
  237. LSW4:
  238. vlan batch 2 3 20 30
  239. interface g 0/0/1
  240. port link-type access
  241. port default vlan 20
  242. int g 0/0/2
  243. port link-type access
  244. port default vlan 30
  245. int g 0/0/3
  246. port link-type trunk
  247. port trunk allow-pass vlan 2 3 20 30
  248. int g 0/0/4
  249. port link-type trunk
  250. port trunk all v 2 3 20 30
  251. q
  252. stp enable
  253. stp mode mstp
  254. stp region-configuration
  255. region-name aa
  256. revision-level 100
  257. instance 1 vlan 2 3
  258. instance 2 vlan 20 30
  259. active region-configuration
复制代码
 
测试结果:

  1. PC1:
  2. ping 10.0.2.254
  3. ping  10.0.3.10
  4. ping 10.0.20.10
  5. ping 10.0.30.10
  6. ping 100.100.100.100
  7. AR1:
  8. ping 10.0.11.1
  9. ping 10.0.12.1
  10. LSW2:
  11. ping 10.0.13.1
复制代码
 

实验感悟:

        通过此次网络实验,收获颇丰。在VLAN与IP配置环节,准确规划与设置是网络有序通信的基石,任何疏漏都可能导致网络不通,这让我深知底子配置严谨性的关键。生成树与网关设置极具挑战,既要明确各交换机在不同VLAN中的主根与备份脚色,又要保障切换的实时性与稳固性。这不仅考验对生成树原理的明白,更需具备将理论转化为实际可靠配置的能力,让我对网络冗余备份机制有了更深刻认知。静态路由配置过程中,梳理各网段间的路径走向,准确设置路由条目,使我对网络层数据转发原理有了更透彻的领悟。而NAT配置实现内外网通信,仿佛搭建起一座连接企业与外部世界的桥梁,进一步拓宽了我对网络互联的认识。此次实验是理论与实践的深度交融,每一步配置都是对知识掌握水平的检验,每一次故障排查都是履历的积累。它不仅提升了我的实操能力,更让我学会从全局视角审阅网络架构,为未来在网络范畴的学习和工作筑牢根基。 
 

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 IT评测·应用市场-qidao123.com技术社区 (https://dis.qidao123.com/) Powered by Discuz! X3.4